Ver Fonte

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

zhangyuewww há 3 anos atrás
pai
commit
9a3dbf06b9

+ 28 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/ContractExpensesInfo.java

@@ -73,8 +73,34 @@ public class ContractExpensesInfo extends BaseModel<ContractExpensesInfo> {
      * 支付日期
      */
     private Date payDeadline;
-
-
+    /**
+     * 支出粮款(元)
+     */
+    private Double foodExpenditure;
+    /**
+     * 收入粮款(元)
+     */
+    private Double grainIncome;
+    /**
+     * 费用收入(元)
+     */
+    private Double expenseIncome;
+    /**
+     * 费用支出(元)
+     */
+    private Double expensesPay;
+    /**
+     * 当期利润(元)
+     */
+    private Double currentProfit;
+    /**
+     * 费用表ID
+     */
+    private String expensesId;
+    /**
+     * 费用类型(1合同费用3库点费用)
+     */
+    private String costType;
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 16 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/ContractInventoryDistribution.java

@@ -79,8 +79,22 @@ public class ContractInventoryDistribution extends BaseModel<ContractInventoryDi
      * 成本
      */
     private Double cost;
-
-
+    /**
+     * 所在仓库
+     */
+    private String locusWarehouse;
+    /**
+     * 货名
+     */
+    private String goodsName;
+    /**
+     * 库存类型(1合同库存3收购库存)
+     */
+    private String inventoryType;
+    /**
+     * 重量(吨)
+     */
+    private Float weight;
     @Override
     protected Serializable pkVal() {
         return this.id;

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

@@ -123,6 +123,14 @@ public class ExportVView {
      * 净重
      */
     private String netWeight;
+    /**
+     * 发货毛重(吨)
+     */
+    private Double deliveryGrossWeight;
+    /**
+     * 发货皮重(吨)
+     */
+    private Double deliveryTare;
     /**
      * 发货净重(吨)
      */

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

@@ -2101,18 +2101,20 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(28, 12 * 256 + 184);
         sheet.setColumnWidth(29, 12 * 256 + 184);
         sheet.setColumnWidth(30, 12 * 256 + 184);
-        sheet.setColumnWidth(31, "发货库".getBytes().length * 25 / 10 * 256);
+        sheet.setColumnWidth(31, 12 * 256 + 184);
         sheet.setColumnWidth(32, 12 * 256 + 184);
-        sheet.setColumnWidth(33, 12 * 256 + 184);
+        sheet.setColumnWidth(33, "发货库".getBytes().length * 25 / 10 * 256);
         sheet.setColumnWidth(34, 12 * 256 + 184);
         sheet.setColumnWidth(35, 12 * 256 + 184);
         sheet.setColumnWidth(36, 12 * 256 + 184);
-        sheet.setColumnWidth(37, "合计应付".getBytes().length * 2 * 256);
+        sheet.setColumnWidth(37, 12 * 256 + 184);
         sheet.setColumnWidth(38, 12 * 256 + 184);
-        sheet.setColumnWidth(39, 12 * 256 + 184);
-        sheet.setColumnWidth(40, "卡号".getBytes().length * 4 * 256);
-        sheet.setColumnWidth(41, "开户支行".getBytes().length * 4 * 256);
-        sheet.setColumnWidth(42, 1 * 256 + 184);
+        sheet.setColumnWidth(39, "合计应付".getBytes().length * 2 * 256);
+        sheet.setColumnWidth(40, 12 * 256 + 184);
+        sheet.setColumnWidth(41, 12 * 256 + 184);
+        sheet.setColumnWidth(42, "卡号".getBytes().length * 4 * 256);
+        sheet.setColumnWidth(43, "开户支行".getBytes().length * 4 * 256);
+        sheet.setColumnWidth(44, 1 * 256 + 184);
 
         // 创建单元格对象
         HSSFCell cell = null;
@@ -2216,6 +2218,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellStyle(styleTitle);
         cell = row0.createCell(41);
         cell.setCellStyle(styleTitle);
+        cell = row0.createCell(42);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(43);
+        cell.setCellStyle(styleTitle);
         rownum++;
 
         Double waterContentTotal = 0d;//水分合计
@@ -2353,16 +2359,20 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell = rowp.createCell(36);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(37);
-        cell.setCellValue(amountIngPayableTotal);
-        cell.setCellStyle(contextstyle1);
+        cell.setCellStyle(styleDetail);
         cell = rowp.createCell(38);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(39);
-        cell.setCellStyle(styleDetail);
+        cell.setCellValue(amountIngPayableTotal);
+        cell.setCellStyle(contextstyle1);
         cell = rowp.createCell(40);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(41);
         cell.setCellStyle(styleDetail);
+        cell = rowp.createCell(42);
+        cell.setCellStyle(styleDetail);
+        cell = rowp.createCell(43);
+        cell.setCellStyle(styleDetail);
         rownum++;
 
         HSSFRow row1 = sheet.createRow((int) rownum);
@@ -2455,39 +2465,45 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellValue("净重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(30);
-        cell.setCellValue("发货重");
+        cell.setCellValue("发货重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(31);
-        cell.setCellValue("发货");
+        cell.setCellValue("发货皮重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(32);
-        cell.setCellValue("运输单价");
+        cell.setCellValue("发货净重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(33);
-        cell.setCellValue("运费");
+        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("姓名");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(42);
+        cell.setCellValue("卡号");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(43);
         cell.setCellValue("开户支行");
         cell.setCellStyle(styleDetail);
 
@@ -2619,40 +2635,46 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(30);
-                cell.setCellValue(editDouble(exportVView.getDeliveryVolume()));
+                cell.setCellValue(editDouble(exportVView.getDeliveryGrossWeight()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(31);
+                cell.setCellValue(editDouble(exportVView.getDeliveryTare()));
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(32);
+                cell.setCellValue(editDouble(exportVView.getDeliveryVolume()));
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(33);
                 cell.setCellValue(editString(exportVView.getSendWarehouse()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(32);
+                cell = rowx.createCell(34);
                 cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getTranPrice())).toString());
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(33);
+                cell = rowx.createCell(35);
                 cell.setCellValue(editFloat(exportVView.getFreight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(34);
+                cell = rowx.createCell(36);
                 cell.setCellValue(editDouble(exportVView.getUnitDeduction()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(35);
+                cell = rowx.createCell(37);
                 cell.setCellValue(new Formatter().format("%.3f", editDouble(exportVView.getPureWeightPrice())).toString());
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(36);
+                cell = rowx.createCell(38);
                 cell.setCellValue(editFloat(exportVView.getPureWeight()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(37);
+                cell = rowx.createCell(39);
                 cell.setCellValue(editDouble(exportVView.getAmountIngPayable()!=null ? exportVView.getAmountIngPayable() : 0));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(38);
+                cell = rowx.createCell(40);
                 cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getAmountEdPayable())).toString());
 //                cell.setCellValue(editDouble(exportVView.getAmountEdPayable()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(39);
+                cell = rowx.createCell(41);
                 cell.setCellValue(editString(exportVView.getCustomerName()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(40);
+                cell = rowx.createCell(42);
                 cell.setCellValue(editString(exportVView.getCardNo()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(41);
+                cell = rowx.createCell(43);
                 cell.setCellValue(editString(exportVView.getBankDeposit() + "-" + exportVView.getBankDepositBranch()));
                 cell.setCellStyle(styleDetail);
 
@@ -2943,18 +2965,20 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(28, 12 * 256 + 184);
         sheet.setColumnWidth(29, 12 * 256 + 184);
         sheet.setColumnWidth(30, 12 * 256 + 184);
-        sheet.setColumnWidth(31, "发货库".getBytes().length * 25 / 10 * 256);
+        sheet.setColumnWidth(31, 12 * 256 + 184);
         sheet.setColumnWidth(32, 12 * 256 + 184);
-        sheet.setColumnWidth(33, 12 * 256 + 184);
+        sheet.setColumnWidth(33, "发货库".getBytes().length * 25 / 10 * 256);
         sheet.setColumnWidth(34, 12 * 256 + 184);
         sheet.setColumnWidth(35, 12 * 256 + 184);
         sheet.setColumnWidth(36, 12 * 256 + 184);
-        sheet.setColumnWidth(37, "合计应付".getBytes().length * 2 * 256);
+        sheet.setColumnWidth(37, 12 * 256 + 184);
         sheet.setColumnWidth(38, 12 * 256 + 184);
-        sheet.setColumnWidth(39, 12 * 256 + 184);
-        sheet.setColumnWidth(40, "卡号".getBytes().length * 4 * 256);
-        sheet.setColumnWidth(41, "开户支行".getBytes().length * 4 * 256);
-        sheet.setColumnWidth(42, 1 * 256 + 184);
+        sheet.setColumnWidth(39, "合计应付".getBytes().length * 2 * 256);
+        sheet.setColumnWidth(40, 12 * 256 + 184);
+        sheet.setColumnWidth(41, 12 * 256 + 184);
+        sheet.setColumnWidth(42, "卡号".getBytes().length * 4 * 256);
+        sheet.setColumnWidth(43, "开户支行".getBytes().length * 4 * 256);
+        sheet.setColumnWidth(44, 1 * 256 + 184);
 
         // 创建单元格对象
         HSSFCell cell = null;
@@ -3058,6 +3082,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellStyle(styleTitle);
         cell = row0.createCell(41);
         cell.setCellStyle(styleTitle);
+        cell = row0.createCell(42);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(43);
+        cell.setCellStyle(styleTitle);
         rownum++;
 
         Map<String, Object> pageView = new HashMap<>();
@@ -3193,16 +3221,20 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell = rowp.createCell(36);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(37);
-            cell.setCellValue(amountIngPayableTotal);
-            cell.setCellStyle(contextstyle1);
+            cell.setCellStyle(styleDetail);
             cell = rowp.createCell(38);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(39);
-            cell.setCellStyle(styleDetail);
+            cell.setCellValue(amountIngPayableTotal);
+            cell.setCellStyle(contextstyle1);
             cell = rowp.createCell(40);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(41);
             cell.setCellStyle(styleDetail);
+            cell = rowp.createCell(42);
+            cell.setCellStyle(styleDetail);
+            cell = rowp.createCell(43);
+            cell.setCellStyle(styleDetail);
             rownum++;
         }
 
@@ -3296,39 +3328,45 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellValue("净重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(30);
-        cell.setCellValue("发货重");
+        cell.setCellValue("发货重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(31);
-        cell.setCellValue("发货");
+        cell.setCellValue("发货皮重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(32);
-        cell.setCellValue("运输单价");
+        cell.setCellValue("发货净重");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(33);
-        cell.setCellValue("运费");
+        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("姓名");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(42);
+        cell.setCellValue("卡号");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(43);
         cell.setCellValue("开户支行");
         cell.setCellStyle(styleDetail);
 
@@ -3450,40 +3488,46 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(30);
-                cell.setCellValue(editDouble(exportVView.getDeliveryVolume()));
+                cell.setCellValue(editDouble(exportVView.getDeliveryGrossWeight()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(31);
+                cell.setCellValue(editDouble(exportVView.getDeliveryTare()));
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(32);
+                cell.setCellValue(editDouble(exportVView.getDeliveryVolume()));
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(33);
                 cell.setCellValue(editString(exportVView.getSendWarehouse()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(32);
+                cell = rowx.createCell(34);
                 cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getTranPrice())).toString());
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(33);
+                cell = rowx.createCell(35);
                 cell.setCellValue(editFloat(exportVView.getFreight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(34);
+                cell = rowx.createCell(36);
                 cell.setCellValue(editDouble(exportVView.getUnitDeduction()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(35);
+                cell = rowx.createCell(37);
                 cell.setCellValue(new Formatter().format("%.3f", editDouble(exportVView.getPureWeightPrice())).toString());
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(36);
+                cell = rowx.createCell(38);
                 cell.setCellValue(editFloat(exportVView.getPureWeight()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(37);
+                cell = rowx.createCell(39);
                 cell.setCellValue(editDouble(exportVView.getAmountIngPayable()!=null ? exportVView.getAmountIngPayable() : 0));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(38);
+                cell = rowx.createCell(40);
                 cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getAmountEdPayable())).toString());
 //                cell.setCellValue(editDouble(exportVView.getAmountEdPayable()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(39);
+                cell = rowx.createCell(41);
                 cell.setCellValue(editString(exportVView.getCustomerName()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(40);
+                cell = rowx.createCell(42);
                 cell.setCellValue(editString(exportVView.getCardNo()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(41);
+                cell = rowx.createCell(43);
                 cell.setCellValue(editString(exportVView.getBankDeposit() + "-" + exportVView.getBankDepositBranch()));
                 cell.setCellStyle(styleDetail);
 

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

@@ -42,6 +42,8 @@
         a.payment_no as paymentNo,
         a.customer_name as customerName,
         '收购入库' as inOutType,
+        '' as deliveryGrossWeight,
+        '' as deliveryTare,
         '' as deliveryVolume,
         '' as sendWarehouse,
         '' as tranPrice,
@@ -109,6 +111,8 @@
         '' as paymentNo,
         m.seller as customerName,
         '采购入库' as inOutType,
+        '' as deliveryGrossWeight,
+        '' as deliveryTare,
         '' as deliveryVolume,
         '' as sendWarehouse,
         '' as tranPrice,
@@ -178,6 +182,8 @@
         '' as paymentNo,
         '' 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,
@@ -224,6 +230,8 @@
         </if>
         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
+        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
         WHERE w.delete_flag = '0'
         AND b.comp_id = #{compId}
@@ -252,6 +260,8 @@
         '' as paymentNo,
         '' as customerName,
         '退库' as inOutType,
+        '' as deliveryGrossWeight,
+        '' as deliveryTare,
         '' as deliveryVolume,
         '' as sendWarehouse,
         0 as tranPrice,