| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.Laboratory; |
| | | import com.yuanchu.mom.service.LaboratoryService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.annotation.Resources; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 实验室管理(LaboratoryController)表控制层 |
| | | */ |
| | | @Api(tags = "场所或设施") |
| | | @AllArgsConstructor |
| | | |
| | | @RestController |
| | | @RequestMapping("/laboratoryScope") |
| | | public class LaboratoryController { |
| | | @Value("${file.path}") |
| | | private String filePath; |
| | | |
| | | @Resource |
| | | private LaboratoryService laboratoryService; |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "查询实验室管理列表") |
| | | @PostMapping("/selectItemParameter") |
| | | public Result selectItemParameter(@RequestBody Map<String, Object> data) throws Exception { |
| | |
| | | Laboratory itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Laboratory.class); |
| | | return Result.success(laboratoryService.selectItemParameter(page, itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify("场所或设施") |
| | | @ApiOperation(value = "添加实验室参数") |
| | | @PostMapping("/addParameter") |
| | | public Result addParameter(@RequestBody Laboratory itemParameter) { |
| | | return Result.success(laboratoryService.addParameter(itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify("场所或设施") |
| | | @ApiOperation(value = "删除实验室参数") |
| | | @PostMapping("/delParameter") |
| | | public Result<?> delParameter(Integer id) { |
| | | return Result.success(laboratoryService.delParameter(id)); |
| | | } |
| | | |
| | | @ValueClassify("场所或设施") |
| | | @ApiOperation(value = "修改实验室参数") |
| | | @PostMapping("/upParameter") |
| | | public Result<?> upParameter(@RequestBody Laboratory itemParameter) { |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "获取实验室名称") |
| | | @PostMapping("/obtainItemParameterList") |
| | | public Result obtainItemParameterList() { |
| | | @GetMapping("/obtainItemParameterList") |
| | | @ValueAuth |
| | | public Result obtainItemParameterList() { |
| | | return Result.success(laboratoryService.obtainItemParameterList()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |