春风项目四线(合箱线、总装线)
wujian
2024-03-22 9e6d86cfea30f99668cde150b49abae780239a55
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -35,6 +35,8 @@
    @Autowired
    private ProductProcessService productProcessService;
    private static final String ZERO = "0";
    /**
     * 查询配方配置子信息列表
     */
@@ -49,19 +51,45 @@
            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);
    }