| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.appendix.service.AppendixService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | import com.ruoyi.production.enums.ProductOrderStatusEnum; |
| | | import com.ruoyi.production.pojo.ProductMaterialSku; |
| | | import com.ruoyi.production.pojo.ProductOrder; |
| | | import com.ruoyi.production.service.IProductionOrderAppendixService; |
| | | import com.ruoyi.production.service.ProductMaterialService; |
| | | import com.ruoyi.production.service.ProductMaterialSkuService; |
| | | import com.ruoyi.production.service.ProductOrderService; |
| | |
| | | private ProductMaterialService productMaterialService; |
| | | |
| | | @Autowired |
| | | private AppendixService appendixService; |
| | | private IProductionOrderAppendixService productionOrderAppendixService; |
| | | |
| | | /** |
| | | * 同步锁,确保手动和定时任务不同时执行 |
| | |
| | | |
| | | // 当下发的产品为砌块或板材,就拉取BOM子集与工艺路线子集数据存入到附表中 |
| | | if ("砌块".equals(productionPlanDto.getProductName())) { |
| | | productOrder.setRouteId(appendixService.populateBlocks(orderId, productionPlanDto)); |
| | | productOrder.setRouteId(productionOrderAppendixService.populateBlocks(orderId, productionPlanDto)); |
| | | } |
| | | if ("板材".equals(productionPlanDto.getProductName())) { |
| | | productOrder.setRouteId(appendixService.populatePlates(orderId, productionPlanDto)); |
| | | productOrder.setRouteId(productionOrderAppendixService.populatePlates(orderId, productionPlanDto)); |
| | | } |
| | | // 更新绑定的工艺路线 |
| | | productOrderService.updateById(productOrder); |