瀏覽代碼

问题修改

xiaochen 2 年之前
父節點
當前提交
01ae810a33

+ 4 - 0
src/main/java/com/tld/model/Storage.java

@@ -88,6 +88,10 @@ public class Storage implements Serializable {
      * 库位名称
      */
     private String storageLocationName;
+    /**
+     * 采购订单号
+     */
+    private String orderCode;
     /**
      * 开始时间
      */

+ 1 - 1
src/main/java/com/tld/service/impl/WarehousingServiceImpl.java

@@ -316,7 +316,7 @@ public class WarehousingServiceImpl implements WarehousingService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("物料名称", "物料编号", "供应商名称", "连番号", "生产日期", "生产批次", "容量", "序列号", "类型", "用户名称", "部门", "库位名称", "入库日期", "采购单号", "WBS","真实姓名");
+            List<Object> head = Arrays.asList("物料名称", "物料编号", "供应商名称", "连番号", "生产日期", "生产批次", "容量", "序列号", "类型", "用户名称", "部门", "库位名称", "入库日期", "采购单号", "WBS","真实姓名","采购订单号");
             //查询数据
             List<Map<String, Object>> list = new ArrayList<>(warehousingMapper.export(storage));
             sheetDataList.add(head);

+ 10 - 2
src/main/resources/mapper/WarehousingMapper.xml

@@ -221,7 +221,8 @@
         a.scrq,
         a.storage_code,
         a.wbs,
-        c.real_name as realName
+        c.real_name as realName,
+        a.order_code as orderCode
         from tld_storage a
         left join tld_material b on a.wllb_code = b.code
         left join tld_user c on a.user_id = c.id
@@ -250,6 +251,9 @@
             <if test="wbs != null and wbs != ''">
                 and a.wbs like CONCAT(CONCAT('%', #{wbs}), '%')
             </if>
+            <if test="orderCode != null and orderCode != ''">
+                and a.order_code like CONCAT(CONCAT('%', #{orderCode}), '%')
+            </if>
             <if test="supplierId != null and supplierId != ''">
                 and a.supplier_id = #{supplierId}
             </if>
@@ -303,7 +307,8 @@
         a.scrq,
         a.storage_code,
         a.wbs,
-        c.real_name as realName
+        c.real_name as realName,
+        a.order_code as orderCode
         from tld_storage a
         left join tld_material b on a.wllb_code = b.code
         left join tld_user c on a.user_id = c.id
@@ -332,6 +337,9 @@
             <if test="wbs != null and wbs != ''">
                 and a.wbs like CONCAT(CONCAT('%', #{wbs}), '%')
             </if>
+            <if test="orderCode != null and orderCode != ''">
+                and a.order_code like CONCAT(CONCAT('%', #{orderCode}), '%')
+            </if>
             <if test="supplierId != null and supplierId != ''">
                 and a.supplier_id = #{supplierId}
             </if>