Browse Source

添加筛选条件

zhangyuewww 3 years ago
parent
commit
ca64bdb215

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

@@ -88,6 +88,7 @@ public class ProcurementPlanInfoServiceImpl extends ServiceImpl<ProcurementPlanI
         //公司id
         pageView.put("compId",procurementPlanInfo.getCompId());
         pageView.put("searchKeyWord",procurementPlanInfo.getSearchKeyWord());
+        pageView.put("goodsName",procurementPlanInfo.getGoodsName());
         pageView.put("pageSize",procurementPlanInfo.getPageSize());
         pageView.put("currentPage",procurementPlanInfo.getCurrentPage());
         // 查询采购订单总数

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

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.ProcurementPlanInfoMapper">
-    <!-- 获得采购订单总数 -->
+    <!-- 获得采购计划总数 -->
     <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
         SELECT
         COUNT(id)
@@ -14,7 +14,7 @@
             OR lower(title) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
     </select>
-    <!-- 获得采购订单列表 -->
+    <!-- 获得采购计划列表 -->
     <select id="getListByCondition" parameterType="Map"
             resultType="com.yh.saas.plugin.yiliangyiyun.entity.ProcurementPlanInfo">
         SELECT
@@ -36,6 +36,9 @@
             AND (lower(procurement_plan_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(title) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
+        <if test="goodsName != null and goodsName != ''">
+            AND (lower(goods_name) like lower(CONCAT('%',#{goodsName},'%'))
+        </if>
         ORDER BY status DESC , update_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}