liyong
2026-04-25 9ae904fc85b1d8bfa9cccba9bf72f347365015f7
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -160,8 +160,13 @@
        productionProductMain.setAuditUserId(dto.getAuditUserId());
        productionProductMain.setAuditUserName(dto.getAuditUserName());
        productionProductMain.setStatus(0);
        productionProductMain.setStartTime(productWorkOrder.getStartProductTime());
        productionProductMain.setEndTime(now);
        if (ObjectUtils.isNotEmpty(dto.getStartTime())&&ObjectUtils.isNotEmpty(dto.getEndTime())) {
            productionProductMain.setStartTime(dto.getStartTime());
            productionProductMain.setEndTime(dto.getEndTime());
        }else {
            productionProductMain.setStartTime(productWorkOrder.getStartProductTime());
            productionProductMain.setEndTime(now);
        }
        productionProductMain.setDeviceId(productProcess.getDeviceId());
        productionProductMain.setDeviceName(productProcess.getDeviceName());
        productionProductMainMapper.insert(productionProductMain);
@@ -365,8 +370,8 @@
            SalesLedgerProductionAccounting salesLedgerProductionAccounting = SalesLedgerProductionAccounting.builder()
                    .productMainId(productionProductMain.getId())
                    .schedulingUserId(user.getUserId())
                    .schedulingUserName(user.getNickName())
                    .schedulingUserId(productionProductMain.getUserId())
                    .schedulingUserName(userMapper.selectUserById(productionProductMain.getUserId()).getNickName())
                    .finishedNum(productQty)
                    .workHours(workHours)
                    .process(productProcess.getName())