| | |
| | | @Autowired |
| | | private ProductProcessService productProcessService; |
| | | |
| | | private static final String ZERO = "0"; |
| | | |
| | | /** |
| | | * 查询配方配置子信息列表 |
| | | */ |
| | |
| | | formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement()); |
| | | formulaChildInfo.setImg(formulaChildInfo.getPicture()); |
| | | } |
| | | list = list.stream().sorted(Comparator.comparing(BsFormulaChildInfo::getSort)).collect(Collectors.toList()); |
| | | |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 查询工艺流程 |
| | | * @param productProcessQuery query |
| | | * @param bsFormulaChildInfo query |
| | | * @return list |
| | | */ |
| | | @PostMapping("/getProductProcess") |
| | | public TableDataInfo getProductProcess(@RequestBody ProductProcessQuery productProcessQuery) |
| | | public TableDataInfo getProductProcess(@RequestBody BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | List<BsFormulaChildInfo> list = productProcessService.getProductProcess(productProcessQuery); |
| | | List<BsFormulaChildInfo> list = bsFormulaChildInfoService.selectBsFormulaChildInfoList(bsFormulaChildInfo); |
| | | for (BsFormulaChildInfo formulaChildInfo : list) { |
| | | formulaChildInfo.setSort(formulaChildInfo.getStepSort()); |
| | | formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement()); |
| | | formulaChildInfo.setImg(formulaChildInfo.getPicture()); |
| | | } |
| | | list = list.stream() |
| | | .filter(x -> !ZERO.equals(x.getSort())).sorted(Comparator.comparing(BsFormulaChildInfo::getSort)).collect(Collectors.toList()); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 查询工艺文件 |
| | | * @param bsFormulaChildInfo query |
| | | * @return list |
| | | */ |
| | | @PostMapping("/getMainProductProcess") |
| | | public TableDataInfo getMainProductProcess(@RequestBody BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | List<BsFormulaChildInfo> list = bsFormulaChildInfoService.selectBsFormulaChildInfoList(bsFormulaChildInfo); |
| | | for (BsFormulaChildInfo formulaChildInfo : list) { |
| | | formulaChildInfo.setSort(formulaChildInfo.getStepSort()); |
| | | formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement()); |
| | | formulaChildInfo.setImg(formulaChildInfo.getPicture()); |
| | | } |
| | | list = list.stream() |
| | | .filter(x -> ZERO.equals(x.getSort())).sorted(Comparator.comparing(BsFormulaChildInfo::getSort)).collect(Collectors.toList()); |
| | | return getDataTable(list); |
| | | } |
| | | |