| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.Plan; |
| | | import com.yuanchu.limslaboratory.pojo.InspectionProductList; |
| | | import com.yuanchu.limslaboratory.service.PlanService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | | * @since 2023-07-17 |
| | | */ |
| | | @Api(tags = "检验模块") |
| | | @Api(tags = "检验模块-->检验计划") |
| | | @RestController |
| | | @RequestMapping("/plan") |
| | | public class PlanController { |
| | |
| | | @Resource |
| | | private PlanService planService; |
| | | |
| | | @ApiOperation("查询所有检验计划表") |
| | | @ApiOperation("查询所有检验计划分配") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true), |
| | |
| | | return Result.success(planService.selectAllPlan(pageSize, countSize, state)); |
| | | } |
| | | |
| | | @ApiOperation("查询检验计划里面的分配信息") |
| | | @ApiOperation("查询检验计划里面的检验项目") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "样品编号", dataTypeClass = Integer.class, required = true) |
| | | @ApiImplicitParam(name = "id", value = "样品id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PutMapping("/selectPlanById/{id}") |
| | | public Result selectPlanById(@PathVariable Integer id) { |
| | | return Result.success(planService.selectById(id)); |
| | | @GetMapping("/selectProductById/{id}") |
| | | public Result selectProductById(@PathVariable Integer id) { |
| | | return Result.success(planService.selectProductById(id)); |
| | | } |
| | | |
| | | @ApiOperation("分配检验计划中分配项目") |
| | | @PostMapping("/upPlan") |
| | | public Result upPlan(@RequestBody InspectionProductList inspectionProductList) { |
| | | planService.upPlan(inspectionProductList); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("作废检验计划") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "检验计划ID", dataTypeClass = Integer.class, required = true), |
| | | }) |
| | | @PostMapping("/delPlan") |
| | | public Result delPlan(Integer id) { |
| | | @PutMapping("/delPlan/{id}") |
| | | public Result delPlan(@PathVariable Integer id) { |
| | | return Result.success(planService.delPlan(id)); |
| | | } |
| | | |
| | | @ApiOperation("查询成品检验") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "state", value = "状态(为空=全部)", dataTypeClass = Integer.class) |
| | | }) |
| | | @GetMapping("/selectInspection") |
| | | public Result selectInspection(int pageSize, int countSize, Integer state) { |
| | | return Result.success(planService.selectInspection(pageSize,countSize,state)); |
| | | } |
| | | } |