Commit 5168dab849c798b80339e721160883f36d89bae4
1 parent
6d252873b0
Exists in
master
and in
6 other branches
孕妇学校
Showing 1 changed file with 14 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java
View file @
5168dab
... | ... | @@ -255,6 +255,7 @@ |
255 | 255 | if (patients != null) |
256 | 256 | { |
257 | 257 | PatientCourseModel model = new PatientCourseModel(); |
258 | + model.setPatientId(patients.getId()); | |
258 | 259 | model.setBirthday(patients.getBirth()); |
259 | 260 | model.setCardNo(patients.getCardNo()); |
260 | 261 | model.setUserName(patients.getUsername()); |
261 | 262 | |
... | ... | @@ -267,7 +268,14 @@ |
267 | 268 | model.setCreated(new Date()); |
268 | 269 | model.setModified(new Date()); |
269 | 270 | model.setYn(YnEnums.YES.getId()); |
271 | + model.setStatus(1); | |
270 | 272 | patientCourseService.addPatientCourse(model); |
273 | + | |
274 | + CourseModel courseModel = new CourseModel(); | |
275 | + courseModel.setId(courseId); | |
276 | + courseModel.setEnrolmentNum(courseModels.get(0).getEnrolmentNum() == null ? 1 : courseModels.get(0).getEnrolmentNum()+1); | |
277 | + courseService.updateCourse(courseModel); | |
278 | + | |
271 | 279 | } |
272 | 280 | |
273 | 281 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
... | ... | @@ -345,6 +353,12 @@ |
345 | 353 | model.setYn(YnEnums.YES.getId()); |
346 | 354 | model.setStatus(2); |
347 | 355 | patientCourseService.updatePatientCourse(model); |
356 | + | |
357 | + | |
358 | + CourseModel courseModel = new CourseModel(); | |
359 | + courseModel.setId(courseId); | |
360 | + courseModel.setSignNum(courseModels.get(0).getSignNum() == null ? 1 : courseModels.get(0).getSignNum() + 1); | |
361 | + courseService.updateCourse(courseModel); | |
348 | 362 | } |
349 | 363 | |
350 | 364 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |