| | |
| | | |
| | | private final PendingInventoryMapper pendingInventoryMapper; |
| | | |
| | | private final ProductionSchedulingMapper productionSchedulingMapper; |
| | | |
| | | @Override |
| | | public IPage<ProductionMasterDto> selectPMList(Page page, ProductionMasterDto productionMasterDto) { |
| | | // 1. 构建主表查询条件 |
| | |
| | | .collect(Collectors.toList()); |
| | | productionInventoryMapper.deleteBatchIds(inventoryIds); |
| | | } |
| | | List<Production> productions = productionMapper.selectList(new LambdaQueryWrapper<Production>() |
| | | .in(Production::getProductionMasterId, idList)); |
| | | |
| | | // 删除生产报工记录 |
| | | productionSchedulingMapper.delete( |
| | | new LambdaQueryWrapper<ProductionScheduling>() |
| | | .in(ProductionScheduling::getProductionId, productions.stream().map(Production::getId).collect(Collectors.toList())) |
| | | ); |
| | | |
| | | // 删除生产明细 |
| | | productionMapper.delete( |
| | |
| | | .in(Production::getProductionMasterId, idList) |
| | | ); |
| | | |
| | | |
| | | // 5. 删除主记录 |
| | | return productionMasterMapper.deleteBatchIds(idList); |
| | | } |