| | |
| | | productOrder.setQuantity(productionPlanDto.getTotalAssignedQuantity()); |
| | | productOrder.setPlanCompleteTime(productionPlanDto.getPlanCompleteTime()); |
| | | productOrder.setStatus(ProductOrderStatusEnum.WAIT.getCode()); |
| | | productOrder.setStrength(productionPlanDto.getStrength()); |
| | | |
| | | Long orderId = productOrderService.insertProductOrder(productOrder); |
| | | |
| | | // 当下发的产品为砌块或板材,就拉取BOM子集与工艺路线子集数据存入到附表中 |
| | | if ("砌块".equals(productionPlanDto.getProductName())) { |
| | | productOrder.setRouteId(appendixService.populateBlocks(productionPlanDto)); |
| | | productOrder.setRouteId(appendixService.populateBlocks(orderId, productionPlanDto)); |
| | | } |
| | | if ("板材".equals(productionPlanDto.getProductName())) { |
| | | productOrder.setRouteId(appendixService.populatePlates(productionPlanDto)); |
| | | productOrder.setRouteId(appendixService.populatePlates(orderId, productionPlanDto)); |
| | | } |
| | | productOrderService.addProductOrder(productOrder); |
| | | // 更新绑定的工艺路线 |
| | | productOrderService.updateById(productOrder); |
| | | |
| | | // 根据下发数量,从第一个生产计划开始分配方数 |
| | | BigDecimal assignedVolume = BigDecimal.ZERO; |