| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.yuanchu.mom.pojo.StandardTree; |
| | | import com.yuanchu.mom.service.InsOrderService; |
| | | import com.yuanchu.mom.service.StandardMethodListService; |
| | | import com.yuanchu.mom.service.StandardProductListService; |
| | | import com.yuanchu.mom.service.StandardTreeService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | private StandardTreeService standardTreeService; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | private InsOrderService insOrderService; |
| | | |
| | | @ApiOperation(value = "获取标准树") |
| | | @GetMapping("/selectStandardTreeList") |
| | | public Result selectStandardTreeList(){ |
| | |
| | | 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") |
| | | @ValueAuth |
| | | public Result selectsStandardMethodByFLSSM(String tree){ |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改标准库中的要求值") |
| | | @PostMapping("/upStandardProductList") |
| | | public Result upStandardProductList(@RequestBody StandardProductList list){ |
| | | return Result.success(standardProductListService.upStandardProductList(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") |
| | | public Result delStandardTree(String tree){ |
| | | return Result.success(standardTreeService.delStandardTree(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "外部获取检测数据") |
| | | @GetMapping("/getOrderThing") |
| | | @ValueAuth |
| | | public Result getOrderThing(){ |
| | | return Result.success(insOrderService.getOrderThing()); |
| | | } |
| | | |
| | | } |