Commit 8f937bb3ad062d585f32428e4cf0bc08017fa9e3
1 parent
6d6d87a9b5
Exists in
master
and in
6 other branches
update code
Showing 1 changed file with 22 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
View file @
8f937bb
... | ... | @@ -127,6 +127,26 @@ |
127 | 127 | couponService.use(autoMatchFacade.getHospitalId(userId), postReviewRequest.getCouponCode(), userId, postReviewModel.getId()); |
128 | 128 | } |
129 | 129 | |
130 | + | |
131 | + //修改非主档案 同时修改主档案的产后复查次数增加 | |
132 | + if (StringUtils.isNotEmpty(patients1.getSource())) | |
133 | + { | |
134 | + Patients mainPatients = patientsService.findOnePatientById(patients1.getSource()); | |
135 | + | |
136 | + if (null != patients1.getPostViewTimes()) { | |
137 | + Patients patients2 = new Patients(); | |
138 | + patients2.setPostViewTimes(patients1.getPostViewTimes() + 1); | |
139 | + patients2.setId(mainPatients.getId()); | |
140 | + patientsService.updatePatient(patients2); | |
141 | + } else { | |
142 | + Patients patients2 = new Patients(); | |
143 | + patients2.setPostViewTimes(1); | |
144 | + patients2.setId(mainPatients.getId()); | |
145 | + patientsService.updatePatient(patients2); | |
146 | + } | |
147 | + | |
148 | + } | |
149 | + | |
130 | 150 | if (null != patients1.getPostViewTimes()) { |
131 | 151 | Patients patients2 = new Patients(); |
132 | 152 | patients2.setPostViewTimes(patients1.getPostViewTimes() + 1); |
... | ... | @@ -138,6 +158,8 @@ |
138 | 158 | patients2.setId(patients1.getId()); |
139 | 159 | patientsService.updatePatient(patients2); |
140 | 160 | } |
161 | + | |
162 | + | |
141 | 163 | patientsService.updateNextCheckTime(postReviewRequest.getNextCheckTime(),patients.getId()); |
142 | 164 | |
143 | 165 | handlApplyOrder(patients, hospital, postReviewRequest); |