zss
2024-05-30 a26151eff700b514ca92b0ac9207200b866071fc
inspect-server/src/main/java/com/yuanchu/mom/controller/StandardTreeController.java
@@ -11,13 +11,16 @@
import com.yuanchu.mom.service.StandardProductListService;
import com.yuanchu.mom.service.StandardTreeService;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@RestController
@AllArgsConstructor
@RequestMapping("/standardTree")
@Api(tags="标准库")
public class StandardTreeController {
    private StandardTreeService standardTreeService;
@@ -103,6 +106,20 @@
        return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page));
    }
    @ApiOperation(value = "批量编辑查询检验项目")
    @PostMapping("/selectStandardProductByMethodId")
    @ValueAuth
    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")
    @ValueAuth
    public Result selectStandardProductEnumByMethodId(Integer id, String tree){
        return Result.success(standardProductListService.selectStandardProductEnumByMethodId(id, tree));
    }
    @ApiOperation(value = "获取标准树下标准方法枚举")
    @GetMapping("/selectStandardMethodEnum")
    @ValueAuth
@@ -117,4 +134,21 @@
        return Result.success(standardTreeService.getStandardTree2());
    }
    @ValueClassify("标准库")
    @ApiOperation(value = "批量修改项目内容")
    @PostMapping("/upStandardProducts")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "standardProductList",dataTypeClass = StandardProductList.class),
            @ApiImplicitParam(name = "ids",dataTypeClass = Integer.class)
    })
    public Result upStandardProducts(@RequestBody Map<String, Object> product){
        return Result.success(standardTreeService.upStandardProducts(product));
    }
    @ValueAuth
    @PostMapping("/getStandTreeBySampleType")
    @ApiModelProperty("仅获取光纤的型号")
    public Result<?> getStandTreeBySampleType(String laboratory, String sampleType){
        return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType));
    }
}