From 520e98b8024878d7845426680ded1787ca600bc5 Mon Sep 17 00:00:00 2001 From: loser <12524321+loser111@user.noreply.gitee.com> Date: Thu, 25 May 2023 11:33:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=99=E5=AE=8C=E8=AE=BA=E6=96=87=E4=BA=86?= =?UTF-8?q?=EF=BC=81=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/CheckManageController.java | 2 +- .../ruoyi/web/controller/EChartsController.java | 8 +- .../web/controller/PatientCureController.java | 4 + .../web/controller/PatientDeadController.java | 3 + .../web/controller/PatientManageController.java | 35 +++- .../web/controller/supplies/NucleicController.java | 21 ++- .../web/controller/supplies/VaccineController.java | 21 ++- ruoyi-admin/src/main/resources/application.yml | 2 +- .../src/main/resources/templates/login.html | 6 +- ruoyi-admin/src/main/resources/templates/main.html | 189 +++++++++++++++++++-- .../templates/patient/patientManage/addCure.html | 2 +- .../templates/patient/patientManage/addDead.html | 2 +- .../templates/patient/patientManage/edit.html | 14 +- .../patient/patientManage/patientManage.html | 5 +- .../templates/supplies/nucleic/nucleic.html | 4 +- .../templates/supplies/vaccine/vaccine.html | 13 +- .../templates/supplies/vaccine/vaccine/edit.html | 13 +- .../main/resources/templates/system/user/add.html | 2 + .../templates/system/user/profile/profile.html | 2 +- .../com/ruoyi/supplies/mapper/NucleicMapper.java | 8 + .../com/ruoyi/supplies/mapper/VaccineMapper.java | 7 + .../java/com/ruoyi/system/domain/CheckManage.java | 4 +- .../main/java/com/ruoyi/system/domain/Nucleic.java | 30 ++-- .../java/com/ruoyi/system/domain/PatientCure.java | 11 +- .../java/com/ruoyi/system/domain/PatientDead.java | 13 +- .../com/ruoyi/system/domain/PatientManage.java | 12 +- .../ruoyi/system/mapper/PatientManageMapper.java | 16 ++ .../com/ruoyi/system/service/INucleicService.java | 9 + .../system/service/IPatientManageService.java | 4 + .../com/ruoyi/system/service/IVaccineService.java | 9 + .../service/impl/CheckManageServiceImpl.java | 2 +- .../system/service/impl/NucleicServiceImpl.java | 25 ++- .../service/impl/PatientManageServiceImpl.java | 10 +- .../system/service/impl/VaccineServiceImpl.java | 22 ++- .../main/resources/mapper/PatientManageMapper.xml | 22 ++- .../resources/mapper/supplies/NucleicMapper.xml | 3 + .../resources/mapper/supplies/VaccineMapper.xml | 3 + 37 files changed, 441 insertions(+), 117 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CheckManageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CheckManageController.java index a9a4cd9..9562cd2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CheckManageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CheckManageController.java @@ -58,7 +58,7 @@ public class CheckManageController extends BaseController return getDataTable(list); } /** - * 导入患者管理列表 + * 导入打卡管理列表 */ @Log(title = "患者管理", businessType = BusinessType.IMPORT) @RequiresPermissions("check:checkManage:import") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/EChartsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/EChartsController.java index 697aea5..fbbe000 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/EChartsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/EChartsController.java @@ -18,11 +18,11 @@ public class EChartsController { { Option option = new Option(); option.tooltip().show(true); - option.legend().data("销量"); + option.legend().data(); ValueAxis valueAxis = new ValueAxis(); valueAxis.type(AxisType.category); - valueAxis.data("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月","13","14"); + valueAxis.data(); option.xAxis(valueAxis); CategoryAxis categoryAxis = new CategoryAxis(); @@ -30,9 +30,9 @@ public class EChartsController { option.yAxis(categoryAxis); Bar bar = new Bar(); - bar.name("女性").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); + bar.name("女性").data(); Bar bar2 = new Bar(); - bar2.name("男性").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); + bar2.name("男性").data(); option.series(bar2); return option; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientCureController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientCureController.java index 46d2ca2..ed1172e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientCureController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientCureController.java @@ -2,6 +2,7 @@ package com.ruoyi.web.controller; import java.util.List; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.PatientCure; import com.ruoyi.system.service.IPatientCureService; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -99,6 +100,9 @@ public class PatientCureController extends BaseController @ResponseBody public AjaxResult editSave(PatientCure patientCure) { + if(StringUtils.isEmpty(patientCure.getPatientIdCard())){ + return error("身份证不为空"); + } return toAjax(patientCureService.updatePatientCure(patientCure)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientDeadController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientDeadController.java index a8f08b4..75c46cc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientDeadController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientDeadController.java @@ -117,6 +117,9 @@ public class PatientDeadController extends BaseController { return error("新增患者'" + patientDead.getPatientName() + "'失败,身份证已存在"); } + if(StringUtils.isEmpty(patientDead.getPatientIdCard())){ + return error("身份证不为空"); + } return toAjax(patientDeadService.updatePatientDead(patientDead)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientManageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientManageController.java index af96ab5..b892659 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientManageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/PatientManageController.java @@ -83,6 +83,9 @@ public class PatientManageController extends BaseController { return error("新增患者'" + patientManage.getPatientName() + "'失败,身份证已存在"); } + if(StringUtils.isEmpty(patientManage.getPatientIdCard())){ + return error("身份证不为空"); + } return toAjax(patientManageService.insertPatientManage(patientManage)); } @@ -111,6 +114,9 @@ public class PatientManageController extends BaseController { return error("新增患者'" + patientManage.getPatientName() + "'失败,身份证已存在"); } + if(StringUtils.isEmpty(patientManage.getPatientIdCard())){ + return error("身份证不为空"); + } return toAjax(patientManageService.updatePatientManage(patientManage)); } @@ -201,7 +207,7 @@ public class PatientManageController extends BaseController @Log(title = "添加治愈患者", businessType = BusinessType.INSERT) @PostMapping("/addCure") @ResponseBody - public AjaxResult addCure(@Validated PatientManage patientManage) + public AjaxResult addCureSave(@Validated PatientManage patientManage) { if (StringUtils.isNotEmpty(patientManage.getPatientIdCard()) && !patientManageService.checkPatientIdCardUnique(patientManage)) @@ -214,7 +220,7 @@ public class PatientManageController extends BaseController /** * 添加患者信息至死亡管理 */ - @RequiresPermissions("patient:patientManage:addCure") + @RequiresPermissions("patient:patientManage:addDead") @GetMapping("/addDead/{patientId}") public String addDead(@PathVariable("patientId") Long patientId, ModelMap mmap) { @@ -230,7 +236,7 @@ public class PatientManageController extends BaseController @Log(title = "添加死亡患者", businessType = BusinessType.INSERT) @PostMapping("/addDead") @ResponseBody - public AjaxResult addDead(@Validated PatientManage patientManage) + public AjaxResult addDeadSave(@Validated PatientManage patientManage) { if (StringUtils.isNotEmpty(patientManage.getPatientIdCard()) && !patientManageService.checkPatientIdCardUnique(patientManage)) @@ -239,4 +245,27 @@ public class PatientManageController extends BaseController } return toAjax(patientManageService.insertDeadPatientManage(patientManage)); } + + /** + * + */ + @RequiresPermissions("patient:patientManage:addCure") + @GetMapping("/isDead/{patientId}") + public String isDead(@PathVariable("patientId") Long patientId, ModelMap mmap) + { + PatientManage patientManage = patientManageService.selectPatientManageByPatientId(patientId); + mmap.put("patientManage", patientManage); + return prefix + "/isDead"; + } + + /** + * + */ + @RequiresPermissions("patient:patientManage:isDead") + @PostMapping("/isDead") + @ResponseBody + public AjaxResult isDeadSave( PatientManage patientManage) + { + return toAjax(patientManageService.updateIsDead(patientManage)); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/supplies/NucleicController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/supplies/NucleicController.java index a77a108..be83a0c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/supplies/NucleicController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/supplies/NucleicController.java @@ -1,10 +1,13 @@ package com.ruoyi.web.controller.supplies; import java.util.List; + +import com.ruoyi.common.utils.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -73,8 +76,12 @@ public class NucleicController extends BaseController @Log(title = "核酸管理", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(Nucleic nucleic) + public AjaxResult addSave(@Validated Nucleic nucleic) { + if (StringUtils.isNotEmpty(nucleic.getNucleicIdNumber()) && !nucleicService.checkNucleicIdNumberUnique(nucleic)) + { + return error("核酸编号'" + nucleic.getNucleicIdNumber() + "'失败,核酸已存在"); + } return toAjax(nucleicService.insertNucleic(nucleic)); } @@ -99,13 +106,17 @@ public class NucleicController extends BaseController @ResponseBody public AjaxResult editSave(Nucleic nucleic) { + if (StringUtils.isNotEmpty(nucleic.getNucleicIdNumber()) && !nucleicService.checkNucleicIdNumberUnique(nucleic)) + { + return error("核酸编号'" + nucleic.getNucleicIdNumber() + "'失败,核酸已存在"); + } return toAjax(nucleicService.updateNucleic(nucleic)); } /** * 删除核酸管理 */ - @RequiresPermissions("supplies:nucleic:remove") + @RequiresPermissions("remove") @Log(title = "核酸管理", businessType = BusinessType.DELETE) @PostMapping( "/remove") @ResponseBody @@ -114,10 +125,10 @@ public class NucleicController extends BaseController return toAjax(nucleicService.deleteNucleicByNucleicIds(ids)); } /** - * 导入患者管理列表 + * 导入核酸管理列表 */ - @Log(title = "患者管理", businessType = BusinessType.IMPORT) - @RequiresPermissions("patient:patientManage:import") + @Log(title = "核酸管理", businessType = BusinessType.IMPORT) + @RequiresPermissions("supplies:nucleic:import") @PostMapping("/importData") @ResponseBody public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/supplies/VaccineController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/supplies/VaccineController.java index 69201f4..24dc915 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/supplies/VaccineController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/supplies/VaccineController.java @@ -1,10 +1,13 @@ package com.ruoyi.web.controller.supplies; import java.util.List; + +import com.ruoyi.common.utils.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -73,8 +76,12 @@ public class VaccineController extends BaseController @Log(title = "疫苗管理", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(Vaccine vaccine) + public AjaxResult addSave(@Validated Vaccine vaccine) { + if (StringUtils.isNotEmpty(vaccine.getVaccineIdNumber()) && !vaccineService.checkVaccineIdNumberUnique(vaccine)) + { + return error("疫苗编号'" + vaccine.getVaccineIdNumber() + "'失败,疫苗已存在"); + } return toAjax(vaccineService.insertVaccine(vaccine)); } @@ -99,6 +106,10 @@ public class VaccineController extends BaseController @ResponseBody public AjaxResult editSave(Vaccine vaccine) { + if (StringUtils.isNotEmpty(vaccine.getVaccineIdNumber()) && !vaccineService.checkVaccineIdNumberUnique(vaccine)) + { + return error("疫苗编号'" + vaccine.getVaccineIdNumber() + "'失败,疫苗已存在"); + } return toAjax(vaccineService.updateVaccine(vaccine)); } @@ -114,10 +125,10 @@ public class VaccineController extends BaseController return toAjax(vaccineService.deleteVaccineByVaccineIds(ids)); } /** - * 导入患者管理列表 + * 导入管理列表 */ - @Log(title = "患者管理", businessType = BusinessType.IMPORT) - @RequiresPermissions("patient:patientManage:import") + @Log(title = "疫苗管理", businessType = BusinessType.IMPORT) + @RequiresPermissions("supplies:vaccine:import") @PostMapping("/importData") @ResponseBody public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception @@ -127,7 +138,7 @@ public class VaccineController extends BaseController String message = vaccineService.importVaccine(vaccineList,updateSupport); return AjaxResult.success(message); } - @RequiresPermissions("patient:patientManage:view") + @RequiresPermissions("patient:vaccine:view") @GetMapping("/importTemplate") @ResponseBody public AjaxResult importTemplate() diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index d9d4510..441a2b2 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -7,7 +7,7 @@ ruoyi: # 版权年份 copyrightYear: 2023 # 实例演示开关 - demoEnabled: true + demoEnabled: false # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) profile: D:/ruoyi/uploadPath # 获取ip地址开关 diff --git a/ruoyi-admin/src/main/resources/templates/login.html b/ruoyi-admin/src/main/resources/templates/login.html index 2d800c1..b3c0d1e 100644 --- a/ruoyi-admin/src/main/resources/templates/login.html +++ b/ruoyi-admin/src/main/resources/templates/login.html @@ -36,8 +36,10 @@

登录:

- - + + + +
diff --git a/ruoyi-admin/src/main/resources/templates/main.html b/ruoyi-admin/src/main/resources/templates/main.html index 272d7fe..ac0b461 100644 --- a/ruoyi-admin/src/main/resources/templates/main.html +++ b/ruoyi-admin/src/main/resources/templates/main.html @@ -37,7 +37,7 @@
-
+
@@ -52,6 +52,14 @@
+ +
+
+
+
+
+
+
@@ -62,13 +70,13 @@ var lineChart = echarts.init(document.getElementById("echarts-line-chart")); var lineoption = { title : { - text: '一周内感染人数状态' + text: '上周感染人数状态' }, tooltip : { trigger: 'axis' }, legend: { - data:['死亡','健在'] + data:['死亡','治愈'] }, grid:{ x:40, @@ -87,7 +95,7 @@ { type : 'value', axisLabel : { - formatter: '{value} °C' + formatter: '{value}' } } ], @@ -95,7 +103,7 @@ { name:'死亡', type:'line', - data:[11, 11, 15, 13, 12, 13, 10], + data:[5, 3, 1, 6, 8, 4, 2], markPoint : { data : [ {type : 'max', name: '最大值'}, @@ -109,12 +117,12 @@ } }, { - name:'健在', + name:'治愈', type:'line', - data:[1, -2, 2, 5, 3, 2, 0], + data:[11, 6, 8, 10, 6, 9, 8], markPoint : { data : [ - {name : '周最低', value : -2, xAxis: 1, yAxis: -1.5} + {name : '周最低', value :6, xAxis: 1, yAxis: -1.5} ] }, markLine : { @@ -168,13 +176,13 @@ var barChart = echarts.init(document.getElementById("echarts-bar-chart")); var baroption = { title : { - text: '14天打卡人体温区间' + text: '14天打卡人发烧数量' }, tooltip : { trigger: 'axis' }, legend: { - data:['女性','男性'] + data:['渝水区','分宜县','仙女湖风景名胜区','高新开发区'] }, grid:{ x:30, @@ -185,7 +193,7 @@ xAxis : [ { type : 'category', - data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月','13','14'] + data : ['5.15','5.16','5.17','5.18','5.19','5.20','5.21','5.22','5.23','5.24','5.25','5.26','5.27','5.28'] } ], yAxis : [ @@ -195,9 +203,41 @@ ], series : [ { - name:'女性', + name:'渝水区', + type:'bar', + data:[0, 3, 2, 0, 1, 0, 1, 3, 1, 1, 0, 2, 2, 3], + markPoint : { + data : [ + {type : 'max', name: '最大值'}, + {type : 'min', name: '最小值'} + ] + }, + markLine : { + data : [ + {type : 'average', name: '平均值'} + ] + } + }, + { + name:'分宜县', + type:'bar', + data:[1, 1, 2, 0, 3, 3, 0,1,2, 0, 2, 1, 1, 2], + markPoint : { + data : [ + {type : 'max', name: '最大值'}, + {type : 'min', name: '最小值'} + ] + }, + markLine : { + data : [ + {type : 'average', name: '平均值'} + ] + } + }, + { + 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], + data:[1, 1, 2, 0, 1, 3, 2, 1, 2, 0,3, 0, 0, 1], markPoint : { data : [ {type : 'max', name: '最大值'}, @@ -211,13 +251,13 @@ } }, { - 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], + data:[1, 0, 2, 0, 2, 1,1, 0, 1, 1, 2, 3, 0, 1], markPoint : { data : [ - {name : '年最高', value : 42, xAxis: 7, yAxis: 183, symbolSize:18}, - {name : '年最低', value : 36.0, xAxis: 11, yAxis: 3} + {type : 'max', name: '最大值'}, + {type : 'min', name: '最小值'} ] }, markLine : { @@ -282,6 +322,121 @@ }; ndChart.setOption(ndoption); window.onresize = ndChart.resize; + + //线图 + 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}' + } + } + ], + series : [ + { + name:'死亡', + type:'line', + data:[5, 3, 1, 6, 8, 4, 2], + markPoint : { + data : [ + {type : 'max', name: '最大值'}, + {type : 'min', name: '最小值'} + ] + }, + markLine : { + data : [ + {type : 'average', name: '平均值'} + ] + } + }, + { + name:'治愈', + type:'line', + data:[11, 6, 8, 10, 6, 9, 8], + markPoint : { + data : [ + {name : '周最低', value :6, xAxis: 1, yAxis: -1.5} + ] + }, + markLine : { + data: [ + {type: 'average', name: '平均值'} + ] + } + } + ] + }; + lineChart.setOption(lineoption); + $(window).resize(lineChart.resize); + + var barChart = echarts.init(document.getElementById("echarts-supplies-chart")); + var baroption = { + title : { + text: '防疫物资库存数量' + }, + tooltip : { + trigger: 'axis' + }, + legend: { + data:['疫苗','核酸'] + }, + grid:{ + x:30, + x2:40, + y2:24 + }, + calculable : true, + xAxis : [ + { + type : 'category', + data : ['库存数量'] + } + ], + yAxis : [ + { + type : 'value' + } + ], + series : [ + { + name:'疫苗', + type:'bar', + data:[70], + }, + { + name:'核酸', + type:'bar', + data:[40], + + } + ] + }; + barChart.setOption(baroption); + window.onresize = barChart.resize; }); diff --git a/ruoyi-admin/src/main/resources/templates/patient/patientManage/addCure.html b/ruoyi-admin/src/main/resources/templates/patient/patientManage/addCure.html index 72086cc..36db012 100644 --- a/ruoyi-admin/src/main/resources/templates/patient/patientManage/addCure.html +++ b/ruoyi-admin/src/main/resources/templates/patient/patientManage/addCure.html @@ -94,7 +94,7 @@ else alert("患者已存在") } location.href=ctx+"patient/patientManage"; - alert("添加成功"); + alert("已添加"); } $("input[name='diagnosedTime']").datetimepicker({ diff --git a/ruoyi-admin/src/main/resources/templates/patient/patientManage/addDead.html b/ruoyi-admin/src/main/resources/templates/patient/patientManage/addDead.html index adc711b..cb30e43 100644 --- a/ruoyi-admin/src/main/resources/templates/patient/patientManage/addDead.html +++ b/ruoyi-admin/src/main/resources/templates/patient/patientManage/addDead.html @@ -99,7 +99,7 @@ // } $.operate.save(prefix + "/add", $('#form-patientDead-add').serialize()); location.href=ctx+"patient/patientManage"; - alert("添加成功"); + alert("已添加"); } $("input[name='diagnosedTime']").datetimepicker({ diff --git a/ruoyi-admin/src/main/resources/templates/patient/patientManage/edit.html b/ruoyi-admin/src/main/resources/templates/patient/patientManage/edit.html index 9117dd5..097d344 100644 --- a/ruoyi-admin/src/main/resources/templates/patient/patientManage/edit.html +++ b/ruoyi-admin/src/main/resources/templates/patient/patientManage/edit.html @@ -88,13 +88,13 @@ - - - - - - - + +
+ + +
diff --git a/ruoyi-admin/src/main/resources/templates/patient/patientManage/patientManage.html b/ruoyi-admin/src/main/resources/templates/patient/patientManage/patientManage.html index 19ac4b9..cc8a0f3 100644 --- a/ruoyi-admin/src/main/resources/templates/patient/patientManage/patientManage.html +++ b/ruoyi-admin/src/main/resources/templates/patient/patientManage/patientManage.html @@ -167,15 +167,16 @@ /* 移交治愈 */ function cure(patientId) { + var url = prefix+'/addCure/'+patientId; - $.modal.openTab("分配用户", url); + $.modal.openTab("移交治愈患者", url); } /* 移交死亡 */ function dead(patientId) { var url = prefix +'/addDead/'+patientId; - $.modal.openTab("分配用户", url); + $.modal.openTab("移交死亡患者", url); } diff --git a/ruoyi-admin/src/main/resources/templates/supplies/nucleic/nucleic.html b/ruoyi-admin/src/main/resources/templates/supplies/nucleic/nucleic.html index 1ac1d0b..dfc6400 100644 --- a/ruoyi-admin/src/main/resources/templates/supplies/nucleic/nucleic.html +++ b/ruoyi-admin/src/main/resources/templates/supplies/nucleic/nucleic.html @@ -15,7 +15,7 @@
  • - +
  • @@ -87,7 +87,7 @@ }, { field: 'nucleicNumber', - title: '采购数量' + title: '库存数量' }, { field: 'nucleicIdNumber', diff --git a/ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine.html b/ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine.html index 52c814e..22ac169 100644 --- a/ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine.html +++ b/ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine.html @@ -11,7 +11,7 @@
    • - +
    • @@ -81,9 +81,13 @@ title: '疫苗d', visible: false }, + { + field: 'vaccineName', + title: '疫苗名字' + }, { field: 'vaccineNumber', - title: '采购数量' + title: '库存数量' }, { field: 'vaccineIdNumber', @@ -93,10 +97,7 @@ field: 'vaccineDescription', title: '疫苗描述' }, - { - field: 'vaccineName', - title: '疫苗名字' - }, + { title: '操作', align: 'center', diff --git a/ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine/edit.html b/ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine/edit.html index 391d8a0..2803c27 100644 --- a/ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine/edit.html +++ b/ruoyi-admin/src/main/resources/templates/supplies/vaccine/vaccine/edit.html @@ -7,6 +7,12 @@
      +
      + +
      + +
      +
      @@ -25,12 +31,7 @@
      -
      - -
      - -
      -
      +
      diff --git a/ruoyi-admin/src/main/resources/templates/system/user/add.html b/ruoyi-admin/src/main/resources/templates/system/user/add.html index 2618918..a634997 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/add.html @@ -209,6 +209,8 @@ }, idNumber:{ isIdentity18:true, + minlength: 15, + maxlength: 18, remote: { url: prefix + "/checkIdNumberUnique", type: "post", diff --git a/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html b/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html index 3470b56..074e7ff 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html @@ -77,7 +77,7 @@
      - +
      diff --git a/ruoyi-system/src/main/java/com/ruoyi/supplies/mapper/NucleicMapper.java b/ruoyi-system/src/main/java/com/ruoyi/supplies/mapper/NucleicMapper.java index 2372ca0..1dfb9e6 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/supplies/mapper/NucleicMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/supplies/mapper/NucleicMapper.java @@ -67,4 +67,12 @@ public interface NucleicMapper * @return 核酸信息 */ public Nucleic selectNucleicByNucleicIdNumber(String nucleicIdNumber); + + /** + * 通过调度核酸ID查询调度信息 + * + * @param nucleicIdNumber 身份证唯一 + * @return 患者信息 + */ + public Nucleic checkNucleicIdNumberUnique(String nucleicIdNumber); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/supplies/mapper/VaccineMapper.java b/ruoyi-system/src/main/java/com/ruoyi/supplies/mapper/VaccineMapper.java index 8d1ff7b..039a215 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/supplies/mapper/VaccineMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/supplies/mapper/VaccineMapper.java @@ -66,4 +66,11 @@ public interface VaccineMapper * @return 疫苗信息 */ public Vaccine selectVaccineByVaccineIdNumber(String vaccineIdNumber); + /** + * 通过调度疫苗ID查询调度信息 + * + * @param vaccineIdNumber 身份证唯一 + * @return 患者信息 + */ + public Vaccine checkVaccineIdNumberUnique(String vaccineIdNumber); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/CheckManage.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/CheckManage.java index 4efda1f..9633a55 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/CheckManage.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/CheckManage.java @@ -36,11 +36,11 @@ public class CheckManage extends BaseEntity private String healthState; /** 是否去过高风险地区 */ - @Excel(name = "是否去过高风险地区" ,readConverterExp = "0=否,1=是") + @Excel(name = "是否去过高风险地区" ,readConverterExp = "0=未去过高风险地区,1=去过高风险地区,未去过高风险地区=未去过高风险地区,去过高风险地区=去过高风险地区") private String isHigh; /** 是否接触过密接人员 */ - @Excel(name = "是否接触过密接人员",readConverterExp = "0=否,1=是") + @Excel(name = "是否接触过密接人员",readConverterExp = "0=不是密接人员,1=是密接人员,不是密接人员=不是密接人员,是密接人员=是密接人员") private String isTouch; /** 备注 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Nucleic.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Nucleic.java index 42f73f5..4fa723b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Nucleic.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Nucleic.java @@ -34,47 +34,47 @@ public class Nucleic extends BaseEntity @Excel(name = "核酸描述") private String nucleicDescription; - public void setnucleicId(Long nucleicId) + public void setNucleicId(Long nucleicId) { this.nucleicId = nucleicId; } - public Long getnucleicId() + public Long getNucleicId() { return nucleicId; } - public void setnucleicName(String nucleicName) + public void setNucleicName(String nucleicName) { this.nucleicName = nucleicName; } - public String getnucleicName() + public String getNucleicName() { return nucleicName; } - public String getnucleicIdNumber() { + public String getNucleicIdNumber() { return nucleicIdNumber; } - public void setnucleicIdNumber(String nucleicIdNumber) { + public void setNucleicIdNumber(String nucleicIdNumber) { this.nucleicIdNumber = nucleicIdNumber; } - public void setnucleicNumber(String nucleicNumber) + public void setNucleicNumber(String nucleicNumber) { this.nucleicNumber = nucleicNumber; } - public String getnucleicNumber() + public String getNucleicNumber() { return nucleicNumber; } - public void setnucleicDescription(String nucleicDescription) + public void setNucleicDescription(String nucleicDescription) { this.nucleicDescription = nucleicDescription; } - public String getnucleicDescription() + public String getNucleicDescription() { return nucleicDescription; } @@ -82,11 +82,11 @@ public class Nucleic extends BaseEntity @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("nucleicId", getnucleicId()) - .append("nucleicName", getnucleicName()) - .append("nucleicNumber", getnucleicNumber()) - .append("nucleicIdNumber", getnucleicIdNumber()) - .append("nucleicDescription", getnucleicDescription()) + .append("nucleicId", getNucleicId()) + .append("nucleicName", getNucleicName()) + .append("nucleicNumber", getNucleicNumber()) + .append("nucleicIdNumber", getNucleicIdNumber()) + .append("nucleicDescription", getNucleicDescription()) .toString(); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientCure.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientCure.java index 18ae1a0..5486b3b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientCure.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientCure.java @@ -29,7 +29,7 @@ public class PatientCure extends BaseEntity private String patientAge; /** 患者性别 */ - @Excel(name = "患者性别" ,readConverterExp = "0=女,1=男") + @Excel(name = "患者性别" ,readConverterExp = "0=女,1=男, 女=女,男=男") private String patientSex; /** 患者联系电话 */ @@ -54,19 +54,18 @@ public class PatientCure extends BaseEntity private Date diagnosedTime; /** 重症状态 */ - @Excel(name = "重症状态" ,readConverterExp = "0=非重症,1=重症") + @Excel(name = "重症状态" ,readConverterExp = "0=非重症患者,1=重症患者,非重症患者=非重症患者,重症患者=重症患者") private String isEmergency; - /** 密接状态 */ - @Excel(name = "密接状态" ,readConverterExp = "0=非密接人员,1=密接人员") + @Excel(name = "密接状态" ,readConverterExp = "0=不是密接人员,1=是密接人员,不是密接人员=不是密接人员,是密接人员=是密接人员") private String isTouch; /** 目前状况 */ - @Excel(name = "目前状况" ,readConverterExp = "0=已死亡,1=健在") + @Excel(name = "目前状况" ,readConverterExp = "0=已死亡,1=健在,已死亡=已死亡,健在=健在") private String isDead; /** 是否去高风险地区 */ - @Excel(name = "是否去高风险地区",readConverterExp = "0=未经过高风险地区,1=已经过") + @Excel(name = "是否去高风险地区",readConverterExp = "0=未经过高风险地区,1=去过高风险地区,未去过高风险地区=未去过高风险地区,去过高风险地区=去过高风险地区") private String isHigh; public void setPatientId(Long patientId) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientDead.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientDead.java index fb15998..b77d9e5 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientDead.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientDead.java @@ -30,7 +30,7 @@ public class PatientDead extends BaseEntity /** 患者性别 */ @Excel(name = "患者性别") - private String patientSex ,readConverterExp = "0=女,1=男"; + private String patientSex ,readConverterExp = "0=女,1=男, 女=女,男=男"; /** 患者联系电话 */ @Excel(name = "患者联系电话") @@ -52,23 +52,22 @@ public class PatientDead extends BaseEntity @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "感染时间", width = 30, dateFormat = "yyyy-MM-dd") private Date diagnosedTime; - /** 重症状态 */ - @Excel(name = "重症状态" ,readConverterExp = "0=非重症,1=重症") + @Excel(name = "重症状态" ,readConverterExp = "0=非重症患者,1=重症患者,非重症患者=非重症患者,重症患者=重症患者") private String isEmergency; - /** 密接状态 */ - @Excel(name = "密接状态" ,readConverterExp = "0=非密接人员,1=密接人员") + @Excel(name = "密接状态" ,readConverterExp = "0=不是密接人员,1=是密接人员,不是密接人员=不是密接人员,是密接人员=是密接人员") private String isTouch; /** 目前状况 */ - @Excel(name = "目前状况" ,readConverterExp = "0=已死亡,1=健在") + @Excel(name = "目前状况" ,readConverterExp = "0=已死亡,1=健在,已死亡=已死亡,健在=健在") private String isDead; /** 是否去高风险地区 */ - @Excel(name = "是否去高风险地区",readConverterExp = "0=未经过高风险地区,1=已经过") + @Excel(name = "是否去高风险地区",readConverterExp = "0=未经过高风险地区,1=去过高风险地区,未去过高风险地区=未去过高风险地区,去过高风险地区=去过高风险地区") private String isHigh; + public void setPatientId(Long patientId) { this.patientId = patientId; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientManage.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientManage.java index 5fa1d1c..8f0bb9a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/PatientManage.java +++ b/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=男") + @Excel(name = "患者性别" ,readConverterExp = "0=女,1=男,女=女,男=男") private String patientSex; /** 患者身份证 */ @@ -56,20 +56,20 @@ public class PatientManage extends BaseEntity @Excel(name = "感染时间", width = 30, dateFormat = "yyyy-MM-dd") private Date diagnosedTime; + /** 重症状态 */ - @Excel(name = "重症状态" ,readConverterExp = "0=非重症,1=重症") + @Excel(name = "重症状态" ,readConverterExp = "0=非重症患者,1=重症患者,非重症患者=非重症患者,重症患者=重症患者") private String isEmergency; - /** 密接状态 */ - @Excel(name = "密接状态" ,readConverterExp = "0=非密接人员,1=密接人员") + @Excel(name = "密接状态" ,readConverterExp = "0=不是密接人员,1=是密接人员,不是密接人员=不是密接人员,是密接人员=是密接人员") private String isTouch; /** 目前状况 */ - @Excel(name = "目前状况" ,readConverterExp = "0=已死亡,1=健在") + @Excel(name = "目前状况" ,readConverterExp = "0=已死亡,1=健在,已死亡=已死亡,健在=健在") private String isDead; /** 是否去高风险地区 */ - @Excel(name = "是否去高风险地区",readConverterExp = "0=未经过高风险地区,1=已经过") + @Excel(name = "是否去高风险地区",readConverterExp = "0=未经过高风险地区,1=去过高风险地区,未去过高风险地区=未去过高风险地区,去过高风险地区=去过高风险地区") private String isHigh; public void setPatientId(Long patientId) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientManageMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientManageMapper.java index d3a803d..e535372 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientManageMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PatientManageMapper.java @@ -101,4 +101,20 @@ public interface PatientManageMapper public int insertDeadPatientManage(PatientManage patientManage); + /** + * 患者转为治愈 + * + * @param patientId 治愈患者管理 + * @return 结果 + */ + public int updateIsCure(Long patientId); + + /** + * 患者转为死亡 + * + * @param patientId 死亡患者管理 + * @return 结果 + */ + public int updateIsDead(Long patientId); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/INucleicService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/INucleicService.java index ae3dca6..b30f770 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/INucleicService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/INucleicService.java @@ -67,4 +67,13 @@ public interface INucleicService * @return 结果 */ public String importNucleic(List nucleicList, Boolean isUpdateSupport); + + /** + * 校验疫苗编号是否唯一 + * + * @param nucleic 患者信息 + * @return 结果 + */ + public boolean checkNucleicIdNumberUnique(Nucleic nucleic); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientManageService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientManageService.java index d705f2d..7facff3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientManageService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IPatientManageService.java @@ -43,6 +43,10 @@ public interface IPatientManageService */ public int updatePatientManage(PatientManage patientManage); + int updateIsDead(PatientManage patientManage); + + int updateIsCure(PatientManage patientManage); + /** * 批量删除患者管理 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IVaccineService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IVaccineService.java index 4fffee1..aecf6c6 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IVaccineService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IVaccineService.java @@ -67,4 +67,13 @@ public interface IVaccineService * @return 结果 */ public String importVaccine(List vaccineList, Boolean isUpdateSupport); + + /** + * 校验疫苗编号是否唯一 + * + * @param vaccine 患者信息 + * @return 结果 + */ + public boolean checkVaccineIdNumberUnique(Vaccine vaccine); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CheckManageServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CheckManageServiceImpl.java index 9e47d9e..f3df83b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CheckManageServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CheckManageServiceImpl.java @@ -117,7 +117,7 @@ public class CheckManageServiceImpl implements ICheckManageService try { // 验证是否存在这个患者 - CheckManage p = checkManageMapper.selectCheckByPhonenumber(checkManage.getCheckPhonenumber()); + CheckManage p = null; if (StringUtils.isNull(p)) { BeanValidators.validateWithException(validator, checkManage); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NucleicServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NucleicServiceImpl.java index 85a8fa6..fcab6f3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NucleicServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NucleicServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl; import java.util.List; +import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.bean.BeanValidators; @@ -118,32 +119,32 @@ public class NucleicServiceImpl implements INucleicService try { // 验证是否存在这个疫苗 - Nucleic p = nucleicMapper.selectNucleicByNucleicIdNumber(nucleic.getnucleicIdNumber()); + Nucleic p = nucleicMapper.selectNucleicByNucleicIdNumber(nucleic.getNucleicIdNumber()); if (StringUtils.isNull(p)) { BeanValidators.validateWithException(validator, nucleic); this.insertNucleic(nucleic); successNum++; - successMsg.append("
      " + successNum + "、身份证: " + nucleic.getnucleicIdNumber() + " 导入成功"); + successMsg.append("
      " + successNum + "、身份证: " + nucleic.getNucleicIdNumber() + " 导入成功"); } else if (isUpdateSupport) { BeanValidators.validateWithException(validator, nucleic); - nucleic.setnucleicId(p.getnucleicId()); + nucleic.setNucleicId(p.getNucleicId()); this.updateNucleic(nucleic); successNum++; - successMsg.append("
      " + successNum + "、核酸编号: " + nucleic.getnucleicIdNumber() + " 的信息更新成功"); + successMsg.append("
      " + successNum + "、核酸编号: " + nucleic.getNucleicIdNumber() + " 的信息更新成功"); } else { failureNum++; - failureMsg.append("
      " + failureNum + "、核酸编号: " + nucleic.getnucleicIdNumber() + " 已存在"); + failureMsg.append("
      " + failureNum + "、核酸编号: " + nucleic.getNucleicIdNumber() + " 已存在"); } } catch (Exception e) { failureNum++; - String msg = "
      " + failureNum + "、核酸编号 " + nucleic.getnucleicIdNumber() + " 导入失败:"; + String msg = "
      " + failureNum + "、核酸编号 " + nucleic.getNucleicIdNumber() + " 导入失败:"; failureMsg.append(msg + e.getMessage()); log.error(msg, e); } @@ -159,4 +160,16 @@ public class NucleicServiceImpl implements INucleicService } return successMsg.toString(); } + + @Override + public boolean checkNucleicIdNumberUnique(Nucleic nucleic) { + Long patientId = StringUtils.isNull(nucleic.getNucleicId()) ? -1L : nucleic.getNucleicId(); + Nucleic info = nucleicMapper.checkNucleicIdNumberUnique(nucleic.getNucleicIdNumber()); + if (StringUtils.isNotNull(info) && info.getNucleicId().longValue() != patientId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientManageServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientManageServiceImpl.java index 337761f..2375f78 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientManageServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PatientManageServiceImpl.java @@ -84,7 +84,15 @@ public class PatientManageServiceImpl implements IPatientManageService { return patientManageMapper.updatePatientManage(patientManage); } - + @Override + public int updateIsDead(PatientManage patientManage) + { + return patientManageMapper.updatePatientManage(patientManage); + } + @Override + public int updateIsCure(PatientManage patientManage) { + return patientManageMapper.updatePatientManage(patientManage); + } /** * 批量删除患者管理 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/VaccineServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/VaccineServiceImpl.java index 477c070..9af7ad4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/VaccineServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/VaccineServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl; import java.util.List; +import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.bean.BeanValidators; @@ -25,7 +26,7 @@ import javax.validation.Validator; @Service public class VaccineServiceImpl implements IVaccineService { - private static final Logger log = LoggerFactory.getLogger(PatientManageServiceImpl.class); + private static final Logger log = LoggerFactory.getLogger(VaccineServiceImpl.class); @Autowired protected Validator validator; @Autowired @@ -124,7 +125,7 @@ public class VaccineServiceImpl implements IVaccineService BeanValidators.validateWithException(validator, vaccine); this.insertVaccine(vaccine); successNum++; - successMsg.append("
      " + successNum + "、身份证: " + vaccine.getVaccineIdNumber() + " 导入成功"); + successMsg.append("
      " + successNum + "、疫苗编号: " + vaccine.getVaccineIdNumber() + " 导入成功"); } else if (isUpdateSupport) { @@ -132,18 +133,18 @@ public class VaccineServiceImpl implements IVaccineService vaccine.setVaccineId(p.getVaccineId()); this.updateVaccine(vaccine); successNum++; - successMsg.append("
      " + successNum + "、核酸编号: " + vaccine.getVaccineIdNumber() + " 的信息更新成功"); + successMsg.append("
      " + successNum + "、疫苗编号: " + vaccine.getVaccineIdNumber() + " 的信息更新成功"); } else { failureNum++; - failureMsg.append("
      " + failureNum + "、核酸编号: " + vaccine.getVaccineIdNumber() + " 已存在"); + failureMsg.append("
      " + failureNum + "、疫苗编号: " + vaccine.getVaccineIdNumber() + " 已存在"); } } catch (Exception e) { failureNum++; - String msg = "
      " + failureNum + "、核酸编号 " + vaccine.getVaccineIdNumber() + " 导入失败:"; + String msg = "
      " + failureNum + "、疫苗编号 " + vaccine.getVaccineIdNumber() + " 导入失败:"; failureMsg.append(msg + e.getMessage()); log.error(msg, e); } @@ -159,4 +160,15 @@ public class VaccineServiceImpl implements IVaccineService } return successMsg.toString(); } + + @Override + public boolean checkVaccineIdNumberUnique(Vaccine vaccine) { + Long patientId = StringUtils.isNull(vaccine.getVaccineId()) ? -1L : vaccine.getVaccineId(); + Vaccine info = vaccineMapper.checkVaccineIdNumberUnique(vaccine.getVaccineIdNumber()); + if (StringUtils.isNotNull(info) && info.getVaccineId().longValue() != patientId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } } diff --git a/ruoyi-system/src/main/resources/mapper/PatientManageMapper.xml b/ruoyi-system/src/main/resources/mapper/PatientManageMapper.xml index 6bafd8b..f1ec13d 100644 --- a/ruoyi-system/src/main/resources/mapper/PatientManageMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/PatientManageMapper.xml @@ -126,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select patient_id, patient_id_card from patient_manage where patient_id_card=#{patientIdCard} + insert into patient_cure patient_id, @@ -143,13 +144,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 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_cure ) + from patient_manage where patient_id not in(SELECT patient_id=#{patientId} from patient_cure ); + update patient_manage set is_dead='1' where patient_id=#{patientId}; - DROP PROCEDURE if EXISTS addDead; - create PROCEDURE addDead() - begin + insert into patient_dead patient_id, @@ -169,4 +169,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 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 ); + + update patient_manage + + is_dead = '0', + + where patient_id = #{patientId} + + + update patient_manage + + is_dead = '0', + + where patient_id = #{patientId} + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/supplies/NucleicMapper.xml b/ruoyi-system/src/main/resources/mapper/supplies/NucleicMapper.xml index 80ba83f..68b378d 100644 --- a/ruoyi-system/src/main/resources/mapper/supplies/NucleicMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/supplies/NucleicMapper.xml @@ -72,4 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where nucleic_id_number = #{nucleicIdNumber} + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/supplies/VaccineMapper.xml b/ruoyi-system/src/main/resources/mapper/supplies/VaccineMapper.xml index 3091cd4..9a34063 100644 --- a/ruoyi-system/src/main/resources/mapper/supplies/VaccineMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/supplies/VaccineMapper.xml @@ -72,4 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where vaccine_id_number = #{vaccineIdNumber} + \ No newline at end of file