| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.service.PlanService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @ApiImplicitParam(name = "code", value = "申请单编号", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "beginTime", value = "检验开始时间", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "endTime", value = "检验结束时间", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "status", value = "检验结果", dataTypeClass = Integer.class) |
| | | @ApiImplicitParam(name = "status", value = "检验结果", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "isLookMe", value = "是否只看我", dataTypeClass = Boolean.class) |
| | | }) |
| | | @GetMapping("/selectAllPlan") |
| | | public Result selectAllPlan(String code, String beginTime, String endTime, Integer status) { |
| | | return Result.success(planService.selectAllPlan(code, beginTime, endTime, status)); |
| | | @AuthHandler |
| | | public Result selectAllPlan(String code, String beginTime, String endTime, Integer status,boolean isLookMe) { |
| | | return Result.success(planService.selectAllPlan(code, beginTime, endTime, status,isLookMe)); |
| | | } |
| | | |
| | | @ApiOperation("分配-->选择检验人") |
| | | @GetMapping("/choosecheck") |
| | | @AuthHandler |
| | | public Result choosecheck() { |
| | | return Result.success(planService.choosecheck()); |
| | | } |
| | | |
| | | @ApiOperation("分配--选择设备") |
| | | @GetMapping("/chooseinstum") |
| | | @AuthHandler |
| | | public Result chooseinstum() { |
| | | return Result.success(planService.chooseinstum()); |
| | | } |
| | |
| | | @ApiOperation("分配") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "检验项目id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "userId", value = "检验人id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "userId", value = "执行人id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "instrumentId", value = "设备id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/distribution") |
| | | @AuthHandler |
| | | public Result distribution(Integer id, Integer userId, Integer instrumentId) { |
| | | return Result.success(planService.distribution(id, userId, instrumentId)); |
| | | } |
| | | |
| | | @ApiOperation("检验") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "检验项目id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "value", value = "检验值", dataTypeClass = String.class) |
| | | }) |
| | | @PostMapping("/check") |
| | | @AuthHandler |
| | | public Result check(Integer id, String value) { |
| | | return Result.success(planService.check(id, value)); |
| | | } |
| | | |
| | | @ApiOperation("上报") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "检验单id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/reported") |
| | | @AuthHandler |
| | | public Result reported(Integer id) { |
| | | return Result.success(planService.reported(id)); |
| | | } |
| | | } |