From 69cd9f59a0fabf12f8c9147fcba7f69817a870b3 Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期一, 06 十一月 2023 23:40:59 +0800
Subject: [PATCH] 更新仓内抓拍2

---
 igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java |   34 +++++++++++++++++++++++-----------
 1 files changed, 23 insertions(+), 11 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 d04efe0..f1e57fb 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
@@ -144,6 +144,11 @@
         htmlStr = htmlStr.replace("remark", bill.getRemark());
         htmlStr = htmlStr.replace("moneyName", bill.getMoneyName());
 
+        htmlStr = htmlStr.replace("unitName", bill.getUnitName());
+        htmlStr = htmlStr.replace("time", bill.getRegisterTime());
+        htmlStr = htmlStr.replace("handleStart", "");
+        htmlStr = htmlStr.replace("handleEnd", "");
+
         htmlStr = htmlStr.replaceAll("weightUser",
                 bill.getWeightUser() == null ? "" : bill.getWeightUser());
         htmlStr = htmlStr.replaceAll("handleUser",
@@ -236,7 +241,7 @@
         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());
@@ -244,13 +249,21 @@
         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());
+        htmlStr = htmlStr.replace("unitName", getValue(bill.getUnitName()));
+        htmlStr = htmlStr.replace("time", bill.getRegisterTime());
+        htmlStr = htmlStr.replace("handleStart", "");
+        htmlStr = htmlStr.replace("handleEnd", "");
+
+        htmlStr = htmlStr.replaceAll("weightUser", getValue(bill.getWeightUser()));
+        htmlStr = htmlStr.replace("handleUser", getValue(bill.getHandleUser()));
+        htmlStr = htmlStr.replaceAll("keeperName", getValue(bill.getKeeperUser()));
         return htmlStr;
+    }
+
+
+    public String getValue(String value) {
+        if (null == value) return "";
+        return value;
     }
 
     /**
@@ -347,12 +360,12 @@
         }
         bill.setSettleMoney(data.getSettleMoney() == null ? "" : data.getSettleMoney() + "");
         bill.setRemark(data.getRemarks() == null ? "" : data.getRemarks());
+        bill.setDeSum(data.getDeCheck() + data.getDeOther() + data.getDeHandle() + data.getDePackage());
 
-
-        if(InoutConstant.TYPE_IN.equals(data.getType())){
+        if (InoutConstant.TYPE_IN.equals(data.getType())) {
             bill.setWeightUser(data.getFullWeightUser());
         }
-        if(InoutConstant.TYPE_OUT.equals(data.getType())){
+        if (InoutConstant.TYPE_OUT.equals(data.getType())) {
             bill.setWeightUser(data.getEmptyWeightUser());
         }
         bill.setHandleUser(data.getHandleUser());
@@ -839,6 +852,5 @@
         List<String> strings3 = result.subList(6, 8);
         System.out.println(strings3);
     }
-
 
 }
\ No newline at end of file

--
Gitblit v1.9.3