zhuo
2025-02-24 6888584781c77de6854b62f93a57dcce53240cf9
basic-server/src/main/java/com/ruoyi/basic/controller/StandardTreeController.java
@@ -57,53 +57,30 @@
        return Result.success(standardTreeService.addStandardTree(standardTree));
    }
    @ApiOperation(value = "给标准树添加检验标准")
    @PostMapping("/addStandardMethodList")
    public Result addStandardMethodList(String tree, Integer standardId) {
        return Result.success(standardMethodListService.addStandardMethodList(standardId, tree));
    }
    @ApiOperation(value = "根据标准树进行标准查询")
    @PostMapping("/selectsStandardMethodByFLSSM")
    @GetMapping("/selectsStandardMethodByFLSSM")
    public Result selectsStandardMethodByFLSSM(String tree) {
        return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree));
    }
    @ApiOperation(value = "修改标准库中的内容")
    @PostMapping("/upStandardProductList")
    public Result upStandardProductList(String str) {
    public Result upStandardProductList(@RequestBody Map<String, String> map) {
        String str = map.get("str");
        StandardProductList list = JSON.parseObject(str, StandardProductList.class);
        return Result.success(standardProductListService.upStandardProductList(list));
    }
    @ApiOperation(value = "修改标准库区间")
    @PostMapping("/updateSection")
    public Result updateSection(String str) {
    public Result updateSection(@RequestBody Map<String, String> map) {
        String str = map.get("str");
        StandardProductList list = JSON.parseObject(str, StandardProductList.class);
        return Result.success(standardProductListService.updateSection(list));
    }
    @ApiOperation(value = "删除标准树下的检验标准")
    @PostMapping("/delStandardMethodByFLSSM")
    public Result delStandardMethodByFLSSM(Integer id) {
        return Result.success(standardMethodListService.delStandardMethodByFLSSM(id));
    }
    @ApiOperation(value = "删除标准树下的检验项目")
    @PostMapping("/delStandardProductByIds")
    public Result delStandardProductByIds(String ids) {
        JSONArray lists = JSON.parseArray(ids);
        return Result.success(standardProductListService.delStandardProduct(lists));
    }
    @ApiOperation(value = "新增标准树下的检验项目")
    @PostMapping("/addStandardProduct")
    public Result addStandardProduct(String ids, String tree) {
        return Result.success(standardTreeService.addStandardProduct(ids, tree));
    }
    @ApiOperation(value = "删除标准树的层级")
    @PostMapping("/delStandardTree")
    @DeleteMapping("/delStandardTree")
    public Result delStandardTree(String tree) {
        return Result.success(standardTreeService.delStandardTree(tree));
    }
@@ -115,19 +92,19 @@
    }
    @ApiOperation(value = "通过检验标准查询检验项目")
    @PostMapping("/selectStandardProductListByMethodId")
    public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page) {
        return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page));
    @GetMapping("/selectStandardProductListByMethodId")
    public Result selectStandardProductListByMethodId(Integer id, String tree) {
        return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree));
    }
    @ApiOperation(value = "批量编辑查询检验项目")
    @PostMapping("/selectStandardProductByMethodId")
    @ApiOperation(value = "批量查询检验项目")
    @GetMapping("/selectStandardProductByMethodId")
    public Result selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items) {
        return Result.success(standardProductListService.selectStandardProductByMethodId(id, tree, page, laboratory, item, items));
    }
    @ApiOperation(value = "批量编辑查询所有检验项目和检验子项枚举")
    @PostMapping("/selectStandardProductEnumByMethodId")
    @ApiOperation(value = "批量查询所有检验项目和检验子项枚举")
    @GetMapping("/selectStandardProductEnumByMethodId")
    public Result selectStandardProductEnumByMethodId(Integer id, String tree, String item) {
        return Result.success(standardProductListService.selectStandardProductEnumByMethodId(id, tree, item));
    }
@@ -154,8 +131,8 @@
        return Result.success(standardTreeService.upStandardProducts(product));
    }
    @PostMapping("/getStandTreeBySampleType")
    @ApiOperation("仅获取光纤的型号")
    @GetMapping("/getStandTreeBySampleType")
    public Result<?> getStandTreeBySampleType(String laboratory, String sampleType) {
        return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType));
    }
@@ -173,21 +150,27 @@
    @ApiOperation("重置标准库单价")
    @PostMapping("/resetTreeOfPrice")
    public Result resetTreeOfPrice(String tree, Integer standardId) {
    public Result resetTreeOfPrice(@RequestBody Map<String, Object> map) {
        String tree = (String) map.get("tree");
        Integer standardId = (Integer) map.get("standardId");
        standardTreeService.resetTreeOfPrice(tree, standardId);
        return Result.success();
    }
    @ApiOperation("重置标准库工时系数")
    @PostMapping("/resetTreeOfHour")
    public Result resetTreeOfHour(String tree, Integer standardId) {
    public Result resetTreeOfHour(@RequestBody Map<String, Object> map) {
        String tree = (String) map.get("tree");
        Integer standardId = (Integer) map.get("standardId");
        standardTreeService.resetTreeOfHour(tree, standardId);
        return Result.success();
    }
    @ApiOperation("重置标准库要求描述和要求值")
    @PostMapping("/resetTreeOfAsk")
    public Result resetTreeOfAsk(String tree, Integer standardId) {
    public Result resetTreeOfAsk(@RequestBody Map<String, Object> map) {
        String tree = (String) map.get("tree");
        Integer standardId = (Integer) map.get("standardId");
        standardTreeService.resetTreeOfAsk(tree, standardId);
        return Result.success();
    }
@@ -217,27 +200,29 @@
    @ApiOperation(value = "根据产品id查询厂家要求值绑定")
    @PostMapping("/selectSupplierAsk")
    public Result selectSupplierAsk(StandardProductListSupplierAsk supplierAsk) throws Exception {
    public Result selectSupplierAsk(@RequestBody StandardProductListSupplierAsk supplierAsk) throws Exception {
        return Result.success(standardProductListSupplierAskService.selectByProductId(supplierAsk));
    }
    @ApiOperation(value = "新增厂家要求值绑定")
    @PostMapping("/addProductSupplierAsk")
    public Result addProductSupplierAsk(String str) {
    public Result addProductSupplierAsk(@RequestBody Map<String, String> map) {
        String str = map.get("str");
        StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class);
        return Result.success(standardProductListSupplierAskService.addProductSupplierAsk(supplierAsk));
    }
    @ApiOperation(value = "更新厂家要求值绑定")
    @PostMapping("/updateProductSupplierAsk")
    public Result updateProductSupplierAsk(String str) {
    public Result updateProductSupplierAsk(@RequestBody Map<String, String> map) {
        String str = map.get("str");
        StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class);
        standardProductListSupplierAskService.updateProductSupplierAsk(supplierAsk);
        return Result.success();
    }
    @ApiOperation(value = "删除厂家要求值绑定")
    @PostMapping("/deleteProductSupplierAsk")
    @DeleteMapping("/deleteProductSupplierAsk")
    public Result deleteProductSupplierAsk(Integer supplierAskId) {
        standardProductListSupplierAskService.removeById(supplierAskId);
        return Result.success();