Commit c46d725d0b18afe464509e3d12a8948b4c97a51c
1 parent
cb4892bcf4
Exists in
master
and in
6 other branches
追访
Showing 3 changed files with 16 additions and 6 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/PostVisitHospitalModel.java
View file @
c46d725
... | ... | @@ -6,15 +6,19 @@ |
6 | 6 | * @discription |
7 | 7 | */ |
8 | 8 | |
9 | +import com.lyms.platform.common.core.annotation.form.Form; | |
9 | 10 | import com.lyms.platform.common.result.BaseModel; |
11 | +import org.hibernate.validator.constraints.NotEmpty; | |
10 | 12 | import org.springframework.data.mongodb.core.mapping.Document; |
11 | 13 | |
14 | +import javax.validation.constraints.NotNull; | |
12 | 15 | import java.util.Date; |
13 | 16 | import java.util.List; |
14 | 17 | |
15 | 18 | /** |
16 | 19 | * 产后修养地配置 |
17 | 20 | */ |
21 | +@Form | |
18 | 22 | @Document(collection = "lyms_post_visit_hospital") |
19 | 23 | public class PostVisitHospitalModel extends BaseModel { |
20 | 24 | private String id; |
... | ... | @@ -25,6 +29,8 @@ |
25 | 29 | /** |
26 | 30 | * 产后修养医院id |
27 | 31 | */ |
32 | + @NotNull(message = "产后修养医院id不能为空") | |
33 | + @NotEmpty(message = "产后修养医院id不能为空") | |
28 | 34 | private String postHosptial; |
29 | 35 | /** |
30 | 36 | * 地址id集合 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ModularFunctionConfigController.java
View file @
c46d725
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 | import org.springframework.web.bind.annotation.*; |
16 | 16 | |
17 | 17 | import javax.servlet.http.HttpServletRequest; |
18 | +import javax.validation.Valid; | |
18 | 19 | import java.util.Map; |
19 | 20 | |
20 | 21 | |
... | ... | @@ -92,7 +93,7 @@ |
92 | 93 | @RequestMapping(method = RequestMethod.POST, value = "/addPostVisitHospital") |
93 | 94 | @ResponseBody |
94 | 95 | @TokenRequired |
95 | - public BaseResponse addPostVisitHospital(PostVisitHospitalModel model, | |
96 | + public BaseResponse addPostVisitHospital(@Valid @RequestBody PostVisitHospitalModel model, | |
96 | 97 | HttpServletRequest request) { |
97 | 98 | if(StringUtils.isNotEmpty(model.getId())){ |
98 | 99 | modularFunctionConfigFacde.updatePostVisitHospital(model, getUserId(request)); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
c46d725
... | ... | @@ -354,16 +354,19 @@ |
354 | 354 | @Override |
355 | 355 | public void run() { |
356 | 356 | try { |
357 | - //发送推送消息 | |
358 | - if (antExamModel.getSendMsg() != null && antExamModel.getSendMsg()) { | |
359 | - Patients patients = patientsService.findOnePatientById(antExamModel.getParentId()); | |
360 | - if (patients != null) { | |
361 | - patients.setVcCardNo(antExAddRequest.getVcCardNo()); | |
357 | + Patients patients = patientsService.findOnePatientById(antExamModel.getParentId()); | |
358 | + if (patients != null) { | |
359 | + patients.setVcCardNo(antExAddRequest.getVcCardNo()); | |
360 | + //发送推送消息 | |
361 | + if (antExamModel.getSendMsg() != null && antExamModel.getSendMsg()) { | |
362 | 362 | //发送推送消息 |
363 | 363 | patients.setSendMsgTime(new Date()); |
364 | + } | |
365 | + if(antExamModel.getSendMsg() != null || StringUtils.isNotEmpty(antExAddRequest.getVcCardNo())){ | |
364 | 366 | patientsService.updatePatient(patients); |
365 | 367 | } |
366 | 368 | } |
369 | + | |
367 | 370 | } catch (Exception e) { |
368 | 371 | e.printStackTrace(); |
369 | 372 | } |