| | |
| | | } |
| | | } |
| | | productOrderMapper.updateById(productOrder); |
| | | /*添加生产核算*/ |
| | | /*添加生产核算 区分工序是计件还是计时*/ |
| | | BigDecimal workHours = (productProcess.getType() == 1) |
| | | ? productProcess.getSalaryQuota().multiply(productQty) |
| | | : productProcess.getSalaryQuota(); |
| | | |
| | | SalesLedgerProductionAccounting salesLedgerProductionAccounting = SalesLedgerProductionAccounting.builder() |
| | | .productMainId(productionProductMain.getId()) |
| | | .schedulingUserId(user.getUserId()) |
| | | .schedulingUserName(user.getNickName()) |
| | | .finishedNum(productQty) |
| | | .workHours(productProcess.getSalaryQuota()) |
| | | .workHours(workHours) |
| | | .process(productProcess.getName()) |
| | | .schedulingDate(LocalDate.now()) |
| | | .tenantId(dto.getTenantId()) |