From 5a8389338e7ae54049e2ff7b01e431a568910610 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期三, 01 十一月 2023 14:19:26 +0800
Subject: [PATCH] 药剂Id生成--三位顺序号
---
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 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 757202e..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
@@ -241,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());
@@ -249,18 +249,21 @@
htmlStr = htmlStr.replace("wet", bill.getWet() + "");
htmlStr = htmlStr.replace("impurity", bill.getImpurity() + "");
- htmlStr = htmlStr.replace("unitName", bill.getUnitName());
+ 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",
- 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.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;
}
/**
@@ -359,10 +362,10 @@
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());
--
Gitblit v1.9.3