| | |
| | | if (CollectionUtils.isEmpty(mainList)) return new ArrayList<>(); |
| | | |
| | | List<Long> mainIds = mainList.stream().map(ProductionProductMain::getId).collect(Collectors.toList()); |
| | | |
| | | |
| | | // 获取投入明细 |
| | | List<ProductionProductInput> allInputs = productionProductInputService.list(Wrappers.<ProductionProductInput>lambdaQuery() |
| | | .in(ProductionProductInput::getProductMainId, mainIds)); |
| | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Long> manage() { |
| | | Map<String, Long> map = new HashMap<>(); |
| | | //生产订单总数 |
| | | Long total = productOrderMapper.selectCount(new QueryWrapper<ProductOrder>().ne("status", 4)); |
| | | map.put("total", total); |
| | | //已完成订单数 |
| | | Long completed = productOrderMapper.selectCount(new QueryWrapper<ProductOrder>().eq("status", 3)); |
| | | map.put("completed", completed); |
| | | //未完成订单数 |
| | | Long uncompleted = productOrderMapper.selectCount(new QueryWrapper<ProductOrder>().eq("status", 1)); |
| | | map.put("uncompleted", uncompleted); |
| | | //部分完成订单数 |
| | | Long partialCompleted = productOrderMapper.selectCount(new QueryWrapper<ProductOrder>().eq("status", 2)); |
| | | map.put("partialCompleted", partialCompleted); |
| | | //来料检总数 |
| | | Long materialInspection = qualityInspectMapper.selectCount(new QueryWrapper<QualityInspect>().eq("inspect_type", 0)); |
| | | map.put("materialInspection", materialInspection); |
| | | return map; |
| | | } |
| | | } |