| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.pojo.InsOrderFile; |
| | | import com.ruoyi.inspect.service.InsOrderFileService; |
| | | import com.ruoyi.inspect.service.InsOrderPlanService; |
| | | import com.ruoyi.inspect.service.InsProductService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ£éªä»»å¡-æ§å¶å± |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/insOrderPlan") |
| | | @Api(tags = "æ£éªä»»å¡") |
| | | @AllArgsConstructor |
| | | public class InsOrderPlanController { |
| | | |
| | | private InsOrderPlanService insOrderPlanService; |
| | | |
| | | private InsOrderFileService insOrderFileService; |
| | | |
| | | private InsProductService insProductService; |
| | | |
| | | @ApiOperation(value = "卿è·åtab表头") |
| | | @GetMapping("/getTabHeader") |
| | | public Result<?> getTabHeader(@RequestParam("sonLaboratory") String sonLaboratory, String samples) { |
| | | return Result.success(insOrderPlanService.getTabHeader(sonLaboratory, samples)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥çç»ææé®") |
| | | @PostMapping("/getInsOrderPlanList") |
| | | public Result getInsOrderPlanList(@RequestBody QueryResultDTO queryResultDTO) { |
| | | return Result.success(insOrderPlanService.getInsOrderPlanList(queryResultDTO)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导åºå§æè´¹ç¨") |
| | | @GetMapping("/exportCommissionFees") |
| | | public void exportCommissionFees(Map<String, Object> data,HttpServletResponse response) { |
| | | insOrderPlanService.exportCommissionFees(data,response); |
| | | } |
| | | |
| | | @ApiOperation(value = "导åºå¾
æ£ä»»å¡") |
| | | @GetMapping("/exportUnInsProducts") |
| | | public void exportUnInsProducts(UnInsProductsDTO unInsProductsDTO, HttpServletResponse response) { |
| | | insOrderPlanService.exportUnInsProducts(unInsProductsDTO,response); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¯¼åºæ¥çæ£éªç»æExcel") |
| | | @PostMapping("/exportInsOrderPlanResult") |
| | | public void exportInsOrderPlanResult(@RequestBody QueryResultDTO data, HttpServletResponse response) { |
| | | insOrderPlanService.exportInsOrderPlanResult(data, response); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥çæ£éªä»»å¡å表") |
| | | @GetMapping("/selectInsOrderPlanList") |
| | | public Result selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) { |
| | | return Result.success(insOrderPlanService.selectInsOrderPlanList(page, insOrderPlanDTO)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ£éªå详æ
-ä»»å¡åæ¢") |
| | | @GetMapping("/inspectionOrderDetailsTaskSwitching") |
| | | public Result inspectionOrderDetailsTaskSwitching(Page page,InsOrderPlanDTO insOrderPlanDTO) { |
| | | return Result.success(insOrderPlanService.inspectionOrderDetailsTaskSwitching(page, insOrderPlanDTO)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è®¤é¢æé®") |
| | | @PostMapping("/claimInsOrderPlan") |
| | | public Result claimInsOrderPlan(@RequestBody InsOrderPlanDTO data) { |
| | | return Result.success(insOrderPlanService.claimInsOrderPlan(data)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ£éªæé®") |
| | | @GetMapping("/doInsOrder") |
| | | public Result<?> doInsOrder(Integer id, String laboratory) { |
| | | return Result.success(insOrderPlanService.doInsOrder(id, laboratory)); |
| | | } |
| | | |
| | | @ApiOperation(value = "忢å¥ç®¡/å
纤/å
çº¤å¸¦è®°å½æ¨¡çæ¥è¯¢æ£éªå
容") |
| | | @GetMapping("/getReportModel") |
| | | public Result<?> getReportModel(Integer sampleId, String sonLaboratory) { |
| | | return Result.success(insOrderPlanService.getReportModel(sampleId,sonLaboratory)); |
| | | } |
| | | |
| | | @GetMapping("/getInsProduct") |
| | | @ApiOperation("è·åæ£éªé¡¹ç®å模æ¿å
容") |
| | | public Result<?> getInsProduct(Integer id, Integer type, String laboratory, HttpServletRequest request) { |
| | | return Result.success(insOrderPlanService.getInsProduct(id, type, laboratory, request)); |
| | | } |
| | | |
| | | @ApiOperation(value = "äº¤æ¥æé®") |
| | | @PostMapping("/upPlanUser") |
| | | public Result<?> upPlanUser(Integer userId, Integer orderId, String sonLaboratory) { |
| | | return Result.success(insOrderPlanService.upPlanUser(userId, orderId, sonLaboratory)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¤æäº¤æ¥çè¯éªå®¤") |
| | | @GetMapping("/upPlanUser2") |
| | | public Result<?> upPlanUser2(Integer orderId) { |
| | | return Result.success(insOrderPlanService.upPlanUser2(orderId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "夿 ¸æé®") |
| | | @PostMapping("/verifyPlan") |
| | | public Result<?> verifyPlan(Integer orderId, String laboratory, Integer type, String tell) { |
| | | return Result.success(insOrderPlanService.verifyPlan(orderId, laboratory, type, tell)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¡éªæ£éªä»»å¡æäº¤") |
| | | @PostMapping("/checkSubmitPlan") |
| | | public Result<?> checkSubmitPlan(Integer orderId, String laboratory, String temperature,String humidity) { |
| | | return Result.success(insOrderPlanService.checkSubmitPlan(orderId, laboratory ,temperature,humidity)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æäº¤æ£éªä»»å¡") |
| | | @PostMapping("/submitPlan") |
| | | public Result<?> submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode) { |
| | | int num = insOrderPlanService.submitPlan(orderId, laboratory, verifyUser, entrustCode); |
| | | return num == 1 ? Result.success() : Result.fail("æäº¤å¤±è´¥ï¼é¨å项ç®è¿æªè¿è¡æ£éª"); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @GetMapping("/getEquipName") |
| | | public Result<?> getEquipName(@RequestParam("orderId") Integer orderId,@RequestParam("sonLaboratory") String sonLaboratory) { |
| | | return Result.success(insOrderPlanService.getEquipName(orderId,sonLaboratory)); |
| | | } |
| | | |
| | | /** |
| | | * @param param 模æ¿å
容 |
| | | * @param currentTable å½å模æ¿id |
| | | * @param sampleId å½åæ ·åid |
| | | * @param orderId å½å订åid |
| | | * @param sonLaboratory åè¯éªå®¤ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ä¿åæ£éªå
容") |
| | | @PostMapping("/saveInsContext") |
| | | public Result<?> saveInsContext(String param, Integer currentTable, Integer sampleId, Integer orderId, String sonLaboratory,Boolean isDelete) { |
| | | Map<String, Object> param2 = JSON.parseObject(param, Map.class); |
| | | insOrderPlanService.saveInsContext(param2, currentTable, sampleId, orderId, sonLaboratory,isDelete); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥çæ£éªåä¸çéä»¶å表") |
| | | @GetMapping("/getFileList") |
| | | public Result<?> getFileList(Page page,InsOrderFile insOrderFile) { |
| | | return Result.success(insOrderPlanService.getFileList(page, insOrderFile)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¸ä¼ éä»¶æé®") |
| | | @PostMapping("/uploadFile") |
| | | public Result<?> uploadFile(Integer orderId, MultipartFile file) { |
| | | return Result.success(insOrderPlanService.uploadFile(orderId, file)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤éä»¶æé®") |
| | | @PostMapping("/delfile") |
| | | public Result<?> delfile(Integer id) { |
| | | return Result.success(insOrderFileService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¸è½½éä»¶") |
| | | @GetMapping("/downFile") |
| | | public Result<?> downFile(Integer id) { |
| | | InsOrderFile insOrderFile = insOrderFileService.getById(id); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("type", insOrderFile.getType()); |
| | | map.put("fileUrl", insOrderFile.getFileUrl()); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "填忏©åº¦ä¸æ¹¿åº¦") |
| | | @PostMapping("/write") |
| | | public Result<?> write(@RequestBody InsProductDto insProductDto) { |
| | | return Result.success(insProductService.write(insProductDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¸©åº¦å¾ªç¯æ¥çåè¡¨æ°æ®(å
æ¬éè¿æ ·åid,å¾ªç¯æ¬¡æ°,温度,å¾ªç¯æ¬¡æ°è¿è¡çé)") |
| | | @GetMapping("/temCycle") |
| | | public Result<?> temCycle(Integer sampleId, String inspectionItem, String inspectionItemSubclass) { |
| | | return Result.success(insOrderPlanService.temCycle(sampleId, inspectionItem, inspectionItemSubclass)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¼§åç¹æ®é¡¹æ¥çåè¡¨æ°æ®") |
| | | @GetMapping("/getSagTemperatureProducts") |
| | | public Result<?> getSagTemperatureProducts(Integer sampleId) { |
| | | return Result.success(insOrderPlanService.getSagTemperatureProducts(sampleId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "(çµåçåºååºå)ä¿åæ£éªå
容") |
| | | @PostMapping("/saveInsContext2") |
| | | public Result<?> saveInsContext2(@RequestBody InsProductResultDTO insProductResult) { |
| | | return Result.success(insOrderPlanService.saveInsContext2(insProductResult)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®è®¢åidæ¥è¯¢æ ·åä¿¡æ¯") |
| | | @GetMapping("/getSampleInfoByOrderId") |
| | | public Result<?> getSampleInfoByOrderId(@RequestParam Integer id,@RequestParam String sonLaboratory){ |
| | | return Result.success(insOrderPlanService.getSampleInfoByOrderId(id,sonLaboratory)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("ä»»å¡å±ç¤º") |
| | | @GetMapping("/tasksShow") |
| | | public Result<?> tasksShow(Page page,String sonLaboratory){ |
| | | return Result.success(insOrderPlanService.tasksShow(page,sonLaboratory)); |
| | | } |
| | | |
| | | @ApiOperation("è·ååè¯éªå®¤å½æçæ»æ£éªä»»å¡æ°é") |
| | | @GetMapping("/getCurrentMonthPlanTotalBySonLaboratory") |
| | | public Result<?> getCurrentMonthPlanTotalBySonLaboratory(InsOrderPlanCountDTO insOrderPlanCountDTO){ |
| | | return Result.success(insOrderPlanService.getCurrentMonthPlanTotalBySonLaboratory(insOrderPlanCountDTO.getSonLaboratory(),insOrderPlanCountDTO.getStartTime(),insOrderPlanCountDTO.getEndTime())); |
| | | } |
| | | |
| | | } |