From 3c6efb35ff0ebcca6e7104c20cde64825fddd59d Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期四, 07 九月 2023 19:35:24 +0800
Subject: [PATCH] 添加数据

---
 igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java |   59 +++++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 47 insertions(+), 12 deletions(-)

diff --git a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java
index 39ad1ad..d04efe0 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java
@@ -84,6 +84,14 @@
         if ("5322".equals(data.getCompanyId())) {
             htmlStr = InoutBill.IN_WEIGHT_5322;
         }
+        // 鐪夊北甯傚簱浣跨敤
+        if ("5005".equals(data.getCompanyId())) {
+            htmlStr = InoutBill.IN_WEIGHT_5005;
+        }
+        // 涓规1搴撲娇鐢�
+        if ("5012".equals(data.getCompanyId())) {
+            htmlStr = InoutBill.IN_WEIGHT_5012;
+        }
 
         htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
 
@@ -104,6 +112,7 @@
         htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety());
         htmlStr = htmlStr.replace("depotName", bill.getDepotName());
         htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation());
+
 
         htmlStr = htmlStr.replace("plateNum", bill.getPlateNum());
         htmlStr = htmlStr.replace("fullWeight",
@@ -135,8 +144,12 @@
         htmlStr = htmlStr.replace("remark", bill.getRemark());
         htmlStr = htmlStr.replace("moneyName", bill.getMoneyName());
 
-        htmlStr = htmlStr.replace("handleUser", bill.getHandleUser());
-
+        htmlStr = htmlStr.replaceAll("weightUser",
+                bill.getWeightUser() == null ? "" : bill.getWeightUser());
+        htmlStr = htmlStr.replaceAll("handleUser",
+                bill.getHandleUser() == null ? "" : bill.getHandleUser());
+        htmlStr = htmlStr.replaceAll("keeperName",
+                bill.getKeeperUser() == null ? "" : bill.getKeeperUser());
         return htmlStr;
     }
 
@@ -148,7 +161,7 @@
      */
     public String outWeightBill(InoutData data) {
         // 鑾峰彇琛ㄥ崟鏁版嵁
-        WeightBill bill = this.createBillData(data, "鍑哄簱绉伴噸鍗�");
+        WeightBill bill = this.createBillData(data, "鍑哄簱鍒掔爜鍗�");
 
         //榛樿妯$増
         String htmlStr = InoutBill.OUT_WEIGHT_DEFAULT;
@@ -182,7 +195,14 @@
         if ("5322".equals(data.getCompanyId())) {
             htmlStr = InoutBill.OUT_WEIGHT_5322;
         }
-
+        // 鐪夊北甯傚簱浣跨敤
+        if ("5005".equals(data.getCompanyId())) {
+            htmlStr = InoutBill.OUT_WEIGHT_5005;
+        }
+        // 涓规1搴撲娇鐢�
+        if ("5012".equals(data.getCompanyId())) {
+            htmlStr = InoutBill.OUT_WEIGHT_5012;
+        }
         htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
 
         htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime());
@@ -190,7 +210,7 @@
         htmlStr = htmlStr.replace("fullTime", bill.getFullTime());
         htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime());
         htmlStr = htmlStr.replace("serId", bill.getSerId());
-        htmlStr = htmlStr.replace("specType", bill.getSpecType());
+//        htmlStr = htmlStr.replace("specType", bill.getSpecType());
 
         htmlStr = htmlStr.replace("customerName", bill.getCustomerName());
         htmlStr = htmlStr.replace("deptName", bill.getUnitName());
@@ -212,18 +232,24 @@
                 new DecimalFormat("0").format(bill.getNetWeight()));
 
         htmlStr = htmlStr.replace("remark", bill.getRemark());
-        htmlStr = htmlStr.replace("deWet", bill.getDeWet() + "");
+//        htmlStr = htmlStr.replace("deWet", bill.getDeWet() + "");
         htmlStr = htmlStr.replace("settleWeight",
                 new DecimalFormat("0").format(bill.getSettleWeight()));
-
+        htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + "");
         htmlStr = htmlStr.replace("handleUser", bill.getHandleUser());
         htmlStr = htmlStr.replace("deSum", bill.getDeSum() + "");
-
+        htmlStr = htmlStr.replace("deOther", bill.getDeOther() + "");
         htmlStr = htmlStr.replace("price", bill.getPrice());
         htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + "");
         htmlStr = htmlStr.replace("wet", bill.getWet() + "");
         htmlStr = htmlStr.replace("impurity", bill.getImpurity() + "");
 
+        htmlStr = htmlStr.replaceAll("weightUser",
+                bill.getWeightUser() == null ? "" : bill.getWeightUser());
+        htmlStr = htmlStr.replaceAll("handleUser",
+                bill.getHandleUser() == null ? "" : bill.getHandleUser());
+        htmlStr = htmlStr.replaceAll("keeperName",
+                bill.getKeeperUser() == null ? "" : bill.getKeeperUser());
         return htmlStr;
     }
 
@@ -322,6 +348,15 @@
         bill.setSettleMoney(data.getSettleMoney() == null ? "" : data.getSettleMoney() + "");
         bill.setRemark(data.getRemarks() == null ? "" : data.getRemarks());
 
+
+        if(InoutConstant.TYPE_IN.equals(data.getType())){
+            bill.setWeightUser(data.getFullWeightUser());
+        }
+        if(InoutConstant.TYPE_OUT.equals(data.getType())){
+            bill.setWeightUser(data.getEmptyWeightUser());
+        }
+        bill.setHandleUser(data.getHandleUser());
+        bill.setKeeperUser(depot.getStoreKeeperName());
         return bill;
     }
 
@@ -364,8 +399,8 @@
                 (dept == null ? "鍏ュ簱鍖栭獙鍗�" : dept.getName() + "鍏ュ簱鍖栭獙鍗�"));
 
         // 鏇挎崲鍩虹鏁版嵁
-        String time = DateFormatUtils.format(data.getRegisterTime(),
-                "yyyy-MM-dd");
+//        String time = DateFormatUtils.format(data.getRegisterTime(),
+//                "yyyy-MM-dd");
         String checkTime = data.getCheckTime() == null ? "-" : DateFormatUtils.format(data.getCheckTime(), "yyyy-MM-dd HH:mm:ss");
         String sampleTime = data.getSampleTime() == null ? "-" : DateFormatUtils.format(data.getSampleTime(), "yyyy-MM-dd HH:mm:ss");
         String reportTime = DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss");
@@ -575,12 +610,12 @@
         }
 //        htmlStr = htmlStr.replace("driverName", settle.getUserName() + "");
 //        htmlStr = htmlStr.replace("otherSum", settle.getOtherSum() + "");
-        htmlStr = htmlStr.replace("paySum", settle.getPaySum() + "");
+        htmlStr = htmlStr.replace("paySum", settle.getPayMoney() + "");
 
         htmlStr = htmlStr.replace("remark", settle.getRemarks() == null ? ""
                 : settle.getRemarks());
         htmlStr = htmlStr.replace("moneyName",
-                MoneyUtil.formatToCN(new BigDecimal(settle.getPaySum())));
+                MoneyUtil.formatToCN(new BigDecimal(settle.getPayMoney())));
 
         return htmlStr;
     }

--
Gitblit v1.9.3