zhangyuewww 2 سال پیش
والد
کامیت
c1008e48fc

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

@@ -126,7 +126,7 @@ public class StockSaleReceiptReport extends BaseModel<StockSaleReceiptReport> {
      */
     private Double settlementWeight;
     /**
-     * 反馈重量(吨)
+     * 卸车重量(吨)
      */
     private Double feedbackWeight;
     /**
@@ -258,7 +258,11 @@ public class StockSaleReceiptReport extends BaseModel<StockSaleReceiptReport> {
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @TableField(exist = false)
     private Date endDate;
-
+    /**
+     * 扣重(吨)
+     */
+    @TableField(exist = false)
+    private Double deductionWeight;
 
     @Override
     protected Serializable pkVal() {

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

@@ -157,6 +157,10 @@ public class TranCarInfo extends BaseModel<TranCarInfo> {
      * 卸车净重
      */
     private Float unloadNetWeight;
+    /**
+     * 扣重(吨)
+     */
+    private Float deductionWeight;
     /**
      * 装车磅单
      */

+ 5 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehousingOrder.java

@@ -541,6 +541,11 @@ public class WarehousingOrder extends BaseModel<WarehousingOrder> {
      */
     @TableField(exist = false)
     private String inventoryFlag;
+    /**
+     * 合同提示
+     */
+    @TableField(exist = false)
+    private String pointOut;
 
     @Override
     protected Serializable pkVal() {

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SalesTransferInfoServiceImpl.java

@@ -85,6 +85,7 @@ public class SalesTransferInfoServiceImpl extends ServiceImpl<SalesTransferInfoM
                 tranCarInfo.setCompId(salesTransferInfo.getCompId());
                 tranCarInfo.setTranType("1");
                 tranCarInfo.setCarNo(warehouseInOutInfo.getCarNo());
+                tranCarInfo.setSubmit("1");
                 tranCarInfo.setContractNo(salesTransferInfo.getContractNo());
                 tranCarInfo.setStatusFlag(StatusEnum.LOADED.getFlag());
                 tranCarInfo.setStatus(StatusEnum.LOADED.getName());

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

@@ -4012,8 +4012,8 @@ 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, "反馈日期".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(38, 12 * 256 + 184);
+        sheet.setColumnWidth(37, 12 * 256 + 184);
+        sheet.setColumnWidth(38, "反馈日期".getBytes().length * 2 * 256);
         sheet.setColumnWidth(39, 12 * 256 + 184);
         sheet.setColumnWidth(40, 12 * 256 + 184);
         sheet.setColumnWidth(41, 12 * 256 + 184);
@@ -4022,10 +4022,11 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(44, 12 * 256 + 184);
         sheet.setColumnWidth(45, 12 * 256 + 184);
         sheet.setColumnWidth(46, 12 * 256 + 184);
-        sheet.setColumnWidth(47, "收款日期".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(48, 12 * 256 + 184);
+        sheet.setColumnWidth(47, 12 * 256 + 184);
+        sheet.setColumnWidth(48, "收款日期".getBytes().length * 2 * 256);
         sheet.setColumnWidth(49, 12 * 256 + 184);
-        sheet.setColumnWidth(50, 1 * 256 + 184);
+        sheet.setColumnWidth(50, 12 * 256 + 184);
+        sheet.setColumnWidth(51, 1 * 256 + 184);
 
         // 创建单元格对象
         HSSFCell cell = null;
@@ -4145,6 +4146,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellStyle(styleTitle);
         cell = row0.createCell(49);
         cell.setCellStyle(styleTitle);
+        cell = row0.createCell(50);
+        cell.setCellStyle(styleTitle);
         rownum++;
 
         Map<String, Object> pageView = new HashMap<>();
@@ -4296,10 +4299,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell = rowp.createCell(43);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(44);
+            cell.setCellStyle(styleDetail);
+            cell = rowp.createCell(45);
             cell.setCellValue(amountIngPayableTotal);
             cell.setCellStyle(contextstyle1);
-            cell = rowp.createCell(45);
-            cell.setCellStyle(styleDetail);
             cell = rowp.createCell(46);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(47);
@@ -4308,6 +4311,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(49);
             cell.setCellStyle(styleDetail);
+            cell = rowp.createCell(50);
+            cell.setCellStyle(styleDetail);
             rownum++;
         }
 
@@ -4420,45 +4425,48 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         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.setCellValue("运运费(元/吨)");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(42);
-        cell.setCellValue("运运费(元/吨)");
+        cell.setCellValue("运运费(元/吨)");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(43);
-        cell.setCellValue("运费");
+        cell.setCellValue("船运运费(元/吨)");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(44);
-        cell.setCellValue("应收金额(元)");
+        cell.setCellValue("运费");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(45);
-        cell.setCellValue("收金额(元)");
+        cell.setCellValue("收金额(元)");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(46);
-        cell.setCellValue("收金额(元)");
+        cell.setCellValue("收金额(元)");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(47);
-        cell.setCellValue("收款日期");
+        cell.setCellValue("未收金额(元)");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(48);
-        cell.setCellValue("已开票金额(元)");
+        cell.setCellValue("收款日期");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(49);
+        cell.setCellValue("已开票金额(元)");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(50);
         cell.setCellValue("状态");
         cell.setCellStyle(styleDetail);
         rownum++;
@@ -4601,44 +4609,47 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(editFloat(exportVView.getFeedbackWeight()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(37);
+                cell.setCellValue(editFloat(exportVView.getBuckleWeight()));
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(38);
                 String date1 = addDateOneDay(exportVView.getFeedbackDate() != null ? exportVView.getFeedbackDate() : new Date());
                 cell.setCellValue(date1);
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(38);
+                cell = rowx.createCell(39);
                 cell.setCellValue(editFloat(exportVView.getSettlementWeight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(39);
+                cell = rowx.createCell(40);
                 cell.setCellValue(editFloat(exportVView.getSettlementPrice()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(40);
+                cell = rowx.createCell(41);
                 cell.setCellValue(editFloat(exportVView.getCarFreight()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(41);
+                cell = rowx.createCell(42);
                 cell.setCellValue(editFloat(exportVView.getTrainFreight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(42);
-                cell.setCellValue(editFloat(exportVView.getShipFreight()));
-                cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(43);
                 cell.setCellValue(editFloat(exportVView.getShipFreight()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(44);
+                cell.setCellValue(editFloat(exportVView.getShipFreight()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(45);
                 cell.setCellValue(editDouble(exportVView.getAmountIngReceivable()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(45);
+                cell = rowx.createCell(46);
                 cell.setCellValue(editDouble(exportVView.getAmountEdReceivable()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(46);
+                cell = rowx.createCell(47);
                 cell.setCellValue(editDouble(exportVView.getAmountNotReceivable()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(47);
+                cell = rowx.createCell(48);
                 String date2 = addDateOneDay(exportVView.getCollectionDate() != null ? exportVView.getCollectionDate() : new Date());
                 cell.setCellValue(date2);
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(48);
+                cell = rowx.createCell(49);
                 cell.setCellValue(editFloat(exportVView.getMoney()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(49);
+                cell = rowx.createCell(50);
                 cell.setCellValue(editString(exportVView.getStatus()));
                 cell.setCellStyle(styleDetail);
 
@@ -4930,8 +4941,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(31, 12 * 256 + 184);
         sheet.setColumnWidth(32, 12 * 256 + 184);
         sheet.setColumnWidth(33, 12 * 256 + 184);
-        sheet.setColumnWidth(34, "反馈日期".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(35, 12 * 256 + 184);
+        sheet.setColumnWidth(34, 12 * 256 + 184);
+        sheet.setColumnWidth(35, "反馈日期".getBytes().length * 2 * 256);
         sheet.setColumnWidth(36, 12 * 256 + 184);
         sheet.setColumnWidth(37, 12 * 256 + 184);
         sheet.setColumnWidth(38, 12 * 256 + 184);
@@ -4940,10 +4951,11 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(41, 12 * 256 + 184);
         sheet.setColumnWidth(42, 12 * 256 + 184);
         sheet.setColumnWidth(43, 12 * 256 + 184);
-        sheet.setColumnWidth(44, "收款日期".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(45, 12 * 256 + 184);
+        sheet.setColumnWidth(44, 12 * 256 + 184);
+        sheet.setColumnWidth(45, "收款日期".getBytes().length * 2 * 256);
         sheet.setColumnWidth(46, 12 * 256 + 184);
-        sheet.setColumnWidth(47, 1 * 256 + 184);
+        sheet.setColumnWidth(47, 12 * 256 + 184);
+        sheet.setColumnWidth(48, 1 * 256 + 184);
 
         // 创建单元格对象
         HSSFCell cell = null;
@@ -5053,8 +5065,12 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellStyle(styleTitle);
         cell = row0.createCell(44);
         cell.setCellStyle(styleTitle);
+        cell = row0.createCell(45);
+        cell.setCellStyle(styleTitle);
         cell = row0.createCell(46);
         cell.setCellStyle(styleTitle);
+        cell = row0.createCell(47);
+        cell.setCellStyle(styleTitle);
         rownum++;
 
         Map<String, Object> pageView = new HashMap<>();
@@ -5198,10 +5214,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell = rowp.createCell(40);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(41);
+            cell.setCellStyle(styleDetail);
+            cell = rowp.createCell(42);
             cell.setCellValue(amountIngPayableTotal);
             cell.setCellStyle(contextstyle1);
-            cell = rowp.createCell(42);
-            cell.setCellStyle(styleDetail);
             cell = rowp.createCell(43);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(44);
@@ -5210,6 +5226,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(46);
             cell.setCellStyle(styleDetail);
+            cell = rowp.createCell(47);
+            cell.setCellStyle(styleDetail);
             rownum++;
         }
 
@@ -5313,45 +5331,48 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         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.setCellValue("运费");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(42);
-        cell.setCellValue("收金额(元)");
+        cell.setCellValue("收金额(元)");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(43);
-        cell.setCellValue("收金额(元)");
+        cell.setCellValue("收金额(元)");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(44);
-        cell.setCellValue("收款日期");
+        cell.setCellValue("未收金额(元)");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(45);
-        cell.setCellValue("已开票金额(元)");
+        cell.setCellValue("收款日期");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(46);
+        cell.setCellValue("已开票金额(元)");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(47);
         cell.setCellValue("状态");
         cell.setCellStyle(styleDetail);
         rownum++;
@@ -5480,44 +5501,47 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(editFloat(exportVView.getFeedbackWeight()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(34);
+                cell.setCellValue(editFloat(exportVView.getBuckleWeight()));
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(35);
                 String date1 = addDateOneDay(exportVView.getFeedbackDate() != null ? exportVView.getFeedbackDate() : new Date());
                 cell.setCellValue(date1);
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(35);
+                cell = rowx.createCell(36);
                 cell.setCellValue(editFloat(exportVView.getSettlementWeight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(36);
+                cell = rowx.createCell(37);
                 cell.setCellValue(editFloat(exportVView.getSettlementPrice()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(37);
+                cell = rowx.createCell(38);
                 cell.setCellValue(editFloat(exportVView.getCarFreight()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(38);
+                cell = rowx.createCell(39);
                 cell.setCellValue(editFloat(exportVView.getTrainFreight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(39);
-                cell.setCellValue(editFloat(exportVView.getShipFreight()));
-                cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(40);
                 cell.setCellValue(editFloat(exportVView.getShipFreight()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(41);
+                cell.setCellValue(editFloat(exportVView.getShipFreight()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(42);
                 cell.setCellValue(editDouble(exportVView.getAmountIngReceivable()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(42);
+                cell = rowx.createCell(43);
                 cell.setCellValue(editDouble(exportVView.getAmountEdReceivable()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(43);
+                cell = rowx.createCell(44);
                 cell.setCellValue(editDouble(exportVView.getAmountNotReceivable()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(44);
+                cell = rowx.createCell(45);
                 String date2 = addDateOneDay(exportVView.getCollectionDate() != null ? exportVView.getCollectionDate() : new Date());
                 cell.setCellValue(date2);
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(45);
+                cell = rowx.createCell(46);
                 cell.setCellValue(editFloat(exportVView.getMoney()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(46);
+                cell = rowx.createCell(47);
                 cell.setCellValue(editString(exportVView.getStatus()));
                 cell.setCellStyle(styleDetail);
 

+ 49 - 45
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/StockSaleReceiptReportMapper.xml

@@ -36,68 +36,72 @@
     <select id="getListByCondition" parameterType="Map"
             resultType="com.yh.saas.plugin.yiliangyiyun.entity.StockSaleReceiptReport">
         SELECT
-        id,
-        comp_id as compId,
-        contract_no as contractNo,
-        car_no as carNo,
-        warehouse_record_id as warehouseRecordId,
-        delivery_date as deliveryDate,
-        process_no as processNo,
-        tran_car_no as tranCarNo,
-        case_no as caseNo,
-        title_no as titleNo,
-        bin_number as binNumber,
-        box_no as boxNo,
-        feedback_person as feedbackPerson,
-        create_date as createDate,
-        update_date as updateDate,
-        net_weight as netWeight,
-        feedback_weight as feedbackWeight,
-        gross_weight as grossWeight,
-        tare as tare,
-        settlement_weight AS settlementWeight,
-        settlement_price AS settlementPrice,
-        ROUND(amount_ing_receivable,2) as amountIngReceivable,
-        ROUND(amount_ed_receivable,2) as amountEdReceivable,
-        ROUND(amount_not_receivable,2) as amountNotReceivable,
-        collection_screenshot as collectionScreenshot,
-        collection_date as collectionDate,
-        already_invoice as alreadyInvoice,
-        warehouse_name as warehouseName,
-        status,
-        approve_status as approveStatus,
-        status_flag as statusFlag,
-        approve_status as approveStatus,
-        return_date as returnDate,
-        return_flag as returnFlag,
-        workflow_id as workflowId
-        FROM stock_sale_receipt_report
+        s.id,
+        s.comp_id as compId,
+        s.contract_no as contractNo,
+        s.car_no as carNo,
+        s.warehouse_record_id as warehouseRecordId,
+        s.delivery_date as deliveryDate,
+        s.process_no as processNo,
+        s.tran_car_no as tranCarNo,
+        s.case_no as caseNo,
+        s.title_no as titleNo,
+        s.bin_number as binNumber,
+        s.box_no as boxNo,
+        s.feedback_person as feedbackPerson,
+        s.create_date as createDate,
+        s.update_date as updateDate,
+        s.net_weight as netWeight,
+        IFNULL(i.unload_net_weight,0) as feedbackWeight,
+        IFNULL(i.deduction_weight,0) as deductionWeight,
+        s.gross_weight as grossWeight,
+        s.tare as tare,
+        case when m.settlement_weight_method = '1' then s.net_weight else IFNULL(i.unload_net_weight,0)-IFNULL(i.deduction_weight,0) end as settlementWeight,
+        s.settlement_price AS settlementPrice,
+        ROUND(s.amount_ing_receivable,2) as amountIngReceivable,
+        ROUND(s.amount_ed_receivable,2) as amountEdReceivable,
+        ROUND(s.amount_not_receivable,2) as amountNotReceivable,
+        s.collection_screenshot as collectionScreenshot,
+        s.collection_date as collectionDate,
+        s.already_invoice as alreadyInvoice,
+        s.warehouse_name as warehouseName,
+        s.status,
+        s.approve_status as approveStatus,
+        s.status_flag as statusFlag,
+        s.approve_status as approveStatus,
+        s.return_date as returnDate,
+        s.return_flag as returnFlag,
+        s.workflow_id as workflowId
+        FROM stock_sale_receipt_report s
+        left join warehouse_in_out_info w on w.id = s.warehouse_record_id and w.delete_flag = 0
+        left join tran_car_info i on  i.delete_flag = 0 and i.id = w.car_id
+        left join contract_management_info m on m.contract_no = s.contract_no and m.comp_id=s.comp_id and m.delete_flag = 0
         WHERE
-        comp_id = #{compId}
-        and delete_flag = '0'
+        s.comp_id = #{compId}
+        and s.delete_flag = '0'
         <if test="contractNo != null and contractNo != ''and contractNo != '全部合同'">
-            AND contract_no = #{contractNo}
+            AND s.contract_no = #{contractNo}
         </if>
         <if test="processNo != null and processNo != ''">
-            AND process_no = #{processNo}
+            AND s.process_no = #{processNo}
         </if>
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 2">
-                AND amount_ing_receivable-amount_ed_receivable>0
+                AND s.amount_ing_receivable-s.amount_ed_receivable>0
             </if>
             <if test="searchType == 3">
-                AND amount_ing_receivable-amount_ed_receivable=0
+                AND s.amount_ing_receivable-s.amount_ed_receivable=0
             </if>
         </if>
         <if test="startDate != null">
-            AND (DATE_FORMAT(create_date,"%Y%m%d") &gt;=
+            AND (DATE_FORMAT(s.create_date,"%Y%m%d") &gt;=
             DATE_FORMAT(#{startDate},"%Y%m%d"))
         </if>
         <if test="endDate != null">
-            AND (DATE_FORMAT(create_date,"%Y%m%d") &lt;=
+            AND (DATE_FORMAT(s.create_date,"%Y%m%d") &lt;=
             DATE_FORMAT(#{endDate},"%Y%m%d"))
         </if>
-        ORDER BY delivery_date DESC
+        ORDER BY s.delivery_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>

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

@@ -182,6 +182,7 @@
             AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &lt;=
             DATE_FORMAT(#{endDate},"%Y%m%d%H%i%s"))
         </if>
+        group by w.id
         UNION ALL
         SELECT
         c.comp_name as compName,
@@ -375,6 +376,7 @@
         ROUND(w.tare,2) as tare,
         '' as contractStatus,
         IFNULL(t.unload_net_weight,0) as feedbackWeight,
+        IFNULL(t.deduction_weight,0) as buckleWeight,
         w.in_out_date as feedbackDate,
         w.net_weight as settlementWeight,
         0 as settlementPrice,
@@ -392,7 +394,7 @@
         tti.receive_warehouse as receiveWarehouse
         FROM warehouse_in_out_info w
         left join warehouse_in_out_detail d on w.id=d.info_id and d.delete_flag = 0
-        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 tran_car_info t on t.contract_no = w.contract_no and t.delete_flag = 0 and t.id = w.car_id
         left join tran_task_info tti on tti.id = t.info_id and tti.delete_flag = 0
         left join warehouse_base_info b on b.id=w.base_id and b.delete_flag = 0
         left join contract_management_info m on m.comp_id = b.comp_id and m.contract_no = w.warehouse_name and m.delete_flag = 0
@@ -450,9 +452,11 @@
         CASE WHEN ( SELECT sum( ssrr.amount_not_receivable ) FROM stock_sale_receipt_report ssrr WHERE ssrr.contract_no
         = s.contract_no ) > 0 THEN
         '未结算' ELSE '已结算' END AS contractStatus,
-        s.feedback_weight as feedbackWeight,
-        s.feedback_date as feedbackDate,
-        s.settlement_weight as settlementWeight,
+        IFNULL(i.unload_net_weight,0) as feedbackWeight,
+        IFNULL(i.deduction_weight,0) as buckleWeight,
+        i.unloading_date as feedbackDate,
+        case when m.settlement_weight_method = '1' then s.net_weight else IFNULL(i.unload_net_weight,0)-IFNULL(i.deduction_weight,0) end as settlementWeight,
+--         s.settlement_weight as settlementWeight,
         s.settlement_price as settlementPrice,
         case when p.tran_type_key = '1' then p.actual_freight else '' end as carFreight,
         case when p.tran_type_key = '2' then p.actual_freight else '' end as trainFreight,
@@ -471,7 +475,7 @@
         left join weighing_management wm on wm.warehouse_in_out_id = w.id and wm.delete_flag = 0
         left join tran_process_info p on p.id = s.process_id and p.delete_flag = 0
         left join tran_task_info t on t.id = p.info_id and t.delete_flag = 0
-        left join tran_car_info i on i.process_id = p.id and i.delete_flag = 0 and i.tran_car_no = s.tran_car_no and i.car_no = s.car_no
+        left join tran_car_info i on  i.delete_flag = 0 and i.id = w.car_id
         left join tran_settlement_report r on r.car_id = i.id and r.delete_flag = 0
         left join contract_management_info m on m.contract_no = w.contract_no and m.comp_id=s.comp_id and m.delete_flag = 0
         left join contract_goods_info g on m.id = g.contract_id and g.delete_flag = 0

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehousingOrderMapper.xml

@@ -387,6 +387,7 @@
         wo.warehouse_name AS warehouseName,
         wo.goods_name AS goodsName,
         wo.in_type AS inType,
+        cmi.point_out as pointOut,
         (
         SELECT
         sum( wo1.surplus_weight )
@@ -417,6 +418,7 @@
         wo.issuing_time AS issuingTimeOther
         FROM
         warehousing_order wo
+        left join contract_management_info cmi on cmi.contract_no=wo.contract_no and cmi.comp_id=wo.comp_id
         WHERE
         wo.delete_flag = '0'
         <if test="searchType != null and searchType != ''">