| | |
| | | import com.yuanchu.mom.service.StandardProductListService; |
| | | import com.yuanchu.mom.service.StandardTreeService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.*; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Map; |
| | | |
| | |
| | | @ValueClassify("标准库") |
| | | @ApiOperation(value = "修改标准库中的内容") |
| | | @PostMapping("/upStandardProductList") |
| | | public Result upStandardProductList(@RequestBody StandardProductList list){ |
| | | public Result upStandardProductList(String str){ |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.upStandardProductList(list)); |
| | | } |
| | | @ValueAuth |
| | |
| | | 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 |
| | |
| | | public Result upStandardProducts(@RequestBody Map<String, Object> product){ |
| | | return Result.success(standardTreeService.upStandardProducts(product)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @PostMapping("/getStandTreeBySampleType") |
| | | @ApiOperation("仅获取光纤的型号") |
| | | public Result<?> getStandTreeBySampleType(String laboratory, String sampleType){ |
| | | return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType)); |
| | | } |
| | | |
| | | @ValueClassify("标准库") |
| | | @ApiOperation("导入标准库") |
| | | @PostMapping("/inExcelOfTree") |
| | | public Result inExcelOfTree(@RequestParam("file") MultipartFile file){ |
| | | standardTreeService.inExcelOfTree(file); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation("重置标准库单价") |
| | | @PostMapping("/resetTreeOfPrice") |
| | | public Result resetTreeOfPrice(String tree, Integer standardId){ |
| | | standardTreeService.resetTreeOfPrice(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation("重置标准库工时系数") |
| | | @PostMapping("/resetTreeOfHour") |
| | | public Result resetTreeOfHour(String tree, Integer standardId){ |
| | | standardTreeService.resetTreeOfHour(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | } |