| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.production.dto.ProductOrderDto; |
| | | import com.ruoyi.production.dto.ProductionProductMainDto; |
| | | import com.ruoyi.production.mapper.ProductOrderMapper; |
| | | import com.ruoyi.production.mapper.ProductionOrderRouteMapper; |
| | | import com.ruoyi.production.mapper.ProductionProductMainMapper; |
| | |
| | | private ProductionProductMainMapper productionProductMainMapper; |
| | | |
| | | @Override |
| | | public TrackDto trackProgressByNo(String applyNo) { |
| | | public TrackDto trackProgressByNo(Long productionPlanId) { |
| | | TrackDto trackDto = new TrackDto(); |
| | | //生产计划数据 |
| | | ProductionPlanDto planDto = new ProductionPlanDto(); |
| | | planDto.setApplyNo(applyNo); |
| | | ProductionPlanDto productionPlanDto = productionPlanMapper.listPage(new Page(1, -1), planDto).getRecords().get(0); |
| | | ProductionPlanDto productionPlanDto=productionPlanMapper.selectProductionPlanDtoById(productionPlanId); |
| | | trackDto.setProductionPlanDto(productionPlanDto); |
| | | //生产订单数据 |
| | | List<OrderDto> orderDtos = listByApplyNo(productionPlanDto); |
| | |
| | | ProductOrderDto productOrderDto=productOrderMapper.getProductOrderDto(productOrderPlan.getProductOrderId()); |
| | | orderDto.setProductOrderDto(productOrderDto); |
| | | //报工详情 |
| | | List<ProductionProductMain> productionProductMains = productionProductMainMapper.selectList(Wrappers.<ProductionProductMain>lambdaQuery() |
| | | .eq(ProductionProductMain::getProductOrderId, productOrderPlan.getProductOrderId()) |
| | | .orderByAsc(ProductionProductMain::getReportingTime)); |
| | | orderDto.setProductionProductMains(productionProductMains); |
| | | List<ProductionProductMainDto> productionProductMainDtos = productionProductMainMapper.selectProductionProductMainDto(productOrderPlan.getProductOrderId()); |
| | | orderDto.setProductionProductMainDtos(productionProductMainDtos); |
| | | orderDtos.add(orderDto); |
| | | }); |
| | | return orderDtos; |