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 @@