Browse Source

死亡管理,治愈管理数据移交完成,面对重复数据错误尚未解决

ry
loser 1 year ago
parent
commit
7c99a0cdc8
  1. 2
      ruoyi-admin/src/main/resources/application.yml
  2. 277
      ruoyi-admin/src/main/resources/templates/main.html
  3. 19
      ruoyi-admin/src/main/resources/templates/patient/patientManage/addCure.html
  4. 28
      ruoyi-admin/src/main/resources/templates/patient/patientManage/addDead.html
  5. 14
      ruoyi-admin/src/main/resources/templates/patient/patientManage/edit.html
  6. 3
      ruoyi-admin/src/main/resources/templates/patient/patientManage/patientManage.html
  7. 2
      ruoyi-admin/src/main/resources/templates/patientCure/cure/cure.html
  8. 5
      ruoyi-admin/src/main/resources/templates/patientDead/dead/dead.html
  9. 7
      ruoyi-system/pom.xml
  10. 4
      ruoyi-system/src/main/java/com/ruoyi/system/domain/ECharts.java
  11. 4
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientManageMapper.java
  12. 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientManageServiceImpl.java
  13. 5
      ruoyi-system/src/main/resources/mapper/PatientManageMapper.xml

2
ruoyi-admin/src/main/resources/application.yml

@ -7,7 +7,7 @@ ruoyi:
# 版权年份 # 版权年份
copyrightYear: 2023 copyrightYear: 2023
# 实例演示开关 # 实例演示开关
demoEnabled: false demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
profile: D:/ruoyi/uploadPath profile: D:/ruoyi/uploadPath
# 获取ip地址开关 # 获取ip地址开关

277
ruoyi-admin/src/main/resources/templates/main.html

@ -4,12 +4,287 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--360浏览器优先以webkit内核解析--> <!--360浏览器优先以webkit内核解析-->
<title>若依介绍</title> <title>首页</title>
<link rel="shortcut icon" href="favicon.ico"> <link rel="shortcut icon" href="favicon.ico">
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/> <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/> <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/> <link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/>
</head> </head>
<body class="gray-bg">
<div class="row border-bottom white-bg dashboard-header">
<div class="col-sm-12">
<p> 病毒无情,人有情! <a href="https://news.sina.cn/zt_d/yiqing0121" target="_blank">了解更多疫情信息</a>
</p>
<p>更多疫情防护小妙招:<a href="https://zhuanlan.zhihu.com/p/568304798" target="_blank">https://zhuanlan.zhihu.com/p/568304798/</a>
</p>
</div>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="echarts" id="echarts-line-chart"></div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="echarts" id="echarts-pie-chart"></div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="echarts" id="echarts-bar-chart"></div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="echarts" id="echarts-nd-chart"></div>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: echarts-js" />
<script type="text/javascript">
$(function () {
//线图
var lineChart = echarts.init(document.getElementById("echarts-line-chart"));
var lineoption = {
title : {
text: '一周内感染人数状态'
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['死亡','健在']
},
grid:{
x:40,
x2:40,
y2:24
},
calculable : true,
xAxis : [
{
type : 'category',
boundaryGap : false,
data :['周一','周二','周三','周四','周五','周六','周日']
}
],
yAxis : [
{
type : 'value',
axisLabel : {
formatter: '{value} °C'
}
}
],
series : [
{
name:'死亡',
type:'line',
data:[11, 11, 15, 13, 12, 13, 10],
markPoint : {
data : [
{type : 'max', name: '最大值'},
{type : 'min', name: '最小值'}
]
},
markLine : {
data : [
{type : 'average', name: '平均值'}
]
}
},
{
name:'健在',
type:'line',
data:[1, -2, 2, 5, 3, 2, 0],
markPoint : {
data : [
{name : '周最低', value : -2, xAxis: 1, yAxis: -1.5}
]
},
markLine : {
data: [
{type: 'average', name: '平均值'}
]
}
}
]
};
lineChart.setOption(lineoption);
$(window).resize(lineChart.resize);
//饼图
var pieChart = echarts.init(document.getElementById("echarts-pie-chart"));
var pieoption = {
title : {
text: '患者年龄岁数',
x:'center'
},
tooltip : {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient : 'vertical',
x : 'left',
data:['0-10','10-20','20-30','30-40','40-50','50-60','70以上']
},
calculable : true,
series : [
{
name:'岁数占比',
type:'pie',
radius : ['30%', '70%'],
center: ['50%', '60%'],
data:[
{value:335, name:'0-10'},
{value:310, name:'10-20'},
{value:234, name:'20-30'},
{value:135, name:'30-40'},
{value:1548, name:'40-50'},
{value:548, name:'50-60'},
{value:548, name:'70以上'}
]
}
]
};
pieChart.setOption(pieoption);
$(window).resize(pieChart.resize);
//柱状图
var barChart = echarts.init(document.getElementById("echarts-bar-chart"));
var baroption = {
title : {
text: '14天打卡人体温区间'
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['女性','男性']
},
grid:{
x:30,
x2:40,
y2:24
},
calculable : true,
xAxis : [
{
type : 'category',
data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月','13','14']
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'女性',
type:'bar',
data:[36.5, 37.9, 37.0, 40.2, 39.6, 36.7, 35.6, 36.2, 36.6, 40.0, 36.4, 38.3, 36.4, 38.3],
markPoint : {
data : [
{type : 'max', name: '最大值'},
{type : 'min', name: '最小值'}
]
},
markLine : {
data : [
{type : 'average', name: '平均值'}
]
}
},
{
name:'男性',
type:'bar',
data:[36.5, 37.9, 36.0, 38.2, 36.6, 37.7, 39.6, 36.2, 36.6, 40.0, 36.9, 37.3, 36.4, 38.3],
markPoint : {
data : [
{name : '年最高', value : 42, xAxis: 7, yAxis: 183, symbolSize:18},
{name : '年最低', value : 36.0, xAxis: 11, yAxis: 3}
]
},
markLine : {
data : [
{type : 'average', name : '平均值'}
]
}
}
]
};
barChart.setOption(baroption);
window.onresize = barChart.resize;
//南丁格尔图
var ndChart = echarts.init(document.getElementById("echarts-nd-chart"));
var ndoption = {
title:{
text: '患者地区分布'
},
color: ['#006cff', '#66cdff', 'gray' , 'brown'],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: [{
icon: "bar",
orient: "vertical",
top: "center",
left: 'left',
itemGap: 15,
textStyle: {
color: "rgba(0,0,0,.5)",
fontSize: "12"
}
}],
series: [
{
name: '患者地区分布',
type: 'pie',
radius: ['10%', '70%'],
center: ['50%', '50%'],
// area面积模式 radius半径模式
roseType: 'radius',
itemStyle: {
borderRadius: 5
},
data: [
{ value: 26, name: "分宜县" },
{ value: 20, name: "渝水区" },
{ value: 18, name: "仙女湖风景名胜区" },
{ value: 22, name: "新余高新技术产业开发区" }
],
label: {
fontSize: 12
},
labelLine: {
// length是链接图形的线,length2是连接length和文字的线
lengthL: 6,
length2: 8
}
}
]
};
ndChart.setOption(ndoption);
window.onresize = ndChart.resize;
});
</script>
</body>
</html> </html>

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

@ -64,7 +64,15 @@
</div> </div>
</div> </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" readonly="true" th:field="*{isDead}" value="1" id="alive" name="isDead" checked>健在</label>
<label class="radio-box">
<input type="radio" readonly="true" th:field="*{isDead}" value="0" id="dead" name="isDead" >已死亡</label>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-sm-offset-5 col-sm-10"> <div class="col-sm-offset-5 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp; <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
@ -76,14 +84,17 @@
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "patientDead/dead"; var prefix = ctx + "patientCure/cure";
var urlParams = new URLSearchParams(window.location.search);
var aId = urlParams.get("patientId");
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
if(){
$.operate.save(prefix + "/add", $('#form-patientCure-add').serialize()); $.operate.save(prefix + "/add", $('#form-patientCure-add').serialize());
} }
else alert("患者已存在")
}
location.href=ctx+"patient/patientManage";
alert("添加成功");
} }
$("input[name='diagnosedTime']").datetimepicker({ $("input[name='diagnosedTime']").datetimepicker({

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

@ -6,6 +6,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-patientDead-add" th:object="${patientManage}"> <form class="form-horizontal m" id="form-patientDead-add" th:object="${patientManage}">
<input name="patientId" th:field="*{patientId}" type="hidden"> <input name="patientId" th:field="*{patientId}" type="hidden">
<div class="form-group"> <div class="form-group">
@ -64,7 +65,15 @@
</div> </div>
</div> </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" readonly="true" th:field="*{isDead}" value="1" id="alive" name="isDead">健在</label>
<label class="radio-box">
<input type="radio" readonly="true" th:field="*{isDead}" value="0" id="dead" name="isDead" checked>已死亡</label>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-sm-offset-5 col-sm-10"> <div class="col-sm-offset-5 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp; <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
@ -77,13 +86,20 @@
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "patientDead/dead"; var prefix = ctx + "patientDead/dead";
var id=document.getElementById("patientId").id;
alert() var urlParams = new URLSearchParams(window.location.search);
var jsonData = urlParams.get("data");
var dataList = JSON.parse(jsonData)
function submitHandler() { function submitHandler() {
// if ($.validate.form()) { // for (var i = 0; i < dataList.length; i++) {
// $.operate.save(prefix + "/add", $('#form-patientDead-add').serialize()); // var data = dataList[i];
// if ($("#" + data.id).length === 0) {
// // ID在A页面不存在,调用$operate.save添加数据
// }
// } // }
alert(id) $.operate.save(prefix + "/add", $('#form-patientDead-add').serialize());
location.href=ctx+"patient/patientManage";
alert("添加成功");
} }
$("input[name='diagnosedTime']").datetimepicker({ $("input[name='diagnosedTime']").datetimepicker({

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

@ -88,13 +88,13 @@
<label class="radio-box"> <label class="radio-box">
<input type="radio" th:field="*{isEmergency}" value="0" id="unemergency" name="isEmergency"></label> <input type="radio" th:field="*{isEmergency}" value="0" id="unemergency" name="isEmergency"></label>
</div> </div>
<label class="col-sm-3 control-label">是否健在:</label> <!-- <label class="col-sm-3 control-label">目前状况:</label>-->
<div class="col-sm-3"> <!-- <div class="col-sm-3">-->
<label class="radio-box"> <!-- <label class="radio-box">-->
<input type="radio" th:field="*{isDead}" value="1" id="alive" name="isDead"></label> <!-- <input type="radio" th:field="*{isDead}" value="1" id="alive" name="isDead">健在</label>-->
<label class="radio-box"> <!-- <label class="radio-box">-->
<input type="radio" th:field="*{isDead}" value="0" id="dead" name="isDead"></label> <!-- <input type="radio" th:field="*{isDead}" value="0" id="dead" name="isDead">已死亡</label>-->
</div> <!-- </div>-->
</div> </div>
</form> </form>
</div> </div>

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

@ -168,6 +168,7 @@
/* 移交治愈 */ /* 移交治愈 */
function cure(patientId) { function cure(patientId) {
var url = prefix+'/addCure/'+patientId; var url = prefix+'/addCure/'+patientId;
$.modal.openTab("分配用户", url); $.modal.openTab("分配用户", url);
} }
@ -185,7 +186,7 @@
<div class="col-xs-offset-1"> <div class="col-xs-offset-1">
<input type="file" id="file" name="file"/> <input type="file" id="file" name="file"/>
<div class="mt10 pt5"> <div class="mt10 pt5">
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在,更新这条数据。"> 是否更新已经存在的用户数据 <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> &nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
</div> </div>
<font color="red" class="pull-left mt10"> <font color="red" class="pull-left mt10">

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

@ -163,7 +163,7 @@
<div class="col-xs-offset-1"> <div class="col-xs-offset-1">
<input type="file" id="file" name="file"/> <input type="file" id="file" name="file"/>
<div class="mt10 pt5"> <div class="mt10 pt5">
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在,更新这条数据。"> 是否更新已经存在的用户数据 <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> &nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
</div> </div>
<font color="red" class="pull-left mt10"> <font color="red" class="pull-left mt10">

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

@ -66,6 +66,7 @@
var removeFlag = [[${@permission.hasPermi('patientDead:dead:remove')}]]; var removeFlag = [[${@permission.hasPermi('patientDead:dead:remove')}]];
var prefix = ctx + "patientDead/dead"; var prefix = ctx + "patientDead/dead";
$(function() { $(function() {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
@ -154,8 +155,8 @@
}; };
$.table.init(options); $.table.init(options);
});
});
</script> </script>
</body> </body>
<script id="importTpl" type="text/template"> <script id="importTpl" type="text/template">
@ -163,7 +164,7 @@
<div class="col-xs-offset-1"> <div class="col-xs-offset-1">
<input type="file" id="file" name="file"/> <input type="file" id="file" name="file"/>
<div class="mt10 pt5"> <div class="mt10 pt5">
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在,更新这条数据。"> 是否更新已经存在的用户数据 <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> &nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
</div> </div>
<font color="red" class="pull-left mt10"> <font color="red" class="pull-left mt10">

7
ruoyi-system/pom.xml

@ -22,7 +22,12 @@
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId> <artifactId>ruoyi-common</artifactId>
</dependency> </dependency>
<!-- echarts-java映射类库 -->
<dependency>
<groupId>com.github.abel533</groupId>
<artifactId>ECharts</artifactId>
<version>3.0.0.2</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

4
ruoyi-system/src/main/java/com/ruoyi/system/domain/ECharts.java

@ -0,0 +1,4 @@
package com.ruoyi.system.domain;
public class ECharts {
}

4
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientManageMapper.java

@ -86,7 +86,7 @@ public interface PatientManageMapper
/** /**
* 新增添加治愈患者管理 * 新增添加治愈患者管理
* *
* @param patientManage 患者管理 * @param patientManage 治愈患者管理
* @return 结果 * @return 结果
*/ */
public int insertCurePatientManage(PatientManage patientManage); public int insertCurePatientManage(PatientManage patientManage);
@ -95,7 +95,7 @@ public interface PatientManageMapper
/** /**
* 新增添加死亡患者管理 * 新增添加死亡患者管理
* *
* @param patientManage 患者管理 * @param patientManage 死亡患者管理
* @return 结果 * @return 结果
*/ */
public int insertDeadPatientManage(PatientManage patientManage); public int insertDeadPatientManage(PatientManage patientManage);

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

@ -218,7 +218,7 @@ public class PatientManageServiceImpl implements IPatientManageService
@Override @Override
public int insertDeadPatientManage(PatientManage patientManage) { public int insertDeadPatientManage(PatientManage patientManage) {
return patientManageMapper.insertCurePatientManage(patientManage); return patientManageMapper.insertDeadPatientManage(patientManage);
} }
} }

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

@ -147,6 +147,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert> </insert>
<insert id="insertDeadPatientManage" parameterType="PatientManage" useGeneratedKeys="true" keyProperty="patientId"> <insert id="insertDeadPatientManage" parameterType="PatientManage" useGeneratedKeys="true" keyProperty="patientId">
DROP PROCEDURE if EXISTS addDead;
create PROCEDURE addDead()
begin
insert into patient_dead insert into patient_dead
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patientId != null">patient_id,</if> <if test="patientId != null">patient_id,</if>
@ -164,6 +167,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDead != null">is_dead,</if> <if test="isDead != null">is_dead,</if>
</trim> </trim>
select patient_id,patient_name,patient_age,patient_sex,patient_id_card,description,current_location,temperature,diagnosed_time,is_emergency,is_touch,is_high,is_dead select patient_id,patient_name,patient_age,patient_sex,patient_id_card,description,current_location,temperature,diagnosed_time,is_emergency,is_touch,is_high,is_dead
from patient_manage where patient_id not in(SELECT patient_id=#{patientId} from patient_dead ) from patient_manage where patient_id not in(SELECT patient_id=#{patientId} from patient_dead );
</insert> </insert>
</mapper> </mapper>
Loading…
Cancel
Save