| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.InsOrderPlanDTO; |
| | | import com.yuanchu.mom.dto.InsProductDto; |
| | | import com.yuanchu.mom.dto.InsProductResultDto; |
| | | import com.yuanchu.mom.pojo.InsOrderFile; |
| | | import com.yuanchu.mom.service.InsOrderFileService; |
| | | import com.yuanchu.mom.service.InsOrderPlanService; |
| | | import com.yuanchu.mom.service.InsProductService; |
| | | import com.yuanchu.mom.pojo.InsOrderState; |
| | | import com.yuanchu.mom.service.*; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.InsProductResultVo; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | public class InsOrderPlanController { |
| | | |
| | | private InsOrderPlanService insOrderPlanService; |
| | | private InsOrderUserService insOrderUserService; |
| | | |
| | | private InsOrderFileService insOrderFileService; |
| | | |
| | | private InsProductService insProductService; |
| | | private InsOrderStateService insOrderStateService; |
| | | |
| | | @ValueClassify("检验任务") |
| | | @ApiOperation(value = "获取检验任务列表") |
| | |
| | | return Result.success(insOrderPlanService.doInsOrder(id, laboratory)); |
| | | } |
| | | |
| | | @ApiOperation(value = "切换光纤/光纤带记录模版查询检验内容") |
| | | @PostMapping("/getReportModel") |
| | | @ValueAuth |
| | | public Result<?> getReportModel(Integer sampleId) { |
| | | return Result.success(insOrderPlanService.getReportModel(sampleId)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @PostMapping("/getInsProduct") |
| | | @ApiOperation("获取检验项目和模板内容") |
| | |
| | | return Result.success(insOrderPlanService.upPlanUser(userId, orderId, sonLaboratory)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "判断交接的试验室") |
| | | @PostMapping("/upPlanUser2") |
| | | public Result<?> upPlanUser2(Integer orderId) { |
| | | return Result.success(insOrderPlanService.upPlanUser2(orderId)); |
| | | } |
| | | |
| | | @ValueClassify("检验任务") |
| | | @ApiOperation(value = "复核检验任务") |
| | | @PostMapping("/verifyPlan") |
| | | public Result<?> verifyPlan(Integer orderId, String laboratory, Integer type, String tell) { |
| | | public Result<?> verifyPlan(Integer orderId, String laboratory, Integer type, String tell) throws IOException { |
| | | return Result.success(insOrderPlanService.verifyPlan(orderId, laboratory, type, tell)); |
| | | } |
| | | |
| | |
| | | @ValueClassify("检验任务") |
| | | @ApiOperation(value = "检验任务提交") |
| | | @PostMapping("/submitPlan") |
| | | public Result<?> submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode, String sampleCode) { |
| | | int num = insOrderPlanService.submitPlan(orderId, laboratory, verifyUser, entrustCode, sampleCode); |
| | | public Result<?> submitPlan(Integer orderId,String laboratory, Integer verifyUser, String entrustCode, String note,String term) { |
| | | int num = insOrderPlanService.submitPlan(orderId, laboratory, verifyUser, entrustCode,note,term); |
| | | return num == 1 ? Result.success() : Result.fail("提交失败,部分项目还未进行检验"); |
| | | } |
| | | |
| | | @ValueClassify("检验任务") |
| | | @ValueClassify("设备") |
| | | @ApiOperation(value = "是否允许修改采集值") |
| | | @DeleteMapping("/isItAllowedToModifyTheCollectedValues") |
| | | public Result<?> isItAllowedToModifyTheCollectedValues() { |
| | |
| | | @ApiOperation(value = "保存检验内容") |
| | | @PostMapping("/saveInsContext") |
| | | @ValueAuth |
| | | public Result<?> saveInsContext(String param) { |
| | | public Result<?> saveInsContext(String param,Integer num) { |
| | | Map<String, Object> param2 = JSON.parseObject(param, Map.class); |
| | | insOrderPlanService.saveInsContext(param2); |
| | | insOrderPlanService.saveInsContext(param2,num); |
| | | return Result.success(); |
| | | } |
| | | |
| | |
| | | return Result.success(insProductService.write(insProductDto)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "温度循环查看列表数据(包括通过样品id,循环次数,温度,循环次数进行筛选)") |
| | | @PostMapping("/temCycle") |
| | | public Result<?> temCycle(Integer sampleId, String inspectionItem, String inspectionItemSubclass) { |
| | | return Result.success(insOrderPlanService.temCycle(sampleId, inspectionItem, inspectionItemSubclass)); |
| | | @ValueClassify("检验任务") |
| | | @ApiOperation(value = "插队操作") |
| | | @PostMapping("/jumpTeam") |
| | | public Result<?> jumpTeam(@RequestBody InsOrderState insOrderState) { |
| | | return Result.success(insOrderStateService.jumpTeam(insOrderState)); |
| | | } |
| | | |
| | | @ApiOperation(value = "电路试验的保存检验内容") |
| | | @PostMapping("/saveInsContext2") |
| | | @ValueAuth |
| | | public Result<?> saveInsContext2(@RequestBody InsProductResultDto insProductResultDtos) { |
| | | return Result.success(insOrderPlanService.saveInsContext2(insProductResultDtos)); |
| | | } |
| | | |
| | | @ApiOperation(value = "电路试验的删除频段") |
| | | @PostMapping("/deleteInsContext") |
| | | @ValueAuth |
| | | public Result<?> deleteInsContext(@RequestBody InsProductResultVo insProductResultVo) { |
| | | return Result.success(insOrderPlanService.deleteInsContext(insProductResultVo)); |
| | | } |
| | | |
| | | @ApiOperation(value = "电路试验点击检验选择版本") |
| | | @PostMapping("/chooseVersion") |
| | | @ValueAuth |
| | | public Result<?> chooseVersion(Integer orderStateId,Integer version) { |
| | | InsOrderState orderState = new InsOrderState(); |
| | | orderState.setId(orderStateId); |
| | | orderState.setVersion(version); |
| | | return Result.success(insOrderStateService.updateById(orderState)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @PostMapping("/getInsOrderUserList") |
| | | @ApiOperation("查看检验历史列表") |
| | | public Result<?> getInsOrderUserList(Integer insOrderStateId) { |
| | | return Result.success(insOrderPlanService.getInsOrderUserList(insOrderStateId)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @PostMapping("/getInsProduct2") |
| | | @ApiOperation("查看检验历史") |
| | | public Result<?> getInsProduct2(Integer id, Integer type, String laboratory, HttpServletRequest request,Integer num) { |
| | | return Result.success(insOrderPlanService.getInsProduct2(id, type, laboratory, request,num)); |
| | | } |
| | | |
| | | @ValueClassify("检验任务") |
| | | @ApiOperation(value = "扫码报检(入库)") |
| | | @PostMapping("/scanInsOrderState") |
| | | public Result scanInsOrderState(String sonLaboratory,String sampleCode,String trees) { |
| | | return Result.success(insOrderPlanService.scanInsOrderState(sonLaboratory,sampleCode,trees)); |
| | | } |
| | | |
| | | @ValueClassify("检验任务") |
| | | @ApiOperation(value = "扫码出库") |
| | | @PostMapping("/outInsOrderState") |
| | | public Result outInsOrderState(String sonLaboratory,String sampleCode) { |
| | | return Result.success(insOrderPlanService.outInsOrderState(sonLaboratory,sampleCode)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @PostMapping("/preview") |
| | | @ApiOperation("预览文件") |
| | | public Result<?> preview(Integer id)throws Exception { |
| | | return Result.success(insOrderPlanService.preview(id)); |
| | | } |
| | | |
| | | } |