Browse Source

完成各个模块01数据转换成是否,增加患者状态模块外形

ry
loser 1 year ago
parent
commit
92fa680cfa
  1. 45
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientManageController.java
  2. 29
      ruoyi-admin/src/main/resources/templates/check/checkManage/add.html
  3. 4
      ruoyi-admin/src/main/resources/templates/check/checkManage/checkManage.html
  4. 12
      ruoyi-admin/src/main/resources/templates/check/checkManage/edit.html
  5. 64
      ruoyi-admin/src/main/resources/templates/patient/patientManage/add.html
  6. 16
      ruoyi-admin/src/main/resources/templates/patient/patientManage/detail.html
  7. 66
      ruoyi-admin/src/main/resources/templates/patient/patientManage/edit.html
  8. 86
      ruoyi-admin/src/main/resources/templates/patient/patientManage/patientManage.html
  9. 16
      ruoyi-system/src/main/java/com/ruoyi/system/domain/CheckManage.java
  10. 47
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientManage.java
  11. 5
      ruoyi-system/src/main/resources/mapper/CheckManageMapper.xml
  12. 23
      ruoyi-system/src/main/resources/mapper/PatientManageMapper.xml

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

@ -172,4 +172,49 @@ public class PatientManageController extends BaseController
mmap.put("patientManage", patientManageService.selectPatientById(patientId));
return prefix + "/detail";
}
/**
* 校验身份证
*/
@PostMapping("/checkPatientIdCardUnique")
@ResponseBody
public boolean checkPatientIdCardUnique(PatientManage user)
{
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";
}
}

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

@ -63,20 +63,23 @@
</div>
</div>
<div class="col-sm-6" >
<div class="form-group" style="display: flex">
<div class="form-group" >
<label class="col-sm-5 control-label">是否接触密接:</label>
<div class="col-sm-2">
<label class="toggle-switch switch-solid">
<input type="checkbox" id="isTouch">
<span></span>
</label>
</div>
<label class="col-sm-4 control-label">是否去过高风险:</label>
<div class="col-sm-2">
<label class="toggle-switch switch-solid">
<input type="checkbox" id="isHigh">
<span></span>
</label>
<div class="col-sm-5">
<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>
</div>
<div class="form-group" >
<label class="col-sm-5 control-label">是否去过高风险:</label>
<div class="col-sm-5">
<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>

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

@ -16,7 +16,7 @@
</li>
<li>
<label>打卡人电话:</label>
<input type="text" name="checkPhonenumber"/>
<input type="text" name="checkPhonenumber" MAXLENGTH="11"/>
</li>
<!-- <li>-->
<!-- <label>身份证:</label>-->
@ -76,7 +76,7 @@
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
modalName: "打卡管理",
modalName: "打卡信息",
columns: [{
checkbox: true
},

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

@ -16,20 +16,26 @@
<div class="form-group">
<label class="col-sm-3 control-label">打卡人电话:</label>
<div class="col-sm-8">
<input name="checkPhonenumber" th:field="*{checkPhonenumber}" class="form-control" type="text">
<input name="checkPhonenumber" th:field="*{checkPhonenumber}" class="form-control" type="text" maxlength="11">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否去高风险地区:</label>
<div class="col-sm-8">
<input name="isHigh" th:field="*{isHigh}" class="form-control" type="text">
<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-8">
<input name="isTouch" th:field="*{isTouch}" class="form-control" type="text">
<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>
</div>
<div class="form-group">

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

@ -13,10 +13,21 @@
<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-8">
<input name="patientSex" class="form-control" type="text">
<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">
@ -46,7 +57,7 @@
<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">
<input name="temperature" class="form-control" type="text" maxlength="4" placeholder="精确到小数点后1位">
</div>
</div>
<div class="form-group">
@ -58,36 +69,43 @@
</div>
</div>
</div>
<div class="form-group" style="display: flex">
<div class="form-group" >
<label class="col-sm-3 control-label">是否为密接人员:</label>
<div class="col-sm-2">
<label class="toggle-switch switch-solid">
<input type="checkbox" id="isTouch">
<span></span>
</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-2">
<label class="toggle-switch switch-solid">
<input type="checkbox" id="isHigh">
<span></span>
</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-8">
<div class="input-group date">
<input name="isDiagnosed" class="form-control" placeholder="目前诊断症状" type="text" maxlength="1">
<span class="input-group-addon"><i class="fa fa-hospital-o"></i></span>
<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"+>
<script th:inline="javascript">
var prefix = ctx + "patient/patientManage"
$("#form-patientManage-add").validate({
onkeyup: false,
@ -119,7 +137,11 @@
focusCleanup: true
},
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-patientManage-add').serialize());
}
}
$("input[name='diagnosedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",

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

@ -30,7 +30,6 @@
<div class="form-control-static" th:text="${patientManage.temperature}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">患者年龄:</label>
<div class="form-control-static" th:text="${patientManage.patientAge}"></div>
@ -41,28 +40,31 @@
<div class="form-control-static" th:text="${patientManage.patientIdCard}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">确诊状态</label>
<div class="form-control-static" th:text="${patientManage.isDiagnosed}"></div>
<label class="col-sm-3 control-label ">是否为重症患者</label>
<div class="form-control-static" th:text="${patientManage.isEmergency}"></div>
</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.isTouch}"></div>
</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.isHigh}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否生还:</label>
<div class="form-control-static" th:text="${patientManage.isDead}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">最近感染地区:</label>
<div class="form-control-static" th:text="${patientManage.currentLocation}"</div>
</div>
<div class="form-group">
<label class="col-xs-2 control-label">备注:</label>
<div class="form-control-static" th:text="${patientManage.description}"></div>

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

@ -14,16 +14,27 @@
<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>
<div class="col-sm-8">
<input name="patientSex" th:field="*{patientSex}" class="form-control" type="text">
<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">
<input name="patientAge" th:field="*{patientAge}" class="form-control" type="text" maxlength="4">
</div>
</div>
<div class="form-group">
@ -59,29 +70,36 @@
</div>
</div>
</div>
<!-- <div class="form-group" style="display: flex">-->
<!-- <label class="col-sm-3 control-label">是否为密接人员:</label>-->
<!-- <div class="col-sm-2">-->
<!-- <label class="toggle-switch switch-solid">-->
<!-- <input id="isTouch" th:field="*{isTouch}" class="form-control" type="checkbox">-->
<!-- <span></span>-->
<!-- </label>-->
<!-- </div>-->
<!-- <label class="col-sm-3 control-label">是否去过高风险地区:</label>-->
<!-- <div class="col-sm-2">-->
<!-- <label class="toggle-switch switch-solid" th:field="*{isHigh}" class="form-control" type="checkbox">-->
<!-- <input type="checkbox" id="isHigh">-->
<!-- <span></span>-->
<!-- </label>-->
<!-- </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="isDiagnosed" class="form-control" placeholder="目前诊断症状" type="text" maxlength="1">
<span class="input-group-addon"><i class="fa fa-hospital-o"></i></span>
<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>

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

@ -19,10 +19,6 @@
<input type="text" name="patientAge"/>
</li>
<li>
<label>患者身份证:</label>
<input type="text" name="patientIdCard"/>
</li>
<li>
<label>最近感染地区:</label>
<input type="text" name="currentLocation"/>
</li>
@ -70,6 +66,10 @@
var editFlag = [[${@permission.hasPermi('patient:patientManage:edit')}]];
var detailFlag = [[${@permission.hasPermi('patient:patientManage:detail')}]];
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() {
@ -82,7 +82,7 @@
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
modalName: "患者管理",
modalName: "患者信息",
columns: [{
checkbox: true
},
@ -96,19 +96,20 @@
field: 'patientName',
title: '患者姓名'
},
// {
// field: 'patientAge',
// title: '患者年龄'
// },
{
field: 'patientSex',
title: '患者性别'
field: 'patientAge',
title: '患者年龄'
},
{
isIdentity:true,
field: 'patientIdCard',
title: '患者身份证'
field: 'patientSex',
title: '患者性别',
},
// {
// isIdentity:true,
// field: 'patientIdCard',
// title: '患者身份证'
// },
{
field: 'currentLocation',
@ -121,18 +122,24 @@
{
field: 'diagnosedTime',
title: '感染时间'
},
{
field: 'isTouch',
title: '接触'
title: '是否为密接人员',
},
{
field: 'isHigh',
title: '高风险地区'
title: '是否去过高风险地区'
},
{
field: 'isDiagnosed',
title: '诊断'
field: 'isEmergency',
title: '是否重症'
},
{
field: 'isDead',
title: '是否死亡'
},
{
field: 'description',
@ -141,17 +148,59 @@
{
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>');
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>');
return actions.join('');
}
}]
};
$.table.init(options);
});
/* 移交治愈 */
function cure(roleId) {
var url = prefix ;
$.modal.openTab("分配用户", url);
}
/* 移交死亡 */
function dead(roleId) {
var url = prefix ;
$.modal.openTab("分配用户", 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>
<script id="importTpl" type="text/template">
@ -167,5 +216,6 @@
</font>
</div>
</form>
</script>
</html>

16
ruoyi-system/src/main/java/com/ruoyi/system/domain/CheckManage.java

@ -36,12 +36,12 @@ public class CheckManage extends BaseEntity
private String healthState;
/** 是否去过高风险地区 */
@Excel(name = "是否去过高风险地区" ,readConverterExp = "0=否,1=是,2=未知")
private Integer isHigh;
@Excel(name = "是否去过高风险地区" ,readConverterExp = "0=否,1=是")
private String isHigh;
/** 是否接触过密接人员 */
@Excel(name = "是否接触过密接人员",readConverterExp = "0=否,1=是,2=未知")
private Integer isTouch;
@Excel(name = "是否接触过密接人员",readConverterExp = "0=否,1=是")
private String isTouch;
/** 备注 */
@Excel(name = "备注")
@ -97,21 +97,21 @@ public class CheckManage extends BaseEntity
{
return healthState;
}
public void setIsHigh(Integer isHigh)
public void setIsHigh(String isHigh)
{
this.isHigh = isHigh;
}
public Integer getIsHigh()
public String getIsHigh()
{
return isHigh;
}
public void setIsTouch(Integer isTouch)
public void setIsTouch(String isTouch)
{
this.isTouch = isTouch;
}
public Integer getIsTouch()
public String getIsTouch()
{
return isTouch;
}

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

@ -31,7 +31,7 @@ public class PatientManage extends BaseEntity
private String patientAge;
/** 患者性别 */
@Excel(name = "患者性别" ,readConverterExp = "0=男,1=女,2=未知")
@Excel(name = "患者性别" ,readConverterExp = "0=女,1=男")
private String patientSex;
/** 患者身份证 */
@ -56,17 +56,21 @@ public class PatientManage extends BaseEntity
@Excel(name = "感染时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date diagnosedTime;
/** 确诊状态 */
@Excel(name = "确诊状态")
private Integer isDiagnosed;
/** 重症状态 */
@Excel(name = "重症状态" ,readConverterExp = "0=否,1=是")
private String isEmergency;
/** 密接状态 */
@Excel(name = "密接状态")
private Integer isTouch;
@Excel(name = "密接状态" ,readConverterExp = "0=否,1=是")
private String isTouch;
/** 死亡状态 */
@Excel(name = "死亡状态" ,readConverterExp = "0=否,1=是")
private String isDead;
/** 是否去高风险地区 */
@Excel(name = "是否去高风险地区")
private Integer isHigh;
@Excel(name = "是否去高风险地区",readConverterExp = "0=否,1=是")
private String isHigh;
public void setPatientId(Long patientId)
{
@ -149,34 +153,42 @@ public class PatientManage extends BaseEntity
{
return diagnosedTime;
}
public void setIsDiagnosed(Integer isDiagnosed)
public void setIsEmergency(String isEmergency)
{
this.isDiagnosed = isDiagnosed;
this.isEmergency = isEmergency;
}
public Integer getIsDiagnosed()
public String getIsEmergency()
{
return isDiagnosed;
return isEmergency;
}
public void setIsTouch(Integer isTouch)
public void setIsTouch(String isTouch)
{
this.isTouch = isTouch;
}
public Integer getIsTouch()
public String getIsTouch()
{
return isTouch;
}
public void setIsHigh(Integer isHigh)
public void setIsHigh(String isHigh)
{
this.isHigh = isHigh;
}
public Integer getIsHigh()
public String getIsHigh()
{
return isHigh;
}
public String getIsDead() {
return isDead;
}
public void setIsDead(String isDead) {
this.isDead = isDead;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -189,9 +201,10 @@ public class PatientManage extends BaseEntity
.append("currentLocation", getCurrentLocation())
.append("temperature", getTemperature())
.append("diagnosedTime", getDiagnosedTime())
.append("isDiagnosed", getIsDiagnosed())
.append("isEmergency", getIsEmergency())
.append("isTouch", getIsTouch())
.append("isHigh", getIsHigh())
.append("isDead", getIsDead())
.toString();
}
}

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

@ -18,7 +18,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectCheckManageVo">
select check_manage_id, check_name, temperature, health_state, is_high, is_touch, description, check_datetime, current_position, check_phonenumber
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
,description, check_datetime, current_position, check_phonenumber
from check_manage
</sql>

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

@ -14,13 +14,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="currentLocation" column="current_location" />
<result property="temperature" column="temperature" />
<result property="diagnosedTime" column="diagnosed_time" />
<result property="isDiagnosed" column="is_diagnosed" />
<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="selectPatientManageVo">
select patient_id, patient_name, patient_age, patient_sex, patient_id_card, description, current_location, temperature, diagnosed_time, is_diagnosed, is_touch, is_high from patient_manage
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_manage
</sql>
<select id="selectPatientManageList" parameterType="PatientManage" resultMap="PatientManageResult">
@ -34,8 +41,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="isDiagnosed != null "> and is_diagnosed = #{isDiagnosed}</if>
<if test="isEmergency != null "> and is_emergency = #{isEmergency}</if>
<if test="isTouch != null "> and is_touch = #{isTouch}</if>
<if test="isDead != null "> and is_dead = #{isDead}</if>
<if test="isHigh != null "> and is_high = #{isHigh}</if>
</where>
</select>
@ -56,9 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="currentLocation != null">current_location,</if>
<if test="temperature != null">temperature,</if>
<if test="diagnosedTime != null">diagnosed_time,</if>
<if test="isDiagnosed != null">is_diagnosed,</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="patientName != null">#{patientName},</if>
@ -69,9 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="currentLocation != null">#{currentLocation},</if>
<if test="temperature != null">#{temperature},</if>
<if test="diagnosedTime != null">#{diagnosedTime},</if>
<if test="isDiagnosed != null">#{isDiagnosed},</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>
@ -86,9 +96,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="isDiagnosed != null">is_diagnosed = #{isDiagnosed},</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>

Loading…
Cancel
Save