¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.ruoyi.basic.pojo.InsSample1; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.service.StandardMethodListService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StandardTreeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/standardTree") |
| | | @Api(tags = "æ ååº") |
| | | public class StandardTreeController { |
| | | |
| | | private StandardTreeService standardTreeService; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | @ApiOperation(value = "æ¥çæ ååºå表") |
| | | @GetMapping("/selectStandardTreeList") |
| | | public Result selectStandardTreeList() { |
| | | return Result.success(standardTreeService.selectStandardTreeList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ åæ (æ£éªä¸å)") |
| | | @GetMapping("/selectStandardTreeList2") |
| | | public Result selectStandardTreeList2() { |
| | | return Result.success(standardTreeService.selectStandardTreeList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å æ åæ ") |
| | | @PostMapping("/addStandardTree") |
| | | public Result addStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.addStandardTree(standardTree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»æ åæ æ·»å æ£éªæ å") |
| | | @PostMapping("/addStandardMethodList") |
| | | public Result addStandardMethodList(@RequestBody Map<String,Object> map) { |
| | | Integer standardId =(Integer) map.get("standardId"); |
| | | String tree =(String) map.get("tree"); |
| | | return Result.success(standardMethodListService.addStandardMethodList(standardId, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®æ åæ è¿è¡æ åæ¥è¯¢") |
| | | @GetMapping("/selectsStandardMethodByFLSSM") |
| | | public Result selectsStandardMethodByFLSSM(String tree) { |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹æ ååºä¸çå
容") |
| | | @PostMapping("/upStandardProductList") |
| | | 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 = "å 餿 åæ ä¸çæ£éªæ å") |
| | | @DeleteMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id) { |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªé¡¹ç®") |
| | | @DeleteMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids) { |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æ åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(@RequestBody Map<String,Object> map) { |
| | | String ids =(String) map.get("ids"); |
| | | String tree =(String) map.get("tree"); |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ çå±çº§") |
| | | @DeleteMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree) { |
| | | return Result.success(standardTreeService.delStandardTree(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ åæ æ¥è¯¢å¯¹åºçæ£éªé¡¹ç®") |
| | | @GetMapping("/selectStandardProductList") |
| | | public Result selectStandardProductList( InsSample1 insSample) { |
| | | return Result.success(standardProductListService.selectStandardProductList(insSample)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ£éªæ åæ¥è¯¢æ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(@RequestBody Map<String,Object> map ) { |
| | | Integer id =(Integer) map.get("id"); |
| | | String tree = (String)map.get("tree"); |
| | | Integer page = (Integer)map.get("page"); |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page)); |
| | | } |
| | | |
| | | @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 = "æ¹éç¼è¾æ¥è¯¢æææ£éªé¡¹ç®åæ£éªå项æä¸¾") |
| | | @GetMapping("/selectStandardProductEnumByMethodId") |
| | | public Result selectStandardProductEnumByMethodId(Integer id, String tree, String item) { |
| | | return Result.success(standardProductListService.selectStandardProductEnumByMethodId(id, tree, item)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ åæ ä¸æ åæ¹æ³æä¸¾") |
| | | @GetMapping("/selectStandardMethodEnum") |
| | | public Result selectStandardMethodEnum() { |
| | | return Result.success(standardMethodListService.selectStandardMethodEnum()); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åäº§åæ¶æ") |
| | | @GetMapping("/getStandardTree2") |
| | | public Result getStandardTree2() { |
| | | return Result.success(standardTreeService.getStandardTree2()); |
| | | } |
| | | |
| | | @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)); |
| | | } |
| | | |
| | | @GetMapping("/getStandTreeBySampleType") |
| | | @ApiOperation("ä»
è·åå
纤çåå·") |
| | | public Result<?> getStandTreeBySampleType(String laboratory, String sampleType) { |
| | | return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType)); |
| | | } |
| | | |
| | | @ApiOperation("导å
¥æ ååº") |
| | | @PostMapping("/inExcelOfTree/{isEquipment}") |
| | | public Result inExcelOfTree(@RequestParam("file") MultipartFile file, @PathVariable("isEquipment") Boolean isEquipment) { |
| | | if (!isEquipment) { |
| | | standardTreeService.inExcelOfTree(file); |
| | | } else { |
| | | standardTreeService.importWorkstationExcel(file); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("éç½®æ ååºåä»·") |
| | | @PostMapping("/resetTreeOfPrice") |
| | | public Result resetTreeOfPrice(@RequestBody Map<String,Object> map) { |
| | | Integer standardId =(Integer) map.get("standardId"); |
| | | String tree =(String) map.get("tree"); |
| | | standardTreeService.resetTreeOfPrice(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("éç½®æ ååºå·¥æ¶ç³»æ°") |
| | | @PostMapping("/resetTreeOfHour") |
| | | public Result resetTreeOfHour(@RequestBody Map<String,Object> map) { |
| | | Integer standardId =(Integer) map.get("standardId"); |
| | | String tree =(String) map.get("tree"); |
| | | standardTreeService.resetTreeOfHour(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("éç½®æ ååºè¦æ±æè¿°åè¦æ±å¼") |
| | | @PostMapping("/resetTreeOfAsk") |
| | | public Result resetTreeOfAsk(@RequestBody Map<String,Object> map) { |
| | | Integer standardId =(Integer) map.get("standardId"); |
| | | String tree =(String) map.get("tree"); |
| | | standardTreeService.resetTreeOfAsk(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | } |