|  |  |  | 
|---|
|  |  |  | 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", | 
|---|
|  |  |  | 
|---|
|  |  |  | 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("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; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 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()); | 
|---|
|  |  |  | 
|---|
|  |  |  | (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"); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //        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; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | List<String> strings3 = result.subList(6, 8); | 
|---|
|  |  |  | System.out.println(strings3); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|