| | |
| | | productionProductMain.setAuditUserId(dto.getAuditUserId()); |
| | | productionProductMain.setAuditUserName(dto.getAuditUserName()); |
| | | productionProductMain.setStatus(0); |
| | | productionProductMain.setStartTime(productWorkOrder.getStartProductTime()); |
| | | productionProductMain.setEndTime(now); |
| | | productionProductMain.setDeviceId(productProcess.getDeviceId()); |
| | | productionProductMain.setDeviceName(productProcess.getDeviceName()); |
| | | 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); |
| | | /*新增报工投入表*/ |
| | | List<ProductStructureDto> productStructureDtos = productStructureMapper.listBybomAndProcess(productProcessRoute.getBomId(), productProcess.getId()); |
| | |
| | | |
| | | 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()) |