huangfuli hace 2 años
padre
commit
086fa9a87a

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

@@ -156,7 +156,7 @@ public class ExportVView {
      */
     private Double pureWeightPrice;
     /**
-     * 纯重(公斤
+     * 纯重(
      */
     private Float pureWeight;
     /**

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

@@ -2112,9 +2112,9 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(34, 12 * 256 + 184);
         sheet.setColumnWidth(35, 12 * 256 + 184);
         sheet.setColumnWidth(36, 12 * 256 + 184);
-        sheet.setColumnWidth(37, 12 * 256 + 184);
+        sheet.setColumnWidth(37, "合计应付".getBytes().length * 2 * 256);
         sheet.setColumnWidth(38, 12 * 256 + 184);
-        sheet.setColumnWidth(39, "合计应付".getBytes().length * 2 * 256);
+        sheet.setColumnWidth(39, 12 * 256 + 184);
         sheet.setColumnWidth(40, 12 * 256 + 184);
         sheet.setColumnWidth(41, 12 * 256 + 184);
         sheet.setColumnWidth(42, "卡号".getBytes().length * 4 * 256);
@@ -2366,12 +2366,12 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell = rowp.createCell(36);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(37);
-        cell.setCellStyle(styleDetail);
+        cell.setCellValue(amountIngPayableTotal);
+        cell.setCellStyle(contextstyle1);
         cell = rowp.createCell(38);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(39);
-        cell.setCellValue(amountIngPayableTotal);
-        cell.setCellStyle(contextstyle1);
+        cell.setCellStyle(styleDetail);
         cell = rowp.createCell(40);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(41);
@@ -2484,25 +2484,25 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellValue("发货库");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(34);
-        cell.setCellValue("运输单价");
+        cell.setCellValue("单价");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(35);
-        cell.setCellValue("运费");
+        cell.setCellValue("纯重单价");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(36);
-        cell.setCellValue("扣单价");
+        cell.setCellValue("纯重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(37);
-        cell.setCellValue("纯重单价");
+        cell.setCellValue("合计应付");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(38);
-        cell.setCellValue("纯重");
+        cell.setCellValue("实付金额");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(39);
-        cell.setCellValue("合计应付");
+        cell.setCellValue("运输单价");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(40);
-        cell.setCellValue("实付金额");
+        cell.setCellValue("运费");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(41);
         cell.setCellValue("姓名");
@@ -2656,35 +2656,35 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(editString(exportVView.getSendWarehouse()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(34);
-                cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getTranPrice())).toString());
-                cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(35);
-                cell.setCellValue(editFloat(exportVView.getFreight()));
-                cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(36);
                 cell.setCellValue(editDouble(exportVView.getUnitDeduction()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(37);
+                cell = rowx.createCell(35);
                 if(exportVView.getPureWeightPrice() == null){
                     cell.setCellValue(new Formatter().format("%.3f", editDouble(exportVView.getPureWeightPrice())).toString());
                 }else {
                     cell.setCellValue(new Formatter().format("%.3f", editDouble(exportVView.getPureWeightPrice() * 1000)).toString());
                 }
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(38);
+                cell = rowx.createCell(36);
                 if(exportVView.getPureWeight() == null){
                     cell.setCellValue(editFloat(exportVView.getPureWeight()));
                 }else {
                     cell.setCellValue(editDouble(Double.valueOf(exportVView.getPureWeight()) / 1000));
                 }
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(39);
+                cell = rowx.createCell(37);
                 cell.setCellValue(editDouble(exportVView.getAmountIngPayable()!=null ? exportVView.getAmountIngPayable() : 0));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(40);
+                cell = rowx.createCell(38);
                 cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getAmountEdPayable())).toString());
 //                cell.setCellValue(editDouble(exportVView.getAmountEdPayable()));
                 cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(39);
+                cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getTranPrice())).toString());
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(40);
+                cell.setCellValue(editFloat(exportVView.getFreight()));
+                cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(41);
                 cell.setCellValue(editString(exportVView.getCustomerName()));
                 cell.setCellStyle(styleDetail);
@@ -2988,9 +2988,9 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(34, 12 * 256 + 184);
         sheet.setColumnWidth(35, 12 * 256 + 184);
         sheet.setColumnWidth(36, 12 * 256 + 184);
-        sheet.setColumnWidth(37, 12 * 256 + 184);
+        sheet.setColumnWidth(37, "合计应付".getBytes().length * 2 * 256);
         sheet.setColumnWidth(38, 12 * 256 + 184);
-        sheet.setColumnWidth(39, "合计应付".getBytes().length * 2 * 256);
+        sheet.setColumnWidth(39, 12 * 256 + 184);
         sheet.setColumnWidth(40, 12 * 256 + 184);
         sheet.setColumnWidth(41, 12 * 256 + 184);
         sheet.setColumnWidth(42, "卡号".getBytes().length * 4 * 256);
@@ -3238,12 +3238,12 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell = rowp.createCell(36);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(37);
-            cell.setCellStyle(styleDetail);
+            cell.setCellValue(amountIngPayableTotal);
+            cell.setCellStyle(contextstyle1);
             cell = rowp.createCell(38);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(39);
-            cell.setCellValue(amountIngPayableTotal);
-            cell.setCellStyle(contextstyle1);
+            cell.setCellStyle(styleDetail);
             cell = rowp.createCell(40);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(41);
@@ -3357,25 +3357,25 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellValue("发货库");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(34);
-        cell.setCellValue("运输单价");
+        cell.setCellValue("单价");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(35);
-        cell.setCellValue("运费");
+        cell.setCellValue("纯重单价");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(36);
-        cell.setCellValue("扣单价");
+        cell.setCellValue("纯重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(37);
-        cell.setCellValue("纯重单价");
+        cell.setCellValue("合计应付");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(38);
-        cell.setCellValue("纯重");
+        cell.setCellValue("实付金额");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(39);
-        cell.setCellValue("合计应付");
+        cell.setCellValue("运输单价");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(40);
-        cell.setCellValue("实付金额");
+        cell.setCellValue("运费");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(41);
         cell.setCellValue("姓名");
@@ -3517,35 +3517,35 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(editString(exportVView.getSendWarehouse()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(34);
-                cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getTranPrice())).toString());
-                cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(35);
-                cell.setCellValue(editFloat(exportVView.getFreight()));
-                cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(36);
                 cell.setCellValue(editDouble(exportVView.getUnitDeduction()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(37);
+                cell = rowx.createCell(35);
                 if(exportVView.getPureWeightPrice() == null){
                     cell.setCellValue(new Formatter().format("%.3f", editDouble(exportVView.getPureWeightPrice())).toString());
                 }else {
                     cell.setCellValue(new Formatter().format("%.3f", editDouble(exportVView.getPureWeightPrice() * 1000)).toString());
                 }
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(38);
+                cell = rowx.createCell(36);
                 if(exportVView.getPureWeight() == null){
                     cell.setCellValue(editFloat(exportVView.getPureWeight()));
                 }else {
                     cell.setCellValue(editDouble(Double.valueOf(exportVView.getPureWeight()) / 1000));
                 }
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(39);
+                cell = rowx.createCell(37);
                 cell.setCellValue(editDouble(exportVView.getAmountIngPayable()!=null ? exportVView.getAmountIngPayable() : 0));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(40);
+                cell = rowx.createCell(38);
                 cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getAmountEdPayable())).toString());
 //                cell.setCellValue(editDouble(exportVView.getAmountEdPayable()));
                 cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(39);
+                cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getTranPrice())).toString());
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(40);
+                cell.setCellValue(editFloat(exportVView.getFreight()));
+                cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(41);
                 cell.setCellValue(editString(exportVView.getCustomerName()));
                 cell.setCellStyle(styleDetail);

+ 8 - 5
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseBaseInfoMapper.xml

@@ -182,14 +182,14 @@
         w.in_out_date as createDate,
         w.contract_no as contractNo,
         '' as paymentNo,
-        '' as customerName,
+        IFNULL(cmi.seller,'') as customerName,
         '移库入库' as inOutType,
         wi.gross_weight as deliveryGrossWeight,
         wi.tare as deliveryTare,
         t.load_net_weight as deliveryVolume,
         i.send_warehouse as sendWarehouse,
         t.tran_price as tranPrice,
-        ROUND(IFNULL(r.amount_ed_payable,IFNULL(t.tran_price,0)*t.load_net_weight),2) as freight,
+        ROUND(IFNULL(r.amount_ing_payable,IFNULL(t.tran_price,0)*t.load_net_weight),2) as freight,
         '' as supplier,
         w.goods_name as goodsName,
         case when w.goods_name like '%潮粮%' then '潮粮' else '干粮' end as type,
@@ -210,10 +210,12 @@
         ROUND(w.tare,2) as tare,
         w.deduction_weight as buckleWeight,
         w.net_weight as netWeight,
-        '' as unitDeduction,
+        IFNULL(q.deduction_amount,0) as unitDeduction,
         '' as pureWeightPrice,
         w.pure_weight as pureWeight,
-        ROUND(IFNULL(r.amount_ed_payable,(w.cost+IFNULL(t.tran_price,0))*t.load_net_weight),2) as amountIngPayable,
+--         ROUND(IFNULL(r.amount_ing_payable,(w.cost+IFNULL(t.tran_price,0))*t.load_net_weight),2) as amountIngPayable,
+        case when cmi.settlement_weight_method = '1' then ROUND((w.cost-IFNULL(q.deduction_amount,0))*t.load_net_weight,2)
+        else ROUND((w.cost-IFNULL(q.deduction_amount,0))*w.net_weight,2) end as amountIngPayable,
         0 as amountEdPayable,
         '' as payeeName,
         '' as cardNo,
@@ -235,6 +237,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
         WHERE w.delete_flag = '0'
         AND b.comp_id = #{compId}
         and w.in_out_flag = 2
@@ -331,7 +334,7 @@
         IFNULL(m.unit_contract_price,IFNULL(w.cost,0))+IFNULL(t.tran_price,0) as costPrice,
 --         w.warehouse_name as contractNo,
         case when m.contract_type = '1' then m.contract_no else '' end as contractNo,
-        '' as customerName,
+        IFNULL(m.seller,'') as customerName,
         '' as remark,
         w.in_out_task_no as inOutTaskNo,
         w.goods_name as goodsName,