Răsfoiți Sursa

规则引擎跑的结果以及通知

0027005599 3 ani în urmă
părinte
comite
b1116e1be7
27 a modificat fișierele cu 2359 adăugiri și 73 ștergeri
  1. 4 2
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/HisController.java
  2. 178 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/MidIncidentVisitDetailLogController.java
  3. 178 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/MidIncidentVisitLogController.java
  4. 5 2
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/DiagnosesVO.java
  5. 195 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/MidIncidentVisitDetailLog.java
  6. 90 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/MidIncidentVisitLog.java
  7. 17 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/MidIncidentVisitDetailLogMapper.java
  8. 17 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/MidIncidentVisitLogMapper.java
  9. 5 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/xml/MidIncidentVisitDetailLogMapper.xml
  10. 5 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/xml/MidIncidentVisitLogMapper.xml
  11. 121 24
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/RuleEngine.java
  12. 74 24
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/dict/DictUtil.java
  13. 14 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/IMidIncidentVisitDetailLogService.java
  14. 14 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/IMidIncidentVisitLogService.java
  15. 19 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/MidIncidentVisitDetailLogServiceImpl.java
  16. 19 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/MidIncidentVisitLogServiceImpl.java
  17. 375 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/MidIncidentVisitDetailLogList.vue
  18. 26 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/MidIncidentVisitDetailLog_menu_insert.sql
  19. 234 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/MidIncidentVisitLogList.vue
  20. 26 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/MidIncidentVisitLog_menu_insert.sql
  21. 274 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitDetailLogForm.vue
  22. 84 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitDetailLogModal.Style#Drawer.vue
  23. 60 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitDetailLogModal.vue
  24. 154 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitLogForm.vue
  25. 84 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitLogModal.Style#Drawer.vue
  26. 60 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitLogModal.vue
  27. 27 21
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/message/websocket/WebSocket.java

+ 4 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/HisController.java

@@ -98,11 +98,13 @@ public class HisController extends JeecgController<Audit, IAuditService> {
     @AutoLog(value = "事中提醒")
     @ApiOperation(value="事中提醒接口", notes="事中提醒接口调用")
     @PostMapping(value = "/midIncidentWarning")
-    public Result<String> midIncidentWarning(@RequestBody MidIncidentWarningVO midIncidentWarningVO) {
+    public Result<String> midIncidentWarning(@RequestBody MidIncidentWarningVO midIncidentWarningVO,HttpServletRequest httpServletRequest) {
         String jsonStr = JSON.toJSONString(midIncidentWarningVO);
+        String ipStr = httpServletRequest.getRemoteHost();
+        log.info("远端请求的服务ip地址:{}", ipStr);
         log.info("事中提醒接收报文:{}", jsonStr);
         JSONObject paramMap = JSON.parseObject(jsonStr);
-        ruleEngine.dealMidInterfaceEngin("midIncidentWarning", paramMap, midIncidentWarningVO);
+        ruleEngine.dealMidInterfaceEngin("midIncidentWarning", paramMap, midIncidentWarningVO, ipStr);
         return Result.OK("添加成功!");
     }
 

+ 178 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/MidIncidentVisitDetailLogController.java

@@ -0,0 +1,178 @@
+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 org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.medical.entity.MidIncidentVisitDetailLog;
+import org.jeecg.modules.medical.service.IMidIncidentVisitDetailLogService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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.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;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+ /**
+ * @Description: mid_incident_visit_detail_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:44
+ * @Version: V1.0
+ */
+@Api(tags="mid_incident_visit_detail_log")
+@RestController
+@RequestMapping("/medical/midIncidentVisitDetailLog")
+@Slf4j
+public class MidIncidentVisitDetailLogController extends JeecgController<MidIncidentVisitDetailLog, IMidIncidentVisitDetailLogService> {
+	@Autowired
+	private IMidIncidentVisitDetailLogService midIncidentVisitDetailLogService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param midIncidentVisitDetailLog
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "mid_incident_visit_detail_log-分页列表查询")
+	@ApiOperation(value="mid_incident_visit_detail_log-分页列表查询", notes="mid_incident_visit_detail_log-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<MidIncidentVisitDetailLog>> queryPageList(MidIncidentVisitDetailLog midIncidentVisitDetailLog,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<MidIncidentVisitDetailLog> queryWrapper = QueryGenerator.initQueryWrapper(midIncidentVisitDetailLog, req.getParameterMap());
+		Page<MidIncidentVisitDetailLog> page = new Page<MidIncidentVisitDetailLog>(pageNo, pageSize);
+		IPage<MidIncidentVisitDetailLog> pageList = midIncidentVisitDetailLogService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param midIncidentVisitDetailLog
+	 * @return
+	 */
+	@AutoLog(value = "mid_incident_visit_detail_log-添加")
+	@ApiOperation(value="mid_incident_visit_detail_log-添加", notes="mid_incident_visit_detail_log-添加")
+	@RequiresPermissions("medical:mid_incident_visit_detail_log:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody MidIncidentVisitDetailLog midIncidentVisitDetailLog) {
+		midIncidentVisitDetailLogService.save(midIncidentVisitDetailLog);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param midIncidentVisitDetailLog
+	 * @return
+	 */
+	@AutoLog(value = "mid_incident_visit_detail_log-编辑")
+	@ApiOperation(value="mid_incident_visit_detail_log-编辑", notes="mid_incident_visit_detail_log-编辑")
+	@RequiresPermissions("medical:mid_incident_visit_detail_log:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody MidIncidentVisitDetailLog midIncidentVisitDetailLog) {
+		midIncidentVisitDetailLogService.updateById(midIncidentVisitDetailLog);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "mid_incident_visit_detail_log-通过id删除")
+	@ApiOperation(value="mid_incident_visit_detail_log-通过id删除", notes="mid_incident_visit_detail_log-通过id删除")
+	@RequiresPermissions("medical:mid_incident_visit_detail_log:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		midIncidentVisitDetailLogService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "mid_incident_visit_detail_log-批量删除")
+	@ApiOperation(value="mid_incident_visit_detail_log-批量删除", notes="mid_incident_visit_detail_log-批量删除")
+	@RequiresPermissions("medical:mid_incident_visit_detail_log:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.midIncidentVisitDetailLogService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "mid_incident_visit_detail_log-通过id查询")
+	@ApiOperation(value="mid_incident_visit_detail_log-通过id查询", notes="mid_incident_visit_detail_log-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<MidIncidentVisitDetailLog> queryById(@RequestParam(name="id",required=true) String id) {
+		MidIncidentVisitDetailLog midIncidentVisitDetailLog = midIncidentVisitDetailLogService.getById(id);
+		if(midIncidentVisitDetailLog==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(midIncidentVisitDetailLog);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param midIncidentVisitDetailLog
+    */
+    @RequiresPermissions("medical:mid_incident_visit_detail_log:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, MidIncidentVisitDetailLog midIncidentVisitDetailLog) {
+        return super.exportXls(request, midIncidentVisitDetailLog, MidIncidentVisitDetailLog.class, "mid_incident_visit_detail_log");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("medical:mid_incident_visit_detail_log:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, MidIncidentVisitDetailLog.class);
+    }
+
+}

+ 178 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/MidIncidentVisitLogController.java

@@ -0,0 +1,178 @@
+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 org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.medical.entity.MidIncidentVisitLog;
+import org.jeecg.modules.medical.service.IMidIncidentVisitLogService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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.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;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+ /**
+ * @Description: mid_incident_visit_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:36
+ * @Version: V1.0
+ */
+@Api(tags="mid_incident_visit_log")
+@RestController
+@RequestMapping("/medical/midIncidentVisitLog")
+@Slf4j
+public class MidIncidentVisitLogController extends JeecgController<MidIncidentVisitLog, IMidIncidentVisitLogService> {
+	@Autowired
+	private IMidIncidentVisitLogService midIncidentVisitLogService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param midIncidentVisitLog
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "mid_incident_visit_log-分页列表查询")
+	@ApiOperation(value="mid_incident_visit_log-分页列表查询", notes="mid_incident_visit_log-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<MidIncidentVisitLog>> queryPageList(MidIncidentVisitLog midIncidentVisitLog,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<MidIncidentVisitLog> queryWrapper = QueryGenerator.initQueryWrapper(midIncidentVisitLog, req.getParameterMap());
+		Page<MidIncidentVisitLog> page = new Page<MidIncidentVisitLog>(pageNo, pageSize);
+		IPage<MidIncidentVisitLog> pageList = midIncidentVisitLogService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param midIncidentVisitLog
+	 * @return
+	 */
+	@AutoLog(value = "mid_incident_visit_log-添加")
+	@ApiOperation(value="mid_incident_visit_log-添加", notes="mid_incident_visit_log-添加")
+	@RequiresPermissions("medical:mid_incident_visit_log:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody MidIncidentVisitLog midIncidentVisitLog) {
+		midIncidentVisitLogService.save(midIncidentVisitLog);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param midIncidentVisitLog
+	 * @return
+	 */
+	@AutoLog(value = "mid_incident_visit_log-编辑")
+	@ApiOperation(value="mid_incident_visit_log-编辑", notes="mid_incident_visit_log-编辑")
+	@RequiresPermissions("medical:mid_incident_visit_log:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody MidIncidentVisitLog midIncidentVisitLog) {
+		midIncidentVisitLogService.updateById(midIncidentVisitLog);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "mid_incident_visit_log-通过id删除")
+	@ApiOperation(value="mid_incident_visit_log-通过id删除", notes="mid_incident_visit_log-通过id删除")
+	@RequiresPermissions("medical:mid_incident_visit_log:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		midIncidentVisitLogService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "mid_incident_visit_log-批量删除")
+	@ApiOperation(value="mid_incident_visit_log-批量删除", notes="mid_incident_visit_log-批量删除")
+	@RequiresPermissions("medical:mid_incident_visit_log:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.midIncidentVisitLogService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "mid_incident_visit_log-通过id查询")
+	@ApiOperation(value="mid_incident_visit_log-通过id查询", notes="mid_incident_visit_log-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<MidIncidentVisitLog> queryById(@RequestParam(name="id",required=true) String id) {
+		MidIncidentVisitLog midIncidentVisitLog = midIncidentVisitLogService.getById(id);
+		if(midIncidentVisitLog==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(midIncidentVisitLog);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param midIncidentVisitLog
+    */
+    @RequiresPermissions("medical:mid_incident_visit_log:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, MidIncidentVisitLog midIncidentVisitLog) {
+        return super.exportXls(request, midIncidentVisitLog, MidIncidentVisitLog.class, "mid_incident_visit_log");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("medical:mid_incident_visit_log:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, MidIncidentVisitLog.class);
+    }
+
+}

+ 5 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/DiagnosesVO.java

@@ -4,6 +4,9 @@ import lombok.Data;
 
 @Data
 public class DiagnosesVO {
-    private String diagnose_code;    //true	char	诊断代码(使用医保下发诊断代码(ICD-10))
-    private String diagnose_desc;    //true	char	诊断描述
+    private String diagnose_code;   //医院内部诊断编码
+    private String diagnose_desc;   //医院内部诊断描述
+
+    private String medical_diagnose_code; //true	char	医保诊断代码(使用医保下发诊断代码(ICD-10))
+    private String medical_diagnose_name; //true	char	医保诊断描述
 }

+ 195 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/MidIncidentVisitDetailLog.java

@@ -0,0 +1,195 @@
+package org.jeecg.modules.medical.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: mid_incident_visit_detail_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:44
+ * @Version: V1.0
+ */
+@Data
+@TableName("mid_incident_visit_detail_log")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="mid_incident_visit_detail_log对象", description="mid_incident_visit_detail_log")
+public class MidIncidentVisitDetailLog implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**主键ID*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键ID")
+    private java.lang.Integer id;
+	/**医保规则ID*/
+	@Excel(name = "医保规则ID", width = 15)
+    @ApiModelProperty(value = "医保规则ID")
+    private java.lang.Integer medicalInsRuleInfoId;
+	/**医保规则编码*/
+	@Excel(name = "医保规则编码", width = 15)
+    @ApiModelProperty(value = "医保规则编码")
+    private java.lang.String medicalInsRuleInfoCode;
+	/**医保规则名称*/
+	@Excel(name = "医保规则名称", width = 15)
+    @ApiModelProperty(value = "医保规则名称")
+    private java.lang.String medicalInsRuleInfoName;
+	/**事中门诊日志表ID*/
+	@Excel(name = "事中门诊日志表ID", width = 15)
+    @ApiModelProperty(value = "事中门诊日志表ID")
+    private java.lang.Integer midIncidentVisitLogId;
+	/**就诊类别;住院/门诊*/
+	@Excel(name = "就诊类别;住院/门诊", width = 15)
+    @ApiModelProperty(value = "就诊类别;住院/门诊")
+    private java.lang.String visitType;
+	/**科室编码*/
+	@Excel(name = "科室编码", width = 15)
+    @ApiModelProperty(value = "科室编码")
+    private java.lang.String medicalDeptCode;
+	/**科室名称*/
+	@Excel(name = "科室名称", width = 15)
+    @ApiModelProperty(value = "科室名称")
+    private java.lang.String medicalDeptName;
+	/**医生姓名*/
+	@Excel(name = "医生姓名", width = 15)
+    @ApiModelProperty(value = "医生姓名")
+    private java.lang.String doctorName;
+	/**主诊医师编码*/
+	@Excel(name = "主诊医师编码", width = 15)
+    @ApiModelProperty(value = "主诊医师编码")
+    private java.lang.String doctorId;
+	/**个人编号*/
+	@Excel(name = "个人编号", width = 15)
+    @ApiModelProperty(value = "个人编号")
+    private java.lang.String patientId;
+	/**患者姓名*/
+	@Excel(name = "患者姓名", width = 15)
+    @ApiModelProperty(value = "患者姓名")
+    private java.lang.String patientName;
+	/**住院号/门诊号*/
+	@Excel(name = "住院号/门诊号", width = 15)
+    @ApiModelProperty(value = "住院号/门诊号")
+    private java.lang.String visitNo;
+	/**医嘱号/处方号*/
+	@Excel(name = "医嘱号/处方号", width = 15)
+    @ApiModelProperty(value = "医嘱号/处方号")
+    private java.lang.String recipeNo;
+	/**项目类型*/
+	@Excel(name = "项目类型", width = 15)
+    @ApiModelProperty(value = "项目类型")
+    private java.lang.String projectType;
+	/**项目编码*/
+	@Excel(name = "项目编码", width = 15)
+    @ApiModelProperty(value = "项目编码")
+    private java.lang.String proejctCode;
+	/**项目名称*/
+	@Excel(name = "项目名称", width = 15)
+    @ApiModelProperty(value = "项目名称")
+    private java.lang.String proejctName;
+	/**医保项目编码*/
+	@Excel(name = "医保项目编码", width = 15)
+    @ApiModelProperty(value = "医保项目编码")
+    private java.lang.String medicalProjectCode;
+	/**医保项目名称*/
+	@Excel(name = "医保项目名称", width = 15)
+    @ApiModelProperty(value = "医保项目名称")
+    private java.lang.String medicalProjectName;
+	/**发票项目编号*/
+	@Excel(name = "发票项目编号", width = 15)
+    @ApiModelProperty(value = "发票项目编号")
+    private java.lang.String invoiceProject;
+	/**费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费*/
+	@Excel(name = "费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费", width = 15)
+    @ApiModelProperty(value = "费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费")
+    private java.lang.String expenseCategory;
+	/**剂型*/
+	@Excel(name = "剂型", width = 15)
+    @ApiModelProperty(value = "剂型")
+    private java.lang.String doseForm;
+	/**规格*/
+	@Excel(name = "规格", width = 15)
+    @ApiModelProperty(value = "规格")
+    private java.lang.String medicalSpecification;
+	/**价格;单价,必须使用数值型,如”12.5”*/
+	@Excel(name = "价格;单价,必须使用数值型,如”12.5”", width = 15)
+    @ApiModelProperty(value = "价格;单价,必须使用数值型,如”12.5”")
+    private java.math.BigDecimal price;
+	/**数量;数量,必须使用数值型,如”10”*/
+	@Excel(name = "数量;数量,必须使用数值型,如”10”", width = 15)
+    @ApiModelProperty(value = "数量;数量,必须使用数值型,如”10”")
+    private java.lang.Integer medicalNumber;
+	/**单位*/
+	@Excel(name = "单位", width = 15)
+    @ApiModelProperty(value = "单位")
+    private java.lang.String doseUnit;
+	/**金额;金额,必须使用数值型,如”50.5”*/
+	@Excel(name = "金额;金额,必须使用数值型,如”50.5”", width = 15)
+    @ApiModelProperty(value = "金额;金额,必须使用数值型,如”50.5”")
+    private java.math.BigDecimal amount;
+	/**用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”*/
+	@Excel(name = "用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”", width = 15)
+    @ApiModelProperty(value = "用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”")
+    private java.lang.Integer useDay;
+	/**单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”*/
+	@Excel(name = "单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”", width = 15)
+    @ApiModelProperty(value = "单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”")
+    private java.lang.Integer singleDoseNumber;
+	/**单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)*/
+	@Excel(name = "单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)", width = 15)
+    @ApiModelProperty(value = "单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)")
+    private java.lang.String singleDoseUnit;
+	/**药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”*/
+	@Excel(name = "药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”", width = 15)
+    @ApiModelProperty(value = "药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”")
+    private java.lang.Integer doseDay;
+	/**服用频次*/
+	@Excel(name = "服用频次", width = 15)
+    @ApiModelProperty(value = "服用频次")
+    private java.lang.String takeFrequence;
+	/**医保标志*/
+	@Excel(name = "医保标志", width = 15)
+    @ApiModelProperty(value = "医保标志")
+    private java.lang.String medicalInsuranceMark;
+	/**检查部位*/
+	@Excel(name = "检查部位", width = 15)
+    @ApiModelProperty(value = "检查部位")
+    private java.lang.String inspectionSite;
+	/**医嘱大类*/
+	@Excel(name = "医嘱大类", width = 15)
+    @ApiModelProperty(value = "医嘱大类")
+    private java.lang.String orderCatalog;
+	/**医嘱类别*/
+	@Excel(name = "医嘱类别", width = 15)
+    @ApiModelProperty(value = "医嘱类别")
+    private java.lang.String orderType;
+	/**创建人*/
+    @ApiModelProperty(value = "创建人")
+    private java.lang.String createBy;
+	/**创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern =  "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern= "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private java.util.Date createTime;
+	/**更新人*/
+    @ApiModelProperty(value = "更新人")
+    private java.lang.String updateBy;
+	/**更新时间*/
+	@JsonFormat(timezone = "GMT+8",pattern =  "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern= "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新时间")
+    private java.util.Date updateTime;
+}

+ 90 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/MidIncidentVisitLog.java

@@ -0,0 +1,90 @@
+package org.jeecg.modules.medical.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: mid_incident_visit_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:36
+ * @Version: V1.0
+ */
+@Data
+@TableName("mid_incident_visit_log")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="mid_incident_visit_log对象", description="mid_incident_visit_log")
+public class MidIncidentVisitLog implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**主键ID*/
+	@TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "主键ID")
+    private java.lang.Integer id;
+	/**就诊类别;住院/门诊*/
+	@Excel(name = "就诊类别;住院/门诊", width = 15)
+    @ApiModelProperty(value = "就诊类别;住院/门诊")
+    private java.lang.String visitType;
+	/**科室编码*/
+	@Excel(name = "科室编码", width = 15)
+    @ApiModelProperty(value = "科室编码")
+    private java.lang.String medicalDeptCode;
+	/**科室名称*/
+	@Excel(name = "科室名称", width = 15)
+    @ApiModelProperty(value = "科室名称")
+    private java.lang.String medicalDeptName;
+	/**医生姓名*/
+	@Excel(name = "医生姓名", width = 15)
+    @ApiModelProperty(value = "医生姓名")
+    private java.lang.String doctorName;
+	/**主诊医师编码*/
+	@Excel(name = "主诊医师编码", width = 15)
+    @ApiModelProperty(value = "主诊医师编码")
+    private java.lang.String doctorId;
+	/**个人编号*/
+	@Excel(name = "个人编号", width = 15)
+    @ApiModelProperty(value = "个人编号")
+    private java.lang.String patientId;
+	/**患者姓名*/
+	@Excel(name = "患者姓名", width = 15)
+    @ApiModelProperty(value = "患者姓名")
+    private java.lang.String patientName;
+	/**住院号/门诊号*/
+	@Excel(name = "住院号/门诊号", width = 15)
+    @ApiModelProperty(value = "住院号/门诊号")
+    private java.lang.String visitNo;
+	/**医嘱号/处方号*/
+	@Excel(name = "医嘱号/处方号", width = 15)
+    @ApiModelProperty(value = "医嘱号/处方号")
+    private java.lang.String doctorAdviceNo;
+	/**入院日期*/
+	@Excel(name = "入院日期", width = 15, format =  "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern =  "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern= "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "入院日期")
+    private java.util.Date inHospDate;
+	/**诊断编码*/
+	@Excel(name = "诊断编码", width = 15)
+    @ApiModelProperty(value = "诊断编码")
+    private java.lang.String diagnoses;
+	/**创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern =  "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern= "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private java.util.Date createTime;
+}

+ 17 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/MidIncidentVisitDetailLogMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.medical.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.medical.entity.MidIncidentVisitDetailLog;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: mid_incident_visit_detail_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:44
+ * @Version: V1.0
+ */
+public interface MidIncidentVisitDetailLogMapper extends BaseMapper<MidIncidentVisitDetailLog> {
+
+}

+ 17 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/MidIncidentVisitLogMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.medical.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.medical.entity.MidIncidentVisitLog;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: mid_incident_visit_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:36
+ * @Version: V1.0
+ */
+public interface MidIncidentVisitLogMapper extends BaseMapper<MidIncidentVisitLog> {
+
+}

+ 5 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/xml/MidIncidentVisitDetailLogMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.medical.mapper.MidIncidentVisitDetailLogMapper">
+
+</mapper>

+ 5 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/xml/MidIncidentVisitLogMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.medical.mapper.MidIncidentVisitLogMapper">
+
+</mapper>

+ 121 - 24
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/RuleEngine.java

@@ -7,11 +7,17 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.util.DateUtils;
 import org.jeecg.modules.medical.Constant;
+import org.jeecg.modules.medical.entity.AdviceDetailsVO;
+import org.jeecg.modules.medical.entity.DiagnosesVO;
 import org.jeecg.modules.medical.entity.FactorEnchance;
 import org.jeecg.modules.medical.entity.MedicalInsRuleInfo;
 import org.jeecg.modules.medical.entity.MedicalInsRuleProject;
 import org.jeecg.modules.medical.entity.MidIncidentAudit;
+import org.jeecg.modules.medical.entity.MidIncidentAuditDiagnose;
+import org.jeecg.modules.medical.entity.MidIncidentVisitDetailLog;
+import org.jeecg.modules.medical.entity.MidIncidentVisitLog;
 import org.jeecg.modules.medical.entity.MidIncidentWarningVO;
 import org.jeecg.modules.medical.entity.RuleAttr;
 import org.jeecg.modules.medical.entity.RuleFactorRela;
@@ -23,15 +29,20 @@ import org.jeecg.modules.medical.service.IFactorCondRelaService;
 import org.jeecg.modules.medical.service.IFactorEnchanceService;
 import org.jeecg.modules.medical.service.IMedicalInsRuleInfoService;
 import org.jeecg.modules.medical.service.IMedicalInsRuleProjectService;
+import org.jeecg.modules.medical.service.IMidIncidentAuditDiagnoseService;
 import org.jeecg.modules.medical.service.IMidIncidentAuditService;
+import org.jeecg.modules.medical.service.IMidIncidentVisitDetailLogService;
+import org.jeecg.modules.medical.service.IMidIncidentVisitLogService;
 import org.jeecg.modules.medical.service.IRuleAttrService;
 import org.jeecg.modules.medical.service.IRuleFactorRelaService;
+import org.jeecg.modules.message.websocket.WebSocket;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.PostConstruct;
+import java.math.BigDecimal;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
@@ -72,13 +83,20 @@ public class RuleEngine {
     @Autowired
     IMidIncidentAuditService midIncidentAuditService;
     @Autowired
+    IMidIncidentAuditDiagnoseService midIncidentAuditDiagnoseService;
+    @Autowired
+    IMidIncidentVisitLogService midIncidentVisitLogService;
+    @Autowired
+    IMidIncidentVisitDetailLogService midIncidentVisitDetailLogService;
+    @Autowired
     DictUtil dictUtil;
+    @Autowired
+    WebSocket webSocket;
 
     public static ThreadLocal<MidIncidentWarningVO> midIncidentWarningVOThreadLocal = new ThreadLocal<>();
 
     public static Map<String, Set<Integer>> itemCodeAndRuleIdMap = new HashMap<>();
-    public static Map<String,List<RuleAttr>> interfRuleAttrList = new HashMap<>();
-
+    public static Map<String, List<RuleAttr>> interfRuleAttrList = new HashMap<>();
 
 
     @PostConstruct
@@ -113,7 +131,7 @@ public class RuleEngine {
                     MedicalInsRuleProject medicalInsRuleProject = null;
                     for (int index = 0; index < medicalInsRuleProjectList.size(); index++) {
                         medicalInsRuleProject = medicalInsRuleProjectList.get(index);
-                        if(StringUtils.isNotBlank(medicalInsRuleProject.getProejctCode())) {
+                        if (StringUtils.isNotBlank(medicalInsRuleProject.getProejctCode())) {
                             if (itemCodeAndRuleIdMap.containsKey(medicalInsRuleProject.getProejctCode())) {
                                 itemCodeAndRuleIdMap.get(medicalInsRuleProject.getProejctCode()).add(medicalInsRuleProject.getMedicineInsRuleInfoId());
                             } else {
@@ -122,7 +140,7 @@ public class RuleEngine {
                                 itemCodeAndRuleIdMap.put(medicalInsRuleProject.getProejctCode(), ruleIdSet);
                             }
                         }
-                        if(StringUtils.isNotBlank(medicalInsRuleProject.getCorrelationProjectCode())) {
+                        if (StringUtils.isNotBlank(medicalInsRuleProject.getCorrelationProjectCode())) {
                             if (itemCodeAndRuleIdMap.containsKey(medicalInsRuleProject.getCorrelationProjectCode())) {
                                 itemCodeAndRuleIdMap.get(medicalInsRuleProject.getCorrelationProjectCode()).add(medicalInsRuleProject.getMedicineInsRuleInfoId());
                             } else {
@@ -169,30 +187,102 @@ public class RuleEngine {
         return null;
     }
 
-    public Result dealMidInterfaceEngin(String intefName, Map<String, Object> paramMap, MidIncidentWarningVO midIncidentWarningVO) {
+    public Result dealMidInterfaceEngin(String intefName, Map<String, Object> paramMap, MidIncidentWarningVO midIncidentWarningVO, String ipStr) {
         midIncidentWarningVOThreadLocal.set(midIncidentWarningVO);
         try {
             List<RuleAttr> ruleAttrList = interfRuleAttrList.get(intefName);
-            if(null == ruleAttrList){
-                return Result.error("接口:"+intefName+" 未配置 对应的规则属性");
+            if (null == ruleAttrList) {
+                return Result.error("接口:" + intefName + " 未配置 对应的规则属性");
             }
+            dictUtil.transferMidIncidentWarningVO(midIncidentWarningVO);
             List<Map<String, Object>> itemList = interfItemListPlugin.findProIntersection(paramMap, ruleAttrList);
 
             MidIncidentAudit midIncidentAudit = insertMidWarning(midIncidentWarningVO);
+            insertLog(midIncidentWarningVO);
             midIncidentAudit.setInterfName(intefName);
             for (Map<String, Object> itemMap : itemList) {
-                dictUtil.transferItemMap(itemMap);
                 Set<Integer> medicalInsRuleInfoIdList = itemCodeAndRuleIdMap.get(itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY));
-                runEngine(itemMap, medicalInsRuleInfoIdList,midIncidentAudit);
+                Object diagnose = itemMap.get(Constant.MEDICAL_DIAGNOSE_CODE_KEY);
+                if (null != diagnose) {
+                    //获取诊断编码配置的规则ID,加入需要执行的规则
+                    Set<Integer> diagnoseMedicalInsRuleInfoIdList = itemCodeAndRuleIdMap.get(diagnose.toString());
+                    if (CollectionUtil.isNotEmpty(diagnoseMedicalInsRuleInfoIdList)) {
+                        medicalInsRuleInfoIdList.addAll(diagnoseMedicalInsRuleInfoIdList);
+                    }
+                }
+                runEngine(itemMap, medicalInsRuleInfoIdList, midIncidentAudit, ipStr);
             }
-        }finally {
+        } finally {
             midIncidentWarningVOThreadLocal.remove();
         }
 
         return Result.ok();
     }
 
-    public MidIncidentAudit insertMidWarning(MidIncidentWarningVO midIncidentWarningVO){
+    public void insertLog(MidIncidentWarningVO midIncidentWarningVO) {
+        MidIncidentVisitLog midIncidentVisitLog = new MidIncidentVisitLog();
+        midIncidentVisitLog.setDoctorId(midIncidentWarningVO.getDoctor_code());
+        midIncidentVisitLog.setDoctorName(midIncidentWarningVO.getDoctor_name());
+        midIncidentVisitLog.setVisitNo(midIncidentWarningVO.getVisit_no());
+        midIncidentVisitLog.setPatientId(midIncidentWarningVO.getPatient_id());
+        midIncidentVisitLog.setPatientName(midIncidentWarningVO.getPatient_name());
+        if (CollectionUtil.isNotEmpty(midIncidentWarningVO.getDiagnoses())) {
+            midIncidentVisitLog.setDiagnoses(JSON.toJSONString(midIncidentWarningVO.getDiagnoses()));
+        }
+        midIncidentVisitLog.setDoctorAdviceNo(midIncidentWarningVO.getDoctor_advice_no());
+        try {
+            Date inHospDate = DateUtils.parseDate(midIncidentWarningVO.getIn_hosp_date(), "yyyyMMdd");
+            midIncidentVisitLog.setInHospDate(inHospDate);
+        } catch (ParseException e) {
+            log.error(e.getMessage(), e);
+        }
+        Date now = new Date(System.currentTimeMillis());
+        midIncidentVisitLog.setCreateTime(now);
+        midIncidentVisitLog.setMedicalDeptCode(midIncidentWarningVO.getMedical_dept_code());
+        midIncidentVisitLog.setMedicalDeptName(midIncidentWarningVO.getMedical_dept_name());
+        midIncidentVisitLog.setVisitType(midIncidentWarningVO.getVisit_type());
+        midIncidentVisitLogService.save(midIncidentVisitLog);
+        if (CollectionUtil.isNotEmpty(midIncidentWarningVO.getAdvice_details())) {
+            List<MidIncidentVisitDetailLog> midIncidentVisitDetailLogList = new ArrayList<>();
+            MidIncidentVisitDetailLog midIncidentVisitDetailLog = null;
+            for (AdviceDetailsVO adviceDetailsVO : midIncidentWarningVO.getAdvice_details()) {
+                midIncidentVisitDetailLog = new MidIncidentVisitDetailLog();
+                midIncidentVisitDetailLog.setAmount(new BigDecimal(adviceDetailsVO.getAmount()));
+                midIncidentVisitDetailLog.setCreateTime(now);
+                midIncidentVisitDetailLog.setMidIncidentVisitLogId(midIncidentVisitLog.getId());
+                midIncidentVisitDetailLog.setDoctorId(midIncidentVisitLog.getDoctorId());
+                midIncidentVisitDetailLog.setDoctorName(midIncidentVisitLog.getDoctorName());
+                midIncidentVisitDetailLog.setDoseDay(adviceDetailsVO.getDose_day());
+                midIncidentVisitDetailLog.setDoseForm(adviceDetailsVO.getDose_form());
+                midIncidentVisitDetailLog.setDoseUnit(adviceDetailsVO.getDose_unit());
+                midIncidentVisitDetailLog.setExpenseCategory(adviceDetailsVO.getExpense_category());
+                midIncidentVisitDetailLog.setVisitNo(midIncidentVisitLog.getVisitNo());
+                midIncidentVisitDetailLog.setVisitType(midIncidentVisitLog.getVisitType());
+                midIncidentVisitDetailLog.setInspectionSite(adviceDetailsVO.getInspection_site());
+                midIncidentVisitDetailLog.setInvoiceProject(adviceDetailsVO.getInvoice_project());
+                midIncidentVisitDetailLog.setMedicalInsuranceMark(adviceDetailsVO.getMedical_insurance_mark());
+                midIncidentVisitDetailLog.setMedicalNumber(adviceDetailsVO.getMedical_number());
+                midIncidentVisitDetailLog.setOrderType(adviceDetailsVO.getOrder_type());
+                midIncidentVisitDetailLog.setOrderCatalog(adviceDetailsVO.getOrder_catalog());
+                midIncidentVisitDetailLog.setSingleDoseNumber(adviceDetailsVO.getSingle_dose_number());
+                midIncidentVisitDetailLog.setSingleDoseUnit(adviceDetailsVO.getSingle_dose_unit());
+                midIncidentVisitDetailLog.setMedicalDeptCode(adviceDetailsVO.getMedical_project_code());
+                midIncidentVisitDetailLog.setMedicalProjectName(adviceDetailsVO.getMedical_project_name());
+                midIncidentVisitDetailLog.setTakeFrequence(adviceDetailsVO.getTake_frequence());
+                midIncidentVisitDetailLog.setMedicalSpecification(adviceDetailsVO.getMedical_specification());
+                midIncidentVisitDetailLog.setPrice(new BigDecimal(adviceDetailsVO.getPrice()));
+                midIncidentVisitDetailLog.setRecipeNo(adviceDetailsVO.getRecipe_no());
+                midIncidentVisitDetailLog.setUseDay(adviceDetailsVO.getUse_day());
+                midIncidentVisitDetailLog.setProjectType(adviceDetailsVO.getProject_type());
+                midIncidentVisitDetailLog.setProejctCode(adviceDetailsVO.getProject_code());
+                midIncidentVisitDetailLog.setProejctName(adviceDetailsVO.getProject_name());
+                midIncidentVisitDetailLogList.add(midIncidentVisitDetailLog);
+            }
+            midIncidentVisitDetailLogService.saveBatch(midIncidentVisitDetailLogList);
+        }
+    }
+
+    public MidIncidentAudit insertMidWarning(MidIncidentWarningVO midIncidentWarningVO) {
         MidIncidentAudit midIncidentAudit = new MidIncidentAudit();
         midIncidentAudit.setMedicalDeptCode(midIncidentWarningVO.getMedical_dept_code());
         midIncidentAudit.setMedicalDeptName(midIncidentWarningVO.getMedical_dept_name());
@@ -206,7 +296,22 @@ public class RuleEngine {
         midIncidentAudit.setPrescriptionNumber(midIncidentWarningVO.getDoctor_advice_no());
         midIncidentAudit.setNoticeType("事中预警");
         midIncidentAuditService.save(midIncidentAudit);
-
+        if (CollectionUtil.isNotEmpty(midIncidentWarningVO.getDiagnoses())) {
+            List<MidIncidentAuditDiagnose> midIncidentAuditDiagnoseList = new ArrayList<>();
+            for (DiagnosesVO diagnosesVO : midIncidentWarningVO.getDiagnoses()) {
+                MidIncidentAuditDiagnose midIncidentAuditDiagnose = new MidIncidentAuditDiagnose();
+                midIncidentAuditDiagnose.setMidIncidentAuditId(midIncidentAudit.getId());
+                midIncidentAuditDiagnose.setDiagnoseCode(diagnosesVO.getDiagnose_code());
+                midIncidentAuditDiagnose.setDiagnoseDesc(diagnosesVO.getDiagnose_desc());
+                midIncidentAuditDiagnose.setMedDiagnoseCode(diagnosesVO.getMedical_diagnose_code());
+                midIncidentAuditDiagnose.setMedDiagnoseDesc(diagnosesVO.getMedical_diagnose_name());
+                midIncidentAuditDiagnose.setCreateTime(date);
+                midIncidentAuditDiagnose.setOutpatientNumber(midIncidentWarningVO.getVisit_no());
+                midIncidentAuditDiagnose.setPrescriptionNumber(midIncidentWarningVO.getDoctor_advice_no());
+                midIncidentAuditDiagnoseList.add(midIncidentAuditDiagnose);
+            }
+            midIncidentAuditDiagnoseService.saveBatch(midIncidentAuditDiagnoseList);
+        }
 
 
         return midIncidentAudit;
@@ -215,7 +320,7 @@ public class RuleEngine {
     public List<Integer> getMedicalInsRuleInfoIdByIntef(String intefName, Map<String, Object> paramMap, List<RuleAttr> ruleAttrList) {
 
         List<Integer> medicalIdList = new ArrayList<>();
-        Map<String,List<Integer>> itemCodeAndRuleIdMap = new HashMap<>();
+        Map<String, List<Integer>> itemCodeAndRuleIdMap = new HashMap<>();
         for (RuleAttr ruleAttr : ruleAttrList) {
             String itemCode = null;
             if (StringUtils.isNotBlank(ruleAttr.getAttrPath())) {
@@ -269,7 +374,7 @@ public class RuleEngine {
      *
      * @param paramMap
      */
-    public void runEngine(Map<String, Object> paramMap, Set<Integer> medicalInsRuleInfoIdList,MidIncidentAudit midIncidentAudit) {
+    public void runEngine(Map<String, Object> paramMap, Set<Integer> medicalInsRuleInfoIdList, MidIncidentAudit midIncidentAudit, String ipStr) {
         LambdaQueryWrapper<RuleFactorRela> query = new LambdaQueryWrapper<RuleFactorRela>();
         query.eq(RuleFactorRela::getDelFlag, CommonConstant.DEL_FLAG_0);
         query.in(RuleFactorRela::getMedicalInsRuleInfoId, medicalInsRuleInfoIdList);
@@ -289,15 +394,7 @@ public class RuleEngine {
                 factorEnchangeFactory.runFactorEnchange(medicalRuleInsInfoId, medicalInsRuleInfo, midIncidentAudit, paramMap, factorEnchangeIdList, factorEnchanceListTemp);
             }
         }
-    }
-
-    /**
-     * 调用规则引擎之后需要异步通知websocket服务
-     *
-     * @param paramMap
-     */
-    public void sendEnginResultToWebSocket(Map<String, Object> paramMap) {
-
+        webSocket.pushMessage(ipStr, JSON.toJSONString(midIncidentAudit));
     }
 
 

+ 74 - 24
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/dict/DictUtil.java

@@ -1,10 +1,13 @@
 package org.jeecg.modules.medical.ruleengine.dict;
 
+import cn.hutool.core.collection.CollectionUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.modules.medical.Constant;
+import org.jeecg.modules.medical.entity.AdviceDetailsVO;
+import org.jeecg.modules.medical.entity.DiagnosesVO;
 import org.jeecg.modules.medical.entity.FactorEnchance;
-import org.jeecg.modules.medical.ruleengine.MedicalEnum;
+import org.jeecg.modules.medical.entity.MidIncidentWarningVO;
 import org.jeecg.modules.medical.service.IMedicineService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
@@ -29,41 +32,42 @@ public class DictUtil {
      * 字典页面配置逻辑
      * 当要转换的接口属性路径配置没有.号,则直接把转换参数属性设置到ext_attr2字段上,
      * 如果有.号则设置到ext_attr1上。
+     *
      * @param localMap
      * @param factorEnchance
      * @param medicalInsRuleInfoId
      */
-    public void transferData(Map<String, Object> localMap, FactorEnchance factorEnchance, Integer medicalInsRuleInfoId){
+    public void transferData(Map<String, Object> localMap, FactorEnchance factorEnchance, Integer medicalInsRuleInfoId) {
         String localMapPath = factorEnchance.getExtAttr1();
 
-        if(StringUtils.isNotBlank(localMapPath)){
+        if (StringUtils.isNotBlank(localMapPath)) {
             String[] keyArr = localMapPath.split("\\.");
-            if(keyArr.length == 2) {
+            if (keyArr.length == 2) {
                 Object dataObject = localMap.get(keyArr[0]);
-                if(dataObject instanceof List){
+                if (dataObject instanceof List) {
                     List<Map> dataList = (List<Map>) dataObject;
                     for (Map param : dataList) {
 
                         Object valueKey = param.get(keyArr[1]);
-                        if(null == valueKey){
-                            throw new NullPointerException("要素提取:"+factorEnchance.getId()+" 规则ID:"+medicalInsRuleInfoId+" 配置的对象路径不存在数据属性:"+localMapPath);
+                        if (null == valueKey) {
+                            throw new NullPointerException("要素提取:" + factorEnchance.getId() + " 规则ID:" + medicalInsRuleInfoId + " 配置的对象路径不存在数据属性:" + localMapPath);
                         }
                         Object value = redisTemplate.opsForHash().get(factorEnchance.getEnhanceValue(), valueKey.toString());
-                        if(value == null){
+                        if (value == null) {
                             log.error("要素提取: {} 规则ID: {} 配置的对象路径不存在数据属性: {} 转换的数据类型:{} 字段属性:{} 未匹配到对应的缓存数据,请刷新缓存", factorEnchance.getId(),
                                     medicalInsRuleInfoId, localMapPath, factorEnchance.getEnhanceValue(), valueKey);
                         }
                         Integer outEventAttrId = factorEnchance.getEventAttrId();
                         param.put(outEventAttrId.toString(), value);
                     }
-                }else if(dataObject instanceof Map){
+                } else if (dataObject instanceof Map) {
                     Map dataMap = (Map) dataObject;
                     Object valueKey = dataMap.get(keyArr[1]);
-                    if(null == valueKey){
-                        throw new NullPointerException("要素提取:"+factorEnchance.getId()+" 规则ID:"+medicalInsRuleInfoId+" 配置的对象路径不存在数据属性:"+localMapPath);
+                    if (null == valueKey) {
+                        throw new NullPointerException("要素提取:" + factorEnchance.getId() + " 规则ID:" + medicalInsRuleInfoId + " 配置的对象路径不存在数据属性:" + localMapPath);
                     }
                     Object value = redisTemplate.opsForHash().get(factorEnchance.getEnhanceValue(), valueKey.toString());
-                    if(value == null){
+                    if (value == null) {
                         log.error("要素提取: {} 规则ID: {} 配置的对象路径不存在数据属性: {} 转换的数据类型:{} 字段属性:{} 未匹配到对应的缓存数据,请刷新缓存", factorEnchance.getId(),
                                 medicalInsRuleInfoId, localMapPath, factorEnchance.getEnhanceValue(), valueKey);
                     }
@@ -72,10 +76,10 @@ public class DictUtil {
                 }
 
             }
-        }else{
+        } else {
             Object valueKey = localMap.get(factorEnchance.getExtAttr2());
             Object value = redisTemplate.opsForHash().get(factorEnchance.getEnhanceValue(), valueKey.toString());
-            if(value == null){
+            if (value == null) {
                 log.error("要素提取: {} 规则ID: {} 配置的对象路径不存在数据属性: {} 转换的数据类型:{} 字段属性:{} 未匹配到对应的缓存数据,请刷新缓存", factorEnchance.getId(),
                         medicalInsRuleInfoId, localMapPath, factorEnchance.getEnhanceValue(), valueKey);
             }
@@ -85,16 +89,62 @@ public class DictUtil {
     }
 
     /**
-     * 转换医保和
+     * 转换医保和医院编码
+     *
+     * @param midIncidentWarningVO
+     */
+    public void transferMidIncidentWarningVO(MidIncidentWarningVO midIncidentWarningVO) {
+        if (CollectionUtil.isNotEmpty(midIncidentWarningVO.getDiagnoses())) {
+            for (DiagnosesVO diagnose : midIncidentWarningVO.getDiagnoses()) {
+                if (null != diagnose.getDiagnose_code()) {
+                    Object value = redisTemplate.opsForHash().get(Constant.HIS_MEDICAL_DICT_KEY, diagnose.getDiagnose_code());
+                    if (value == null) {
+                        log.error("字段未配置该诊断编码映射的医保记录,项目:{}", diagnose);
+                    } else {
+                        value = diagnose.getDiagnose_code();
+                    }
+                    diagnose.setMedical_diagnose_code(value.toString());
+//                        itemMap.put(Constant.MEDICAL_DIAGNOSE_CODE_KEY, value);
+                    Object name = redisTemplate.opsForHash().get(Constant.MEDICAL_CODE_NAME_KEY, value.toString());
+                    if (null != name) {
+                        diagnose.setMedical_diagnose_name(name.toString());
+                    }
+                }
+            }
+        }
+
+        if (CollectionUtil.isNotEmpty(midIncidentWarningVO.getAdvice_details())) {
+            for (AdviceDetailsVO adviceDetailsVO : midIncidentWarningVO.getAdvice_details()) {
+                if (null != adviceDetailsVO.getProject_code()) {
+                    Object value = redisTemplate.opsForHash().get(Constant.HIS_MEDICAL_DICT_KEY, adviceDetailsVO.getProject_code());
+                    if (value == null) {
+                        log.error("字段未配置该项目编码映射的医保记录,项目:{}", adviceDetailsVO);
+                    } else {
+                        value = adviceDetailsVO.getProject_code();
+                    }
+                    adviceDetailsVO.setMedical_project_code(value.toString());
+//                        itemMap.put(Constant.MEDICAL_DIAGNOSE_CODE_KEY, value);
+                    Object name = redisTemplate.opsForHash().get(Constant.MEDICAL_CODE_NAME_KEY, value.toString());
+                    if (null != name) {
+                        adviceDetailsVO.setMedical_project_name(name.toString());
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 转换医保和医院编码
+     *
      * @param itemMap
      */
-    public void transferItemMap(Map<String,Object> itemMap){
+    public void transferItemMap(Map<String, Object> itemMap) {
         Object projectCode = itemMap.get(Constant.PROJECT_CODE_KEY);
-        if(null !=projectCode){
+        if (null != projectCode) {
             Object value = redisTemplate.opsForHash().get(Constant.HIS_MEDICAL_DICT_KEY, projectCode.toString());
-            if(value == null){
-                log.error("字段未配置该项目编码映射的医保记录,项目:{}",itemMap);
-            }else{
+            if (value == null) {
+                log.error("字段未配置该项目编码映射的医保记录,项目:{}", itemMap);
+            } else {
                 itemMap.put(Constant.MEDICAL_PROJECT_CODE_KEY, value);
                 Object name = redisTemplate.opsForHash().get(Constant.MEDICAL_CODE_NAME_KEY, projectCode.toString());
                 itemMap.put(Constant.MEDICAL_PROJECT_NAME_KEY, name);
@@ -102,11 +152,11 @@ public class DictUtil {
         }
 
         Object diagnoseCode = itemMap.get(Constant.DIAGNOSE_CODE_KEY);
-        if(null !=diagnoseCode){
+        if (null != diagnoseCode) {
             Object value = redisTemplate.opsForHash().get(Constant.HIS_MEDICAL_DICT_KEY, diagnoseCode.toString());
-            if(value == null){
-                log.error("字段未配置该诊断编码映射的医保记录,项目:{}",itemMap);
-            }else{
+            if (value == null) {
+                log.error("字段未配置该诊断编码映射的医保记录,项目:{}", itemMap);
+            } else {
                 itemMap.put(Constant.MEDICAL_DIAGNOSE_CODE_KEY, value);
                 Object name = redisTemplate.opsForHash().get(Constant.MEDICAL_CODE_NAME_KEY, diagnoseCode.toString());
                 itemMap.put(Constant.MEDICAL_PROJECT_NAME_KEY, name);

+ 14 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/IMidIncidentVisitDetailLogService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.medical.service;
+
+import org.jeecg.modules.medical.entity.MidIncidentVisitDetailLog;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: mid_incident_visit_detail_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:44
+ * @Version: V1.0
+ */
+public interface IMidIncidentVisitDetailLogService extends IService<MidIncidentVisitDetailLog> {
+
+}

+ 14 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/IMidIncidentVisitLogService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.medical.service;
+
+import org.jeecg.modules.medical.entity.MidIncidentVisitLog;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: mid_incident_visit_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:36
+ * @Version: V1.0
+ */
+public interface IMidIncidentVisitLogService extends IService<MidIncidentVisitLog> {
+
+}

+ 19 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/MidIncidentVisitDetailLogServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.medical.service.impl;
+
+import org.jeecg.modules.medical.entity.MidIncidentVisitDetailLog;
+import org.jeecg.modules.medical.mapper.MidIncidentVisitDetailLogMapper;
+import org.jeecg.modules.medical.service.IMidIncidentVisitDetailLogService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: mid_incident_visit_detail_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:44
+ * @Version: V1.0
+ */
+@Service
+public class MidIncidentVisitDetailLogServiceImpl extends ServiceImpl<MidIncidentVisitDetailLogMapper, MidIncidentVisitDetailLog> implements IMidIncidentVisitDetailLogService {
+
+}

+ 19 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/MidIncidentVisitLogServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.medical.service.impl;
+
+import org.jeecg.modules.medical.entity.MidIncidentVisitLog;
+import org.jeecg.modules.medical.mapper.MidIncidentVisitLogMapper;
+import org.jeecg.modules.medical.service.IMidIncidentVisitLogService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: mid_incident_visit_log
+ * @Author: jeecg-boot
+ * @Date:   2023-05-12 09:23:36
+ * @Version: V1.0
+ */
+@Service
+public class MidIncidentVisitLogServiceImpl extends ServiceImpl<MidIncidentVisitLogMapper, MidIncidentVisitLog> implements IMidIncidentVisitLogService {
+
+}

+ 375 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/MidIncidentVisitDetailLogList.vue

@@ -0,0 +1,375 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('mid_incident_visit_detail_log')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <mid-incident-visit-detail-log-modal ref="modalForm" @ok="modalFormOk"></mid-incident-visit-detail-log-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import MidIncidentVisitDetailLogModal from './modules/MidIncidentVisitDetailLogModal'
+
+  export default {
+    name: 'MidIncidentVisitDetailLogList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      MidIncidentVisitDetailLogModal
+    },
+    data () {
+      return {
+        description: 'mid_incident_visit_detail_log管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'医保规则ID',
+            align:"center",
+            dataIndex: 'medicalInsRuleInfoId'
+          },
+          {
+            title:'医保规则编码',
+            align:"center",
+            dataIndex: 'medicalInsRuleInfoCode'
+          },
+          {
+            title:'医保规则名称',
+            align:"center",
+            dataIndex: 'medicalInsRuleInfoName'
+          },
+          {
+            title:'事中门诊日志表ID',
+            align:"center",
+            dataIndex: 'midIncidentVisitLogId'
+          },
+          {
+            title:'就诊类别;住院/门诊',
+            align:"center",
+            dataIndex: 'visitType'
+          },
+          {
+            title:'科室编码',
+            align:"center",
+            dataIndex: 'medicalDeptCode'
+          },
+          {
+            title:'科室名称',
+            align:"center",
+            dataIndex: 'medicalDeptName'
+          },
+          {
+            title:'医生姓名',
+            align:"center",
+            dataIndex: 'doctorName'
+          },
+          {
+            title:'主诊医师编码',
+            align:"center",
+            dataIndex: 'doctorId'
+          },
+          {
+            title:'个人编号',
+            align:"center",
+            dataIndex: 'patientId'
+          },
+          {
+            title:'患者姓名',
+            align:"center",
+            dataIndex: 'patientName'
+          },
+          {
+            title:'住院号/门诊号',
+            align:"center",
+            dataIndex: 'visitNo'
+          },
+          {
+            title:'医嘱号/处方号',
+            align:"center",
+            dataIndex: 'recipeNo'
+          },
+          {
+            title:'项目类型',
+            align:"center",
+            dataIndex: 'projectType'
+          },
+          {
+            title:'项目编码',
+            align:"center",
+            dataIndex: 'proejctCode'
+          },
+          {
+            title:'项目名称',
+            align:"center",
+            dataIndex: 'proejctName'
+          },
+          {
+            title:'医保项目编码',
+            align:"center",
+            dataIndex: 'medicalProjectCode'
+          },
+          {
+            title:'医保项目名称',
+            align:"center",
+            dataIndex: 'medicalProjectName'
+          },
+          {
+            title:'发票项目编号',
+            align:"center",
+            dataIndex: 'invoiceProject'
+          },
+          {
+            title:'费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费',
+            align:"center",
+            dataIndex: 'expenseCategory'
+          },
+          {
+            title:'剂型',
+            align:"center",
+            dataIndex: 'doseForm'
+          },
+          {
+            title:'规格',
+            align:"center",
+            dataIndex: 'medicalSpecification'
+          },
+          {
+            title:'价格;单价,必须使用数值型,如”12.5”',
+            align:"center",
+            dataIndex: 'price'
+          },
+          {
+            title:'数量;数量,必须使用数值型,如”10”',
+            align:"center",
+            dataIndex: 'medicalNumber'
+          },
+          {
+            title:'单位',
+            align:"center",
+            dataIndex: 'doseUnit'
+          },
+          {
+            title:'金额;金额,必须使用数值型,如”50.5”',
+            align:"center",
+            dataIndex: 'amount'
+          },
+          {
+            title:'用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”',
+            align:"center",
+            dataIndex: 'useDay'
+          },
+          {
+            title:'单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”',
+            align:"center",
+            dataIndex: 'singleDoseNumber'
+          },
+          {
+            title:'单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)',
+            align:"center",
+            dataIndex: 'singleDoseUnit'
+          },
+          {
+            title:'药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”',
+            align:"center",
+            dataIndex: 'doseDay'
+          },
+          {
+            title:'服用频次',
+            align:"center",
+            dataIndex: 'takeFrequence'
+          },
+          {
+            title:'医保标志',
+            align:"center",
+            dataIndex: 'medicalInsuranceMark'
+          },
+          {
+            title:'检查部位',
+            align:"center",
+            dataIndex: 'inspectionSite'
+          },
+          {
+            title:'医嘱大类',
+            align:"center",
+            dataIndex: 'orderCatalog'
+          },
+          {
+            title:'医嘱类别',
+            align:"center",
+            dataIndex: 'orderType'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/medical/midIncidentVisitDetailLog/list",
+          delete: "/medical/midIncidentVisitDetailLog/delete",
+          deleteBatch: "/medical/midIncidentVisitDetailLog/deleteBatch",
+          exportXlsUrl: "/medical/midIncidentVisitDetailLog/exportXls",
+          importExcelUrl: "medical/midIncidentVisitDetailLog/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'int',value:'medicalInsRuleInfoId',text:'医保规则ID'})
+        fieldList.push({type:'string',value:'medicalInsRuleInfoCode',text:'医保规则编码'})
+        fieldList.push({type:'string',value:'medicalInsRuleInfoName',text:'医保规则名称'})
+        fieldList.push({type:'int',value:'midIncidentVisitLogId',text:'事中门诊日志表ID'})
+        fieldList.push({type:'string',value:'visitType',text:'就诊类别;住院/门诊'})
+        fieldList.push({type:'string',value:'medicalDeptCode',text:'科室编码'})
+        fieldList.push({type:'string',value:'medicalDeptName',text:'科室名称'})
+        fieldList.push({type:'string',value:'doctorName',text:'医生姓名'})
+        fieldList.push({type:'string',value:'doctorId',text:'主诊医师编码'})
+        fieldList.push({type:'string',value:'patientId',text:'个人编号'})
+        fieldList.push({type:'string',value:'patientName',text:'患者姓名'})
+        fieldList.push({type:'string',value:'visitNo',text:'住院号/门诊号'})
+        fieldList.push({type:'string',value:'recipeNo',text:'医嘱号/处方号'})
+        fieldList.push({type:'string',value:'projectType',text:'项目类型'})
+        fieldList.push({type:'string',value:'proejctCode',text:'项目编码'})
+        fieldList.push({type:'string',value:'proejctName',text:'项目名称'})
+        fieldList.push({type:'string',value:'medicalProjectCode',text:'医保项目编码'})
+        fieldList.push({type:'string',value:'medicalProjectName',text:'医保项目名称'})
+        fieldList.push({type:'string',value:'invoiceProject',text:'发票项目编号'})
+        fieldList.push({type:'string',value:'expenseCategory',text:'费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费'})
+        fieldList.push({type:'string',value:'doseForm',text:'剂型'})
+        fieldList.push({type:'string',value:'medicalSpecification',text:'规格'})
+        fieldList.push({type:'number',value:'price',text:'价格;单价,必须使用数值型,如”12.5”'})
+        fieldList.push({type:'int',value:'medicalNumber',text:'数量;数量,必须使用数值型,如”10”'})
+        fieldList.push({type:'string',value:'doseUnit',text:'单位'})
+        fieldList.push({type:'number',value:'amount',text:'金额;金额,必须使用数值型,如”50.5”'})
+        fieldList.push({type:'int',value:'useDay',text:'用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”'})
+        fieldList.push({type:'int',value:'singleDoseNumber',text:'单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”'})
+        fieldList.push({type:'string',value:'singleDoseUnit',text:'单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)'})
+        fieldList.push({type:'int',value:'doseDay',text:'药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”'})
+        fieldList.push({type:'string',value:'takeFrequence',text:'服用频次'})
+        fieldList.push({type:'string',value:'medicalInsuranceMark',text:'医保标志'})
+        fieldList.push({type:'string',value:'inspectionSite',text:'检查部位'})
+        fieldList.push({type:'string',value:'orderCatalog',text:'医嘱大类'})
+        fieldList.push({type:'string',value:'orderType',text:'医嘱类别'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 26 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/MidIncidentVisitDetailLog_menu_insert.sql

@@ -0,0 +1,26 @@
+-- 注意:该页面对应的前台目录为views/medical文件夹下
+-- 如果你想更改到其他目录,请修改sql中component字段对应的值
+
+
+INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) 
+VALUES ('2023051209232290440', NULL, 'mid_incident_visit_detail_log', '/medical/midIncidentVisitDetailLogList', 'medical/MidIncidentVisitDetailLogList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-05-12 09:23:44', NULL, NULL, 0);
+
+-- 权限控制sql
+-- 新增
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209232290441', '2023051209232290440', '添加mid_incident_visit_detail_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_detail_log:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:44', NULL, NULL, 0, 0, '1', 0);
+-- 编辑
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209232290442', '2023051209232290440', '编辑mid_incident_visit_detail_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_detail_log:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:44', NULL, NULL, 0, 0, '1', 0);
+-- 删除
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209232290443', '2023051209232290440', '删除mid_incident_visit_detail_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_detail_log:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:44', NULL, NULL, 0, 0, '1', 0);
+-- 批量删除
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209232290444', '2023051209232290440', '批量删除mid_incident_visit_detail_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_detail_log:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:44', NULL, NULL, 0, 0, '1', 0);
+-- 导出excel
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209232300445', '2023051209232290440', '导出excel_mid_incident_visit_detail_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_detail_log:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:44', NULL, NULL, 0, 0, '1', 0);
+-- 导入excel
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209232300446', '2023051209232290440', '导入excel_mid_incident_visit_detail_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_detail_log:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:44', NULL, NULL, 0, 0, '1', 0);

+ 234 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/MidIncidentVisitLogList.vue

@@ -0,0 +1,234 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('mid_incident_visit_log')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <mid-incident-visit-log-modal ref="modalForm" @ok="modalFormOk"></mid-incident-visit-log-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import MidIncidentVisitLogModal from './modules/MidIncidentVisitLogModal'
+
+  export default {
+    name: 'MidIncidentVisitLogList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      MidIncidentVisitLogModal
+    },
+    data () {
+      return {
+        description: 'mid_incident_visit_log管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'就诊类别;住院/门诊',
+            align:"center",
+            dataIndex: 'visitType'
+          },
+          {
+            title:'科室编码',
+            align:"center",
+            dataIndex: 'medicalDeptCode'
+          },
+          {
+            title:'科室名称',
+            align:"center",
+            dataIndex: 'medicalDeptName'
+          },
+          {
+            title:'医生姓名',
+            align:"center",
+            dataIndex: 'doctorName'
+          },
+          {
+            title:'主诊医师编码',
+            align:"center",
+            dataIndex: 'doctorId'
+          },
+          {
+            title:'个人编号',
+            align:"center",
+            dataIndex: 'patientId'
+          },
+          {
+            title:'患者姓名',
+            align:"center",
+            dataIndex: 'patientName'
+          },
+          {
+            title:'住院号/门诊号',
+            align:"center",
+            dataIndex: 'visitNo'
+          },
+          {
+            title:'医嘱号/处方号',
+            align:"center",
+            dataIndex: 'doctorAdviceNo'
+          },
+          {
+            title:'入院日期',
+            align:"center",
+            dataIndex: 'inHospDate',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'诊断编码',
+            align:"center",
+            dataIndex: 'diagnoses'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/medical/midIncidentVisitLog/list",
+          delete: "/medical/midIncidentVisitLog/delete",
+          deleteBatch: "/medical/midIncidentVisitLog/deleteBatch",
+          exportXlsUrl: "/medical/midIncidentVisitLog/exportXls",
+          importExcelUrl: "medical/midIncidentVisitLog/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'visitType',text:'就诊类别;住院/门诊'})
+        fieldList.push({type:'string',value:'medicalDeptCode',text:'科室编码'})
+        fieldList.push({type:'string',value:'medicalDeptName',text:'科室名称'})
+        fieldList.push({type:'string',value:'doctorName',text:'医生姓名'})
+        fieldList.push({type:'string',value:'doctorId',text:'主诊医师编码'})
+        fieldList.push({type:'string',value:'patientId',text:'个人编号'})
+        fieldList.push({type:'string',value:'patientName',text:'患者姓名'})
+        fieldList.push({type:'string',value:'visitNo',text:'住院号/门诊号'})
+        fieldList.push({type:'string',value:'doctorAdviceNo',text:'医嘱号/处方号'})
+        fieldList.push({type:'date',value:'inHospDate',text:'入院日期'})
+        fieldList.push({type:'string',value:'diagnoses',text:'诊断编码'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 26 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/MidIncidentVisitLog_menu_insert.sql

@@ -0,0 +1,26 @@
+-- 注意:该页面对应的前台目录为views/medical文件夹下
+-- 如果你想更改到其他目录,请修改sql中component字段对应的值
+
+
+INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) 
+VALUES ('2023051209238230360', NULL, 'mid_incident_visit_log', '/medical/midIncidentVisitLogList', 'medical/MidIncidentVisitLogList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-05-12 09:23:36', NULL, NULL, 0);
+
+-- 权限控制sql
+-- 新增
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209238240361', '2023051209238230360', '添加mid_incident_visit_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_log:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:36', NULL, NULL, 0, 0, '1', 0);
+-- 编辑
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209238240362', '2023051209238230360', '编辑mid_incident_visit_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_log:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:36', NULL, NULL, 0, 0, '1', 0);
+-- 删除
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209238240363', '2023051209238230360', '删除mid_incident_visit_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_log:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:36', NULL, NULL, 0, 0, '1', 0);
+-- 批量删除
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209238240364', '2023051209238230360', '批量删除mid_incident_visit_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_log:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:36', NULL, NULL, 0, 0, '1', 0);
+-- 导出excel
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209238240365', '2023051209238230360', '导出excel_mid_incident_visit_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_log:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:36', NULL, NULL, 0, 0, '1', 0);
+-- 导入excel
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023051209238240366', '2023051209238230360', '导入excel_mid_incident_visit_log', NULL, NULL, 0, NULL, NULL, 2, 'medical:mid_incident_visit_log:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-12 09:23:36', NULL, NULL, 0, 0, '1', 0);

+ 274 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitDetailLogForm.vue

@@ -0,0 +1,274 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="医保规则ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalInsRuleInfoId">
+              <a-input-number v-model="model.medicalInsRuleInfoId" placeholder="请输入医保规则ID" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医保规则编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalInsRuleInfoCode">
+              <a-input v-model="model.medicalInsRuleInfoCode" placeholder="请输入医保规则编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医保规则名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalInsRuleInfoName">
+              <a-input v-model="model.medicalInsRuleInfoName" placeholder="请输入医保规则名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="事中门诊日志表ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="midIncidentVisitLogId">
+              <a-input-number v-model="model.midIncidentVisitLogId" placeholder="请输入事中门诊日志表ID" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="就诊类别;住院/门诊" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="visitType">
+              <a-input v-model="model.visitType" placeholder="请输入就诊类别;住院/门诊"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="科室编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalDeptCode">
+              <a-input v-model="model.medicalDeptCode" placeholder="请输入科室编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="科室名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalDeptName">
+              <a-input v-model="model.medicalDeptName" placeholder="请输入科室名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医生姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doctorName">
+              <a-input v-model="model.doctorName" placeholder="请输入医生姓名"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="主诊医师编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doctorId">
+              <a-input v-model="model.doctorId" placeholder="请输入主诊医师编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="个人编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="patientId">
+              <a-input v-model="model.patientId" placeholder="请输入个人编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="患者姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="patientName">
+              <a-input v-model="model.patientName" placeholder="请输入患者姓名"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="住院号/门诊号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="visitNo">
+              <a-input v-model="model.visitNo" placeholder="请输入住院号/门诊号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医嘱号/处方号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recipeNo">
+              <a-input v-model="model.recipeNo" placeholder="请输入医嘱号/处方号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="项目类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectType">
+              <a-input v-model="model.projectType" placeholder="请输入项目类型"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="项目编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="proejctCode">
+              <a-input v-model="model.proejctCode" placeholder="请输入项目编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="proejctName">
+              <a-input v-model="model.proejctName" placeholder="请输入项目名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医保项目编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalProjectCode">
+              <a-input v-model="model.medicalProjectCode" placeholder="请输入医保项目编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医保项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalProjectName">
+              <a-input v-model="model.medicalProjectName" placeholder="请输入医保项目名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="发票项目编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invoiceProject">
+              <a-input v-model="model.invoiceProject" placeholder="请输入发票项目编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="expenseCategory">
+              <a-input v-model="model.expenseCategory" placeholder="请输入费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="剂型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doseForm">
+              <a-input v-model="model.doseForm" placeholder="请输入剂型"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalSpecification">
+              <a-input v-model="model.medicalSpecification" placeholder="请输入规格"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="价格;单价,必须使用数值型,如”12.5”" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
+              <a-input-number v-model="model.price" placeholder="请输入价格;单价,必须使用数值型,如”12.5”" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="数量;数量,必须使用数值型,如”10”" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalNumber">
+              <a-input-number v-model="model.medicalNumber" placeholder="请输入数量;数量,必须使用数值型,如”10”" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doseUnit">
+              <a-input v-model="model.doseUnit" placeholder="请输入单位"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="金额;金额,必须使用数值型,如”50.5”" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
+              <a-input-number v-model="model.amount" placeholder="请输入金额;金额,必须使用数值型,如”50.5”" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="useDay">
+              <a-input-number v-model="model.useDay" placeholder="请输入用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="singleDoseNumber">
+              <a-input-number v-model="model.singleDoseNumber" placeholder="请输入单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="singleDoseUnit">
+              <a-input v-model="model.singleDoseUnit" placeholder="请输入单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doseDay">
+              <a-input-number v-model="model.doseDay" placeholder="请输入药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="服用频次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="takeFrequence">
+              <a-input v-model="model.takeFrequence" placeholder="请输入服用频次"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医保标志" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalInsuranceMark">
+              <a-input v-model="model.medicalInsuranceMark" placeholder="请输入医保标志"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="检查部位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionSite">
+              <a-input v-model="model.inspectionSite" placeholder="请输入检查部位"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医嘱大类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCatalog">
+              <a-input v-model="model.orderCatalog" placeholder="请输入医嘱大类"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医嘱类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderType">
+              <a-input v-model="model.orderType" placeholder="请输入医嘱类别"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'MidIncidentVisitDetailLogForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/medical/midIncidentVisitDetailLog/add",
+          edit: "/medical/midIncidentVisitDetailLog/edit",
+          queryById: "/medical/midIncidentVisitDetailLog/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitDetailLogModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <mid-incident-visit-detail-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></mid-incident-visit-detail-log-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import MidIncidentVisitDetailLogForm from './MidIncidentVisitDetailLogForm'
+
+  export default {
+    name: 'MidIncidentVisitDetailLogModal',
+    components: {
+      MidIncidentVisitDetailLogForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitDetailLogModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <mid-incident-visit-detail-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></mid-incident-visit-detail-log-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import MidIncidentVisitDetailLogForm from './MidIncidentVisitDetailLogForm'
+  export default {
+    name: 'MidIncidentVisitDetailLogModal',
+    components: {
+      MidIncidentVisitDetailLogForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 154 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitLogForm.vue

@@ -0,0 +1,154 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="就诊类别;住院/门诊" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="visitType">
+              <a-input v-model="model.visitType" placeholder="请输入就诊类别;住院/门诊"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="科室编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalDeptCode">
+              <a-input v-model="model.medicalDeptCode" placeholder="请输入科室编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="科室名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="medicalDeptName">
+              <a-input v-model="model.medicalDeptName" placeholder="请输入科室名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医生姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doctorName">
+              <a-input v-model="model.doctorName" placeholder="请输入医生姓名"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="主诊医师编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doctorId">
+              <a-input v-model="model.doctorId" placeholder="请输入主诊医师编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="个人编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="patientId">
+              <a-input v-model="model.patientId" placeholder="请输入个人编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="患者姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="patientName">
+              <a-input v-model="model.patientName" placeholder="请输入患者姓名"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="住院号/门诊号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="visitNo">
+              <a-input v-model="model.visitNo" placeholder="请输入住院号/门诊号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="医嘱号/处方号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doctorAdviceNo">
+              <a-input v-model="model.doctorAdviceNo" placeholder="请输入医嘱号/处方号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="入院日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inHospDate">
+              <j-date placeholder="请选择入院日期" v-model="model.inHospDate"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="诊断编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diagnoses">
+              <a-input v-model="model.diagnoses" placeholder="请输入诊断编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'MidIncidentVisitLogForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/medical/midIncidentVisitLog/add",
+          edit: "/medical/midIncidentVisitLog/edit",
+          queryById: "/medical/midIncidentVisitLog/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitLogModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <mid-incident-visit-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></mid-incident-visit-log-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import MidIncidentVisitLogForm from './MidIncidentVisitLogForm'
+
+  export default {
+    name: 'MidIncidentVisitLogModal',
+    components: {
+      MidIncidentVisitLogForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/vue/modules/MidIncidentVisitLogModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <mid-incident-visit-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></mid-incident-visit-log-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import MidIncidentVisitLogForm from './MidIncidentVisitLogForm'
+  export default {
+    name: 'MidIncidentVisitLogModal',
+    components: {
+      MidIncidentVisitLogForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 27 - 21
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/message/websocket/WebSocket.java

@@ -1,18 +1,21 @@
 package org.jeecg.modules.message.websocket;
 
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.websocket.*;
-import javax.websocket.server.PathParam;
-import javax.websocket.server.ServerEndpoint;
-
-import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.base.BaseMap;
 import org.jeecg.common.constant.WebsocketConst;
 import org.jeecg.common.modules.redis.client.JeecgRedisClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
-import lombok.extern.slf4j.Slf4j;
+
+import javax.websocket.OnClose;
+import javax.websocket.OnError;
+import javax.websocket.OnMessage;
+import javax.websocket.OnOpen;
+import javax.websocket.Session;
+import javax.websocket.server.PathParam;
+import javax.websocket.server.ServerEndpoint;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * @Author scott
@@ -23,8 +26,10 @@ import lombok.extern.slf4j.Slf4j;
 @Slf4j
 @ServerEndpoint("/websocket/{userId}")
 public class WebSocket {
-    
-    /**线程安全Map*/
+
+    /**
+     * 线程安全Map
+     */
     private static ConcurrentHashMap<String, Session> sessionPool = new ConcurrentHashMap<>();
 
     /**
@@ -58,24 +63,24 @@ public class WebSocket {
     /**
      * ws推送消息
      *
-     * @param userId
+     * @param ipStr
      * @param message
      */
-    public void pushMessage(String userId, String message) {
+    public void pushMessage(String ipStr, String message) {
         for (Map.Entry<String, Session> item : sessionPool.entrySet()) {
             //userId key值= {用户id + "_"+ 登录token的md5串}
             //TODO vue2未改key新规则,暂时不影响逻辑
-            if (item.getKey().contains(userId)) {
+            if (item.getKey().contains(ipStr)) {
                 Session session = item.getValue();
                 try {
                     //update-begin-author:taoyan date:20211012 for: websocket报错 https://gitee.com/jeecg/jeecg-boot/issues/I4C0MU
-                    synchronized (session){
-                        log.info("【系统 WebSocket】推送单人消息:" + message);
+                    synchronized (session) {
+                        log.info("【系统 WebSocket】推送:{} 单人消息:{}", ipStr, message);
                         session.getBasicRemote().sendText(message);
                     }
                     //update-end-author:taoyan date:20211012 for: websocket报错 https://gitee.com/jeecg/jeecg-boot/issues/I4C0MU
                 } catch (Exception e) {
-                    log.error(e.getMessage(),e);
+                    log.error(e.getMessage(), e);
                 }
             }
         }
@@ -105,12 +110,12 @@ public class WebSocket {
      */
     @OnMessage
     public void onMessage(String message, @PathParam(value = "userId") String userId) {
-        if(!"ping".equals(message) && !WebsocketConst.CMD_CHECK.equals(message)){
+        if (!"ping".equals(message) && !WebsocketConst.CMD_CHECK.equals(message)) {
             log.info("【系统 WebSocket】收到客户端消息:" + message);
-        }else{
+        } else {
             log.debug("【系统 WebSocket】收到客户端消息:" + message);
         }
-        
+
 //        //------------------------------------------------------------------------------
 //        JSONObject obj = new JSONObject();
 //        //业务类型
@@ -133,9 +138,10 @@ public class WebSocket {
         t.printStackTrace();
     }
     //==========【系统 WebSocket接受、推送消息等方法 —— 具体服务节点推送ws消息】========================================================================================
-    
+
 
     //==========【采用redis发布订阅模式——推送消息】========================================================================================
+
     /**
      * 后台发送消息到redis
      *
@@ -174,5 +180,5 @@ public class WebSocket {
         }
     }
     //=======【采用redis发布订阅模式——推送消息】==========================================================================================
-    
+
 }