YYC
2026-02-27 1369c87ddcc0e76e17d01208ef66261ee0cd27da
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutRecordService.java
@@ -24,7 +24,6 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -137,13 +136,13 @@
            queryWrapper.eq("settle_tag", param.getSettleTag());
        }
        if (null != param.getStart()) {
            queryWrapper.ge("create_time", DateUtil.getCurZero(param.getStart()));
            queryWrapper.ge("complete_time", DateUtil.getCurZero(param.getStart()));
        }
        if (null != param.getEnd()) {
            queryWrapper.le("create_time", DateUtil.getNextZero(param.getEnd()));
            queryWrapper.le("complete_time", DateUtil.getNextZero(param.getEnd()));
        }
        queryWrapper.ne("record_status", Constant.RECORD_STATUS_DEL); //不是删除的单子,即正常的单子
        queryWrapper.orderByDesc("create_time");
        queryWrapper.orderByDesc("complete_time");
        return queryWrapper;
    }
@@ -688,10 +687,10 @@
    public String inWeightBill(InoutRecord data) {
        // 获取表单数据
        InoutPrintBill bill = this.createBillData(data, "-入库单");
        InoutPrintBill bill = this.createBillData(data, "入库单");
        // 调整模版数据并返回
        String htmlStr = InoutBill.IN_WEIGHT_DEFAULT;
        String htmlStr = InoutBill.IN_WEIGHT_DEFAULT_NEW;
        htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
@@ -749,7 +748,7 @@
        htmlStr = htmlStr.replace("handleEnd", "");
        htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId());
        htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + "");
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm"));
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
        htmlStr = htmlStr.replaceAll("weightUser",
                bill.getWeightUser() == null ? "" : bill.getWeightUser());
@@ -757,7 +756,7 @@
                bill.getHandleUser() == null ? "" : bill.getHandleUser());
        htmlStr = htmlStr.replaceAll("keeperName",
                bill.getKeeperUser() == null ? "" : bill.getKeeperUser());
        htmlStr = htmlStr.replaceAll("createUser",ContextUtil.getLoginUserName());
        return htmlStr;
    }
@@ -770,10 +769,10 @@
     */
    public String outWeightBill(InoutRecord data) {
        // 获取表单数据
        InoutPrintBill bill = this.createBillData(data, "-出库单");
        InoutPrintBill bill = this.createBillData(data, "出库单");
        //默认模版
        String htmlStr = InoutBill.OUT_WEIGHT_DEFAULT;
        String htmlStr = InoutBill.OUT_WEIGHT_DEFAULT_NEW;
        htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
@@ -822,11 +821,13 @@
        htmlStr = htmlStr.replace("handleEnd", "");
        htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId());
        htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + "");
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm"));
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
        htmlStr = htmlStr.replaceAll("weightUser", getValue(bill.getWeightUser()));
        htmlStr = htmlStr.replace("handleUser", getValue(bill.getHandleUser()));
        htmlStr = htmlStr.replaceAll("keeperName", getValue(bill.getKeeperUser()));
        htmlStr = htmlStr.replaceAll("createUser",ContextUtil.getLoginUserName());
        return htmlStr;
    }
@@ -862,13 +863,13 @@
            data.setRegisterTime(new Date());
        }
        bill.setRegisterTime(DateFormatUtils.format(data.getRegisterTime(),
                "yyyy-MM-dd HH:mm"));
                "yyyy-MM-dd HH:mm:ss"));
        if (null == data.getCompleteTime()) {
            data.setCompleteTime(new Date());
        }
        bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(),
                "yyyy-MM-dd HH:mm"));
                "yyyy-MM-dd HH:mm:ss"));
        bill.setEmptyTime(DateFormatUtils.format(data.getEmptyWeightTime(),
                "yyyy-MM-dd HH:mm:ss"));
@@ -922,7 +923,7 @@
                data.setSettleMoney(NumberUtil.keepPrecision(data.getPrice() * data.getRecordWeight(), 2));
            }
        }
        bill.setSettleMoney(data.getSettleMoney() == null ? "" : data.getSettleMoney() + "");
        bill.setSettleMoney(data.getSettleMoney() == null ? "" : String.format("%.2f", data.getSettleMoney()));
        bill.setRemark(data.getRemarks() == null ? "" : data.getRemarks());
        if (Constant.TYPE_IN.equals(data.getType())) {