jiazx0107@163.com
2023-05-27 ff212e3d6cc57220133aff1d68b6bed02ba8a77b
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java
@@ -261,7 +261,7 @@
        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));
@@ -269,7 +269,7 @@
        }
        //客户信息
        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());
@@ -301,19 +301,19 @@
        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){
@@ -373,7 +373,7 @@
        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());
        }
@@ -449,13 +449,13 @@
    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());
        }
        // 调整模版数据并返回
@@ -473,26 +473,26 @@
        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(),
@@ -500,8 +500,8 @@
        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()));
@@ -514,8 +514,8 @@
                    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 ? ""