Browse Source

精简功能模块,完成打卡记录管理除更改以外所有模块

ry
loser 1 year ago
parent
commit
19c229f5a5
  1. 67
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/CheckController.java
  2. 2
      ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js
  3. 211
      ruoyi-admin/src/main/resources/templates/check/checkManage/add.html
  4. 65
      ruoyi-admin/src/main/resources/templates/check/checkManage/checkManage.html
  5. 14
      ruoyi-admin/src/main/resources/templates/check/checkManage/edit.html
  6. 84
      ruoyi-admin/src/main/resources/templates/individual/check/add.html
  7. 207
      ruoyi-admin/src/main/resources/templates/individual/check/check.html
  8. 85
      ruoyi-admin/src/main/resources/templates/individual/check/edit.html
  9. 23
      ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html
  10. 157
      ruoyi-system/src/main/java/com/ruoyi/system/domain/Check.java
  11. 163
      ruoyi-system/src/main/java/com/ruoyi/system/domain/CheckManage.java
  12. 2
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/CheckManageMapper.java
  13. 24
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/CheckMapper.java
  14. 23
      ruoyi-system/src/main/java/com/ruoyi/system/service/ICheckService.java
  15. 10
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CheckManageServiceImpl.java
  16. 32
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CheckServiceImpl.java
  17. 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
  18. 83
      ruoyi-system/src/main/resources/mapper/CheckManageMapper.xml
  19. 44
      ruoyi-system/src/main/resources/mapper/CheckMapper.xml
  20. 8
      ruoyi-system/src/main/resources/mapper/PatientManageMapper.xml

67
ruoyi-admin/src/main/java/com/ruoyi/web/controller/CheckController.java

@ -1,67 +0,0 @@
package com.ruoyi.web.controller;
import java.util.List;
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.validation.annotation.Validated;
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.Check;
import com.ruoyi.system.service.ICheckService;
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;
/**
* 个人打卡Controller
*
* @author zlx
* @date 2023-04-22
*/
@Controller
@RequestMapping("/individual/check")
public class CheckController extends BaseController
{
private String prefix = "individual/check";
@Autowired
private ICheckService checkService;
@RequiresPermissions("individual:check:view")
@GetMapping()
public String check()
{
return prefix + "/check";
}
/**
* 新增个人打卡
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存个人打卡
*/
@RequiresPermissions("individual:check:add")
@Log(title = "个人打卡", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(@Validated Check check)
{
return toAjax(checkService.insertCheck(check));
}
}

2
ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js

@ -30,7 +30,7 @@ $(document).ready(function(){
jQuery.validator.addMethod("isTemperature",function(value,element){ jQuery.validator.addMethod("isTemperature",function(value,element){
var userName=/^[.0-9]{2,13}$/; var userName=/^[.0-9]{2,13}$/;
return this.optional(element) || (userName).test(value); return this.optional(element) || (userName).test(value);
},'请输入数字,可使用"."号'); },'请输入体温单位为℃,可使用"."号');
//校验身份证 //校验身份证
jQuery.validator.addMethod("isIdentity",function(value,element){ jQuery.validator.addMethod("isIdentity",function(value,element){
var id= /^(\d{15}$|^\d{18}$|^\d{17}(\d|X))$/; var id= /^(\d{15}$|^\d{18}$|^\d{17}(\d|X))$/;

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

@ -1,84 +1,219 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('新增打卡管理')" /> <th:block th:include="include :: header('个人打卡列表')" />
</head> </head>
<body class="white-bg"> <body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="main-content" >
<form class="form-horizontal m" id="form-checkManage-add"> <form class="form-horizontal" id="form-checkManage-add">
<div class="container-div">
<h4 class="form-header h4">打卡信息提交</h4>
<div class="row">
<div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">打卡人姓名:</label> <label class="col-sm-4 control-label is-required">姓名:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="checkName" class="form-control" type="text"> <input name="checkName" placeholder="请输入姓名" class="form-control" type="text" maxlength="30" >
</div>
</div> </div>
</div> </div>
<div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">打卡人年龄</label> <label class="col-sm-4 control-label">目前位置</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="checkAge" class="form-control" type="text"> <div class="input-group" style="display: flex">
<input class="btn bg-olive" type="button" value="点击获取位置" onclick="clickToGetAddress()" ></input>
<input type="text" class="form-control" name="currentPosition" id="currentPosition" placeholder="目前位置" value="">
</div>
</div> </div>
</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">
</div> </div>
</div> </div>
<div class="row">
<div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">确诊状态:</label> <label class="col-sm-4 control-label">健康状况</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="isDiagnosed" class="form-control" type="text"> <div class="input-group">
<input name="healthState" placeholder="健康状况" class="form-control" type="text">
<span class="input-group-addon"><i class="fa fa-user"></i></span>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">治愈状态:</label>
<div class="col-sm-8">
<input name="isCure" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">密接状态</label> <label class="col-sm-4 control-label">打卡时间</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="isTouch" class="form-control" type="text"> <div class="input-group">
<input name="checkDatetime" class="form-control " type="date" placeholder="打卡时间">
</div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">死亡状态:</label>
<div class="col-sm-8">
<input name="isDead" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="row">
<div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备注:</label> <label class="col-sm-4 control-label is-required">体温</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="description" class="form-control" type="text"> <input name="temperature" class="form-control" type="text" placeholder="体温" maxlength="4"/>
</div> </div>
</div> </div>
</div>
<div class="col-sm-6" >
<div class="form-group" style="display: flex">
<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>
</div>
</div>
<div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">最近接触地区:</label> <label class="col-sm-4 control-label is-required">手机号码</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="checkPostition" class="form-control" type="text"> <input name="checkPhonenumber" class="form-control" type="text" placeholder="手机号码" maxlength="11"/>
</div> </div>
</div> </div>
</div>
</div>
<h4 class="form-header h4">其他信息</h4>
<div class="row">
<div class="col-sm-12">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">体温:</label> <label class="col-xs-2 control-label">备注:</label>
<div class="col-sm-8"> <div class="col-xs-10">
<input name="temperature" class="form-control" type="text"> <textarea name="description" maxlength="500" class="form-control" rows="3" placeholder="个人状况描述"></textarea>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-offset-5 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitCheck()"><i class="fa fa-check"></i>保 存</button>&nbsp;
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script src="http://api.map.baidu.com/api?v=1.4" type="text/javascript"></script>
var prefix = ctx + "check/checkManage" <script >
var prefix = ctx + "check/checkManage";
$("#form-checkManage-add").validate({ $("#form-checkManage-add").validate({
focusCleanup: true focusCleanup: true,
}); //首字母默认大写
onkeyup: false,
rules:{
checkName:{
isName:true,
},
currentPosition:{
},
healthState:{
},
checkDatetime:{
},
temperature:{
isTemperature:true
},
checkPhonenumber:{
isPhone:true,
}
},
description: {
},
function submitHandler() { });
function submitCheck () {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-checkManage-add').serialize()); var data = $("#form-checkManage-add").serializeArray();
var isTouch = $("input[id='isTouch']").is(':checked') == true ? 0 : 1;
var isHigh = $("input[id='isHigh']").is(':checked') == true ? 0 : 1;
data.push({"checkName": "isTouch", "value": isTouch});
data.push({"checkName": "isHigh", "value": isHigh});
$.operate.saveTab(prefix+"/add", data);
}
}
$(document).ready(function() {
$('#datepicker-a3').datetimepicker({
format : "yyyy-mm-dd hh:ii",
autoclose : true,
todayBtn : true,
language : "zh-CN"
});
});
//获取位置
function getLocation() {
var options = {
enableHighAccuracy : true,
maximumAge : 1000
}
if (navigator.geolocation) {
//浏览器支持geolocation
navigator.geolocation.getCurrentPosition(onSuccess, onError, options);
} else {
//浏览器不支持geolocation
alert('您的浏览器不支持地理位置定位');
}
} }
//成功时
function onSuccess(position) {
//返回用户位置
//经度
var longitude = position.coords.longitude;
//纬度
var latitude = position.coords.latitude;
document.getElementById("currentPosition").value= `当前经纬度:经度 ${longitude},纬度 ${latitude}`
//根据经纬度获取地理位置,不太准确,获取城市区域还是可以的
var map = new BMap.Map("allmap");
var point = new BMap.Point(longitude, latitude);
var gc = new BMap.Geocoder();
gc.getLocation(point, function(rs) {
var addComp = rs.addressComponents;
document.getElementById("currentPosition").value=`${addComp.province}, ${addComp.city}, ${addComp.district}`
});
// 这里后面可以写你的后续操作了
postData(longitude, latitude);
}
//失败时
function onError(error) {
switch (error.code) {
case 1:
alert("位置服务被拒绝");
break;
case 2:
alert("暂时获取不到位置信息");
break;
case 3:
alert("获取信息超时");
break;
case 4:
alert("未知错误");
break;
}
// 这里后面可以写你的后续操作了
}
//获取地理位置
const clickToGetAddress = () => {
getLocation();
} }
</script> </script>
</body> </body>

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

@ -15,25 +15,25 @@
<input type="text" name="checkName"/> <input type="text" name="checkName"/>
</li> </li>
<li> <li>
<label>打卡人年龄</label> <label>打卡人电话</label>
<input type="text" name="checkAge"/> <input type="text" name="checkPhonenumber"/>
</li> </li>
<li> <li>
<label>身份证:</label> <label>身份证:</label>
<input type="text" name="patientIdCard"/> <input type="text" name="patientIdCard"/>
</li> </li>
<li> <li>
<label>备注:</label>
<input type="text" name="description"/>
</li>
<li>
<label>最近接触地区:</label> <label>最近接触地区:</label>
<input type="text" name="checkPostition"/> <input type="text" name="currentPosition"/>
</li> </li>
<li> <li>
<label>体温:</label> <label>体温:</label>
<input type="text" name="temperature"/> <input type="text" name="temperature"/>
</li> </li>
<!-- <li>-->
<!-- <label>性别:</label>-->
<!-- <input type="text" name="sex"/>-->
<!-- </li>-->
<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-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> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -44,16 +44,13 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="check:checkManage:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="check:checkManage:edit"> <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="check:checkManage:edit">
<i class="fa fa-edit"></i> 修改 <i class="fa fa-edit"></i> 修改
</a> </a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="check:checkManage:remove"> <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="check:checkManage:remove">
<i class="fa fa-remove"></i> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="patient:patientManage:import"> <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="check:checkManage:import">
<i class="fa fa-upload"></i> 导入 <i class="fa fa-upload"></i> 导入
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="check:checkManage:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="check:checkManage:export">
@ -74,7 +71,6 @@
$(function() { $(function() {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
@ -93,45 +89,42 @@
field: 'checkName', field: 'checkName',
title: '打卡人姓名' title: '打卡人姓名'
}, },
// {
// field: 'sex',
// title: '性别'
// },
{ {
field: 'checkAge', field: 'checkPhonenumber',
title: '打卡人年龄' title: '打卡人电话'
},
{
field: 'checkSex',
title: '打卡人性别'
}, },
// {
// field: 'patientIdCard',
// title: '身份证'
// },
{ {
field: 'patientIdCard', field: 'isHigh',
title: '身份证' title: '是否去高风险地区'
},
{
field: 'isDiagnosed',
title: '确诊状态'
},
{
field: 'isCure',
title: '治愈状态'
}, },
{ {
field: 'isTouch', field: 'isTouch',
title: '密接状态' title: '密接状态'
}, },
{ {
field: 'isDead', field: 'currentPosition',
title: '死亡状态' title: '最近接触地区'
}, },
{ {
field: 'description', field: 'temperature',
title: '备注' title: '体温'
}, },
{ {
field: 'checkPostition', field:'healthState',
title: '最近接触地区' title:'健康状况'
}, },
{ {
field: 'temperature', field: 'description',
title: '体温' title: '备注'
}, },
{ {
title: '操作', title: '操作',

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

@ -14,9 +14,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">打卡人年龄</label> <label class="col-sm-3 control-label">打卡人电话</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="checkAge" th:field="*{checkAge}" class="form-control" type="text"> <input name="checkPhonenumber" th:field="*{checkPhonenumber}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -26,9 +26,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">确诊状态</label> <label class="col-sm-3 control-label">是否去高风险地区</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="isDiagnosed" th:field="*{isDiagnosed}" class="form-control" type="text"> <input name="isHigh" th:field="*{isHigh}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -44,9 +44,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">死亡状态</label> <label class="col-sm-3 control-label">健康状况</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="isDead" th:field="*{isDead}" class="form-control" type="text"> <input name="healthState" th:field="*{healthState}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -58,7 +58,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">最近接触地区:</label> <label class="col-sm-3 control-label">最近接触地区:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="checkPostition" th:field="*{checkPostition}" class="form-control" type="text"> <input name="currentPosition" th:field="*{currentPosition}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

84
ruoyi-admin/src/main/resources/templates/individual/check/add.html

@ -1,84 +0,0 @@
<!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-check-add">
<div class="form-group">
<label class="col-sm-3 control-label">打卡人姓名:</label>
<div class="col-sm-8">
<input name="checkName" 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">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">健康状况:</label>
<div class="col-sm-8">
<input name="state" 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="isHigh" 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="isTouch" 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" 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="checkDatetime" 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-8">
<input name="currentPosition" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/check"
$("#form-check-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-check-add').serialize());
}
}
$("input[name='checkDatetime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

207
ruoyi-admin/src/main/resources/templates/individual/check/check.html

@ -1,207 +0,0 @@
<!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="main-content" >
<form class="form-horizontal" id="form-check">
<div class="container-div">
<h4 class="form-header h4">打卡信息提交</h4>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">姓名:</label>
<div class="col-sm-8">
<input name="checkName" placeholder="请输入姓名" class="form-control" type="text" maxlength="30" >
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">目前位置:</label>
<div class="col-sm-8">
<div class="input-group" style="display: flex">
<input class="btn bg-olive" type="button" value="点击获取位置" onclick="clickToGetAddress()" ></input>
<input type="text" class="form-control" name="currentPosition" id="currentPosition" placeholder="目前位置" value="">
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">健康状况:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="state" placeholder="健康状况" class="form-control" type="text">
<span class="input-group-addon"><i class="fa fa-user"></i></span>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">打卡时间:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="checkDatetime" class="form-control " type="date" placeholder="打卡时间">
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">体温:</label>
<div class="col-sm-8">
<input name="temperature" class="form-control" type="text" placeholder="体温"/>
</div>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group" style="display: flex">
<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>
</div>
</div>
<h4 class="form-header h4">其他信息</h4>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="col-xs-2 control-label">备注:</label>
<div class="col-xs-10">
<textarea name="description" maxlength="500" class="form-control" rows="3" placeholder="个人状况描述"></textarea>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-offset-5 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitCheck()"><i class="fa fa-check"></i>保 存</button>&nbsp;
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script src="http://api.map.baidu.com/api?v=1.4" type="text/javascript"></script>
<script >
var prefix = ctx + "individual/check";
$("#form-check").validate({
//首字母默认大写
onkeyup: false,
rules:{
checkName:{
isUserName:true,
},
currentPosition:{
},
state:{
},
checkDatetime:{
},
temperature:{
isTemperature:true
},
},
description: {
},
});
function submitCheck () {
if ($.validate.form()) {
var data = $("#form-check").serializeArray();
var isTouch = $("input[id='isTouch']").is(':checked') == true ? 0 : 1;
var isHigh = $("input[id='isHigh']").is(':checked') == true ? 0 : 1;
data.push({"checkName": "isTouch", "value": isTouch});
data.push({"checkName": "isHigh", "value": isHigh});
$.operate.saveTab(prefix+"/add", data);
}
}
$(document).ready(function() {
$('#datepicker-a3').datetimepicker({
format : "yyyy-mm-dd hh:ii",
autoclose : true,
todayBtn : true,
language : "zh-CN"
});
});
//获取位置
function getLocation() {
var options = {
enableHighAccuracy : true,
maximumAge : 1000
}
if (navigator.geolocation) {
//浏览器支持geolocation
navigator.geolocation.getCurrentPosition(onSuccess, onError, options);
} else {
//浏览器不支持geolocation
alert('您的浏览器不支持地理位置定位');
}
}
//成功时
function onSuccess(position) {
//返回用户位置
//经度
var longitude = position.coords.longitude;
//纬度
var latitude = position.coords.latitude;
document.getElementById("currentPosition").value= `当前经纬度:经度 ${longitude},纬度 ${latitude}`
//根据经纬度获取地理位置,不太准确,获取城市区域还是可以的
var map = new BMap.Map("allmap");
var point = new BMap.Point(longitude, latitude);
var gc = new BMap.Geocoder();
gc.getLocation(point, function(rs) {
var addComp = rs.addressComponents;
document.getElementById("currentPosition").value=`${addComp.province}, ${addComp.city}, ${addComp.district}`
});
// 这里后面可以写你的后续操作了
postData(longitude, latitude);
}
//失败时
function onError(error) {
switch (error.code) {
case 1:
alert("位置服务被拒绝");
break;
case 2:
alert("暂时获取不到位置信息");
break;
case 3:
alert("获取信息超时");
break;
case 4:
alert("未知错误");
break;
}
// 这里后面可以写你的后续操作了
}
//获取地理位置
const clickToGetAddress = () => {
getLocation();
}
</script>
</body>
</html>

85
ruoyi-admin/src/main/resources/templates/individual/check/edit.html

@ -1,85 +0,0 @@
<!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-check-edit" th:object="${check}">
<input name="checkId" th:field="*{checkId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">打卡人姓名:</label>
<div class="col-sm-8">
<input name="checkName" th:field="*{checkName}" 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" 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="state" th:field="*{state}" 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="isHigh" th:field="*{isHigh}" 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="isTouch" th:field="*{isTouch}" 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">
<div class="input-group date">
<input name="checkDatetime" th:value="${#dates.format(check.checkDatetime, '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-8">
<input name="currentPosition" th:field="*{currentPosition}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/check";
$("#form-check-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-check-edit').serialize());
}
}
$("input[name='checkDatetime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

23
ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html

@ -75,6 +75,12 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">身份证:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="idNumber" maxlength="18" th:field="*{idNumber}" placeholder="请输入身份证号码">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">邮箱:</label> <label class="col-sm-2 control-label">邮箱:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" maxlength="50" class="form-control" name="email" th:field="*{email}" placeholder="请输入邮箱"> <input type="text" maxlength="50" class="form-control" name="email" th:field="*{email}" placeholder="请输入邮箱">
@ -217,6 +223,23 @@
} }
} }
}, },
idNumber:{
required:true,
isIdentity18:true,
remote: {
url: prefix + "system/user/checkIdNumberUnique",
type: "post",
dataType: "json",
data: {
"userId": function() {
return $("#userId").val();
},
"idNumber": function () {
return $.common.trim($("#idNumber").val());
}
}
}
},
}, },
messages: { messages: {
"userName": { "userName": {

157
ruoyi-system/src/main/java/com/ruoyi/system/domain/Check.java

@ -1,157 +0,0 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.xss.Xss;
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;
import org.apache.ibatis.annotations.Param;
import javax.validation.constraints.Size;
/**
* 个人打卡对象 check
*
* @author zlx
* @date 2023-04-22
*/
public class Check extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 打卡id */
private Long checkId;
/** 打卡人姓名 */
@Excel(name = "打卡人姓名")
private String checkName;
/** 体温 */
@Excel(name = "体温")
private String temperature;
/** 健康状况 */
@Excel(name = "健康状况")
private String state;
/** 是否去过高风险地区 */
@Excel(name = "是否去过高风险地区")
private Integer isHigh;
/** 是否接触过密接人员 */
@Excel(name = "是否接触过密接人员")
private Integer isTouch;
/** 个人状况描述 */
@Excel(name = "个人状况描述")
private String description;
/** 当前时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "当前时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date checkDatetime;
/** 打卡位置 */
@Excel(name = "打卡位置")
private String currentPosition;
public void setCheckId(Long checkId)
{
this.checkId = checkId;
}
public Long getCheckId()
{
return checkId;
}
public void setCheckName(String checkName)
{
this.checkName = checkName;
}
@Xss(message = "用户昵称不能包含脚本字符")
@Size(min = 2, max = 30, message = "不能为空,用户昵称长度不能超过30个字符")
public String getCheckName()
{
return checkName;
}
public void setTemperature(String temperature)
{
this.temperature = temperature;
}
@Size(min = 2, message = "体温只能为数字")
public String getTemperature()
{
return temperature;
}
public void setState(String state)
{
this.state = state;
}
public String getState()
{
return state;
}
public void setIsHigh(Integer isHigh)
{
this.isHigh = isHigh;
}
public Integer getIsHigh()
{
return isHigh;
}
public void setIsTouch(Integer isTouch)
{
this.isTouch = isTouch;
}
public Integer getIsTouch()
{
return isTouch;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setCheckDatetime(Date checkDatetime)
{
this.checkDatetime = checkDatetime;
}
public Date getCheckDatetime()
{
return checkDatetime;
}
public void setCurrentPosition(String currentPosition)
{
this.currentPosition = currentPosition;
}
public String getCurrentPosition()
{
return currentPosition;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("checkId", getCheckId())
.append("checkName", getCheckName())
.append("temperature", getTemperature())
.append("state", getState())
.append("isHigh", getIsHigh())
.append("isTouch", getIsTouch())
.append("description", getDescription())
.append("checkDatetime", getCheckDatetime())
.append("currentPosition", getCurrentPosition())
.toString();
}
}

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

@ -1,10 +1,15 @@
package com.ruoyi.system.domain; package com.ruoyi.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.xss.Xss;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import javax.validation.constraints.Size;
import java.util.Date;
/** /**
* 打卡管理对象 check_manage * 打卡管理对象 check_manage
* *
@ -22,108 +27,84 @@ public class CheckManage extends BaseEntity
@Excel(name = "打卡人姓名") @Excel(name = "打卡人姓名")
private String checkName; private String checkName;
/** 打卡人年龄 */ /** 体温 */
@Excel(name = "打卡人年龄") @Excel(name = "体温")
private String checkAge; private String temperature;
/** 打卡人性别 */
@Excel(name = "打卡人性别")
private Integer checkSex;
/** 身份证 */
@Excel(name = "身份证")
private String patientIdCard;
/** 确诊状态 */ /** 健康状况 */
@Excel(name = "确诊状态") @Excel(name = "健康状况")
private Integer isDiagnosed; private String healthState;
/** 治愈状态 */ /** 是否去过高风险地区 */
@Excel(name = "治愈状态") @Excel(name = "是否去过高风险地区")
private Integer isCure; private Integer isHigh;
/** 密接状态 */ /** 是否接触过密接人员 */
@Excel(name = "密接状态") @Excel(name = "是否接触过密接人员")
private Integer isTouch; private Integer isTouch;
/** 死亡状态 */
@Excel(name = "死亡状态")
private Integer isDead;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
private String description; private String description;
/** 最近接触地区 */ /** 当前时间 */
@Excel(name = "最近接触地区") @JsonFormat(pattern = "yyyy-MM-dd")
private String checkPostition; @Excel(name = "当前时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date checkDatetime;
/** 体温 */ /** 打卡位置 */
@Excel(name = "体温") @Excel(name = "打卡位置")
private String temperature; private String currentPosition;
public void setCheckManageId(Long checkManageId) /** 当前使用电话 */
{ @Excel(name = "当前使用电话")
this.checkManageId = checkManageId; private String checkPhonenumber;
}
public Long getCheckManageId() public Long getCheckManageId() {
{
return checkManageId; return checkManageId;
} }
public void setCheckManageId(Long checkManageId) {
this.checkManageId = checkManageId;
}
public void setCheckName(String checkName) public void setCheckName(String checkName)
{ {
this.checkName = checkName; this.checkName = checkName;
} }
@Xss(message = "用户昵称不能包含脚本字符")
@Size(min = 2, max = 30, message = "不能为空,用户昵称长度不能超过30个字符")
public String getCheckName() public String getCheckName()
{ {
return checkName; return checkName;
} }
public void setCheckAge(String checkAge) public void setTemperature(String temperature)
{
this.checkAge = checkAge;
}
public String getCheckAge()
{
return checkAge;
}
public void setCheckSex(Integer checkSex)
{
this.checkSex = checkSex;
}
public Integer getCheckSex()
{
return checkSex;
}
public void setPatientIdCard(String patientIdCard)
{ {
this.patientIdCard = patientIdCard; this.temperature = temperature;
} }
public String getPatientIdCard() @Size(min = 2, message = "体温只能为数字")
public String getTemperature()
{ {
return patientIdCard; return temperature;
} }
public void setIsDiagnosed(Integer isDiagnosed) public void setHealthState(String healthState)
{ {
this.isDiagnosed = isDiagnosed; this.healthState = healthState;
} }
public Integer getIsDiagnosed() public String getHealthState()
{ {
return isDiagnosed; return healthState;
} }
public void setIsCure(Integer isCure) public void setIsHigh(Integer isHigh)
{ {
this.isCure = isCure; this.isHigh = isHigh;
} }
public Integer getIsCure() public Integer getIsHigh()
{ {
return isCure; return isHigh;
} }
public void setIsTouch(Integer isTouch) public void setIsTouch(Integer isTouch)
{ {
@ -134,15 +115,6 @@ public class CheckManage extends BaseEntity
{ {
return isTouch; return isTouch;
} }
public void setIsDead(Integer isDead)
{
this.isDead = isDead;
}
public Integer getIsDead()
{
return isDead;
}
public void setDescription(String description) public void setDescription(String description)
{ {
this.description = description; this.description = description;
@ -152,40 +124,45 @@ public class CheckManage extends BaseEntity
{ {
return description; return description;
} }
public void setCheckPostition(String checkPostition) public void setCheckDatetime(Date checkDatetime)
{ {
this.checkPostition = checkPostition; this.checkDatetime = checkDatetime;
} }
public Date getCheckDatetime()
public String getCheckPostition()
{ {
return checkPostition; return checkDatetime;
} }
public void setTemperature(String temperature) public void setCurrentPosition(String currentPosition)
{ {
this.temperature = temperature; this.currentPosition = currentPosition;
} }
public String getTemperature() public String getCurrentPosition()
{ {
return temperature; return currentPosition;
}
public String getCheckPhonenumber() {
return checkPhonenumber;
}
public void setCheckPhonenumber(String checkPhonenumber) {
this.checkPhonenumber = checkPhonenumber;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("checkManageId", getCheckManageId()) .append("checkMangeId", getCheckManageId())
.append("checkName", getCheckName()) .append("checkName", getCheckName())
.append("checkAge", getCheckAge()) .append("temperature", getTemperature())
.append("checkSex", getCheckSex()) .append("healthState", getHealthState())
.append("patientIdCard", getPatientIdCard()) .append("isHigh", getIsHigh())
.append("isDiagnosed", getIsDiagnosed())
.append("isCure", getIsCure())
.append("isTouch", getIsTouch()) .append("isTouch", getIsTouch())
.append("isDead", getIsDead())
.append("description", getDescription()) .append("description", getDescription())
.append("checkPostition", getCheckPostition()) .append("checkDatetime", getCheckDatetime())
.append("temperature", getTemperature()) .append("currentPosition", getCurrentPosition())
.append("checkPhonenumber", getCheckPhonenumber())
.toString(); .toString();
} }
} }

2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/CheckManageMapper.java

@ -65,5 +65,5 @@ public interface CheckManageMapper
* @param patientIdCard 身份证 * @param patientIdCard 身份证
* @return 患者信息 * @return 患者信息
*/ */
public CheckManage selectCheckByPatientIdCard(String patientIdCard); public CheckManage selectCheckByPhonenumber(String patientIdCard);
} }

24
ruoyi-system/src/main/java/com/ruoyi/system/mapper/CheckMapper.java

@ -1,24 +0,0 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.Check;
/**
* 个人打卡Mapper接口
*
* @author zlx
* @date 2023-04-22
*/
public interface CheckMapper
{
/**
* 新增个人打卡
*
* @param check 个人打卡
* @return 结果
*/
public int insertCheck(Check check);
}

23
ruoyi-system/src/main/java/com/ruoyi/system/service/ICheckService.java

@ -1,23 +0,0 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.Check;
/**
* 个人打卡Service接口
*
* @author zlx
* @date 2023-04-22
*/
public interface ICheckService
{
/**
* 新增个人打卡
*
* @param check 个人打卡
* @return 结果
*/
public int insertCheck(Check check);
}

10
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CheckManageServiceImpl.java

@ -117,13 +117,13 @@ public class CheckManageServiceImpl implements ICheckManageService
try try
{ {
// 验证是否存在这个患者 // 验证是否存在这个患者
CheckManage p = checkManageMapper.selectCheckByPatientIdCard(checkManage.getPatientIdCard()); CheckManage p = checkManageMapper.selectCheckByPhonenumber(checkManage.getCheckPhonenumber());
if (StringUtils.isNull(p)) if (StringUtils.isNull(p))
{ {
BeanValidators.validateWithException(validator, checkManage); BeanValidators.validateWithException(validator, checkManage);
this.insertCheckManage(checkManage); this.insertCheckManage(checkManage);
successNum++; successNum++;
successMsg.append("<br/>" + successNum + "、身份证: " + checkManage.getPatientIdCard() + " 导入成功"); successMsg.append("<br/>" + successNum + "、电话为: " + checkManage.getCheckPhonenumber() + " 的打卡信息导入成功");
} }
else if (isUpdateSupport) else if (isUpdateSupport)
{ {
@ -131,18 +131,18 @@ public class CheckManageServiceImpl implements ICheckManageService
checkManage.setCheckManageId(p.getCheckManageId()); checkManage.setCheckManageId(p.getCheckManageId());
this.updateCheckManage(checkManage); this.updateCheckManage(checkManage);
successNum++; successNum++;
successMsg.append("<br/>" + successNum + "、身份证: " + checkManage.getPatientIdCard() + " 的打卡信息更新成功"); successMsg.append("<br/>" + successNum + "、电话为 " + checkManage.getCheckName() + " 的打卡信息更新成功");
} }
else else
{ {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证 " + checkManage.getPatientIdCard() + " 已存在"); failureMsg.append("<br/>" + failureNum + "、电话为 " + checkManage.getCheckPhonenumber() + " 已存在");
} }
} }
catch (Exception e) catch (Exception e)
{ {
failureNum++; failureNum++;
String msg = "<br/>" + failureNum + "、身份证 " + checkManage.getPatientIdCard() + " 导入失败:"; String msg = "<br/>" + failureNum + "、电话为 " + checkManage.getCheckPhonenumber() + " 导入失败:";
failureMsg.append(msg + e.getMessage()); failureMsg.append(msg + e.getMessage());
log.error(msg, e); log.error(msg, e);
} }

32
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CheckServiceImpl.java

@ -1,32 +0,0 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CheckMapper;
import com.ruoyi.system.domain.Check;
import com.ruoyi.system.service.ICheckService;
/**
* 个人打卡Service业务层处理
*
* @author zlx
* @date 2023-04-22
*/
@Service
public class CheckServiceImpl implements ICheckService {
@Autowired
private CheckMapper checkMapper;
/**
* 新增个人打卡
*
* @param check 个人打卡
* @return 结果
*/
@Override
public int insertCheck(Check check) {
return checkMapper.insertCheck(check);
}
}

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

@ -31,7 +31,6 @@ import com.ruoyi.system.mapper.SysUserPostMapper;
import com.ruoyi.system.mapper.SysUserRoleMapper; import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.system.service.ISysUserService;
/** /**
* 用户 业务层处理 * 用户 业务层处理

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

@ -7,37 +7,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="CheckManage" id="CheckManageResult"> <resultMap type="CheckManage" id="CheckManageResult">
<result property="checkManageId" column="check_manage_id" /> <result property="checkManageId" column="check_manage_id" />
<result property="checkName" column="check_name" /> <result property="checkName" column="check_name" />
<result property="checkSex" column="check_sex" /> <result property="checkPhonenumber" column="check_phonenumber" />
<result property="patientIdCard" column="patient_id_card" /> <result property="temperature" column="temperature" />
<result property="isDiagnosed" column="is_diagnosed" /> <result property="healthState" column="health_state" />
<result property="isCure" column="is_cure" /> <result property="currentPosition" column="current_position" />
<result property="isHigh" column="is_high" />
<result property="isTouch" column="is_touch" /> <result property="isTouch" column="is_touch" />
<result property="isDead" column="is_dead" />
<result property="description" column="description" /> <result property="description" column="description" />
<result property="checkPostition" column="check_postition" /> <result property="checkDatetime" column="check_datetime" />
<result property="temperature" column="temperature" />
</resultMap> </resultMap>
<sql id="selectCheckManageVo"> <sql id="selectCheckManageVo">
select check_manage_id, check_name, check_sex, patient_id_card, is_diagnosed, is_cure, is_touch, is_dead, description, check_postition, temperature from check_manage select check_manage_id, check_name, temperature, health_state, is_high, is_touch, description, check_datetime, current_position, check_phonenumber
from check_manage
</sql> </sql>
<select id="selectCheckManageList" parameterType="CheckManage" resultMap="CheckManageResult"> <select id="selectCheckManageList" parameterType="CheckManage" resultMap="CheckManageResult">
<include refid="selectCheckManageVo"/> <include refid="selectCheckManageVo"/>
<where> <where>
<if test="checkName != null and checkName != ''"> and check_name like concat('%', #{checkName}, '%')</if> <if test="checkName != null and checkName != ''"> and check_name like concat('%', #{checkName}, '%')</if>
<if test="checkSex != null "> and check_sex = #{checkSex}</if> <if test="healthState != null and healthState != ''"> and health_state = #{healthState}</if>
<if test="patientIdCard != null and patientIdCard != ''"> and patient_id_card = #{patientIdCard}</if> <if test="checkPhonenumber != null and checkPhonenumber != ''"> and check_phonenumber = #{checkPhonenumber}</if>
<if test="isDiagnosed != null "> and is_diagnosed = #{isDiagnosed}</if>
<if test="isCure != null "> and is_cure = #{isCure}</if>
<if test="isTouch != null "> and is_touch = #{isTouch}</if>
<if test="isDead != null "> and is_dead = #{isDead}</if>
<if test="description != null and description != ''"> and description = #{description}</if> <if test="description != null and description != ''"> and description = #{description}</if>
<if test="checkPostition != null and checkPostition != ''"> and check_postition = #{checkPostition}</if> <if test="currentPosition != null and currentPosition != ''"> and current_position = #{currentPosition}</if>
<if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if> <if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if>
<if test="checkDatetime != null "> and check_datetime = #{checkDatetime}</if>
<if test="isHigh != null and isHigh != ''"> and is_high = #{isHigh}</if>
<if test="isTouch != null and isTouch != ''"> and is_touch = #{isTouch}</if>
</where> </where>
</select> </select>
<select id="selectCheckManageByCheckManageId" parameterType="Long" resultMap="CheckManageResult"> <select id="selectCheckManageByCheckManageId" parameterType="Long" resultMap="CheckManageResult">
<include refid="selectCheckManageVo"/> <include refid="selectCheckManageVo"/>
where check_manage_id = #{checkManageId} where check_manage_id = #{checkManageId}
@ -46,28 +44,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertCheckManage" parameterType="CheckManage" useGeneratedKeys="true" keyProperty="checkManageId"> <insert id="insertCheckManage" parameterType="CheckManage" useGeneratedKeys="true" keyProperty="checkManageId">
insert into check_manage insert into check_manage
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="checkName != null">check_name,</if> <if test="checkName != null and checkName != ''">check_name,</if>
<if test="checkSex != null">check_sex,</if> <if test="checkPhonenumber != null and checkPhonenumber != ''">check_phonenumber,</if>
<if test="patientIdCard != null">patient_id_card,</if> <if test="temperature != null and temperature != ''">temperature,</if>
<if test="isDiagnosed != null">is_diagnosed,</if> <if test="healthState != null and healthState != ''">health_state,</if>
<if test="isCure != null">is_cure,</if> <if test="description != null and description != ''">description,</if>
<if test="isTouch != null">is_touch,</if> <if test="currentPosition != null and currentPosition != ''">current_position,</if>
<if test="isDead != null">is_dead,</if> <if test="isHigh != null and isHigh != ''">is_high,</if>
<if test="description != null">description,</if> <if test="isTouch != null and isTouch != ''">is_touch,</if>
<if test="checkPostition != null">check_postition,</if> <if test="checkDatetime != null ">check_datetime,</if>
<if test="temperature != null">temperature,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="checkName != null">#{checkName},</if> <if test="checkName != null and checkName != ''">#{checkName},</if>
<if test="checkSex != null">#{checkSex},</if> <if test="checkPhonenumber != null and checkPhonenumber != ''">#{checkPhonenumber},</if>
<if test="patientIdCard != null">#{patientIdCard},</if> <if test="temperature != null and temperature != ''">#{temperature},</if>
<if test="isDiagnosed != null">#{isDiagnosed},</if> <if test="healthState != null and healthState != ''">#{healthState},</if>
<if test="isCure != null">#{isCure},</if> <if test="description != null and description != ''">#{description},</if>
<if test="isTouch != null">#{isTouch},</if> <if test="currentPosition != null and currentPosition != ''">#{currentPosition},</if>
<if test="isDead != null">#{isDead},</if> <if test="isHigh != null and isHigh != ''">#{isHigh},</if>
<if test="description != null">#{description},</if> <if test="isTouch != null and isTouch != ''">#{isTouch},</if>
<if test="checkPostition != null">#{checkPostition},</if> <if test="checkDatetime != null ">#{checkDatetime},</if>
<if test="temperature != null">#{temperature},</if>
</trim> </trim>
</insert> </insert>
@ -75,15 +71,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update check_manage update check_manage
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="checkName != null">check_name = #{checkName},</if> <if test="checkName != null">check_name = #{checkName},</if>
<if test="checkSex != null">check_sex = #{checkSex},</if> <if test="checkPhonenumber != null">check_phonenumber = #{checkPhonenumber},</if>
<if test="patientIdCard != null">patient_id_card = #{patientIdCard},</if> <if test="healthState != null">health_state = #{healthState},</if>
<if test="isDiagnosed != null">is_diagnosed = #{isDiagnosed},</if> <if test="isHigh != null">is_high = #{isHigh},</if>
<if test="isCure != null">is_cure = #{isCure},</if>
<if test="isTouch != null">is_touch = #{isTouch},</if> <if test="isTouch != null">is_touch = #{isTouch},</if>
<if test="isDead != null">is_dead = #{isDead},</if>
<if test="description != null">description = #{description},</if> <if test="description != null">description = #{description},</if>
<if test="checkPostition != null">check_postition = #{checkPostition},</if>
<if test="temperature != null">temperature = #{temperature},</if> <if test="temperature != null">temperature = #{temperature},</if>
<if test="currentPosition != null">current_position = #{currentPosition},</if>
<if test="checkDatetime != null">check_datetime = #{checkDatetime},</if>
</trim> </trim>
where check_manage_id = #{checkManageId} where check_manage_id = #{checkManageId}
</update> </update>
@ -98,8 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{checkManageId} #{checkManageId}
</foreach> </foreach>
</delete> </delete>
<select id="selectCheckByPatientIdCard" parameterType="String" resultMap="CheckManageResult"> <select id="selectCheckByPhonenumber" parameterType="String" resultMap="CheckManageResult">
<include refid="selectCheckManageVo"/> <include refid="selectCheckManageVo"/>
where patient_id_card = #{patientIdCard} where check_phonenumber = #{checkPhonenumber}
</select> </select>
</mapper> </mapper>

44
ruoyi-system/src/main/resources/mapper/CheckMapper.xml

@ -1,44 +0,0 @@
<?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.CheckMapper">
<resultMap type="Check" id="CheckResult">
<result property="checkId" column="check_id" />
<result property="checkName" column="check_name" />
<result property="temperature" column="temperature" />
<result property="state" column="state" />
<result property="isHigh" column="is_high" />
<result property="isTouch" column="is_touch" />
<result property="description" column="description" />
<result property="checkDatetime" column="check_datetime" />
<result property="currentPosition" column="current_position" />
</resultMap>
<insert id="insertCheck" parameterType="Check" useGeneratedKeys="true" keyProperty="checkId">
insert into individual_check
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="checkName != null and checkName != ''">check_name,</if>
<if test="temperature != null and temperature != ''">temperature,</if>
<if test="state != null and state != ''">state,</if>
<if test="description != null and description != ''">description,</if>
<if test="isHigh != null ">is_high,</if>
<if test="isTouch != null ">is_touch,</if>
<if test="currentPosition != null and currentPosition != ''">current_position,</if>
<if test="checkDatetime != null ">check_datetime,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="checkName != null and checkName != ''">#{checkName},</if>
<if test="temperature != null and temperature != ''">#{temperature},</if>
<if test="state != null and state != ''">#{state},</if>
<if test="description != null and description != ''">#{description},</if>
<if test="isHigh != null and isHigh != ''">#{isHigh},</if>
<if test="isTouch != null and isTouch != ''">#{isTouch},</if>
<if test="currentPosition != null and currentPosition != ''">#{currentPosition},</if>
<if test="checkDatetime != null ">#{checkDatetime},</if>
</trim>
</insert>
</mapper>

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

@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectPatientManageVo"> <sql id="selectPatientManageVo">
select patient_id, patient_name, patient_age, patient_sex, patient_id_card, description, curren_postition, temperature, diagnosed_time, is_diagnosed, is_cure, is_touch, is_dead from patient_manage select patient_id, patient_name, patient_age, patient_sex, patient_id_card, description, current_position, temperature, diagnosed_time, is_diagnosed, is_cure, is_touch, is_dead from patient_manage
</sql> </sql>
<select id="selectPatientManageList" parameterType="PatientManage" resultMap="PatientManageResult"> <select id="selectPatientManageList" parameterType="PatientManage" resultMap="PatientManageResult">
@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="patientSex != null and patientSex != ''"> and patient_sex = #{patientSex}</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="patientIdCard != null and patientIdCard != ''"> and patient_id_card = #{patientIdCard}</if>
<if test="description != null and description != ''"> and description = #{description}</if> <if test="description != null and description != ''"> and description = #{description}</if>
<if test="currentPosition != null and currentPosition != ''"> and curren_postition = #{currentPosition}</if> <if test="currentPosition != null and currentPosition != ''"> and current_position = #{currentPosition}</if>
<if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if> <if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if>
<if test="diagnosedTime != null "> and diagnosed_time = #{diagnosedTime}</if> <if test="diagnosedTime != null "> and diagnosed_time = #{diagnosedTime}</if>
<if test="isDiagnosed != null "> and is_diagnosed = #{isDiagnosed}</if> <if test="isDiagnosed != null "> and is_diagnosed = #{isDiagnosed}</if>
@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="patientSex != null">patient_sex,</if> <if test="patientSex != null">patient_sex,</if>
<if test="patientIdCard != null">patient_id_card,</if> <if test="patientIdCard != null">patient_id_card,</if>
<if test="description != null">description,</if> <if test="description != null">description,</if>
<if test="currentPosition != null">curren_postition,</if> <if test="currentPosition != null">current_position,</if>
<if test="temperature != null">temperature,</if> <if test="temperature != null">temperature,</if>
<if test="diagnosedTime != null">diagnosed_time,</if> <if test="diagnosedTime != null">diagnosed_time,</if>
<if test="isDiagnosed != null">is_diagnosed,</if> <if test="isDiagnosed != null">is_diagnosed,</if>
@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="patientSex != null">patient_sex = #{patientSex},</if> <if test="patientSex != null">patient_sex = #{patientSex},</if>
<if test="patientIdCard != null">patient_id_card = #{patientIdCard},</if> <if test="patientIdCard != null">patient_id_card = #{patientIdCard},</if>
<if test="description != null">description = #{description},</if> <if test="description != null">description = #{description},</if>
<if test="currentPosition != null">curren_postition = #{currentPosition},</if> <if test="currentPosition != null">current_position = #{currentPosition},</if>
<if test="temperature != null">temperature = #{temperature},</if> <if test="temperature != null">temperature = #{temperature},</if>
<if test="diagnosedTime != null">diagnosed_time = #{diagnosedTime},</if> <if test="diagnosedTime != null">diagnosed_time = #{diagnosedTime},</if>
<if test="isDiagnosed != null">is_diagnosed = #{isDiagnosed},</if> <if test="isDiagnosed != null">is_diagnosed = #{isDiagnosed},</if>

Loading…
Cancel
Save