Commit 6c8927c88163f2e8bcec4dbeb3a8353902b8f23b
1 parent
ce8b722539
Exists in
luanping
#fix:新增威县孕产妇管理问诊次数接口逻辑
Showing 3 changed files with 126 additions and 0 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
6c8927c
... | ... | @@ -487,6 +487,35 @@ |
487 | 487 | private String buildingManualCode; |
488 | 488 | private Integer isComplete; |
489 | 489 | |
490 | + /** | |
491 | + * 威县一月内会诊数据 | |
492 | + * @return | |
493 | + */ | |
494 | + /** | |
495 | + * his病例ID | |
496 | + */ | |
497 | + private String patientHId; | |
498 | + /** | |
499 | + * 一个月内访问次数 | |
500 | + */ | |
501 | + private String visitsNum; | |
502 | + | |
503 | + public String getPatientHId() { | |
504 | + return patientHId; | |
505 | + } | |
506 | + | |
507 | + public void setPatientHId(String patientHId) { | |
508 | + this.patientHId = patientHId; | |
509 | + } | |
510 | + | |
511 | + public String getVisitsNum() { | |
512 | + return visitsNum; | |
513 | + } | |
514 | + | |
515 | + public void setVisitsNum(String visitsNum) { | |
516 | + this.visitsNum = visitsNum; | |
517 | + } | |
518 | + | |
490 | 519 | public String getVillageId() { |
491 | 520 | return villageId; |
492 | 521 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientController.java
View file @
6c8927c
1 | +package com.lyms.platform.operate.web.controller; | |
2 | + | |
3 | +import com.lyms.platform.biz.service.PatientsService; | |
4 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
5 | +import com.lyms.platform.common.result.BaseResponse; | |
6 | +import com.lyms.platform.operate.web.utils.CollectionUtils; | |
7 | +import com.lyms.platform.operate.web.vo.PatientsDTO; | |
8 | +import com.lyms.platform.pojo.Patients; | |
9 | +import com.lyms.platform.query.PatientsQuery; | |
10 | +import org.springframework.beans.factory.annotation.Autowired; | |
11 | +import org.springframework.stereotype.Controller; | |
12 | +import org.springframework.web.bind.annotation.RequestBody; | |
13 | +import org.springframework.web.bind.annotation.RequestMapping; | |
14 | +import org.springframework.web.bind.annotation.RequestMethod; | |
15 | +import org.springframework.web.bind.annotation.ResponseBody; | |
16 | + | |
17 | +import java.util.List; | |
18 | + | |
19 | +@Controller("/patient") | |
20 | +public class PatientController { | |
21 | + @Autowired | |
22 | + private PatientsService patientsService; | |
23 | + //http://112.112.112.183:8085/viewhip-etyy/view/commView/layout.jsp?patientId=病人ID | |
24 | + | |
25 | + @RequestMapping(method = RequestMethod.GET, value = "/getPatients") | |
26 | + @ResponseBody | |
27 | + public BaseResponse getPatients(){ | |
28 | + BaseResponse baseResponse=new BaseResponse(); | |
29 | + PatientsQuery patientsQuery =new PatientsQuery(); | |
30 | + patientsQuery.setYn(1); | |
31 | + patientsQuery.setHospitalId("2100002419"); | |
32 | + List<Patients> patientsList= patientsService.queryPatient(patientsQuery); | |
33 | + baseResponse.setObject(patientsList); | |
34 | + return baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
35 | + } | |
36 | + | |
37 | + @RequestMapping(method = RequestMethod.POST, value = "/updatePatients") | |
38 | + @ResponseBody | |
39 | + public BaseResponse updatePatients(@RequestBody PatientsDTO patientsDTO){ | |
40 | + BaseResponse baseResponse=new BaseResponse(); | |
41 | + if (patientsDTO!=null){ | |
42 | + PatientsQuery patientsQuery =new PatientsQuery(); | |
43 | + patientsQuery.setYn(1); | |
44 | + patientsQuery.setId(patientsDTO.getId()); | |
45 | + List<Patients> patientsList=patientsService.queryPatient(patientsQuery); | |
46 | + if (CollectionUtils.isNotEmpty(patientsList)){ | |
47 | + Patients patient= patientsList.get(0); | |
48 | + patient.setPatientHId(patientsDTO.getPatientHId()); | |
49 | + patient.setVisitsNum(patientsDTO.getVisitsNum()); | |
50 | + patientsService.updatePatientOne(patient,patient.getId()); | |
51 | + baseResponse.setErrormsg("成功"); | |
52 | + } | |
53 | + | |
54 | + } | |
55 | + return baseResponse; | |
56 | + } | |
57 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/vo/PatientsDTO.java
View file @
6c8927c
1 | +package com.lyms.platform.operate.web.vo; | |
2 | + | |
3 | +public class PatientsDTO { | |
4 | + /** | |
5 | + * 患者ID | |
6 | + */ | |
7 | + private String id; | |
8 | + /** | |
9 | + * his病例ID | |
10 | + */ | |
11 | + private String patientHId; | |
12 | + /** | |
13 | + * 一个月内访问次数 | |
14 | + */ | |
15 | + private String visitsNum; | |
16 | + | |
17 | + public String getId() { | |
18 | + return id; | |
19 | + } | |
20 | + | |
21 | + public void setId(String id) { | |
22 | + this.id = id; | |
23 | + } | |
24 | + | |
25 | + public String getPatientHId() { | |
26 | + return patientHId; | |
27 | + } | |
28 | + | |
29 | + public void setPatientHId(String patientHId) { | |
30 | + this.patientHId = patientHId; | |
31 | + } | |
32 | + | |
33 | + public String getVisitsNum() { | |
34 | + return visitsNum; | |
35 | + } | |
36 | + | |
37 | + public void setVisitsNum(String visitsNum) { | |
38 | + this.visitsNum = visitsNum; | |
39 | + } | |
40 | +} |