|
@@ -130,6 +130,12 @@
|
|
|
<if test="orgId != null">
|
|
<if test="orgId != null">
|
|
|
AND org_id != #{orgId}
|
|
AND org_id != #{orgId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="orgCode != null">
|
|
|
|
|
+ AND org_code LIKE concat('%',my_ex.likequery(#{orgCode}),'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="orgName != null">
|
|
|
|
|
+ AND org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
|
|
|
|
|
+ </if>
|
|
|
order by display_no
|
|
order by display_no
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -331,10 +337,10 @@
|
|
|
where tmgs.flg_valid
|
|
where tmgs.flg_valid
|
|
|
AND tmgs.cp_id = #{cpId}
|
|
AND tmgs.cp_id = #{cpId}
|
|
|
<if test="skuCode != null">
|
|
<if test="skuCode != null">
|
|
|
- AND tmgs.sku_code = #{skuCode}
|
|
|
|
|
|
|
+ AND tmgs.sku_code LIKE concat('%',my_ex.likequery(#{skuCode}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="skuName != null">
|
|
<if test="skuName != null">
|
|
|
- AND tmgs.sku_name = #{skuName}
|
|
|
|
|
|
|
+ AND tmgs.sku_name LIKE concat('%',my_ex.likequery(#{skuName}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -346,10 +352,63 @@
|
|
|
where tmgs.flg_valid
|
|
where tmgs.flg_valid
|
|
|
AND tmgs.cp_id = #{cpId}
|
|
AND tmgs.cp_id = #{cpId}
|
|
|
<if test="skuCode != null">
|
|
<if test="skuCode != null">
|
|
|
- AND tmgs.sku_code = #{skuCode}
|
|
|
|
|
|
|
+ AND tmgs.sku_code LIKE concat('%',my_ex.likequery(#{skuCode}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="skuName != null">
|
|
<if test="skuName != null">
|
|
|
- AND tmgs.sku_name = #{skuName}
|
|
|
|
|
|
|
+ AND tmgs.sku_name LIKE concat('%',my_ex.likequery(#{skuName}),'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 获取商品 -->
|
|
|
|
|
+ <select id="getGoodsForOrder" resultType="java.util.Map">
|
|
|
|
|
+ select tmgs.sku_id as "skuId",
|
|
|
|
|
+ tmgs.sku_code as "skuCode",
|
|
|
|
|
+ tmgs.sku_name as "skuName",
|
|
|
|
|
+ tmgs.sku_model as "skuModel",
|
|
|
|
|
+ tmgs.brand_id as "brandId",
|
|
|
|
|
+ tmgb.brand_name as "brandName",
|
|
|
|
|
+ tmgs.category_id as "categoryId",
|
|
|
|
|
+ tmgc.cat_name as "categoryName",
|
|
|
|
|
+ tmgs.unit_id as "unitId",
|
|
|
|
|
+ tmgu.unit_name as "unitName",
|
|
|
|
|
+ tmgs.sub_unit_id as "subUnitId",
|
|
|
|
|
+ tmgs.conversion_factor as "conversionFactor",
|
|
|
|
|
+ tmgs.series_id as "seriesId",
|
|
|
|
|
+ tmgseries.series_name as "seriesName",
|
|
|
|
|
+ tmgs.sku_spec as "skuSpec",
|
|
|
|
|
+ tmgs.price_purchase as "pricePurchase",
|
|
|
|
|
+ tmgs.price_standard as "priceStandard",
|
|
|
|
|
+ tmgs.price_wholesale as "priceWholesale",
|
|
|
|
|
+ tmgs.price_limited as "priceLimited",
|
|
|
|
|
+ tmgs.sku_images as "skuImages",
|
|
|
|
|
+ tmgs.remarks
|
|
|
|
|
+ from dkic_b.t_mst_goods_sku as tmgs
|
|
|
|
|
+ left join dkic_b.t_mst_goods_brand as tmgb on tmgs.brand_id = tmgb.brand_id
|
|
|
|
|
+ left join dkic_b.t_mst_goods_category as tmgc on tmgs.category_id = tmgc.cat_id
|
|
|
|
|
+ left join dkic_b.t_mst_goods_series as tmgseries on tmgs.series_id = tmgseries.series_id
|
|
|
|
|
+ left join dkic_b.t_mst_unit as tmgu on tmgs.unit_id = tmgu.unit_id
|
|
|
|
|
+ where tmgs.flg_valid
|
|
|
|
|
+ AND tmgs.cp_id = #{cpId}
|
|
|
|
|
+ <if test="skuCode != null">
|
|
|
|
|
+ AND tmgs.sku_code LIKE concat('%',my_ex.likequery(#{skuCode}),'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuName != null">
|
|
|
|
|
+ AND tmgs.sku_name LIKE concat('%',my_ex.likequery(#{skuName}),'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 获取商品个数 -->
|
|
|
|
|
+ <select id="getGoodsForOrderCountByPage" resultType="Long">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ count(1)
|
|
|
|
|
+ from dkic_b.t_mst_goods_sku as tmgs
|
|
|
|
|
+ where tmgs.flg_valid
|
|
|
|
|
+ AND tmgs.cp_id = #{cpId}
|
|
|
|
|
+ <if test="skuCode != null">
|
|
|
|
|
+ AND tmgs.sku_code LIKE concat('%',my_ex.likequery(#{skuCode}),'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuName != null">
|
|
|
|
|
+ AND tmgs.sku_name LIKE concat('%',my_ex.likequery(#{skuName}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -437,13 +496,13 @@
|
|
|
from dkic_b.t_mst_supplier tms
|
|
from dkic_b.t_mst_supplier tms
|
|
|
where tms.cp_id = #{cpId}
|
|
where tms.cp_id = #{cpId}
|
|
|
<if test="supplierName!=null and supplierName!=''">
|
|
<if test="supplierName!=null and supplierName!=''">
|
|
|
- AND tms.sup_name LIKE concat('%', #{supplierName}, '%')
|
|
|
|
|
|
|
+ AND tms.sup_name LIKE concat('%',my_ex.likequery(#{supplierName}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="supplierCode!=null and supplierCode!=''">
|
|
<if test="supplierCode!=null and supplierCode!=''">
|
|
|
- AND tms.sup_code LIKE concat('%', #{supplierCode}, '%')
|
|
|
|
|
|
|
+ AND tms.sup_code LIKE concat('%',my_ex.likequery(#{supplierCode}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="supplierType!=null and supplierType!=''">
|
|
<if test="supplierType!=null and supplierType!=''">
|
|
|
- AND tms.sup_type LIKE concat('%', #{supplierType}, '%')
|
|
|
|
|
|
|
+ AND tms.sup_type LIKE concat('%',my_ex.likequery(#{supplierType}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
order by tms.sup_code
|
|
order by tms.sup_code
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|