Commit 3fa7e3b806b85405f41119f16a5b93700ae986fe
1 parent
5a7bbb355c
Exists in
master
and in
6 other branches
分娩
Showing 2 changed files with 22 additions and 5 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientRegistrationModelQuery.java
View file @
3fa7e3b
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientRegistrationFacade.java
View file @
3fa7e3b
... | ... | @@ -98,9 +98,26 @@ |
98 | 98 | model.setPhone(personModels.getPhone()); |
99 | 99 | } |
100 | 100 | |
101 | - model.setCreateDate(new Date()); | |
102 | - model.setHospitalId("216"); | |
103 | - model = patientRegistrationService.add(model); | |
101 | + PatientRegistrationModelQuery query = new PatientRegistrationModelQuery(); | |
102 | + query.setCardno(model.getCardno()); | |
103 | + query.setOutType(1); | |
104 | + List<PatientRegistrationModel> patientRegistrationModels = patientRegistrationService.queryListAll(query); | |
105 | + if (CollectionUtils.isNotEmpty(patientRegistrationModels)) | |
106 | + { | |
107 | + PatientRegistrationModel db = patientRegistrationModels.get(0); | |
108 | + db.setOrderDate(model.getOrderDate()); | |
109 | + db.setBedType(model.getBedType()); | |
110 | + db.setCreateDate(new Date()); | |
111 | + db.setPhone(model.getPhone()); | |
112 | + db.setName(model.getName()); | |
113 | + patientRegistrationService.update(db, db.getId()); | |
114 | + } | |
115 | + else | |
116 | + { | |
117 | + model.setCreateDate(new Date()); | |
118 | + model.setHospitalId("216"); | |
119 | + model = patientRegistrationService.add(model); | |
120 | + } | |
104 | 121 | createMsg(model); |
105 | 122 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
106 | 123 | br.setErrormsg("成功"); |
... | ... | @@ -140,7 +157,7 @@ |
140 | 157 | messages.add(mr); |
141 | 158 | if (CollectionUtils.isNotEmpty(messages)) { |
142 | 159 | System.out.println(messages.get(0).toString()); |
143 | - //smsConfigFacade.saveMsg(messages, messages.get(0).getHospitalId()); | |
160 | + // smsConfigFacade.saveMsg(messages, messages.get(0).getHospitalId()); | |
144 | 161 | } |
145 | 162 | |
146 | 163 | } |