xiongchao 3 年之前
父节点
当前提交
ff45a9fe6c

+ 10 - 0
platform-dao/src/main/java/com/platform/dao/dto/sb/SbInfoDTO.java

@@ -427,4 +427,14 @@ public class SbInfoDTO extends BaseDTO implements Serializable {
      * 是否过滤数据,查询主子数据
      */
     private Boolean parentSearch;
+
+    /**
+     * 有效期搜索开始时间
+     */
+    private LocalDate nextCheckDateStart;
+
+    /**
+     * 有效期搜索结束时间
+     */
+    private LocalDate nextCheckDateEnd;
 }

+ 12 - 4
platform-dao/src/main/java/com/platform/dao/dto/sqarepartmanage/SparePartInfoDTO.java

@@ -117,10 +117,6 @@ public class SparePartInfoDTO extends BaseDTO implements Serializable {
      */
     private String initNo;
 
-    /**
-   * 生产商
-   */
-    private String producerId;
     /**
    * 计量单位: 1-件;2-台;3-条; 4-个
    */
@@ -145,10 +141,22 @@ public class SparePartInfoDTO extends BaseDTO implements Serializable {
      * 初始库存
      */
     private BigDecimal initStock;
+    /**
+     * 生产商
+     */
+    private String producerId;
     /**
      * 采购供应商
      */
     private String supplierId;
+    /**
+     * 生产商
+     */
+    private String producerName;
+    /**
+     * 采购供应商
+     */
+    private String supplierName;
     /**
      * 使用周期:月
      */

+ 12 - 0
platform-dao/src/main/resources/mapper/sb/SbInfoMapper.xml

@@ -212,6 +212,12 @@
         <if test="saveUser != null">
             and sb.save_user = #{saveUser}
         </if>
+        <if test="nextCheckDateStart != null">
+            and sb.next_check_date <![CDATA[ >= ]]> #{nextCheckDateStart}
+        </if>
+        <if test="nextCheckDateEnd != null">
+            and sb.next_check_date <![CDATA[ <= ]]> #{nextCheckDateEnd}
+        </if>
         <if test="status != null">
             and sb.status = #{status}
         </if>
@@ -305,6 +311,12 @@
         <if test="useGroup != null">
             and sb.use_group = #{useGroup}
         </if>
+        <if test="nextCheckDateStart != null">
+            and sb.next_check_date <![CDATA[ >= ]]> #{nextCheckDateStart}
+        </if>
+        <if test="nextCheckDateEnd != null">
+            and sb.next_check_date <![CDATA[ <= ]]> #{nextCheckDateEnd}
+        </if>
         <if test="saveDept != null">
             and sb.save_dept = #{saveDept}
         </if>

+ 13 - 2
platform-dao/src/main/resources/mapper/sqarepartmanage/SparePartInfoMapper.xml

@@ -77,9 +77,21 @@
         select info.*
         from t_spare_part_info info
         <if test="storeId != null and storeId != ''">
-           LEFT JOIN t_spare_store spare on  spare.spare_id = info.id
+           LEFT JOIN t_spare_store spare on spare.spare_id = info.id
+        </if>
+        <if test="producerName != null and producerName != ''">
+            LEFT JOIN t_firm_producer producer on producer.id = info.producer_id
+        </if>
+        <if test="supplierName != null and supplierName != ''">
+            LEFT JOIN t_supplier supplier on supplier.id = info.supplier_id
         </if>
         <where>
+            <if test="producerName != null and producerName != ''">
+                AND producer.name like concat('%',#{producerName},'%')
+            </if>
+            <if test="supplierName != null and supplierName != ''">
+                AND supplier.name like concat('%',#{supplierName},'%')
+            </if>
             <if test="keyword != null and keyword != ''">
                 AND ( info.name like concat('%',#{keyword},'%') or
                 info.no like concat('%',#{keyword},'%'))
@@ -96,7 +108,6 @@
             <if test="yt != null">
                 AND info.yt=#{yt}
             </if>
-
             <if test="storeId != null and storeId != ''">
                 AND spare.store_id=#{storeId}
             </if>