Commit 8b1574d5725611307195b7d2850e26c4b8d8a37b
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 4 changed files
- platform-common/src/main/java/com/lyms/platform/common/result/BaseResponse.java
- platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java
platform-common/src/main/java/com/lyms/platform/common/result/BaseResponse.java
View file @
8b1574d
1 | 1 | package com.lyms.platform.common.result; |
2 | 2 | |
3 | 3 | |
4 | +import com.lyms.platform.common.utils.DateUtil; | |
5 | + | |
4 | 6 | /** |
5 | 7 | * 基础的返回模型 |
6 | 8 | * |
... | ... | @@ -16,6 +18,10 @@ |
16 | 18 | |
17 | 19 | protected String errormsg; |
18 | 20 | protected int errorcode; |
21 | + | |
22 | + public String getNow() { | |
23 | + return DateUtil.getymd(); | |
24 | + } | |
19 | 25 | |
20 | 26 | public BaseResponse() { |
21 | 27 | super(); |
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
8b1574d
... | ... | @@ -20,6 +20,10 @@ |
20 | 20 | public static final int DAY_SECONDS = 86399; |
21 | 21 | public static final int DAY_FULL_SECONDS = 86400; |
22 | 22 | |
23 | + public static String getymd() { | |
24 | + return y_m_d.format(new Date()); | |
25 | + } | |
26 | + | |
23 | 27 | public static String getymdhmss() { |
24 | 28 | return yyyyMMddHHmmssSSS.format(new Date()); |
25 | 29 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
8b1574d
... | ... | @@ -256,12 +256,13 @@ |
256 | 256 | if (patients.getType() == 1) { |
257 | 257 | |
258 | 258 | //判断在儿童建档的时候,是否设置到这个儿童对应的孕妇 设置成产妇 |
259 | - //计算规则 儿童生日 > 孕妇分娩时间 - 60 设置成分娩 | |
259 | + //计算规则 儿童生日 >= 孕妇预产期 + 24周 设置成分娩 (高帆 2016-08-04 17:34定) | |
260 | 260 | Date dueDate = patients.getDueDate(); |
261 | 261 | if (dueDate != null && request.getBabyBirthday() != null) { |
262 | 262 | Date brith = DateUtil.parseYMD(request.getBabyBirthday()); |
263 | - Date tempDate = DateUtil.addMonth(dueDate, -2); | |
264 | - if (brith.getTime() > tempDate.getTime()) { | |
263 | +// Date tempDate = DateUtil.addMonth(dueDate, -2); | |
264 | + Date tempDate = DateUtil.addWeek(dueDate, 24); | |
265 | + if (brith.getTime() >= tempDate.getTime()) { | |
265 | 266 | //设置孕妇已分娩 |
266 | 267 | Patients patientUpdate = new Patients(); |
267 | 268 | patientUpdate.setYn(YnEnums.YES.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java
View file @
8b1574d
... | ... | @@ -89,37 +89,24 @@ |
89 | 89 | { |
90 | 90 | patient.setModified(new Date()); |
91 | 91 | patient.setDueStatus(1); |
92 | + | |
93 | + //更新状态为过期 | |
94 | + //判断其为增值服务还是 标准服务 | |
95 | + if (patient.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId()) | |
96 | + { | |
97 | + patient.setServiceStatus(ServiceStatusEnums.STANDARD_OVERDUE.getId()); | |
98 | + } | |
99 | + else if (patient.getServiceType() == ServiceTypeEnums.ADD_SERVICE.getId()) | |
100 | + { | |
101 | + patient.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId()); | |
102 | + } | |
103 | + patient.setDueDate(new Date()); | |
104 | + | |
92 | 105 | //分娩状态 0未终止妊娠 1终止妊娠 |
93 | 106 | yunBookbuildingService.updatePregnant(patient, request.getPid()); |
94 | 107 | } |
95 | 108 | |
96 | 109 | } |
97 | - | |
98 | - Patients pat = null; | |
99 | - PatientsQuery patientsQuery1 = new PatientsQuery(); | |
100 | - patientsQuery1.setYn(YnEnums.YES.getId()); | |
101 | - patientsQuery1.setId(request.getId()); | |
102 | - List<Patients> pats = yunBookbuildingService.queryPregnantWithQuery(patientsQuery1); | |
103 | - if (CollectionUtils.isNotEmpty(pats)) | |
104 | - { | |
105 | - pat = pats.get(0); | |
106 | - } | |
107 | - if (pat != null) | |
108 | - { | |
109 | - //更新状态为过期 | |
110 | - //判断其为增值服务还是 标准服务 | |
111 | - if (pat.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId()) | |
112 | - { | |
113 | - pat.setServiceStatus(ServiceStatusEnums.STANDARD_OVERDUE.getId()); | |
114 | - } | |
115 | - else if (pat.getServiceType() == ServiceTypeEnums.ADD_SERVICE.getId()) | |
116 | - { | |
117 | - pat.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId()); | |
118 | - } | |
119 | - yunBookbuildingService.updatePregnant(pat,pat.getId()); | |
120 | - } | |
121 | - | |
122 | - | |
123 | 110 | |
124 | 111 | StopPregModel model = getStopPregModel(request); |
125 | 112 | model.setCreated(new Date()); |