|
|
@@ -492,6 +492,7 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+<!-- 查询商品档案-->
|
|
|
<select id="getGoodsBrand" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
tmgb.flg_valid AS "flgValid",
|
|
|
@@ -503,18 +504,16 @@
|
|
|
FROM dkic_b.t_mst_goods_brand tmgb
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND tmgb.brand_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ AND tmgb.brand_name LIKE concat('%',my_ex.likequery(#{searchText}), '%')
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
- AND cp_id = #{cpId}
|
|
|
+ AND tmgb.cp_id = #{cpId}
|
|
|
</if>
|
|
|
</where>
|
|
|
- order by display_no asc
|
|
|
+ order by tmgb.display_no asc
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
|
</if>
|
|
|
-
|
|
|
-
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询表t_mst_goods_brand,(条件查询)个数 -->
|
|
|
@@ -527,10 +526,11 @@
|
|
|
AND tmgb.brand_name LIKE concat('%', #{searchText}, '%')
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
- AND cp_id = #{cpId}
|
|
|
+ AND tmgb.cp_id = #{cpId}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+<!-- 查询商品种类-->
|
|
|
<select id="getGoodsCategory" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
cat_id AS "catId",
|
|
|
@@ -541,8 +541,8 @@
|
|
|
FROM dkic_b.t_mst_goods_category
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND ( cat_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
+ AND ( cat_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
+ or remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -554,6 +554,7 @@
|
|
|
</if>
|
|
|
|
|
|
</select>
|
|
|
+<!-- 查询商品种类的个数-->
|
|
|
<select id="countGoodsCategory" resultType="java.lang.Long">
|
|
|
SELECT
|
|
|
count(1)
|
|
|
@@ -568,6 +569,7 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+<!-- 查询商品系列-->
|
|
|
<select id="getGoodsSeries" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
series_id AS "seriesId",
|
|
|
@@ -577,8 +579,8 @@
|
|
|
FROM dkic_b.t_mst_goods_series
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND ( series_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
+ AND ( series_name LIKE concat('%',my_ex.likequery(#{searchText}), '%')
|
|
|
+ or remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -590,14 +592,15 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+<!-- 商品系列个数-->
|
|
|
<select id="countGoodsSeries" resultType="java.lang.Long">
|
|
|
SELECT
|
|
|
count(1)
|
|
|
FROM dkic_b.t_mst_goods_series
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND ( series_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
+ AND ( series_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
+ or remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -605,6 +608,7 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
+<!-- 获取计量单位-->
|
|
|
<select id="getUnit" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
unit_id AS "unitId",
|
|
|
@@ -615,8 +619,8 @@
|
|
|
FROM dkic_b.t_mst_unit
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND ( unit_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
+ AND ( unit_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
+ or remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -628,14 +632,15 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+<!-- 获取计量单位个数-->
|
|
|
<select id="countUnit" resultType="java.lang.Long">
|
|
|
SELECT
|
|
|
count(1)
|
|
|
FROM dkic_b.t_mst_unit
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND ( unit_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
+ AND ( unit_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
+ or remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -655,8 +660,8 @@
|
|
|
FROM dkic_b.t_mst_warehouse
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND ( wh_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
+ AND ( wh_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
+ or remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -675,8 +680,8 @@
|
|
|
FROM dkic_b.t_mst_warehouse
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND ( wh_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
+ AND ( wh_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
+ or remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -765,46 +770,6 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
- <select id="getDictionaryDataByPage" resultType="java.util.Map">
|
|
|
- SELECT
|
|
|
- data_id AS dataId,
|
|
|
- dict_code AS dictCode,
|
|
|
- data_code AS dataCode,
|
|
|
- data_value AS dataValue
|
|
|
- FROM dkic_b.t_mst_dictionary_data
|
|
|
- <where>
|
|
|
- dict_code = '账户类别'
|
|
|
- <if test="searchText !=null">
|
|
|
- AND ( mac_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
- </if>
|
|
|
- <if test="cpId != null">
|
|
|
- AND cp_id = #{cpId}
|
|
|
- </if>
|
|
|
|
|
|
- </where>
|
|
|
- order by CASE WHEN flg_default = true THEN 0 ELSE 1 END, display_no
|
|
|
- <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
- limit #{end} offset #{start}
|
|
|
- </if>
|
|
|
-
|
|
|
-
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="countDictionaryDataByPage" resultType="java.lang.Long">
|
|
|
- SELECT
|
|
|
- count(1)
|
|
|
- FROM dkic_b.t_mst_dictionary_data
|
|
|
- <where>
|
|
|
- <if test="searchText !=null">
|
|
|
- AND ( mac_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
- </if>
|
|
|
- <if test="cpId != null">
|
|
|
- AND cp_id = #{cpId}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
-
|
|
|
- </select>
|
|
|
|
|
|
</mapper>
|