| | |
| | | bill.setFullTime(DateFormatUtils.format(data.getFullWeightTime(), |
| | | "yyyy-MM-dd HH:mm:ss")); |
| | | bill.setSerId(data.getId()); |
| | | bill.setSpecType(StringUtils.isEmpty(data.getSpecType())?"散粮":data.getSpecType()); |
| | | // bill.setSpecType(StringUtils.isEmpty(data.getSpecType())?"散粮":data.getSpecType()); |
| | | if ("5016".equals(data.getCompanyId())) { |
| | | bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(), "yyyy-MM-dd")); |
| | | bill.setSerId(data.getId().substring(2)); |
| | |
| | | } |
| | | |
| | | //客户信息 |
| | | bill.setCustomerId(data.getCustomerId() == null ? "" : data.getCustomerId()); |
| | | // bill.setCustomerId(data.getCustomerId() == null ? "" : data.getCustomerId()); |
| | | bill.setCustomerName(data.getCustomerName() == null ? "" : data.getCustomerName()); |
| | | bill.setUserId(data.getUserId() == null ? "" : data.getUserId()); |
| | | bill.setUserAddress(data.getUserAddress() == null ? "" : data.getUserAddress()); |
| | |
| | | bill.setEmptyWeight(data.getEmptyWeight()); |
| | | bill.setNetWeight(data.getNetWeight()); |
| | | |
| | | bill.setDeWet(data.getDeWet()); |
| | | bill.setDeImpurity(data.getDeImpurity()); |
| | | bill.setDeHandle(data.getDeHandle()); |
| | | bill.setDeOther(data.getDeOther()); |
| | | bill.setDeSum(data.getDeSum() == null ? 0.0 :data.getDeSum()); |
| | | // bill.setDeWet(data.getDeWet()); |
| | | // bill.setDeImpurity(data.getDeImpurity()); |
| | | // bill.setDeHandle(data.getDeHandle()); |
| | | // bill.setDeOther(data.getDeOther()); |
| | | // bill.setDeSum(data.getDeSum() == null ? 0.0 :data.getDeSum()); |
| | | |
| | | bill.setSettleWeight(data.getSettleWeight()); |
| | | if(data.getWet() != null && data.getWet() > 0){ |
| | | bill.setWet(data.getWet() +""); |
| | | } |
| | | if(data.getImpurity() != null && data.getImpurity() > 0){ |
| | | bill.setImpurity(data.getImpurity()+""); |
| | | } |
| | | // if(data.getWet() != null && data.getWet() > 0){ |
| | | // bill.setWet(data.getWet() +""); |
| | | // } |
| | | // if(data.getImpurity() != null && data.getImpurity() > 0){ |
| | | // bill.setImpurity(data.getImpurity()+""); |
| | | // } |
| | | |
| | | bill.setPrice(data.getPrice()== null ? "" :data.getPrice() + ""); |
| | | if(data.getSettleMoney() <= 0){ |
| | |
| | | String key; |
| | | for (CheckItemData item : checkLst) { |
| | | key = item.getStandardId() + "_ST"; |
| | | checkBillItems.put(key, item.getStandardValue()); |
| | | // checkBillItems.put(key, item.getStandardValue()); |
| | | key = item.getStandardId() + "_VAL"; |
| | | checkBillItems.put(key, item.getValue()); |
| | | } |
| | |
| | | public String inSettleBill(InoutData data, InoutSettle settle) { |
| | | |
| | | if (null != data) { |
| | | settle.setCompleteTime(data.getCompleteTime()); |
| | | // settle.setCompleteTime(data.getCompleteTime()); |
| | | settle.setDepotId(data.getDepotId()); |
| | | settle.setDeptId(data.getDeptId()); |
| | | settle.setUserName(data.getUserName()); |
| | | settle.setPlateNum(data.getPlateNum()); |
| | | settle.setFoodLevel(data.getFoodLevel()); |
| | | settle.setFoodVariety(data.getFoodVariety()); |
| | | // settle.setUserName(data.getUserName()); |
| | | // settle.setPlateNum(data.getPlateNum()); |
| | | // settle.setFoodLevel(data.getFoodLevel()); |
| | | // settle.setFoodVariety(data.getFoodVariety()); |
| | | } |
| | | |
| | | // 调整模版数据并返回 |
| | |
| | | htmlStr = htmlStr.replace("payTime", time); |
| | | htmlStr = htmlStr.replace("serId", settle.getId()); |
| | | |
| | | htmlStr = htmlStr.replace( |
| | | "customerName", |
| | | settle.getCustomerName() == null ? "" : settle |
| | | .getCustomerName()); |
| | | // htmlStr = htmlStr.replace( |
| | | // "customerName", |
| | | // settle.getCustomerName() == null ? "" : settle |
| | | // .getCustomerName()); |
| | | htmlStr = htmlStr.replace("deptName", |
| | | dept == null ? "" : dept.getName()); |
| | | |
| | | htmlStr = htmlStr.replace("bank", settle.getBank() == null ? "" |
| | | : settle.getBank()); |
| | | htmlStr = htmlStr.replace("fullWeight", |
| | | new DecimalFormat("0").format(settle.getFullWeight())); |
| | | htmlStr = htmlStr.replace("emptyWeight", |
| | | new DecimalFormat("0").format(settle.getEmptyWeight())); |
| | | // htmlStr = htmlStr.replace("fullWeight", |
| | | // new DecimalFormat("0").format(settle.getFullWeight())); |
| | | // htmlStr = htmlStr.replace("emptyWeight", |
| | | // new DecimalFormat("0").format(settle.getEmptyWeight())); |
| | | |
| | | htmlStr = htmlStr.replace("banNum", settle.getBankNum() == null ? "" |
| | | : settle.getBankNum()); |
| | | htmlStr = htmlStr.replace("netWeight", |
| | | new DecimalFormat("0").format(settle.getNetWeight())); |
| | | htmlStr = htmlStr.replace("deSum", |
| | | new DecimalFormat("0").format(settle.getDeSum())); |
| | | // htmlStr = htmlStr.replace("netWeight", |
| | | // new DecimalFormat("0").format(settle.getNetWeight())); |
| | | // htmlStr = htmlStr.replace("deSum", |
| | | // new DecimalFormat("0").format(settle.getDeSum())); |
| | | |
| | | // 获取仓库信息 |
| | | Depot depot = commonService.getCacheDepot(settle.getCompanyId(), |
| | |
| | | |
| | | htmlStr = htmlStr.replace("depotName", |
| | | depot == null ? "" : depot.getName()); |
| | | htmlStr = htmlStr.replace("foodVariety", |
| | | FoodVariety.getMsg(settle.getFoodVariety())); |
| | | // htmlStr = htmlStr.replace("foodVariety", |
| | | // FoodVariety.getMsg(settle.getFoodVariety())); |
| | | htmlStr = htmlStr.replace("payPrice", settle.getPayPrice() + ""); |
| | | htmlStr = htmlStr.replace("settleWeight", |
| | | new DecimalFormat("0").format(settle.getSettleWeight())); |
| | |
| | | depot.getStoreKeeperName() == null ? "" : depot |
| | | .getStoreKeeperName()); |
| | | } |
| | | htmlStr = htmlStr.replace("driverName", settle.getUserName() + ""); |
| | | htmlStr = htmlStr.replace("otherSum", settle.getOtherSum() + ""); |
| | | // htmlStr = htmlStr.replace("driverName", settle.getUserName() + ""); |
| | | // htmlStr = htmlStr.replace("otherSum", settle.getOtherSum() + ""); |
| | | htmlStr = htmlStr.replace("paySum", settle.getPaySum() + ""); |
| | | |
| | | htmlStr = htmlStr.replace("remark", settle.getRemarks() == null ? "" |