|
|
@@ -2,16 +2,15 @@ package org.jeecg.modules.medical.controller;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
-import java.net.URLDecoder;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
-import org.jeecg.common.util.oConvertUtils;
|
|
|
+import org.jeecg.modules.medical.common.bo.mid.FeedbackReasonRequest;
|
|
|
+import org.jeecg.modules.medical.common.bo.mid.ViolationDetails;
|
|
|
+import org.jeecg.modules.medical.common.bo.mid.ViolationInfo;
|
|
|
import org.jeecg.modules.medical.entity.MidIncidentAuditDetail;
|
|
|
import org.jeecg.modules.medical.service.IMidIncidentAuditDetailService;
|
|
|
|
|
|
@@ -20,18 +19,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
-import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
-import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
-import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.modules.medical.service.IMidIncidentAuditService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
@@ -43,14 +35,56 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
* @Date: 2023-05-09 14:37:06
|
|
|
* @Version: V1.0
|
|
|
*/
|
|
|
-@Api(tags="mid_incident_audit_detail")
|
|
|
+@Api(tags="事中api")
|
|
|
@RestController
|
|
|
@RequestMapping("/medical/midIncidentAuditDetail")
|
|
|
@Slf4j
|
|
|
public class MidIncidentAuditDetailController extends JeecgController<MidIncidentAuditDetail, IMidIncidentAuditDetailService> {
|
|
|
@Autowired
|
|
|
private IMidIncidentAuditDetailService midIncidentAuditDetailService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private IMidIncidentAuditService midIncidentAuditService;
|
|
|
+
|
|
|
+
|
|
|
+ // 获取患者信息 、、同事前一样的接口,使用同一个
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据始终推送的工单id,查询违规信息
|
|
|
+ * @param req
|
|
|
+ * @param id 事中工单id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation(value="事中-获取违规信息列表", notes="获取违规信息列表")
|
|
|
+ @GetMapping(value = "/violation/info/list")
|
|
|
+ public Result<List<ViolationInfo>> loadViolationInfoList(HttpServletRequest req, Integer id) {
|
|
|
+ List<ViolationInfo> resultList = midIncidentAuditDetailService.loadViolationInfoList(id);
|
|
|
+ return Result.OK(resultList);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "事中-获取违规明细", notes = "根据工单ID和规则编码获取违规明细信息")
|
|
|
+ @GetMapping("/violation/details")
|
|
|
+ public Result<IPage<ViolationDetails>> loadViolationDetails(
|
|
|
+ @RequestParam(name = "id", required = true) String id,
|
|
|
+ @RequestParam(name = "ruleCode", required = true) String ruleCode,
|
|
|
+ @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
+ if (pageSize >= 100) {
|
|
|
+ pageSize = 100;
|
|
|
+ }
|
|
|
+ Page<ViolationDetails> page = new Page<>(pageNo, pageSize);
|
|
|
+ IPage<ViolationDetails> violationDetails = midIncidentAuditDetailService.loadViolationDetails(page, id, ruleCode);
|
|
|
+ return Result.OK(violationDetails);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "事中-工单反馈", notes = "事中-工单反馈")
|
|
|
+ @PostMapping("/violation/feedback")
|
|
|
+ public Result<?> updateReason(@RequestBody @Valid FeedbackReasonRequest request) {
|
|
|
+ midIncidentAuditDetailService.updateReason(request, midIncidentAuditService);
|
|
|
+ return Result.ok("完成");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
|
@@ -72,7 +106,7 @@ public class MidIncidentAuditDetailController extends JeecgController<MidInciden
|
|
|
IPage<MidIncidentAuditDetail> pageList = midIncidentAuditDetailService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
|
@@ -87,7 +121,7 @@ public class MidIncidentAuditDetailController extends JeecgController<MidInciden
|
|
|
midIncidentAuditDetailService.save(midIncidentAuditDetail);
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
*
|
|
|
@@ -102,7 +136,7 @@ public class MidIncidentAuditDetailController extends JeecgController<MidInciden
|
|
|
midIncidentAuditDetailService.updateById(midIncidentAuditDetail);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id删除
|
|
|
*
|
|
|
@@ -117,7 +151,7 @@ public class MidIncidentAuditDetailController extends JeecgController<MidInciden
|
|
|
midIncidentAuditDetailService.removeById(id);
|
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 批量删除
|
|
|
*
|
|
|
@@ -132,7 +166,7 @@ public class MidIncidentAuditDetailController extends JeecgController<MidInciden
|
|
|
this.midIncidentAuditDetailService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
return Result.OK("批量删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id查询
|
|
|
*
|