| | |
| | | import com.yuanchu.mom.dto.InsProductResultDto; |
| | | import com.yuanchu.mom.pojo.InsOrderFile; |
| | | import com.yuanchu.mom.pojo.InsOrderState; |
| | | import com.yuanchu.mom.service.InsOrderFileService; |
| | | import com.yuanchu.mom.service.InsOrderPlanService; |
| | | import com.yuanchu.mom.service.InsOrderStateService; |
| | | import com.yuanchu.mom.service.InsProductService; |
| | | import com.yuanchu.mom.service.*; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.InsProductResultVo; |
| | | import com.yuanchu.mom.vo.Result; |
| | |
| | | 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; |
| | | |
| | |
| | | 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("获取检验项目和模板内容") |
| | |
| | | @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) { |
| | | int num = insOrderPlanService.submitPlan(orderId, laboratory, verifyUser, entrustCode); |
| | | 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("提交失败,部分项目还未进行检验"); |
| | | } |
| | | |
| | |
| | | @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") |
| | |
| | | return Result.success(insOrderPlanService.deleteInsContext(insProductResultVo)); |
| | | } |
| | | |
| | | @ApiOperation(value = "电路试验的删除互调") |
| | | @PostMapping("/deleteInsContext2") |
| | | @ValueAuth |
| | | public Result<?> deleteInsContext2(String frequency,Integer productId,String often) { |
| | | return Result.success(insOrderPlanService.deleteInsContext2(frequency,productId,often)); |
| | | } |
| | | |
| | | @ApiOperation(value = "电路试验点击检验选择版本") |
| | | @PostMapping("/chooseVersion") |
| | | @ValueAuth |
| | |
| | | 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)); |
| | | } |
| | | |
| | | } |