Browse Source

添加患者管理下的治愈管理和死亡管理

ry
loser 1 year ago
parent
commit
5fba698834
  1. 172
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientCureController.java
  2. 178
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientDeadController.java
  3. 36
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientManageController.java
  4. 2
      ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/resizable/jquery.resizableColumns.min.js
  5. 2
      ruoyi-admin/src/main/resources/static/ajax/libs/report/echarts/echarts-all.min.js
  6. 2
      ruoyi-admin/src/main/resources/static/js/jquery-ui-1.10.4.min.js
  7. 20
      ruoyi-admin/src/main/resources/templates/check/checkManage/checkManage.html
  8. 18
      ruoyi-admin/src/main/resources/templates/patient/patientManage/add.html
  9. 2
      ruoyi-admin/src/main/resources/templates/patient/patientManage/detail.html
  10. 8
      ruoyi-admin/src/main/resources/templates/patient/patientManage/edit.html
  11. 44
      ruoyi-admin/src/main/resources/templates/patient/patientManage/patientManage.html
  12. 147
      ruoyi-admin/src/main/resources/templates/patientCure/cure/add.html
  13. 176
      ruoyi-admin/src/main/resources/templates/patientCure/cure/cure.html
  14. 78
      ruoyi-admin/src/main/resources/templates/patientCure/cure/detail.html
  15. 149
      ruoyi-admin/src/main/resources/templates/patientCure/cure/edit.html
  16. 153
      ruoyi-admin/src/main/resources/templates/patientDead/dead/add.html
  17. 176
      ruoyi-admin/src/main/resources/templates/patientDead/dead/dead.html
  18. 76
      ruoyi-admin/src/main/resources/templates/patientDead/dead/detail.html
  19. 149
      ruoyi-admin/src/main/resources/templates/patientDead/dead/edit.html
  20. 2
      ruoyi-admin/src/main/resources/templates/supplies/nucleic/nucleic.html
  21. 2
      ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine.html
  22. 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  23. 208
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientCure.java
  24. 208
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientDead.java
  25. 8
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientManage.java
  26. 72
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientCureMapper.java
  27. 69
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientDeadMapper.java
  28. 82
      ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientCureService.java
  29. 79
      ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientDeadService.java
  30. 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientManageService.java
  31. 181
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientCureServiceImpl.java
  32. 182
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientDeadServiceImpl.java
  33. 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientManageServiceImpl.java
  34. 4
      ruoyi-system/src/main/resources/mapper/CheckManageMapper.xml
  35. 124
      ruoyi-system/src/main/resources/mapper/PatientCureMapper.xml
  36. 124
      ruoyi-system/src/main/resources/mapper/PatientDeadMapper.xml
  37. 10
      ruoyi-system/src/main/resources/mapper/PatientManageMapper.xml

172
ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientCureController.java

@ -0,0 +1,172 @@
package com.ruoyi.web.controller;
import java.util.List;
import com.ruoyi.system.domain.PatientCure;
import com.ruoyi.system.service.IPatientCureService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 治愈患者Controller
*
* @author zlx
* @date 2023-05-13
*/
@Controller
@RequestMapping("/patientCure/cure")
public class PatientCureController extends BaseController
{
private String prefix = "patientCure/cure";
@Autowired
private IPatientCureService patientCureService;
@RequiresPermissions("patientCure:cure:view")
@GetMapping()
public String cure()
{
return prefix + "/cure";
}
/**
* 查询治愈患者列表
*/
@RequiresPermissions("patientCure:cure:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(PatientCure patientCure)
{
startPage();
List<PatientCure> list = patientCureService.selectPatientCureList(patientCure);
return getDataTable(list);
}
/**
* 新增治愈患者
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存治愈患者
*/
@RequiresPermissions("patientCure:cure:add")
@Log(title = "治愈患者", businessType = BusinessType.INSERT) @PostMapping("/add")
@ResponseBody
public AjaxResult addSave(PatientCure patientCure)
{
return toAjax(patientCureService.insertPatientCure(patientCure));
}
/**
* 修改治愈患者
*/
@RequiresPermissions("patientCure:cure:edit")
@GetMapping("/edit/{patientId}")
public String edit(@PathVariable("patientId") Long patientId, ModelMap mmap)
{
PatientCure patientCure = patientCureService.selectPatientCureByPatientId(patientId);
mmap.put("patientCure", patientCure);
return prefix + "/edit";
}
/**
* 修改保存治愈患者
*/
@RequiresPermissions("patientCure:cure:edit")
@Log(title = "治愈患者", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(PatientCure patientCure)
{
return toAjax(patientCureService.updatePatientCure(patientCure));
}
/**
* 删除治愈患者
*/
@RequiresPermissions("patientCure:cure:remove")
@Log(title = "治愈患者", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(patientCureService.deletePatientCureByPatientIds(ids));
}
/**
* 导入治愈患者
*/
@Log(title = "治愈患者管理", businessType = BusinessType.IMPORT)
@RequiresPermissions("patientCure:cure:import")
@PostMapping("/importData")
@ResponseBody
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
ExcelUtil<PatientCure> util = new ExcelUtil<PatientCure>(PatientCure.class);
List<PatientCure> patientCureList = util.importExcel(file.getInputStream());
String message = patientCureService.importPatient(patientCureList,updateSupport);
return AjaxResult.success(message);
}
@RequiresPermissions("patientCure:cure:view")
@GetMapping("/importTemplate")
@ResponseBody
public AjaxResult importTemplate()
{
ExcelUtil<PatientCure> util = new ExcelUtil<PatientCure>(PatientCure.class);
return util.importTemplateExcel("治愈患者数据");
}
/**
* 导出治愈患者列表
*/
@RequiresPermissions("patientCure:cure:export")
@Log(title = "治愈患者", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(PatientCure patientCure)
{
List<PatientCure> list = patientCureService.selectPatientCureList(patientCure);
ExcelUtil<PatientCure> util = new ExcelUtil<PatientCure>(PatientCure.class);
return util.exportExcel(list, "治愈患者数据");
}
/**
* 展示详细信息
*/
@RequiresPermissions("patientCure:cure:detail")
@GetMapping("/detail/{patientId}")
public String detail(@PathVariable("patientId") Long patientId, ModelMap mmap)
{
mmap.put("name", "patientCure");
mmap.put("patientCure", patientCureService.selectPatientCureByPatientId(patientId));
return prefix + "/detail";
}
/**
* 校验身份证
*/
@PostMapping("/checkPatientIdCardUnique")
@ResponseBody
public boolean checkPatientIdCardUnique(PatientCure patientCure)
{
return patientCureService.checkPatientIdCardUnique(patientCure);
}
}

178
ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientDeadController.java

@ -0,0 +1,178 @@
package com.ruoyi.web.controller;
import java.util.List;
import com.ruoyi.common.utils.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.PatientDead;
import com.ruoyi.system.service.IPatientDeadService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 死亡患者Controller
*
* @author zlx
* @date 2023-05-13
*/
@Controller
@RequestMapping("/patientDead/dead")
public class PatientDeadController extends BaseController
{
private String prefix = "patientDead/dead";
@Autowired
private IPatientDeadService patientDeadService;
@RequiresPermissions("patientDead:dead:view")
@GetMapping()
public String dead()
{
return prefix + "/dead";
}
/**
* 查询死亡患者列表
*/
@RequiresPermissions("patientDead:dead:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(PatientDead patientDead)
{
startPage();
List<PatientDead> list = patientDeadService.selectPatientDeadList(patientDead);
return getDataTable(list);
}
/**
* 导出死亡患者列表
*/
@RequiresPermissions("patientDead:dead:export")
@Log(title = "死亡患者", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(PatientDead patientDead)
{
List<PatientDead> list = patientDeadService.selectPatientDeadList(patientDead);
ExcelUtil<PatientDead> util = new ExcelUtil<PatientDead>(PatientDead.class);
return util.exportExcel(list, "死亡患者数据");
}
/**
* 新增死亡患者
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存死亡患者
*/
@RequiresPermissions("patientDead:dead:add")
@Log(title = "死亡患者", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(PatientDead patientDead)
{
return toAjax(patientDeadService.insertPatientDead(patientDead));
}
/**
* 修改死亡患者
*/
@RequiresPermissions("patientDead:dead:edit")
@GetMapping("/edit/{patient_id}")
public String edit(@PathVariable("patient_id") Long patient_id, ModelMap mmap)
{
PatientDead patientDead = patientDeadService.selectPatientDeadByPatientId(patient_id);
mmap.put("patientDead", patientDead);
return prefix + "/edit";
}
/**
* 修改保存死亡患者
*/
@RequiresPermissions("patientDead:dead:edit")
@Log(title = "死亡患者", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(PatientDead patientDead)
{
if (StringUtils.isNotEmpty(patientDead.getPatientIdCard()) && !patientDeadService.checkPatientIdCardUnique(patientDead))
{
return error("新增患者'" + patientDead.getPatientName() + "'失败,身份证已存在");
}
return toAjax(patientDeadService.updatePatientDead(patientDead));
}
/**
* 删除死亡患者
*/
@RequiresPermissions("patientDead:dead:remove")
@Log(title = "死亡患者", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(patientDeadService.deletePatientDeadByPatientIds(ids));
}
/**
* 导入死亡患者管理列表
*/
@Log(title = "死亡患者管理", businessType = BusinessType.IMPORT)
@RequiresPermissions("patientDead:dead:import")
@PostMapping("/importData")
@ResponseBody
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
ExcelUtil<PatientDead> util = new ExcelUtil<PatientDead>(PatientDead.class);
List<PatientDead> patientList = util.importExcel(file.getInputStream());
String message = patientDeadService.importPatient(patientList,updateSupport);
return AjaxResult.success(message);
}
@RequiresPermissions("patientDead:dead:view")
@GetMapping("/importTemplate")
@ResponseBody
public AjaxResult importTemplate()
{
ExcelUtil<PatientDead> util = new ExcelUtil<PatientDead>(PatientDead.class);
return util.importTemplateExcel("死亡患者数据");
}
/**
* 展示详细信息
*/
@RequiresPermissions("patientDead:dead:detail")
@GetMapping("/detail/{patientId}")
public String detail(@PathVariable("patientId") Long patient_id, ModelMap mmap)
{
mmap.put("name", "patientDead");
mmap.put("patientDead", patientDeadService.selectPatientDeadByPatientId(patient_id));
return prefix + "/detail";
}
/**
* 校验身份证
*/
@PostMapping("/checkPatientIdCardUnique")
@ResponseBody
public boolean checkPatientIdCardUnique(PatientDead patientDead)
{
return patientDeadService.checkPatientIdCardUnique(patientDead);
}
}

36
ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientManageController.java

@ -181,40 +181,4 @@ public class PatientManageController extends BaseController
{
return patientManageService.checkPatientIdCardUnique(user);
}
/**
* 患者移交治愈管理
*/
@RequiresPermissions("patient:patientManage:cure")
@GetMapping("/cure/{patientId}")
public String cure(@Validated Long patientId)
{
return prefix + "/cure";
}
/**
* 患者移交死亡管理
*/
@RequiresPermissions("patient:patientManage:dead")
@GetMapping("/dead/{patientId}")
public String dead(@Validated Long patientId)
{
return prefix + "/dead";
}
/**
* 患者移交密接管理
*/
@RequiresPermissions("patient:patientManage:touch")
@GetMapping("/touch/{patientId}")
public String touch(@Validated Long patientId)
{
return prefix + "/touch";
}
/**
* 患者移交重症管理
*/
@RequiresPermissions("patient:patientManage:emergency")
@GetMapping("/emergency/{patientId}")
public String emergency (@Validated Long patientId)
{
return prefix + "/emergency";
}
}

2
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/resizable/jquery.resizableColumns.min.js vendored

File diff suppressed because one or more lines are too long

2
ruoyi-admin/src/main/resources/static/ajax/libs/report/echarts/echarts-all.min.js vendored

File diff suppressed because one or more lines are too long

2
ruoyi-admin/src/main/resources/static/js/jquery-ui-1.10.4.min.js vendored

File diff suppressed because one or more lines are too long

20
ruoyi-admin/src/main/resources/templates/check/checkManage/checkManage.html

@ -18,10 +18,6 @@
<label>打卡人电话:</label>
<input type="text" name="checkPhonenumber" MAXLENGTH="11"/>
</li>
<!-- <li>-->
<!-- <label>身份证:</label>-->
<!-- <input type="text" name="patientIdCard"/>-->
<!-- </li>-->
<li>
<label>最近接触地区:</label>
<input type="text" name="currentPosition"/>
@ -30,10 +26,6 @@
<label>体温:</label>
<input type="text" name="temperature"/>
</li>
<!-- <li>-->
<!-- <label>性别:</label>-->
<!-- <input type="text" name="sex"/>-->
<!-- </li>-->
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -89,18 +81,10 @@
field: 'checkName',
title: '打卡人姓名'
},
// {
// field: 'sex',
// title: '性别'
// },
{
field: 'checkPhonenumber',
title: '打卡人电话'
},
// {
// field: 'patientIdCard',
// title: '身份证'
// },
{
field: 'isHigh',
title: '是否去高风险地区'
@ -123,6 +107,10 @@
title:'健康状况'
},
{
field:"checkDatetime",
title:"打卡时间"
},
{
field: 'description',
title: '备注'
},

18
ruoyi-admin/src/main/resources/templates/patient/patientManage/add.html

@ -73,32 +73,32 @@
<label class="col-sm-3 control-label">是否为密接人员:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" value="1" id="touched" name="isTouch"></label>
<input type="radio" value="1" id="touched" name="isTouch">密接人员</label>
<label class="radio-box">
<input type="radio" checked="" value="0" id="untouched" name="isTouch"></label>
<input type="radio" checked="" value="0" id="untouched" name="isTouch">非密接人员</label>
</div>
<label class="col-sm-3 control-label">是否去过高风险地区:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" value="1" id="high" name="isHigh"></label>
<input type="radio" value="1" id="high" name="isHigh">去过高风险地区</label>
<label class="radio-box">
<input type="radio" checked="" value="0" id="low" name="isHigh"></label>
<input type="radio" checked="" value="0" id="low" name="isHigh">未去过高风险地区</label>
</div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否为重症:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" value="1" id="emergency" name="isEmergency"></label>
<input type="radio" value="1" id="emergency" name="isEmergency">重症患者</label>
<label class="radio-box">
<input type="radio" checked="" value="0" id="unemergency" name="isEmergency"></label>
<input type="radio" checked="" value="0" id="unemergency" name="isEmergency">非重症患者</label>
</div>
<label class="col-sm-3 control-label">是否生还</label>
<label class="col-sm-3 control-label">目前状况</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" checked="" value="1" id="alive" name="isDead"></label>
<input type="radio" checked="" value="1" id="alive" name="isDead">健在</label>
<label class="radio-box">
<input type="radio" value="0" id="dead" name="isDead"></label>
<input type="radio" value="0" id="dead" name="isDead">已死亡</label>
</div>
</div>
</form>

2
ruoyi-admin/src/main/resources/templates/patient/patientManage/detail.html

@ -56,7 +56,7 @@
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否生还</label>
<label class="col-sm-3 control-label">目前状态</label>
<div class="form-control-static" th:text="${patientManage.isDead}"></div>
</div>

8
ruoyi-admin/src/main/resources/templates/patient/patientManage/edit.html

@ -14,12 +14,6 @@
<input name="patientName" th:field="*{patientName}" class="form-control" type="text">
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">性别:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="patientSex" th:field="*{patientSex}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
<div class="col-md-12">
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
@ -94,7 +88,7 @@
<label class="radio-box">
<input type="radio" th:field="*{isEmergency}" value="0" id="unemergency" name="isEmergency"></label>
</div>
<label class="col-sm-3 control-label">是否生还</label>
<label class="col-sm-3 control-label">是否健在</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" th:field="*{isDead}" value="1" id="alive" name="isDead"></label>

44
ruoyi-admin/src/main/resources/templates/patient/patientManage/patientManage.html

@ -68,8 +68,6 @@
var removeFlag = [[${@permission.hasPermi('patient:patientManage:remove')}]];
var cureFlag= [[${@permission.hasPermi('patient:patientManage:cure')}]];
var deadFlag= [[${@permission.hasPermi('patient:patientManage:dead')}]];
var touchFlag= [[${@permission.hasPermi('patient:patientManage:touch')}]];
var emergencyFlag= [[${@permission.hasPermi('patient:patientManage:emergency')}]];
var prefix = ctx + "patient/patientManage";
$(function() {
@ -139,7 +137,7 @@
},
{
field: 'isDead',
title: '是否死亡'
title: '目前状况'
},
{
field: 'description',
@ -155,11 +153,9 @@
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.patientId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.patientId + '\')"><i class="fa fa-remove"></i>删除</a>');
var more = [];
more.push("<a class='btn btn-default btn-xs " + cureFlag + "' href='javascript:void(0)' onclick='cure(" + row.patientId + ")'><i class='fa fa-user'></i>治愈</a> ");
more.push("<a class='btn btn-default btn-xs " + deadFlag + "' href='javascript:void(0)' onclick='dead(" + row.patientId + ")'><i class='fa fa-bomb'></i>死亡</a>");
more.push("<a class='btn btn-default btn-xs " + touchFlag + "' href='javascript:void(0)' onclick='touch(" + row.patientId + ")'><i class='fa fa-hand-grab-o'></i>密接</a>");
more.push("<a class='btn btn-default btn-xs " + emergencyFlag + "' href='javascript:void(0)' onclick='emergency(" + row.patientId + ")'><i class='fa fa-bed'></i>重症</a>");
actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="central" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>选择患者状态</a>');
more.push("<a class='btn btn-default btn-xs " + cureFlag + "' href='javascript:void(0)' onclick='cure(" + row.patientId + ")'><i class='fa fa-user'></i>已治愈</a> ");
more.push("<a class='btn btn-default btn-xs " + deadFlag + "' href='javascript:void(0)' onclick='dead(" + row.patientId + ")'><i class='fa fa-bomb'></i>已死亡</a>");
actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>选择患者状态</a>');
return actions.join('');
}
}]
@ -169,37 +165,17 @@
});
/* 移交治愈 */
function cure(roleId) {
var url = prefix ;
$.modal.openTab("分配用户", url);
function cure(patientId) {
var url = ''+patientId;
location.href=url;
}
/* 移交死亡 */
function dead(roleId) {
var url = prefix ;
$.modal.openTab("分配用户", url);
function dead(patientId) {
var url = prefix +'//'+patientId;
location.href=url;
}
/* 移交密接 */
function touch(roleId) {
var url = prefix ;
$.modal.openTab("分配用户", url);
}
/* 移交重症 */
function emergency(roleId) {
var url = prefix ;
$.modal.openTab("分配用户", url);
}
function genderConvert(e) {
var Genders = [ {id : 0, text : '女'}, {id : 1, text : '男'}];
for ( var i = 0, l = Genders.length; i < l; i++) {
var g = Genders[i];
if (g.id == e.value)
return g.text;
}
return "";
}
</script>
</body>

147
ruoyi-admin/src/main/resources/templates/patientCure/cure/add.html

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增患者管理')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-patientCure-add">
<div class="form-group">
<label class="col-sm-3 control-label">患者姓名:</label>
<div class="col-sm-8">
<input name="patientName" class="form-control" type="text">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-9">
<label class="radio-box">
<input type="radio" checked="" value="1" id="male" name="patientSex"></label>
<label class="radio-box">
<input type="radio" value="0" id="female" name="patientSex"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">患者年龄:</label>
<div class="col-sm-8">
<input name="patientAge" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">患者身份证:</label>
<div class="col-sm-8">
<input name="patientIdCard" class="form-control" type="text" maxlength="18" placeholder="填写18位身份证号码">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="description" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">最近感染地区:</label>
<div class="col-sm-8">
<input name="currentLocation" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">当天体温:</label>
<div class="col-sm-8">
<input name="temperature" class="form-control" type="text" maxlength="4" placeholder="精确到小数点后1位">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">感染时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="diagnosedTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否为密接人员:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" value="1" id="touched" name="isTouch">是密接人员</label>
<label class="radio-box">
<input type="radio" checked="" value="0" id="untouched" name="isTouch">非密接人员</label>
</div>
<label class="col-sm-3 control-label">是否去过高风险地区:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" value="1" id="high" name="isHigh">去过高风险地区</label>
<label class="radio-box">
<input type="radio" checked="" value="0" id="low" name="isHigh">未去过高风险地区</label>
</div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否为重症:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" value="1" id="emergency" name="isEmergency">重症患者</label>
<label class="radio-box">
<input type="radio" checked="" value="0" id="unemergency" name="isEmergency">非重症患者</label>
</div>
<label class="col-sm-3 control-label">目前状况:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" checked="" value="1" id="alive" name="isDead">健在</label>
<label class="radio-box">
<input type="radio" value="0" id="dead" name="isDead">已死亡</label>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "patientCure/cure"
$("#form-patientCure-add").validate({
onkeyup: false,
rules:{
patientName:{
isName:true,
},
temperature:{
isTemperature:true
},
patientIdCard:{
isIdentity18:true,
remote: {
url: prefix + "/checkPatientIdCardUnique",
type: "post",
dataType: "json",
data: {
"patientIdCard": function () {
return $.common.trim($("#patientIdCard").val());
}
}
},
},
messages: {
"patientIdCard":{
remote: "身份证号码已经存在"
}
},
focusCleanup: true
},
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-patientCure-add').serialize());
}
}
$("input[name='diagnosedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

176
ruoyi-admin/src/main/resources/templates/patientCure/cure/cure.html

@ -0,0 +1,176 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('死亡列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>患者姓名:</label>
<input type="text" name="patientName"/>
</li>
<li>
<label>患者年龄:</label>
<input type="text" name="patientAge"/>
</li>
<li>
<label>最近感染地区:</label>
<input type="text" name="currentLocation"/>
</li>
<li>
<label>当天体温:</label>
<input type="text" name="temperature"/>
</li>
<li>
<label>感染时间:</label>
<input type="text" class="time-input" placeholder="请选择感染时间" name="diagnosedTime"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="patientCure:cure:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="patientCure:cure:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="patientCure:cure:import">
<i class="fa fa-upload"></i> 导入
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="patientCure:cure:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('patientCure:cure:edit')}]];
var detailFlag = [[${@permission.hasPermi('patientCure:cure:detail')}]];
var removeFlag = [[${@permission.hasPermi('patientCure:cure:remove')}]];
var prefix = ctx + "patientCure/cure";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
detailUrl: prefix + "/detail/{id}",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
modalName: "死亡信息",
columns: [{
checkbox: true
},
{
field: 'patientId',
title: '死亡患者ID',
visible: false
},
{
isName:true,
field: 'patientName',
title: '患者姓名'
},
{
field: 'patientAge',
title: '患者年龄'
},
{
field: 'patientSex',
title: '患者性别',
},
// {
// isIdentity:true,
// field: 'patientIdCard',
// title: '患者身份证'
// },
{
field: 'currentLocation',
title: '最近感染地区'
},
{
field: 'temperature',
title: '当天体温'
},
{
field: 'diagnosedTime',
title: '感染时间'
},
// {
// field: 'isTouch',
// title: '是否为密接人员',
//
// },
// {
// field: 'isHigh',
// title: '是否去过高风险地区'
// },
// {
// field: 'isEmergency',
// title: '是否重症'
// },
// {
// field: 'iscure',
// title: '是否死亡'
// },
{
field: 'description',
title: '备注'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-primary btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.patientId + '\')"><i class="fa fa-search"></i>详情</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.patientId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.patientId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
<script id="importTpl" type="text/template">
<form enctype="multipart/form-data" class="mt20 mb10">
<div class="col-xs-offset-1">
<input type="file" id="file" name="file"/>
<div class="mt10 pt5">
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在,更新这条数据。"> 是否更新已经存在的用户数据
&nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
</div>
<font color="red" class="pull-left mt10">
提示:仅允许导入“xls”或“xlsx”格式文件!
</font>
</div>
</form>
</script>
</html>

78
ruoyi-admin/src/main/resources/templates/patientCure/cure/detail.html

@ -0,0 +1,78 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('详细信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" >
<form class="form-horizontal m-t" id="form-patientCure-detail">
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="form-control-static" th:text="${patientCure.patientName}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="form-control-static" th:text="${patientCure.patientSex}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">感染时间:</label>
<div class="form-control-static" th:text="${patientCure.diagnosedTime}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">体温:</label>
<div class="form-control-static" th:text="${patientCure.temperature}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">患者年龄:</label>
<div class="form-control-static" th:text="${patientCure.patientAge}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">身份证:</label>
<div class="form-control-static" th:text="${patientCure.patientIdCard}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">是否为重症患者:</label>
<div class="form-control-static" th:text="${patientCure.isEmergency}"></div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否接触密接人员:</label>
<div class="form-control-static" th:text="${patientCure.isTouch}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否去过高风险地区:</label>
<div class="form-control-static" th:text="${patientCure.isHigh}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">目前状态:</label>
<div class="form-control-static" th:text="${patientCure.isDead}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">最近感染地区:</label>
<div class="form-control-static" th:text="${patientCure.currentLocation}"</div>
</div>
<div class="form-group">
<label class="col-xs-2 control-label">备注:</label>
<div class="form-control-static" th:text="${patientCure.description}"></div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: jsonview-js" />
</body>
</html>

149
ruoyi-admin/src/main/resources/templates/patientCure/cure/edit.html

@ -0,0 +1,149 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改患者管理')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-patientCure-edit" th:object="${patientCure}">
<input name="patientId" th:field="*{patientId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">患者姓名:</label>
<div class="col-sm-8">
<input name="patientName" th:field="*{patientName}" class="form-control" type="text">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-9">
<label class="radio-box">
<input type="radio" th:field="*{patientSex}" value="1" id="male" name="patientSex"></label>
<label class="radio-box">
<input type="radio" th:field="*{patientSex}" value="0" id="female" name="patientSex"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">年龄:</label>
<div class="col-sm-8">
<input name="patientAge" th:field="*{patientAge}" class="form-control" type="text" maxlength="4">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">患者身份证:</label>
<div class="col-sm-8">
<input name="patientIdCard" th:field="*{patientIdCard}" class="form-control" type="text" maxlength="18">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">当天体温:</label>
<div class="col-sm-8">
<input name="temperature" th:field="*{temperature}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="description" th:field="*{description}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">最近感染地区:</label>
<div class="col-sm-8">
<input name="currentLocation" th:field="*{currentLocation}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">感染时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="diagnosedTime" th:value="${#dates.format(patientCure.diagnosedTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否为密接人员:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" th:field="*{isTouch}" value="1" id="touched" name="isTouch"></label>
<label class="radio-box">
<input type="radio" th:field="*{isTouch}" value="0" id="untouched" name="isTouch"></label>
</div>
<label class="col-sm-3 control-label">是否去过高风险地区:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" th:field="*{isHigh}" value="1" id="high" name="isHigh"></label>
<label class="radio-box">
<input type="radio" th:field="*{isHigh}" value="0" id="low" name="isHigh"></label>
</div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否为重症:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" th:field="*{isEmergency}" value="1" id="emergency" name="isEmergency"></label>
<label class="radio-box">
<input type="radio" th:field="*{isEmergency}" value="0" id="unemergency" name="isEmergency"></label>
</div>
<label class="col-sm-3 control-label">是否健在:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" th:field="*{isDead}" value="1" id="alive" name="iscure"></label>
<label class="radio-box">
<input type="radio" th:field="*{isDead}" value="0" id="cure" name="iscure"></label>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "patientCure/cure";
$("#form-patientCure-edit").validate({
onkeyup: false,
rules:{
patientName:{
isName:true,
},
temperature:{
isTemperature:true
},
patientIdCard:{
isIdentity18:true,
remote: {
url: prefix + "/checkPatientIdCardUnique",
type: "post",
dataType: "json",
data: {
"patientIdCard": function () {
return $.common.trim($("#patientIdCard").val());
}
}
},
},
messages: {
"patientIdCard":{
remote: "身份证号码已经存在"
}
},
focusCleanup: true
},
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-patientCure-edit').serialize());
}
}
$("input[name='diagnosedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

153
ruoyi-admin/src/main/resources/templates/patientDead/dead/add.html

@ -0,0 +1,153 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增患者管理')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-patientDead-add">
<div class="form-group">
<label class="col-sm-3 control-label">患者姓名:</label>
<div class="col-sm-8">
<input name="patientName" class="form-control" type="text">
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">性别:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="patientSex" class="form-control" type="text" maxlength="1">-->
<!-- </div>-->
<!-- </div>-->
<div class="col-md-12">
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-9">
<label class="radio-box">
<input type="radio" checked="" value="1" id="male" name="patientSex"></label>
<label class="radio-box">
<input type="radio" value="0" id="female" name="patientSex"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">患者年龄:</label>
<div class="col-sm-8">
<input name="patientAge" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">患者身份证:</label>
<div class="col-sm-8">
<input name="patientIdCard" class="form-control" type="text" maxlength="18" placeholder="填写18位身份证号码">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="description" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">最近感染地区:</label>
<div class="col-sm-8">
<input name="currentLocation" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">当天体温:</label>
<div class="col-sm-8">
<input name="temperature" class="form-control" type="text" maxlength="4" placeholder="精确到小数点后1位">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">感染时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="diagnosedTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否为密接人员:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" value="1" id="touched" name="isTouch">是密接人员</label>
<label class="radio-box">
<input type="radio" checked="" value="0" id="untouched" name="isTouch">非密接人员</label>
</div>
<label class="col-sm-3 control-label">是否去过高风险地区:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" value="1" id="high" name="isHigh">去过高风险地区</label>
<label class="radio-box">
<input type="radio" checked="" value="0" id="low" name="isHigh">未去过高风险地区</label>
</div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否为重症:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" value="1" id="emergency" name="isEmergency">重症患者</label>
<label class="radio-box">
<input type="radio" checked="" value="0" id="unemergency" name="isEmergency">非重症患者</label>
</div>
<label class="col-sm-3 control-label">目前状况:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" checked="" value="1" id="alive" name="isDead">健在</label>
<label class="radio-box">
<input type="radio" value="0" id="dead" name="isDead">已死亡</label>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "patientDead/dead"
$("#form-patientDead-add").validate({
onkeyup: false,
rules:{
patientName:{
isName:true,
},
temperature:{
isTemperature:true
},
patientIdCard:{
isIdentity18:true,
remote: {
url: prefix + "/checkPatientIdCardUnique",
type: "post",
dataType: "json",
data: {
"patientIdCard": function () {
return $.common.trim($("#patientIdCard").val());
}
}
},
},
messages: {
"patientIdCard":{
remote: "身份证号码已经存在"
}
},
focusCleanup: true
},
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-patientDead-add').serialize());
}
}
$("input[name='diagnosedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

176
ruoyi-admin/src/main/resources/templates/patientDead/dead/dead.html

@ -0,0 +1,176 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('死亡列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>患者姓名:</label>
<input type="text" name="patientName"/>
</li>
<li>
<label>患者年龄:</label>
<input type="text" name="patientAge"/>
</li>
<li>
<label>最近感染地区:</label>
<input type="text" name="currentLocation"/>
</li>
<li>
<label>当天体温:</label>
<input type="text" name="temperature"/>
</li>
<li>
<label>感染时间:</label>
<input type="text" class="time-input" placeholder="请选择感染时间" name="diagnosedTime"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="patientDead:dead:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="patientDead:dead:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="patientDead:dead:import">
<i class="fa fa-upload"></i> 导入
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="patientDead:dead:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('patientDead:dead:edit')}]];
var detailFlag = [[${@permission.hasPermi('patientDead:dead:detail')}]];
var removeFlag = [[${@permission.hasPermi('patientDead:dead:remove')}]];
var prefix = ctx + "patientDead/dead";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
detailUrl: prefix + "/detail/{id}",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
modalName: "死亡信息",
columns: [{
checkbox: true
},
{
field: 'patientId',
title: '死亡患者ID',
visible: false
},
{
isName:true,
field: 'patientName',
title: '患者姓名'
},
{
field: 'patientAge',
title: '患者年龄'
},
{
field: 'patientSex',
title: '患者性别',
},
// {
// isIdentity:true,
// field: 'patientIdCard',
// title: '患者身份证'
// },
{
field: 'currentLocation',
title: '最近感染地区'
},
{
field: 'temperature',
title: '当天体温'
},
{
field: 'diagnosedTime',
title: '感染时间'
},
// {
// field: 'isTouch',
// title: '是否为密接人员',
//
// },
// {
// field: 'isHigh',
// title: '是否去过高风险地区'
// },
// {
// field: 'isEmergency',
// title: '是否重症'
// },
// {
// field: 'isDead',
// title: '是否死亡'
// },
{
field: 'description',
title: '备注'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-primary btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.patientId + '\')"><i class="fa fa-search"></i>详情</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.patientId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.patientId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
<script id="importTpl" type="text/template">
<form enctype="multipart/form-data" class="mt20 mb10">
<div class="col-xs-offset-1">
<input type="file" id="file" name="file"/>
<div class="mt10 pt5">
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在,更新这条数据。"> 是否更新已经存在的用户数据
&nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
</div>
<font color="red" class="pull-left mt10">
提示:仅允许导入“xls”或“xlsx”格式文件!
</font>
</div>
</form>
</script>
</html>

76
ruoyi-admin/src/main/resources/templates/patientDead/dead/detail.html

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('详细信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" >
<form class="form-horizontal m-t" id="form-patientDead-detail">
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="form-control-static" th:text="${patientDead.patientName}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="form-control-static" th:text="${patientDead.patientSex}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">感染时间:</label>
<div class="form-control-static" th:text="${patientDead.diagnosedTime}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">体温:</label>
<div class="form-control-static" th:text="${patientDead.temperature}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">患者年龄:</label>
<div class="form-control-static" th:text="${patientDead.patientAge}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">身份证:</label>
<div class="form-control-static" th:text="${patientDead.patientIdCard}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">是否为重症患者:</label>
<div class="form-control-static" th:text="${patientDead.isEmergency}"></div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否接触密接人员:</label>
<div class="form-control-static" th:text="${patientDead.isTouch}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否去过高风险地区:</label>
<div class="form-control-static" th:text="${patientDead.isHigh}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">目前状态:</label>
<div class="form-control-static" th:text="${patientDead.isDead}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">最近感染地区:</label>
<div class="form-control-static" th:text="${patientDead.currentLocation}"</div>
</div>
<div class="form-group">
<label class="col-xs-2 control-label">备注:</label>
<div class="form-control-static" th:text="${patientDead.description}"></div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: jsonview-js" />
</body>
</html>

149
ruoyi-admin/src/main/resources/templates/patientDead/dead/edit.html

@ -0,0 +1,149 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改患者管理')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-patientDead-edit" th:object="${patientDead}">
<input name="patientId" th:field="*{patientId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">患者姓名:</label>
<div class="col-sm-8">
<input name="patientName" th:field="*{patientName}" class="form-control" type="text">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-9">
<label class="radio-box">
<input type="radio" th:field="*{patientSex}" value="1" id="male" name="patientSex"></label>
<label class="radio-box">
<input type="radio" th:field="*{patientSex}" value="0" id="female" name="patientSex"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">年龄:</label>
<div class="col-sm-8">
<input name="patientAge" th:field="*{patientAge}" class="form-control" type="text" maxlength="4">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">患者身份证:</label>
<div class="col-sm-8">
<input name="patientIdCard" th:field="*{patientIdCard}" class="form-control" type="text" maxlength="18">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">当天体温:</label>
<div class="col-sm-8">
<input name="temperature" th:field="*{temperature}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="description" th:field="*{description}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">最近感染地区:</label>
<div class="col-sm-8">
<input name="currentLocation" th:field="*{currentLocation}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">感染时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="diagnosedTime" th:value="${#dates.format(patientDead.diagnosedTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否为密接人员:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" th:field="*{isTouch}" value="1" id="touched" name="isTouch"></label>
<label class="radio-box">
<input type="radio" th:field="*{isTouch}" value="0" id="untouched" name="isTouch"></label>
</div>
<label class="col-sm-3 control-label">是否去过高风险地区:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" th:field="*{isHigh}" value="1" id="high" name="isHigh"></label>
<label class="radio-box">
<input type="radio" th:field="*{isHigh}" value="0" id="low" name="isHigh"></label>
</div>
</div>
<div class="form-group" >
<label class="col-sm-3 control-label">是否为重症:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" th:field="*{isEmergency}" value="1" id="emergency" name="isEmergency"></label>
<label class="radio-box">
<input type="radio" th:field="*{isEmergency}" value="0" id="unemergency" name="isEmergency"></label>
</div>
<label class="col-sm-3 control-label">是否健在:</label>
<div class="col-sm-3">
<label class="radio-box">
<input type="radio" th:field="*{isDead}" value="1" id="alive" name="isDead"></label>
<label class="radio-box">
<input type="radio" th:field="*{isDead}" value="0" id="dead" name="isDead"></label>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "patientDead/dead";
$("#form-patientDead-edit").validate({
onkeyup: false,
rules:{
patientName:{
isName:true,
},
temperature:{
isTemperature:true
},
patientIdCard:{
isIdentity18:true,
remote: {
url: prefix + "/checkPatientIdCardUnique",
type: "post",
dataType: "json",
data: {
"patientIdCard": function () {
return $.common.trim($("#patientIdCard").val());
}
}
},
},
messages: {
"patientIdCard":{
remote: "身份证号码已经存在"
}
},
focusCleanup: true
},
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-patientDead-edit').serialize());
}
}
$("input[name='diagnosedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

2
ruoyi-admin/src/main/resources/templates/supplies/nucleic/nucleic.html

@ -87,7 +87,7 @@
},
{
field: 'nucleicNumber',
title: '核酸数量'
title: '采购数量'
},
{
field: 'nucleicIdNumber',

2
ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine.html

@ -83,7 +83,7 @@
},
{
field: 'vaccineNumber',
title: '疫苗数量'
title: '采购数量'
},
{
field: 'vaccineIdNumber',

1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java

@ -396,6 +396,7 @@ public class SysUser extends BaseEntity
.append("remark", getRemark())
.append("dept", getDept())
.append("roles", getRoles())
.append("idNumber", getIdNumber())
.toString();
}
}

208
ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientCure.java

@ -0,0 +1,208 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 治愈患者对象 patient_cure
*
* @author zlx
* @date 2023-05-13
*/
public class PatientCure extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 已治愈患者id */
private Long patientId;
/** 患者姓名 */
@Excel(name = "患者姓名")
private String patientName;
/** 患者年龄 */
@Excel(name = "患者年龄")
private String patientAge;
/** 患者性别 */
@Excel(name = "患者性别" ,readConverterExp = "0=女,1=男")
private String patientSex;
/** 患者联系电话 */
@Excel(name = "患者联系电话")
private String patientIdCard;
/** 备注 */
@Excel(name = "备注")
private String description;
/** 最近感染地区 */
@Excel(name = "最近感染地区")
private String currentLocation;
/** 当天体温 */
@Excel(name = "当天体温")
private String temperature;
/** 感染时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "感染时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date diagnosedTime;
/** 重症状态 */
@Excel(name = "重症状态" ,readConverterExp = "0=非重症,1=重症")
private String isEmergency;
/** 密接状态 */
@Excel(name = "密接状态" ,readConverterExp = "0=非密接人员,1=密接人员")
private String isTouch;
/** 死亡状态 */
@Excel(name = "死亡状态" ,readConverterExp = "0=健在,1=已死亡")
private String isDead;
/** 是否去高风险地区 */
@Excel(name = "是否去高风险地区",readConverterExp = "0=未经过高风险地区,1=已经过")
private String isHigh;
public void setPatientId(Long patientId)
{
this.patientId = patientId;
}
public Long getPatientId()
{
return patientId;
}
public void setPatientName(String patientName)
{
this.patientName = patientName;
}
public String getPatientName()
{
return patientName;
}
public void setPatientAge(String patientAge)
{
this.patientAge = patientAge;
}
public String getPatientAge()
{
return patientAge;
}
public void setPatientSex(String patientSex)
{
this.patientSex = patientSex;
}
public String getPatientSex()
{
return patientSex;
}
public void setPatientIdCard(String patientIdCard)
{
this.patientIdCard = patientIdCard;
}
public String getPatientIdCard()
{
return patientIdCard;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setCurrentLocation(String currentLocation)
{
this.currentLocation = currentLocation;
}
public String getCurrentLocation()
{
return currentLocation;
}
public void setTemperature(String temperature)
{
this.temperature = temperature;
}
public String getTemperature()
{
return temperature;
}
public void setDiagnosedTime(Date diagnosedTime)
{
this.diagnosedTime = diagnosedTime;
}
public Date getDiagnosedTime()
{
return diagnosedTime;
}
public void setIsEmergency(String isEmergency)
{
this.isEmergency = isEmergency;
}
public String getIsEmergency()
{
return isEmergency;
}
public void setIsTouch(String isTouch)
{
this.isTouch = isTouch;
}
public String getIsTouch()
{
return isTouch;
}
public void setIsHigh(String isHigh)
{
this.isHigh = isHigh;
}
public String getIsHigh()
{
return isHigh;
}
public void setIsDead(String isDead)
{
this.isDead = isDead;
}
public String getIsDead()
{
return isDead;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("patientId", getPatientId())
.append("patientName", getPatientName())
.append("patientAge", getPatientAge())
.append("patientSex", getPatientSex())
.append("patientIdCard", getPatientIdCard())
.append("description", getDescription())
.append("currentLocation", getCurrentLocation())
.append("temperature", getTemperature())
.append("diagnosedTime", getDiagnosedTime())
.append("isEmergency", getIsEmergency())
.append("isTouch", getIsTouch())
.append("isHigh", getIsHigh())
.append("isDead", getIsDead())
.toString();
}
}

208
ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientDead.java

@ -0,0 +1,208 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 死亡患者对象 patient_dead
*
* @author zlx
* @date 2023-05-13
*/
public class PatientDead extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 已死亡患者id */
private Long patientId;
/** 患者姓名 */
@Excel(name = "患者姓名")
private String patientName;
/** 患者年龄 */
@Excel(name = "患者年龄")
private String patientAge;
/** 患者性别 */
@Excel(name = "患者性别")
private String patientSex ,readConverterExp = "0=女,1=男";
/** 患者联系电话 */
@Excel(name = "患者联系电话")
private String patientIdCard;
/** 备注 */
@Excel(name = "备注")
private String description;
/** 最近感染地区 */
@Excel(name = "最近感染地区")
private String currentLocation;
/** 当天体温 */
@Excel(name = "当天体温")
private String temperature;
/** 感染时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "感染时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date diagnosedTime;
/** 重症状态 */
@Excel(name = "重症状态" ,readConverterExp = "0=非重症,1=重症")
private String isEmergency;
/** 密接状态 */
@Excel(name = "密接状态" ,readConverterExp = "0=非密接人员,1=密接人员")
private String isTouch;
/** 死亡状态 */
@Excel(name = "死亡状态" ,readConverterExp = "0=健在,1=已死亡")
private String isDead;
/** 是否去高风险地区 */
@Excel(name = "是否去高风险地区",readConverterExp = "0=未经过高风险地区,1=已经过")
private String isHigh;
public void setPatientId(Long patientId)
{
this.patientId = patientId;
}
public Long getPatientId()
{
return patientId;
}
public void setPatientName(String patientName)
{
this.patientName = patientName;
}
public String getPatientName()
{
return patientName;
}
public void setPatientAge(String patientAge)
{
this.patientAge = patientAge;
}
public String getPatientAge()
{
return patientAge;
}
public void setPatientSex(String patientSex)
{
this.patientSex = patientSex;
}
public String getPatientSex()
{
return patientSex;
}
public void setPatientIdCard(String patientIdCard)
{
this.patientIdCard = patientIdCard;
}
public String getPatientIdCard()
{
return patientIdCard;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setCurrentLocation(String currentLocation)
{
this.currentLocation = currentLocation;
}
public String getCurrentLocation()
{
return currentLocation;
}
public void setTemperature(String temperature)
{
this.temperature = temperature;
}
public String getTemperature()
{
return temperature;
}
public void setDiagnosedTime(Date diagnosedTime)
{
this.diagnosedTime = diagnosedTime;
}
public Date getDiagnosedTime()
{
return diagnosedTime;
}
public void setIsEmergency(String isEmergency)
{
this.isEmergency = isEmergency;
}
public String getIsEmergency()
{
return isEmergency;
}
public void setIsTouch(String isTouch)
{
this.isTouch = isTouch;
}
public String getIsTouch()
{
return isTouch;
}
public void setIsHigh(String isHigh)
{
this.isHigh = isHigh;
}
public String getIsHigh()
{
return isHigh;
}
public void setIsDead(String isDead)
{
this.isDead = isDead;
}
public String getIsDead()
{
return isDead;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("patientId", getPatientId())
.append("patientName", getPatientName())
.append("patientAge", getPatientAge())
.append("patientSex", getPatientSex())
.append("patientIdCard", getPatientIdCard())
.append("description", getDescription())
.append("currentLocation", getCurrentLocation())
.append("temperature", getTemperature())
.append("diagnosedTime", getDiagnosedTime())
.append("isEmergency", getIsEmergency())
.append("isTouch", getIsTouch())
.append("isHigh", getIsHigh())
.append("isDead", getIsDead())
.toString();
}
}

8
ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientManage.java

@ -57,19 +57,19 @@ public class PatientManage extends BaseEntity
private Date diagnosedTime;
/** 重症状态 */
@Excel(name = "重症状态" ,readConverterExp = "0=否,1=是")
@Excel(name = "重症状态" ,readConverterExp = "0=非重症,1=重症")
private String isEmergency;
/** 密接状态 */
@Excel(name = "密接状态" ,readConverterExp = "0=否,1=是")
@Excel(name = "密接状态" ,readConverterExp = "0=非密接人员,1=密接人员")
private String isTouch;
/** 死亡状态 */
@Excel(name = "死亡状态" ,readConverterExp = "0=否,1=是")
@Excel(name = "死亡状态" ,readConverterExp = "0=健在,1=已死亡")
private String isDead;
/** 是否去高风险地区 */
@Excel(name = "是否去高风险地区",readConverterExp = "0=否,1=是")
@Excel(name = "是否去高风险地区",readConverterExp = "0=未经过高风险地区,1=已经过")
private String isHigh;
public void setPatientId(Long patientId)

72
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientCureMapper.java

@ -0,0 +1,72 @@
package com.ruoyi.system.mapper;
;
import com.ruoyi.system.domain.PatientCure;
import java.util.List;
/**
* 治愈患者Mapper接口
*
* @author zlx
* @date 2023-05-13
*/
public interface PatientCureMapper
{
/**
* 查询治愈患者
*
* @param patientId 治愈患者主键
* @return 治愈患者
*/
public PatientCure selectPatientCureByPatientId(Long patientId);
/**
* 查询治愈患者列表
*
* @param patientCure 治愈患者
* @return 治愈患者集合
*/
public List<PatientCure> selectPatientCureList(PatientCure patientCure);
/**
* 新增治愈患者
*
* @param patientCure 治愈患者
* @return 结果
*/
public int insertPatientCure(PatientCure patientCure);
/**
* 修改治愈患者
*
* @param patientCure 治愈患者
* @return 结果
*/
public int updatePatientCure(PatientCure patientCure);
/**
* 删除治愈患者
*
* @param patientId 治愈患者主键
* @return 结果
*/
public int deletePatientCureByPatientId(Long patientId);
/**
* 批量删除治愈患者
*
* @param patientIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePatientCureByPatientIds(String[] patientIds);
/**
* 通过调度患者ID查询调度信息
*
* @param patientIdCard 身份证唯一
* @return 患者信息
*/
public PatientCure checkPatientIdCardUnique(String patientIdCard);
}

69
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientDeadMapper.java

@ -0,0 +1,69 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.PatientDead;
/**
* 死亡患者Mapper接口
*
* @author zlx
* @date 2023-05-13
*/
public interface PatientDeadMapper
{
/**
* 查询死亡患者
*
* @param patientId 死亡患者主键
* @return 死亡患者
*/
public PatientDead selectPatientDeadByPatientId(Long patientId);
/**
* 查询死亡患者列表
*
* @param patientDead 死亡患者
* @return 死亡患者集合
*/
public List<PatientDead> selectPatientDeadList(PatientDead patientDead);
/**
* 新增死亡患者
*
* @param patientDead 死亡患者
* @return 结果
*/
public int insertPatientDead(PatientDead patientDead);
/**
* 修改死亡患者
*
* @param patientDead 死亡患者
* @return 结果
*/
public int updatePatientDead(PatientDead patientDead);
/**
* 删除死亡患者
*
* @param patientId 死亡患者主键
* @return 结果
*/
public int deletePatientDeadByPatientId(Long patientId);
/**
* 批量删除死亡患者
*
* @param patientIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePatientDeadByPatientIds(String[] patientIds);
/**
* 通过调度患者ID查询调度信息
*
* @param patientIdCard 身份证唯一
* @return 患者信息
*/
public PatientDead checkPatientIdCardUnique(String patientIdCard);
}

82
ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientCureService.java

@ -0,0 +1,82 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.PatientCure;
import com.ruoyi.system.domain.PatientDead;
import java.util.List;
/**
* 治愈患者Service接口
*
* @author zlx
* @date 2023-05-13
*/
public interface IPatientCureService
{
/**
* 查询治愈患者
*
* @param patientId 治愈患者主键
* @return 治愈患者
*/
public PatientCure selectPatientCureByPatientId(Long patientId);
/**
* 查询治愈患者列表
*
* @param patientCure 治愈患者
* @return 治愈患者集合
*/
public List<PatientCure> selectPatientCureList(PatientCure patientCure);
/**
* 新增治愈患者
*
* @param patientCure 治愈患者
* @return 结果
*/
public int insertPatientCure(PatientCure patientCure);
/**
* 修改治愈患者
*
* @param patientCure 治愈患者
* @return 结果
*/
public int updatePatientCure(PatientCure patientCure);
/**
* 批量删除治愈患者
*
* @param patientIds 需要删除的治愈患者主键集合
* @return 结果
*/
public int deletePatientCureByPatientIds(String patientIds);
/**
* 删除治愈患者信息
*
* @param patientId 治愈患者主键
* @return 结果
*/
public int deletePatientCureByPatientId(Long patientId);
/**
* 校验身份证号码是否唯一
*
* @param patientCure 患者信息
* @return 结果
*/
public boolean checkPatientIdCardUnique(PatientCure patientCure);
/**
* 导入治愈患者数据
*
* @param patientCureList 死亡患者数据列表
* @param isUpdateSupport 是否更新支持如果已存在则进行更新数据
* @return 结果
*/
public String importPatient(List<PatientCure> patientCureList, Boolean isUpdateSupport);
}

79
ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientDeadService.java

@ -0,0 +1,79 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.PatientDead;
/**
* 死亡患者Service接口
*
* @author zlx
* @date 2023-05-13
*/
public interface IPatientDeadService
{
/**
* 查询死亡患者
*
* @param patient_id 死亡患者主键
* @return 死亡患者
*/
public PatientDead selectPatientDeadByPatientId(Long patientDeadId);
/**
* 查询死亡患者列表
*
* @param patientDead 死亡患者
* @return 死亡患者集合
*/
public List<PatientDead> selectPatientDeadList(PatientDead patientDead);
/**
* 新增死亡患者
*
* @param patientDead 死亡患者
* @return 结果
*/
public int insertPatientDead(PatientDead patientDead);
/**
* 修改死亡患者
*
* @param patientDead 死亡患者
* @return 结果
*/
public int updatePatientDead(PatientDead patientDead);
/**
* 批量删除死亡患者
*
* @param patientDeadIds 需要删除的死亡患者主键集合
* @return 结果
*/
public int deletePatientDeadByPatientIds(String patientIds);
/**
* 删除死亡患者信息
*
* @param patientId 死亡患者主键
* @return 结果
*/
public int deletePatientDeadByPatientId(Long patientId);
/**
* 校验身份证号码是否唯一
*
* @param patientDead 患者信息
* @return 结果
*/
public boolean checkPatientIdCardUnique(PatientDead patientDead);
/**
* 导入死亡患者数据
*
* @param patientDeadList 死亡患者数据列表
* @param isUpdateSupport 是否更新支持如果已存在则进行更新数据
* @return 结果
*/
public String importPatient(List<PatientDead> patientDeadList, Boolean isUpdateSupport);
}

1
ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientManageService.java

@ -82,4 +82,5 @@ public interface IPatientManageService
* @return 结果
*/
public boolean checkPatientIdCardUnique(PatientManage patientManage);
}

181
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientCureServiceImpl.java

@ -0,0 +1,181 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanValidators;
import com.ruoyi.system.domain.PatientCure;
import com.ruoyi.system.mapper.PatientCureMapper;
import com.ruoyi.system.service.IPatientCureService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;
import javax.validation.Validator;
/**
* 治愈患者Service业务层处理
*
* @author zlx
* @date 2023-05-13
*/
@Service
public class PatientCureServiceImpl implements IPatientCureService
{
private static final Logger log = LoggerFactory.getLogger(PatientManageServiceImpl.class);
@Autowired
protected Validator validator;
@Autowired
private PatientCureMapper patientCureMapper;
/**
* 查询治愈患者
*
* @param patientId 治愈患者主键
* @return 治愈患者
*/
@Override
public PatientCure selectPatientCureByPatientId(Long patientId)
{
return patientCureMapper.selectPatientCureByPatientId(patientId);
}
/**
* 查询治愈患者列表
*
* @param patientCure 治愈患者
* @return 治愈患者
*/
@Override
public List<PatientCure> selectPatientCureList(PatientCure patientCure)
{
return patientCureMapper.selectPatientCureList(patientCure);
}
/**
* 新增治愈患者
*
* @param patientCure 治愈患者
* @return 结果
*/
@Override
public int insertPatientCure(PatientCure patientCure)
{
return patientCureMapper.insertPatientCure(patientCure);
}
/**
* 修改治愈患者
*
* @param patientCure 治愈患者
* @return 结果
*/
@Override
public int updatePatientCure(PatientCure patientCure)
{
return patientCureMapper.updatePatientCure(patientCure);
}
/**
* 批量删除治愈患者
*
* @param patientIds 需要删除的治愈患者主键
* @return 结果
*/
@Override
public int deletePatientCureByPatientIds(String patientIds)
{
return patientCureMapper.deletePatientCureByPatientIds(Convert.toStrArray(patientIds));
}
/**
* 删除治愈患者信息
*
* @param patientId 治愈患者主键
* @return 结果
*/
@Override
public int deletePatientCureByPatientId(Long patientId)
{
return patientCureMapper.deletePatientCureByPatientId(patientId);
}
@Override
public boolean checkPatientIdCardUnique(PatientCure patientCure) {
Long patientId = StringUtils.isNull(patientCure.getPatientId()) ? -1L : patientCure.getPatientId();
PatientCure info = patientCureMapper.checkPatientIdCardUnique(patientCure.getPatientIdCard());
if (StringUtils.isNotNull(info) && info.getPatientId().longValue() != patientId.longValue())
{
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
}
/**
* 导入用户数据
*
* @param patientList 用户数据列表
* @return 结果
*/
@Override
public String importPatient(List<PatientCure> patientList, Boolean isUpdateSupport)
{
if (StringUtils.isNull(patientList) || patientList.size() == 0)
{
throw new ServiceException("导入患者数据不能为空!");
}
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
for (PatientCure patientCure : patientList)
{
try
{
// 验证是否存在这个患者
PatientCure p = patientCureMapper.selectPatientCureByPatientId(patientCure.getPatientId());
if (StringUtils.isNull(p))
{
BeanValidators.validateWithException(validator, patientCure);
this.insertPatientCure(patientCure);
successNum++;
successMsg.append("<br/>" + successNum + "、身份证: " + patientCure.getPatientIdCard() + " 导入成功");
}
else if (isUpdateSupport)
{
BeanValidators.validateWithException(validator, patientCure);
patientCure.setPatientId(p.getPatientId());
this.updatePatientCure(patientCure);
successNum++;
successMsg.append("<br/>" + successNum + "、身份证: " + patientCure.getPatientIdCard() + " 的患者信息更新成功");
}
else
{
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证 " + patientCure.getPatientIdCard() + " 已存在");
}
}
catch (Exception e)
{
failureNum++;
String msg = "<br/>" + failureNum + "、身份证 " + patientCure.getPatientIdCard() + " 导入失败:";
failureMsg.append(msg + e.getMessage());
log.error(msg, e);
}
}
if (failureNum > 0)
{
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}
else
{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
}

182
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientDeadServiceImpl.java

@ -0,0 +1,182 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanValidators;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PatientDeadMapper;
import com.ruoyi.system.domain.PatientDead;
import com.ruoyi.system.service.IPatientDeadService;
import com.ruoyi.common.core.text.Convert;
import javax.validation.Validator;
/**
* 死亡患者Service业务层处理
*
* @author zlx
* @date 2023-05-13
*/
@Service
public class PatientDeadServiceImpl implements IPatientDeadService
{
private static final Logger log = LoggerFactory.getLogger(PatientManageServiceImpl.class);
@Autowired
protected Validator validator;
@Autowired
private PatientDeadMapper patientDeadMapper;
/**
* 查询死亡患者
*
* @param patientId 死亡患者主键
* @return 死亡患者
*/
@Override
public PatientDead selectPatientDeadByPatientId(Long patientId)
{
return patientDeadMapper.selectPatientDeadByPatientId(patientId);
}
/**
* 查询死亡患者列表
*
* @param patientDead 死亡患者
* @return 死亡患者
*/
@Override
public List<PatientDead> selectPatientDeadList(PatientDead patientDead)
{
return patientDeadMapper.selectPatientDeadList(patientDead);
}
/**
* 新增死亡患者
*
* @param patientDead 死亡患者
* @return 结果
*/
@Override
public int insertPatientDead(PatientDead patientDead)
{
return patientDeadMapper.insertPatientDead(patientDead);
}
/**
* 修改死亡患者
*
* @param patientDead 死亡患者
* @return 结果
*/
@Override
public int updatePatientDead(PatientDead patientDead)
{
return patientDeadMapper.updatePatientDead(patientDead);
}
/**
* 批量删除死亡患者
*
* @param patientIds 需要删除的死亡患者主键
* @return 结果
*/
@Override
public int deletePatientDeadByPatientIds(String patientIds)
{
return patientDeadMapper.deletePatientDeadByPatientIds(Convert.toStrArray(patientIds));
}
/**
* 删除死亡患者信息
*
* @param patientId 死亡患者主键
* @return 结果
*/
@Override
public int deletePatientDeadByPatientId(Long patientId)
{
return patientDeadMapper.deletePatientDeadByPatientId(patientId);
}
@Override
public boolean checkPatientIdCardUnique(PatientDead patientDead) {
Long patientId = StringUtils.isNull(patientDead.getPatientId()) ? -1L : patientDead.getPatientId();
PatientDead info = patientDeadMapper.checkPatientIdCardUnique(patientDead.getPatientIdCard());
if (StringUtils.isNotNull(info) && info.getPatientId().longValue() != patientId.longValue())
{
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
}
/**
* 导入死亡患者数据
*
* @param patientList 用户数据列表
* @return 结果
*/
@Override
public String importPatient(List<PatientDead> patientList, Boolean isUpdateSupport)
{
if (StringUtils.isNull(patientList) || patientList.size() == 0)
{
throw new ServiceException("导入患者数据不能为空!");
}
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
for (PatientDead patientDead : patientList)
{
try
{
// 验证是否存在这个患者
PatientDead p = patientDeadMapper.selectPatientDeadByPatientId(patientDead.getPatientId());
if (StringUtils.isNull(p))
{
BeanValidators.validateWithException(validator, patientDead);
this.insertPatientDead(patientDead);
successNum++;
successMsg.append("<br/>" + successNum + "、身份证: " + patientDead.getPatientIdCard() + " 导入成功");
}
else if (isUpdateSupport)
{
BeanValidators.validateWithException(validator, patientDead);
patientDead.setPatientId(p.getPatientId());
this.updatePatientDead(patientDead);
successNum++;
successMsg.append("<br/>" + successNum + "、身份证: " + patientDead.getPatientIdCard() + " 的患者信息更新成功");
}
else
{
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证 " + patientDead.getPatientIdCard() + " 已存在");
}
}
catch (Exception e)
{
failureNum++;
String msg = "<br/>" + failureNum + "、身份证 " + patientDead.getPatientIdCard() + " 导入失败:";
failureMsg.append(msg + e.getMessage());
log.error(msg, e);
}
}
if (failureNum > 0)
{
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}
else
{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
}

1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientManageServiceImpl.java

@ -210,4 +210,5 @@ public class PatientManageServiceImpl implements IPatientManageService
}
return UserConstants.UNIQUE;
}
}

4
ruoyi-system/src/main/resources/mapper/CheckManageMapper.xml

@ -19,8 +19,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectCheckManageVo">
select check_manage_id, check_name, temperature, health_state
, CASE is_touch WHEN '1' THEN '是' ELSE '否' END as is_touch
, CASE is_high WHEN '1' THEN '是' ELSE '否' END as is_high
, CASE is_touch WHEN '1' THEN '是密接人员' ELSE '不是密接人员' END as is_touch
, CASE is_high WHEN '1' THEN '去过高风险地区' ELSE '未去过高风险地区' END as is_high
,description, check_datetime, current_position, check_phonenumber
from check_manage
</sql>

124
ruoyi-system/src/main/resources/mapper/PatientCureMapper.xml

@ -0,0 +1,124 @@
<?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="com.ruoyi.system.mapper.PatientCureMapper">
<resultMap type="PatientCure" id="PatientCureResult">
<result property="patientId" column="patient_id" />
<result property="patientName" column="patient_name" />
<result property="patientAge" column="patient_age" />
<result property="patientSex" column="patient_sex" />
<result property="patientIdCard" column="patient_id_card" />
<result property="description" column="description" />
<result property="currentLocation" column="current_location" />
<result property="temperature" column="temperature" />
<result property="diagnosedTime" column="diagnosed_time" />
<result property="isEmergency" column="is_emergency" />
<result property="isTouch" column="is_touch" />
<result property="isHigh" column="is_high" />
<result property="isDead" column="is_dead" />
</resultMap>
<sql id="selectPatientCureVo">
select patient_id, patient_name, CASE patient_sex WHEN '1' THEN '男' ELSE '女' END as patient_sex
,patient_sex, patient_id_card, description, current_location, temperature, diagnosed_time
, CASE is_emergency WHEN '1' THEN '重症患者' ELSE '非重症患者' END as is_emergency
, CASE is_dead WHEN '1' THEN '健在' ELSE '已死亡' END as is_dead
, CASE is_touch WHEN '1' THEN '是密接人员' ELSE '不是密接人员' END as is_touch
, CASE is_high WHEN '1' THEN '去过高风险地区' ELSE '未去过高风险地区' END as is_high
from patient_cure
</sql>
<select id="selectPatientCureList" parameterType="PatientCure" resultMap="PatientCureResult">
<include refid="selectPatientCureVo"/>
<where>
<if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
<if test="patientAge != null and patientAge != ''"> and patient_age = #{patientAge}</if>
<if test="patientSex != null and patientSex != ''"> and patient_sex = #{patientSex}</if>
<if test="patientIdCard != null and patientIdCard != ''"> and patient_id_card = #{patientIdCard}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="currentLocation != null and currentLocation != ''"> and current_location = #{currentLocation}</if>
<if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if>
<if test="diagnosedTime != null "> and diagnosed_time = #{diagnosedTime}</if>
<if test="isEmergency != null and isEmergency != ''"> and is_emergency = #{isEmergency}</if>
<if test="isTouch != null and isTouch != ''"> and is_touch = #{isTouch}</if>
<if test="isHigh != null and isHigh != ''"> and is_high = #{isHigh}</if>
<if test="isDead != null and isDead != ''"> and is_dead = #{isDead}</if>
</where>
</select>
<select id="selectPatientCureByPatientId" parameterType="Long" resultMap="PatientCureResult">
<include refid="selectPatientCureVo"/>
where patient_id = #{patientId}
</select>
<insert id="insertPatientCure" parameterType="PatientCure">
insert into patient_cure
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patientId != null">patient_id,</if>
<if test="patientName != null">patient_name,</if>
<if test="patientAge != null">patient_age,</if>
<if test="patientSex != null">patient_sex,</if>
<if test="patientIdCard != null">patient_id_card,</if>
<if test="description != null">description,</if>
<if test="currentLocation != null">current_location,</if>
<if test="temperature != null">temperature,</if>
<if test="diagnosedTime != null">diagnosed_time,</if>
<if test="isEmergency != null">is_emergency,</if>
<if test="isTouch != null">is_touch,</if>
<if test="isHigh != null">is_high,</if>
<if test="isDead != null">is_dead,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patientId != null">#{patientId},</if>
<if test="patientName != null">#{patientName},</if>
<if test="patientAge != null">#{patientAge},</if>
<if test="patientSex != null">#{patientSex},</if>
<if test="patientIdCard != null">#{patientIdCard},</if>
<if test="description != null">#{description},</if>
<if test="currentLocation != null">#{currentLocation},</if>
<if test="temperature != null">#{temperature},</if>
<if test="diagnosedTime != null">#{diagnosedTime},</if>
<if test="isEmergency != null">#{isEmergency},</if>
<if test="isTouch != null">#{isTouch},</if>
<if test="isHigh != null">#{isHigh},</if>
<if test="isDead != null">#{isDead},</if>
</trim>
</insert>
<update id="updatePatientCure" parameterType="PatientCure">
update patient_cure
<trim prefix="SET" suffixOverrides=",">
<if test="patientName != null">patient_name = #{patientName},</if>
<if test="patientAge != null">patient_age = #{patientAge},</if>
<if test="patientSex != null">patient_sex = #{patientSex},</if>
<if test="patientIdCard != null">patient_id_card = #{patientIdCard},</if>
<if test="description != null">description = #{description},</if>
<if test="currentLocation != null">current_location = #{currentLocation},</if>
<if test="temperature != null">temperature = #{temperature},</if>
<if test="diagnosedTime != null">diagnosed_time = #{diagnosedTime},</if>
<if test="isEmergency != null">is_emergency = #{isEmergency},</if>
<if test="isTouch != null">is_touch = #{isTouch},</if>
<if test="isHigh != null">is_high = #{isHigh},</if>
<if test="isDead != null">is_dead = #{isDead},</if>
</trim>
where patient_id = #{patientId}
</update>
<delete id="deletePatientCureByPatientId" parameterType="Long">
delete from patient_cure where patient_id = #{patientId}
</delete>
<delete id="deletePatientCureByPatientIds" parameterType="String">
delete from patient_cure where patient_id in
<foreach item="patientId" collection="array" open="(" separator="," close=")">
#{patientId}
</foreach>
</delete>
<select id="checkPatientIdCardUnique" parameterType="String" resultMap="PatientCureResult">
select patient_id, patient_id_card from patient_cure where patient_id_card=#{patientIdCard}
</select>
</mapper>

124
ruoyi-system/src/main/resources/mapper/PatientDeadMapper.xml

@ -0,0 +1,124 @@
<?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="com.ruoyi.system.mapper.PatientDeadMapper">
<resultMap type="PatientDead" id="PatientDeadResult">
<result property="patientId" column="patient_id" />
<result property="patientName" column="patient_name" />
<result property="patientAge" column="patient_age" />
<result property="patientSex" column="patient_sex" />
<result property="patientIdCard" column="patient_id_card" />
<result property="description" column="description" />
<result property="currentLocation" column="current_location" />
<result property="temperature" column="temperature" />
<result property="diagnosedTime" column="diagnosed_time" />
<result property="isEmergency" column="is_emergency" />
<result property="isTouch" column="is_touch" />
<result property="isHigh" column="is_high" />
<result property="isDead" column="is_dead" />
</resultMap>
<sql id="selectPatientDeadVo">
select patient_id, patient_name, patient_age,CASE patient_sex WHEN '1' THEN '男' ELSE '女' END as patient_sex
, patient_id_card, description, current_location, temperature, diagnosed_time
, CASE is_emergency WHEN '1' THEN '重症患者' ELSE '非重症患者' END as is_emergency
, CASE is_dead WHEN '1' THEN '健在' ELSE '已死亡' END as is_dead
, CASE is_touch WHEN '1' THEN '是密接人员' ELSE '不是密接人员' END as is_touch
, CASE is_high WHEN '1' THEN '去过高风险地区' ELSE '未去过高风险地区' END as is_high
from patient_dead
</sql>
<select id="selectPatientDeadList" parameterType="PatientDead" resultMap="PatientDeadResult">
<include refid="selectPatientDeadVo"/>
<where>
<if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
<if test="patientAge != null and patientAge != ''"> and patient_age = #{patientAge}</if>
<if test="patientSex != null and patientSex != ''"> and patient_sex = #{patientSex}</if>
<if test="patientIdCard != null and patientIdCard != ''"> and patient_id_card = #{patientIdCard}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="currentLocation != null and currentLocation != ''"> and current_location = #{currentLocation}</if>
<if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if>
<if test="diagnosedTime != null "> and diagnosed_time = #{diagnosedTime}</if>
<if test="isEmergency != null and isEmergency != ''"> and is_emergency = #{isEmergency}</if>
<if test="isTouch != null and isTouch != ''"> and is_touch = #{isTouch}</if>
<if test="isHigh != null and isHigh != ''"> and is_high = #{isHigh}</if>
<if test="isDead != null and isDead != ''"> and is_dead = #{isDead}</if>
</where>
</select>
<select id="selectPatientDeadByPatientId" parameterType="Long" resultMap="PatientDeadResult">
<include refid="selectPatientDeadVo"/>
where patient_id = #{patientId}
</select>
<insert id="insertPatientDead" parameterType="PatientDead">
insert into patient_dead
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patientId != null">patient_id,</if>
<if test="patientName != null">patient_name,</if>
<if test="patientAge != null">patient_age,</if>
<if test="patientSex != null">patient_sex,</if>
<if test="patientIdCard != null">patient_id_card,</if>
<if test="description != null">description,</if>
<if test="currentLocation != null">current_location,</if>
<if test="temperature != null">temperature,</if>
<if test="diagnosedTime != null">diagnosed_time,</if>
<if test="isEmergency != null">is_emergency,</if>
<if test="isTouch != null">is_touch,</if>
<if test="isHigh != null">is_high,</if>
<if test="isDead != null">is_dead,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patientId != null">#{patientId},</if>
<if test="patientName != null">#{patientName},</if>
<if test="patientAge != null">#{patientAge},</if>
<if test="patientSex != null">#{patientSex},</if>
<if test="patientIdCard != null">#{patientIdCard},</if>
<if test="description != null">#{description},</if>
<if test="currentLocation != null">#{currentLocation},</if>
<if test="temperature != null">#{temperature},</if>
<if test="diagnosedTime != null">#{diagnosedTime},</if>
<if test="isEmergency != null">#{isEmergency},</if>
<if test="isTouch != null">#{isTouch},</if>
<if test="isHigh != null">#{isHigh},</if>
<if test="isDead != null">#{isDead},</if>
</trim>
</insert>
<update id="updatePatientDead" parameterType="PatientDead">
update patient_dead
<trim prefix="SET" suffixOverrides=",">
<if test="patientName != null">patient_name = #{patientName},</if>
<if test="patientAge != null">patient_age = #{patientAge},</if>
<if test="patientSex != null">patient_sex = #{patientSex},</if>
<if test="patientIdCard != null">patient_id_card = #{patientIdCard},</if>
<if test="description != null">description = #{description},</if>
<if test="currentLocation != null">current_location = #{currentLocation},</if>
<if test="temperature != null">temperature = #{temperature},</if>
<if test="diagnosedTime != null">diagnosed_time = #{diagnosedTime},</if>
<if test="isEmergency != null">is_emergency = #{isEmergency},</if>
<if test="isTouch != null">is_touch = #{isTouch},</if>
<if test="isHigh != null">is_high = #{isHigh},</if>
<if test="isDead != null">is_dead = #{isDead},</if>
</trim>
where patient_id = #{patientId}
</update>
<delete id="deletePatientDeadByPatientId" parameterType="Long">
delete from patient_dead where patient_id = #{patientId}
</delete>
<delete id="deletePatientDeadByPatientIds" parameterType="String">
delete from patient_dead where patient_id in
<foreach item="patientId" collection="array" open="(" separator="," close=")">
#{patientId}
</foreach>
</delete>
<select id="checkPatientIdCardUnique" parameterType="String" resultMap="PatientDeadResult">
select patient_id, patient_id_card from patient_dead where patient_id_card=#{patientIdCard}
</select>
</mapper>

10
ruoyi-system/src/main/resources/mapper/PatientManageMapper.xml

@ -23,10 +23,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectPatientManageVo">
select patient_id, patient_name, patient_age, CASE patient_sex WHEN '1' THEN '男' ELSE '女' END as patient_sex
, patient_id_card, description, current_location, temperature, diagnosed_time
, CASE is_emergency WHEN '1' THEN '是' ELSE '否' END as is_emergency
, CASE is_dead WHEN '1' THEN '是' ELSE '否' END as is_dead
, CASE is_touch WHEN '1' THEN '是' ELSE '否' END as is_touch
, CASE is_high WHEN '1' THEN '是' ELSE '否' END as is_high
, CASE is_emergency WHEN '1' THEN '重症患者' ELSE '非重症患者' END as is_emergency
, CASE is_dead WHEN '1' THEN '健在' ELSE '已死亡' END as is_dead
, CASE is_touch WHEN '1' THEN '是密接人员' ELSE '不是密接人员' END as is_touch
, CASE is_high WHEN '1' THEN '去过高风险地区' ELSE '未去过高风险地区' END as is_high
from patient_manage
</sql>
@ -125,4 +125,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="checkPatientIdCardUnique" parameterType="String" resultMap="PatientManageResult">
select patient_id, patient_id_card from patient_manage where patient_id_card=#{patientIdCard}
</select>
</mapper>
Loading…
Cancel
Save