huangfuli 2 vuotta sitten
vanhempi
commit
f16d228dff

+ 4 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ExportVView.java

@@ -31,6 +31,10 @@ public class ExportVView {
      * 合同号
      */
     private String contractNo;
+    /**
+     * 入库任务编号
+     */
+    private String warehousingTaskNo;
     /**
      * 出入库类型
      */

+ 77 - 79
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -2169,12 +2169,12 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(3, 12 * 256 + 184);
         sheet.setColumnWidth(4, "开票日期".getBytes().length * 2 * 256);
         sheet.setColumnWidth(5, "合同编号".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(6, "务编号".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(7, 12 * 256 + 184);
+        sheet.setColumnWidth(6, "务编号".getBytes().length * 2 * 256);
+        sheet.setColumnWidth(7, "业务编号".getBytes().length * 2 * 256);
         sheet.setColumnWidth(8, 12 * 256 + 184);
         sheet.setColumnWidth(9, 12 * 256 + 184);
-        sheet.setColumnWidth(10, "货名".getBytes().length * 3 * 256);
-        sheet.setColumnWidth(11, 12 * 256 + 184);
+        sheet.setColumnWidth(10, 12 * 256 + 184);
+        sheet.setColumnWidth(11, "货名".getBytes().length * 3 * 256);
         sheet.setColumnWidth(12, 12 * 256 + 184);
         sheet.setColumnWidth(13, 12 * 256 + 184);
         sheet.setColumnWidth(14, 12 * 256 + 184);
@@ -2419,8 +2419,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell = rowp.createCell(19);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(20);
-        cell.setCellValue(dataList.size());
-        cell.setCellStyle(styleDetail1);
+        cell.setCellStyle(styleDetail);
         cell = rowp.createCell(21);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(22);
@@ -2493,49 +2492,49 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellValue("合同编号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(6);
-        cell.setCellValue("务编号");
+        cell.setCellValue("入库任务编号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(7);
-        cell.setCellValue("入库类型");
+        cell.setCellValue("业务编号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(8);
-        cell.setCellValue("客户");
+        cell.setCellValue("入库类型");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(9);
-        cell.setCellValue("供应商");
+        cell.setCellValue("客户");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(10);
-        cell.setCellValue("货名");
+        cell.setCellValue("供应商");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(11);
-        cell.setCellValue("类型");
+        cell.setCellValue("货名");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(12);
-        cell.setCellValue("等级");
+        cell.setCellValue("类型");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(13);
-        cell.setCellValue("容重");
+        cell.setCellValue("等级");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(14);
-        cell.setCellValue("水分");
+        cell.setCellValue("容重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(15);
-        cell.setCellValue("霉变粒");
+        cell.setCellValue("水分");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(16);
-        cell.setCellValue("杂质");
+        cell.setCellValue("霉变粒");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(17);
-        cell.setCellValue("热损伤");
+        cell.setCellValue("杂质");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(18);
-        cell.setCellValue("不完善粒");
+        cell.setCellValue("热损伤");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(19);
-        cell.setCellValue("车牌号");
+        cell.setCellValue("不完善粒");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(20);
-        cell.setCellValue("车");
+        cell.setCellValue("车牌号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(21);
         cell.setCellValue("箱号1");
@@ -2648,61 +2647,61 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 }
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(6);
-                cell.setCellValue(editString(exportVView.getPaymentNo()));
+                cell.setCellValue(editString(exportVView.getWarehousingTaskNo()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(7);
-                cell.setCellValue(editString(exportVView.getInOutType()));
+                cell.setCellValue(editString(exportVView.getPaymentNo()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(8);
-                cell.setCellValue(editString(exportVView.getCustomerName()));
+                cell.setCellValue(editString(exportVView.getInOutType()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(9);
-                cell.setCellValue(editString(exportVView.getSupplier()));
+                cell.setCellValue(editString(exportVView.getCustomerName()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(10);
-                cell.setCellValue(editString(exportVView.getGoodsName()));
+                cell.setCellValue(editString(exportVView.getSupplier()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(11);
-                cell.setCellValue(editString(exportVView.getType()));
+                cell.setCellValue(editString(exportVView.getGoodsName()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(12);
-                cell.setCellValue(editString(exportVView.getGrade()));
+                cell.setCellValue(editString(exportVView.getType()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(13);
+                cell.setCellValue(editString(exportVView.getGrade()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(14);
                 if (!StringUtils.isEmpty(exportVView.getBulkDensity())) {
                     cell.setCellValue(Double.parseDouble(exportVView.getBulkDensity()));
                 }
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(14);
+                cell = rowx.createCell(15);
                 if (!StringUtils.isEmpty(exportVView.getWaterContent())) {
                     cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()));
                 }
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(15);
+                cell = rowx.createCell(16);
                 if (!StringUtils.isEmpty(exportVView.getMildewGrain())) {
                     cell.setCellValue(Double.parseDouble(exportVView.getMildewGrain()));
                 }
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(16);
+                cell = rowx.createCell(17);
                 if (!StringUtils.isEmpty(exportVView.getImpurity())) {
                     cell.setCellValue(Double.parseDouble(exportVView.getImpurity()));
                 }
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(17);
+                cell = rowx.createCell(18);
                 if (!StringUtils.isEmpty(exportVView.getJiaorenli())) {
                     cell.setCellValue(Double.parseDouble(exportVView.getJiaorenli()));
                 }
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(18);
+                cell = rowx.createCell(19);
                 if (!StringUtils.isEmpty(exportVView.getImperfectGrain())) {
                     cell.setCellValue(Double.parseDouble(exportVView.getImperfectGrain()));
                 }
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(19);
-                cell.setCellValue(editString(exportVView.getCarNo()));
-                cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(20);
-                cell.setCellValue("1");
+                cell.setCellValue(editString(exportVView.getCarNo()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(21);
                 cell.setCellValue(editString(exportVView.getBoxNo()));
@@ -3056,12 +3055,12 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(3, 12 * 256 + 184);
         sheet.setColumnWidth(4, "开票日期".getBytes().length * 2 * 256);
         sheet.setColumnWidth(5, "合同编号".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(6, "务编号".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(7, 12 * 256 + 184);
+        sheet.setColumnWidth(6, "务编号".getBytes().length * 2 * 256);
+        sheet.setColumnWidth(7, "业务编号".getBytes().length * 2 * 256);
         sheet.setColumnWidth(8, 12 * 256 + 184);
         sheet.setColumnWidth(9, 12 * 256 + 184);
-        sheet.setColumnWidth(10, "货名".getBytes().length * 3 * 256);
-        sheet.setColumnWidth(11, 12 * 256 + 184);
+        sheet.setColumnWidth(10, 12 * 256 + 184);
+        sheet.setColumnWidth(11, "货名".getBytes().length * 3 * 256);
         sheet.setColumnWidth(12, 12 * 256 + 184);
         sheet.setColumnWidth(13, 12 * 256 + 184);
         sheet.setColumnWidth(14, 12 * 256 + 184);
@@ -3302,8 +3301,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell = rowp.createCell(19);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(20);
-            cell.setCellValue(dataList.size());
-            cell.setCellStyle(styleDetail1);
+            cell.setCellStyle(styleDetail);
             cell = rowp.createCell(21);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(22);
@@ -3377,49 +3375,49 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellValue("合同编号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(6);
-        cell.setCellValue("务编号");
+        cell.setCellValue("入库任务编号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(7);
-        cell.setCellValue("入库类型");
+        cell.setCellValue("业务编号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(8);
-        cell.setCellValue("客户");
+        cell.setCellValue("入库类型");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(9);
-        cell.setCellValue("供应商");
+        cell.setCellValue("客户");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(10);
-        cell.setCellValue("货名");
+        cell.setCellValue("供应商");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(11);
-        cell.setCellValue("类型");
+        cell.setCellValue("货名");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(12);
-        cell.setCellValue("等级");
+        cell.setCellValue("类型");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(13);
-        cell.setCellValue("水分");
+        cell.setCellValue("等级");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(14);
-        cell.setCellValue("杂质");
+        cell.setCellValue("容重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(15);
-        cell.setCellValue("霉变粒");
+        cell.setCellValue("水分");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(16);
-        cell.setCellValue("不完善粒");
+        cell.setCellValue("霉变粒");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(17);
-        cell.setCellValue("容重");
+        cell.setCellValue("杂质");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(18);
         cell.setCellValue("热损伤");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(19);
-        cell.setCellValue("车牌号");
+        cell.setCellValue("不完善粒");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(20);
-        cell.setCellValue("车");
+        cell.setCellValue("车牌号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(21);
         cell.setCellValue("箱号1");
@@ -3524,49 +3522,47 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 }
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(6);
-                cell.setCellValue(editString(exportVView.getPaymentNo()));
+                cell.setCellValue(editString(exportVView.getWarehousingTaskNo()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(7);
-                cell.setCellValue(editString(exportVView.getInOutType()));
+                cell.setCellValue(editString(exportVView.getPaymentNo()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(8);
-                cell.setCellValue(editString(exportVView.getCustomerName()));
+                cell.setCellValue(editString(exportVView.getInOutType()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(9);
-                cell.setCellValue(editString(exportVView.getSupplier()));
+                cell.setCellValue(editString(exportVView.getCustomerName()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(10);
-                cell.setCellValue(editString(exportVView.getGoodsName()));
+                cell.setCellValue(editString(exportVView.getSupplier()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(11);
-                cell.setCellValue(editString(exportVView.getType()));
+                cell.setCellValue(editString(exportVView.getGoodsName()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(12);
-                cell.setCellValue(editString(exportVView.getGrade()));
+                cell.setCellValue(editString(exportVView.getType()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(13);
-                if (!StringUtils.isEmpty(exportVView.getWaterContent())) {
-                    cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()));
-                }
-                cell.setCellStyle(contextstyle);
+                cell.setCellValue(editString(exportVView.getGrade()));
+                cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(14);
-                if (!StringUtils.isEmpty(exportVView.getImpurity())) {
-                    cell.setCellValue(Double.parseDouble(exportVView.getImpurity()));
+                if (!StringUtils.isEmpty(exportVView.getBulkDensity())) {
+                    cell.setCellValue(Double.parseDouble(exportVView.getBulkDensity()));
                 }
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(15);
-                if (!StringUtils.isEmpty(exportVView.getMildewGrain())) {
-                    cell.setCellValue(Double.parseDouble(exportVView.getMildewGrain()));
+                if (!StringUtils.isEmpty(exportVView.getWaterContent())) {
+                    cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()));
                 }
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(16);
-                if (!StringUtils.isEmpty(exportVView.getImperfectGrain())) {
-                    cell.setCellValue(Double.parseDouble(exportVView.getImperfectGrain()));
+                if (!StringUtils.isEmpty(exportVView.getMildewGrain())) {
+                    cell.setCellValue(Double.parseDouble(exportVView.getMildewGrain()));
                 }
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(17);
-                if (!StringUtils.isEmpty(exportVView.getBulkDensity())) {
-                    cell.setCellValue(Double.parseDouble(exportVView.getBulkDensity()));
+                if (!StringUtils.isEmpty(exportVView.getImpurity())) {
+                    cell.setCellValue(Double.parseDouble(exportVView.getImpurity()));
                 }
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(18);
@@ -3575,10 +3571,12 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 }
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(19);
-                cell.setCellValue(editString(exportVView.getCarNo()));
-                cell.setCellStyle(styleDetail);
+                if (!StringUtils.isEmpty(exportVView.getImperfectGrain())) {
+                    cell.setCellValue(Double.parseDouble(exportVView.getImperfectGrain()));
+                }
+                cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(20);
-                cell.setCellValue("1");
+                cell.setCellValue(editString(exportVView.getCarNo()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(21);
                 cell.setCellValue(editString(exportVView.getBoxNo()));

+ 10 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseBaseInfoMapper.xml

@@ -40,6 +40,7 @@
         q.bin_number as binNumber,
         a.settlement_date as createDate,
         a.contract_no as contractNo,
+        iowt.in_out_task_no as warehousingTaskNo,
         a.payment_no as paymentNo,
         a.customer_name as customerName,
         '收购入库' as inOutType,
@@ -86,8 +87,9 @@
         left join common_company c on c.comp_id = a.comp_id and c.delete_flag = 0
         left join identity_authentication_info i on i.customer_name = a.customer_name
         and i.customer_phone = a.customer_phone and i.customer_type_flag = 1 and i.delete_flag = 0 and i.cover = 0
-        left join common_company_identity cci on cci.com_id = a.comp_id and cci.delete_flag = 0
-        and cci.identity_id = i.id
+        left join common_company_identity cci on cci.com_id = a.comp_id and cci.delete_flag = 0 and cci.identity_id = i.id
+        left join in_out_warehouse_task iowt on iowt.comp_id = a.comp_id and iowt.delete_flag = 0 and iowt.contract_no = a.contract_no
+        and iowt.approve_status is null and iowt.in_out_type = '收购入库'
         WHERE a.delete_flag = '0'
         AND a.comp_id = #{compId}
         AND a.management_type = '1'
@@ -111,6 +113,7 @@
         w.bin_number as binNumber,
         w.update_date as createDate,
         s.contract_no as contractNo,
+        iowt.in_out_task_no as warehousingTaskNo,
         '' as paymentNo,
         m.seller as customerName,
         '采购入库' as inOutType,
@@ -152,6 +155,7 @@
         i.bank_deposit_branch as bankDepositBranch
         FROM stock_purchase_receipt_report s
         left join warehouse_in_out_info w on w.id = s.warehouse_record_id and w.delete_flag = 0
+        left join in_out_warehouse_task iowt on iowt.in_out_task_no = w.in_out_task_no and iowt.delete_flag = 0
         left join quality_inspection_management q on q.warehouse_in_out_id = w.id and q.delete_flag = 0
         left join warehouse_in_out_detail wd on wd.info_id = w.id
         left join tran_car_info t on t.contract_no = w.contract_no and t.delete_flag = 0 and t.tran_car_no = w.tran_car_no and t.car_no = w.car_no
@@ -182,6 +186,7 @@
         w.bin_number as binNumber,
         w.update_date as createDate,
         w.contract_no as contractNo,
+        iowt.in_out_task_no as warehousingTaskNo,
         '' as paymentNo,
         IFNULL(cmi.seller,'') as customerName,
         '移库入库' as inOutType,
@@ -238,6 +243,7 @@
         left join warehouse_in_out_info wi on t.contract_no = wi.contract_no and wi.delete_flag = 0 and t.tran_car_no = wi.tran_car_no and t.car_no = wi.car_no and wi.in_out_flag = 1
         left join tran_settlement_report r on r.car_id = t.id and r.delete_flag = 0
         left join contract_management_info cmi on cmi.contract_no = wi.warehouse_name and cmi.delete_flag = 0
+        left join in_out_warehouse_task iowt on iowt.in_out_task_no = w.in_out_task_no and iowt.delete_flag = 0
         WHERE w.delete_flag = '0'
         AND b.comp_id = #{compId}
         and w.in_out_flag = 2
@@ -263,6 +269,7 @@
         w.bin_number as binNumber,
         w.update_date as createDate,
         w.contract_no as contractNo,
+        iowt.in_out_task_no as warehousingTaskNo,
         '' as paymentNo,
         '' as customerName,
         '退库' as inOutType,
@@ -306,6 +313,7 @@
         left join warehouse_in_out_detail d on w.id=d.info_id and d.delete_flag = 0
         left join warehouse_base_info b on b.id=w.base_id and b.delete_flag = 0
         left join common_company c on c.comp_id = b.comp_id and c.delete_flag = 0
+        left join in_out_warehouse_task iowt on iowt.in_out_task_no = w.in_out_task_no and iowt.delete_flag = 0
         WHERE w.delete_flag = '0'
         AND b.comp_id = #{compId}
         and w.in_out_flag = 2