From 6c8927c88163f2e8bcec4dbeb3a8353902b8f23b Mon Sep 17 00:00:00 2001 From: zhangchao Date: Fri, 26 Apr 2024 16:10:02 +0800 Subject: [PATCH] =?UTF-8?q?#fix:=E6=96=B0=E5=A2=9E=E5=A8=81=E5=8E=BF?= =?UTF-8?q?=E5=AD=95=E4=BA=A7=E5=A6=87=E7=AE=A1=E7=90=86=E9=97=AE=E8=AF=8A?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=E6=8E=A5=E5=8F=A3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/lyms/platform/pojo/Patients.java | 29 +++++++++++ .../operate/web/controller/PatientController.java | 57 ++++++++++++++++++++++ .../lyms/platform/operate/web/vo/PatientsDTO.java | 40 +++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientController.java create mode 100644 platform-operate-api/src/main/java/com/lyms/platform/operate/web/vo/PatientsDTO.java diff --git a/platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java b/platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java index fd3d1a9..cc085f6 100644 --- a/platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java +++ b/platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java @@ -487,6 +487,35 @@ public class Patients extends BaseModel { private String buildingManualCode; private Integer isComplete; + /** + * 威县一月内会诊数据 + * @return + */ + /** + * his病例ID + */ + private String patientHId; + /** + * 一个月内访问次数 + */ + private String visitsNum; + + public String getPatientHId() { + return patientHId; + } + + public void setPatientHId(String patientHId) { + this.patientHId = patientHId; + } + + public String getVisitsNum() { + return visitsNum; + } + + public void setVisitsNum(String visitsNum) { + this.visitsNum = visitsNum; + } + public String getVillageId() { return villageId; } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientController.java new file mode 100644 index 0000000..a5b45d4 --- /dev/null +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientController.java @@ -0,0 +1,57 @@ +package com.lyms.platform.operate.web.controller; + +import com.lyms.platform.biz.service.PatientsService; +import com.lyms.platform.common.constants.ErrorCodeConstants; +import com.lyms.platform.common.result.BaseResponse; +import com.lyms.platform.operate.web.utils.CollectionUtils; +import com.lyms.platform.operate.web.vo.PatientsDTO; +import com.lyms.platform.pojo.Patients; +import com.lyms.platform.query.PatientsQuery; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +@Controller("/patient") +public class PatientController { + @Autowired + private PatientsService patientsService; + //http://112.112.112.183:8085/viewhip-etyy/view/commView/layout.jsp?patientId=病人ID + + @RequestMapping(method = RequestMethod.GET, value = "/getPatients") + @ResponseBody + public BaseResponse getPatients(){ + BaseResponse baseResponse=new BaseResponse(); + PatientsQuery patientsQuery =new PatientsQuery(); + patientsQuery.setYn(1); + patientsQuery.setHospitalId("2100002419"); + List patientsList= patientsService.queryPatient(patientsQuery); + baseResponse.setObject(patientsList); + return baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); + } + + @RequestMapping(method = RequestMethod.POST, value = "/updatePatients") + @ResponseBody + public BaseResponse updatePatients(@RequestBody PatientsDTO patientsDTO){ + BaseResponse baseResponse=new BaseResponse(); + if (patientsDTO!=null){ + PatientsQuery patientsQuery =new PatientsQuery(); + patientsQuery.setYn(1); + patientsQuery.setId(patientsDTO.getId()); + List patientsList=patientsService.queryPatient(patientsQuery); + if (CollectionUtils.isNotEmpty(patientsList)){ + Patients patient= patientsList.get(0); + patient.setPatientHId(patientsDTO.getPatientHId()); + patient.setVisitsNum(patientsDTO.getVisitsNum()); + patientsService.updatePatientOne(patient,patient.getId()); + baseResponse.setErrormsg("成功"); + } + + } + return baseResponse; + } +} diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/vo/PatientsDTO.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/vo/PatientsDTO.java new file mode 100644 index 0000000..53460cc --- /dev/null +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/vo/PatientsDTO.java @@ -0,0 +1,40 @@ +package com.lyms.platform.operate.web.vo; + +public class PatientsDTO { + /** + * 患者ID + */ + private String id; + /** + * his病例ID + */ + private String patientHId; + /** + * 一个月内访问次数 + */ + private String visitsNum; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPatientHId() { + return patientHId; + } + + public void setPatientHId(String patientHId) { + this.patientHId = patientHId; + } + + public String getVisitsNum() { + return visitsNum; + } + + public void setVisitsNum(String visitsNum) { + this.visitsNum = visitsNum; + } +} -- 1.8.3.1