huangfuli преди 2 години
родител
ревизия
2f50b87aee

+ 11 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/PaymentManagementController.java

@@ -1,12 +1,15 @@
 package com.yh.saas.plugin.yiliangyiyun.controller;
 
 
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.PaymentManagement;
+import com.yh.saas.plugin.yiliangyiyun.entity.QualityInspectionManagement;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.PaymentView;
 import com.yh.saas.plugin.yiliangyiyun.service.IIdentityAuthenticationInfoService;
 import com.yh.saas.plugin.yiliangyiyun.service.IPaymentManagementService;
+import com.yh.saas.plugin.yiliangyiyun.service.IQualityInspectionManagementService;
 import com.yh.saas.plugin.yiliangyiyun.util.XmlUtil;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -36,6 +39,8 @@ public class PaymentManagementController {
     private IPaymentManagementService paymentManagementService;
     @Autowired
     private IIdentityAuthenticationInfoService iIdentityAuthenticationInfoService;
+    @Autowired
+    private IQualityInspectionManagementService qualityInspectionManagementService;
 //    @Autowired
 //    private XmlUtil xmlUtil;
     /**
@@ -167,6 +172,10 @@ public class PaymentManagementController {
             paymentManagement = paymentManagementList.get(i);
             paymentManagement.setInvoicing("1");
             paymentManagement.setIdentityAuthenticationInfo(iIdentityAuthenticationInfoService.selectById(paymentManagement.getIdentityId()));
+            //查询质检表合同号
+            QualityInspectionManagement qualityInspectionManagement = qualityInspectionManagementService.selectOne(new EntityWrapper<QualityInspectionManagement>()
+                    .eq("relation_id",paymentManagement.getRelationId()).eq("delete_flag","0"));
+            paymentManagement.setContractNo(qualityInspectionManagement.getContractNo());
             paymentManagementService.updateById(paymentManagement);
         }
         if(paymentManagementList.size() >0 && !"1".equals(paymentManagementList.get(0).getInvoiceFlag())){
@@ -207,7 +216,7 @@ public class PaymentManagementController {
                             + " 皮:" +
                             tmp.getTareStr()
                             + " 净:" +
-                            tmp.getNetWeight() + " 纯:" + weight + " 应付:" + payable + " 单号:" + m.replaceAll("").trim() + " ,★☆性质:贸易粮 形态:玉米堆(1)"
+                            tmp.getNetWeight() + " 纯:" + weight + " 应付:" + payable + " 单号:" + m.replaceAll("").trim() + " 合同号:" + tmp.getContractNo() + " 仓库:" + tmp.getWarehouseName() + " ,★☆性质:贸易粮 形态:玉米堆(1)"
                     );
                     if(tmp.getGrade() == null){
                         tmp.setGrade(" ");
@@ -238,7 +247,7 @@ public class PaymentManagementController {
                             tmp1.getGrossWeightStr()
                             + " 皮:" +
                             tmp1.getTareStr()
-                            + " 净:" + tmp1.getNetWeight() + " 纯:" + weight + " 应付:" + payable + " 单号:" + m.replaceAll("").trim() + " ,★☆性质:贸易粮 形态:玉米堆(2)"
+                            + " 净:" + tmp1.getNetWeight() + " 纯:" + weight + " 应付:" + payable + " 单号:" + m.replaceAll("").trim() + " 合同号:" + tmp1.getContractNo() + " 仓库:" + tmp1.getWarehouseName() + " ,★☆性质:贸易粮 形态:玉米堆(2)"
                     );
                     list1.add(tmp1);
                 }

+ 2 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/XmlUtil.java

@@ -181,7 +181,7 @@ public class XmlUtil implements InitializingBean {
                 "<Gfdzdh>" + paymentManagement.getIdentityAuthenticationInfo().getCompAddress() + "</Gfdzdh>\n" +
                 "\n" +
                 "<Bz>车号:" + paymentManagement.getCarNo() + "毛:" + paymentManagement.getGrossWeight() + " 皮:" + paymentManagement.getTare()
-                + " 净:" + paymentManagement.getNetWeight() + " 纯:" + paymentManagement.getPureWeight() + " 应付:" + paymentManagement.getAmountIngPayable() + " 单号:" + m.replaceAll("").trim() + " ,★☆性质:贸易粮 形态:玉米堆</Bz>\n" +
+                + " 净:" + paymentManagement.getNetWeight() + " 纯:" + paymentManagement.getPureWeight() + " 应付:" + paymentManagement.getAmountIngPayable() + " 单号:" + m.replaceAll("").trim() + " 合同号:" + paymentManagement.getContractNo() + " 仓库:" + paymentManagement.getWarehouseName() + " ,★☆性质:贸易粮 形态:玉米堆</Bz>\n" +
                 "\n" +
                 "<Fhr/>\n" +
                 "\n" +
@@ -299,7 +299,7 @@ public class XmlUtil implements InitializingBean {
                 paymentManagement.getGrossWeightStr()
                 + " 皮:" +
                 paymentManagement.getTareStr()
-                + " 净:" + paymentManagement.getNetWeight() + " 纯:" + paymentManagement.getPureWeight() + " 应付:" + paymentManagement.getAmountIngPayable() + " 单号:" + m.replaceAll("").trim() + " ,★☆性质:贸易粮 形态:玉米堆</Bz>\n" +
+                + " 净:" + paymentManagement.getNetWeight() + " 纯:" + paymentManagement.getPureWeight() + " 应付:" + paymentManagement.getAmountIngPayable() + " 单号:" + m.replaceAll("").trim() + " 合同号:" + paymentManagement.getContractNo() + " 仓库:" + paymentManagement.getWarehouseName() + " ,★☆性质:贸易粮 形态:玉米堆</Bz>\n" +
                 "\n" +
                 "<Fhr/>\n" +
                 "\n" +