瀏覽代碼

修改sql

zhangyuewww 3 年之前
父節點
當前提交
9bbc82cb98

+ 1 - 0
winsea-haixin-platform-backend/src/main/resources/application.yml

@@ -43,6 +43,7 @@ auth:
     - /saas/**/*
     - /ws/**/*
     - /commonUser/*
+    - /procurementPlanInfo/*
   expire-in: 36000
   login-url: /login.html
   logout-url: /auth/api/logout

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java

@@ -212,6 +212,7 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
         //  公司ID
         pageView.put("compId", AuthSecurityUtils.getCurrentUserInfo().getCompId());
         pageView.put("searchKeyWord", contractManagementInfo.getSearchKeyWord());
+        pageView.put("goodsType", contractManagementInfo.getGoodsType());
         pageView.put("startDate", contractManagementInfo.getStartDate());
         pageView.put("endDate", contractManagementInfo.getEndDate());
         pageView.put("searchType", contractManagementInfo.getSearchType());

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ProcurementPlanInfoServiceImpl.java

@@ -89,7 +89,7 @@ public class ProcurementPlanInfoServiceImpl extends ServiceImpl<ProcurementPlanI
         pageView.put("compId",procurementPlanInfo.getCompId());
         pageView.put("searchKeyWord",procurementPlanInfo.getSearchKeyWord());
         pageView.put("pcFlag",procurementPlanInfo.getPcFlag());
-        pageView.put("goodsName",procurementPlanInfo.getGoodsName());
+        pageView.put("receivePrivate",procurementPlanInfo.getReceivePrivate());
         pageView.put("pageSize",procurementPlanInfo.getPageSize());
         pageView.put("currentPage",procurementPlanInfo.getCurrentPage());
         // 查询采购订单总数

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/ContractManagementInfoMapper.xml

@@ -10,6 +10,7 @@
         left join contract_process_info p on m.id=p.contract_id
         WHERE
         m.comp_id = #{compId}
+        and m.goods_type= #{goodsType}
         and m.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
@@ -66,6 +67,7 @@
         left join contract_process_info p on m.id=p.contract_id
         WHERE
         m.comp_id = #{compId}
+        and m.goods_type= #{goodsType}
         and m.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">

+ 11 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/ProcurementPlanInfoMapper.xml

@@ -10,6 +10,10 @@
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(procurement_plan_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(title) like lower(CONCAT('%',#{searchKeyWord},'%')))
+            OR lower(goods_name) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="receivePrivate != null and receivePrivate != '' and receivePrivate != '全国'">
+            AND (lower(receive_private) like lower(CONCAT('%',#{receivePrivate},'%'))
         </if>
         <if test="pcFlag != null and pcFlag != ''">
             AND comp_id = #{compId}
@@ -21,11 +25,15 @@
         SELECT
         id,
         procurement_plan_no as procurementPlanNo,
+        procurement_plan_type as procurementPlanType,
         title as title,
         goods_name as goodsName,
         weight as weight,
         basis_price as basisPrice,
         unit_price as unitPrice,
+        receive_private as receivePrivate,
+        receive_city as receiveCity,
+        receive_area as receiveArea,
         receive_warehouse as receiveWarehouse,
         status as status,
         update_date as updateDate
@@ -34,9 +42,10 @@
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(procurement_plan_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(title) like lower(CONCAT('%',#{searchKeyWord},'%')))
+            OR lower(goods_name) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-        <if test="goodsName != null and goodsName != ''">
-            AND goods_name = #{goodsName}
+        <if test="receivePrivate != null and receivePrivate != '' and receivePrivate != '全国'">
+            AND (lower(receive_private) like lower(CONCAT('%',#{receivePrivate},'%'))
         </if>
         <if test="pcFlag != null and pcFlag != ''">
             AND comp_id = #{compId}