dongke 2 yıl önce
ebeveyn
işleme
b3feeafb48

+ 1 - 13
src/main/java/com/dk/mdm/controller/common/CommonController.java

@@ -509,19 +509,7 @@ public class CommonController extends BaseController<Map<String, Object>> {
         return commonService.getServiceCategories(param);
     }
 
-    /**
-     * @desc : 获取仓库
-     * @author : 王英杰
-     * @date : 2024/2/26 10:36
-     */
-    @ApiOperation(
-            value = "获取账户类别",
-            notes = "获取账户类别"
-    )
-    @PostMapping("get_dictionarydata_by_page")
-    public ResponseResultVO<PageList<Map<String, Object>>> getDictionaryDataByPage(@RequestBody Map<String, Object> param) {
-        return commonService.getDictionaryDataByPage(param);
-    }
+
 }
 
 

+ 1 - 13
src/main/java/com/dk/mdm/mapper/common/CommonMapper.java

@@ -324,7 +324,7 @@ public interface CommonMapper extends BaseMapper<Map<String, Object>> {
 
     /**
      * @desc : 获取获取仓库档案个数
-     * @author : 洪旭东
+     * @author : 王英杰
      * @date : 2024/3/1 9:21
      */
     Long countWarehouseByPage(Map param);
@@ -365,18 +365,6 @@ public interface CommonMapper extends BaseMapper<Map<String, Object>> {
     List<Map<String, Object>> getServiceCategories(Map param);
 
 
-    /**
-     * @desc : 获取账户类别
-     * @author : 王英杰
-     * @date : 2024/3/1 9:21
-     */
-    List<Map<String, Object>> getDictionaryDataByPage(Map param);
 
-    /**
-     * @desc : 获取账户类别个数
-     * @author : 洪旭东
-     * @date : 2024/3/1 9:21
-     */
-    Long countDictionaryDataByPage(Map param);
 
 }

+ 25 - 60
src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

@@ -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>

+ 1 - 10
src/main/java/com/dk/mdm/service/common/CommonService.java

@@ -635,14 +635,5 @@ public class CommonService extends BaseService<Map<String, Object>> {
         return ResponseResultUtil.success(list);
     }
 
-    /**
-     * @desc : 获取仓库档案
-     * @author : 王英杰
-     * @date :2024/3/1 9:20
-     */
-    public ResponseResultVO<PageList<Map<String, Object>>> getDictionaryDataByPage(Map<String, Object> param) {
-        this.getLimit(param);
-        return super.mergeListWithCount(param, commonMapper.getDictionaryDataByPage(param),
-                commonMapper.countDictionaryDataByPage(param));
-    }
+
 }