| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/insOrderPlan") |
| | | @Api("/检验任务") |
| | | @Api(tags = "检验任务") |
| | | @AllArgsConstructor |
| | | public class InsOrderPlanController { |
| | | |
| | |
| | | InsOrderPlanDTO insOrderPlanDTO = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InsOrderPlanDTO.class); |
| | | return Result.success(insOrderPlanService.selectInsOrderPlanList(page, insOrderPlanDTO)); |
| | | } |
| | | |
| | | @ValueClassify("检验任务") |
| | | @ApiOperation(value = "检验单详情-任务切换") |
| | | @PostMapping("/inspectionOrderDetailsTaskSwitching") |
| | | public Result inspectionOrderDetailsTaskSwitching(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | page.setOptimizeCountSql(false); |
| | | InsOrderPlanDTO insOrderPlanDTO = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InsOrderPlanDTO.class); |
| | | return Result.success(insOrderPlanService.inspectionOrderDetailsTaskSwitching(page, insOrderPlanDTO)); |
| | | } |
| | | |
| | | @ValueClassify("检验任务") |
| | | @ApiOperation(value = "认领任务计划") |
| | | @PostMapping("/claimInsOrderPlan") |
| | |
| | | @ValueClassify("检验任务") |
| | | @ApiOperation(value = "检验任务提交") |
| | | @PostMapping("/submitPlan") |
| | | public Result<?> submitPlan(Integer orderId, String laboratory) { |
| | | int num = insOrderPlanService.submitPlan(orderId, laboratory); |
| | | public Result<?> submitPlan(Integer orderId, String laboratory, Integer verifyUser) { |
| | | int num = insOrderPlanService.submitPlan(orderId, laboratory, verifyUser); |
| | | return num==1?Result.success():Result.fail("提交失败,部分项目还未进行检验"); |
| | | } |
| | | |
| | | @ApiOperation(value = "保存检验内容") |
| | | @PostMapping("/saveInsContext") |
| | | @ValueAuth |
| | | public Result<?> saveInsContext(@RequestBody Map<String, Object> param){ |
| | | insOrderPlanService.saveInsContext(param); |
| | | public Result<?> saveInsContext(String param){ |
| | | Map<String, Object> param2 = JSON.parseObject(param, Map.class); |
| | | insOrderPlanService.saveInsContext(param2); |
| | | return Result.success(); |
| | | } |
| | | } |