Commit f7fe2445b59d63cea2ed5f87d5b820e2cd8ab906
1 parent
2f39e05029
Exists in
master
and in
6 other branches
儿童疾病
Showing 3 changed files with 78 additions and 6 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.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/controller/AntenatalExaminationController.java
View file @
f7fe244
... | ... | @@ -14,12 +14,16 @@ |
14 | 14 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
15 | 15 | import com.lyms.platform.common.result.BaseListResponse; |
16 | 16 | import com.lyms.platform.common.result.BaseResponse; |
17 | +import com.lyms.platform.common.utils.DateUtil; | |
17 | 18 | import com.lyms.platform.common.utils.PropertiesUtils; |
18 | 19 | import com.lyms.platform.operate.web.facade.AntExRecordFacade; |
19 | 20 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
20 | 21 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
21 | 22 | import com.lyms.platform.operate.web.request.*; |
23 | +import com.lyms.platform.permission.model.Organization; | |
22 | 24 | import com.lyms.platform.permission.service.CouponService; |
25 | +import com.lyms.platform.permission.service.OrganizationService; | |
26 | +import com.lyms.platform.permission.service.UsersService; | |
23 | 27 | import org.apache.commons.lang.StringUtils; |
24 | 28 | import org.slf4j.Logger; |
25 | 29 | import org.slf4j.LoggerFactory; |
... | ... | @@ -32,6 +36,7 @@ |
32 | 36 | import javax.servlet.http.HttpServletResponse; |
33 | 37 | import javax.validation.Valid; |
34 | 38 | import java.awt.*; |
39 | +import java.util.Date; | |
35 | 40 | import java.util.List; |
36 | 41 | import java.util.Map; |
37 | 42 | |
... | ... | @@ -256,6 +261,10 @@ |
256 | 261 | return antenatalExaminationFacade.findAntExListTwo(exListQueryRequest, loginState.getId()); |
257 | 262 | } |
258 | 263 | |
264 | + | |
265 | + @Autowired | |
266 | + private OrganizationService organizationService; | |
267 | + | |
259 | 268 | /** |
260 | 269 | * 产检管理接口 |
261 | 270 | * |
... | ... | @@ -265,6 +274,17 @@ |
265 | 274 | @ResponseBody |
266 | 275 | @TokenRequired |
267 | 276 | public BaseResponse findAntEx(@Valid AntExManagerQueryRequest antExManagerQueryRequest, HttpServletRequest request) { |
277 | + | |
278 | + /** | |
279 | + * 唐山零时限制 | |
280 | + */ | |
281 | + Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) request.getAttribute("loginContext")).getId()).getOrgId()); | |
282 | + if ("4".equals(organization.getCityId())) | |
283 | + { | |
284 | + String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(), -3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); | |
285 | + antExManagerQueryRequest.setcTime(date); | |
286 | + } | |
287 | + | |
268 | 288 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
269 | 289 | return antExRecordFacade.findList(antExManagerQueryRequest, loginState.getId(), false, "true",antExManagerQueryRequest.isCurrent()); |
270 | 290 | } |
271 | 291 | |
... | ... | @@ -296,8 +316,9 @@ |
296 | 316 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
297 | 317 | antExRecordFacade.exportFindAntEx(antExManagerQueryRequest, loginState.getId(), false, httpServletResponse); |
298 | 318 | } |
319 | + @Autowired | |
320 | + private UsersService usersService; | |
299 | 321 | |
300 | - | |
301 | 322 | /** |
302 | 323 | * 产检区域管理接口 |
303 | 324 | * |
... | ... | @@ -307,6 +328,16 @@ |
307 | 328 | @ResponseBody |
308 | 329 | @TokenRequired |
309 | 330 | public BaseResponse findRegionAntEx(@Valid AntExManagerQueryRequest antExManagerQueryRequest, HttpServletRequest request) { |
331 | + | |
332 | + /** | |
333 | + * 唐山零时限制 | |
334 | + */ | |
335 | + Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) request.getAttribute("loginContext")).getId()).getOrgId()); | |
336 | + if ("4".equals(organization.getCityId())) | |
337 | + { | |
338 | + String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(), -3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); | |
339 | + antExManagerQueryRequest.setcTime(date); | |
340 | + } | |
310 | 341 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
311 | 342 | return antExRecordFacade.findList(antExManagerQueryRequest, loginState.getId(), true, "true",antExManagerQueryRequest.isCurrent()); |
312 | 343 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
f7fe244
... | ... | @@ -11,10 +11,7 @@ |
11 | 11 | import com.lyms.platform.common.result.BaseListResponse; |
12 | 12 | import com.lyms.platform.common.result.BaseObjectResponse; |
13 | 13 | import com.lyms.platform.common.result.BaseResponse; |
14 | -import com.lyms.platform.common.utils.BeanUtils; | |
15 | -import com.lyms.platform.common.utils.ExcelUtil; | |
16 | -import com.lyms.platform.common.utils.ExceptionUtils; | |
17 | -import com.lyms.platform.common.utils.SystemConfig; | |
14 | +import com.lyms.platform.common.utils.*; | |
18 | 15 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
19 | 16 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
20 | 17 | import com.lyms.platform.operate.web.facade.BasicConfigFacade; |
... | ... | @@ -25,6 +22,9 @@ |
25 | 22 | import com.lyms.platform.operate.web.result.PatientManagerQueryModel; |
26 | 23 | import com.lyms.platform.operate.web.result.PatientManagerResult; |
27 | 24 | import com.lyms.platform.operate.web.service.RareBloodGroupService; |
25 | +import com.lyms.platform.permission.model.Organization; | |
26 | +import com.lyms.platform.permission.service.OrganizationService; | |
27 | +import com.lyms.platform.permission.service.UsersService; | |
28 | 28 | import com.lyms.platform.pojo.RareBloodGroupModel; |
29 | 29 | import org.apache.commons.collections.CollectionUtils; |
30 | 30 | import org.apache.commons.lang.StringUtils; |
... | ... | @@ -131,6 +131,9 @@ |
131 | 131 | return baseResponse; |
132 | 132 | } |
133 | 133 | |
134 | + | |
135 | + | |
136 | + | |
134 | 137 | /** |
135 | 138 | * 全部孕妇管理 |
136 | 139 | * |
... | ... | @@ -142,6 +145,16 @@ |
142 | 145 | @TokenRequired |
143 | 146 | public BaseResponse queryAllPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest, HttpServletRequest request) { |
144 | 147 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
148 | + /** | |
149 | + * 唐山零时限制 | |
150 | + */ | |
151 | + Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) request.getAttribute("loginContext")).getId()).getOrgId()); | |
152 | + if ("4".equals(organization.getCityId())) | |
153 | + { | |
154 | + String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(), -3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); | |
155 | + patientsQueryRequest.setBuildTime(date); | |
156 | + } | |
157 | + | |
145 | 158 | return patientFacade.queryHighRisk(patientsQueryRequest, null, 1, loginState.getId(), "true", Boolean.FALSE); |
146 | 159 | } |
147 | 160 | |
148 | 161 | |
... | ... | @@ -510,9 +523,26 @@ |
510 | 523 | @TokenRequired |
511 | 524 | public BaseResponse queryRegionAllPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest, HttpServletRequest request) { |
512 | 525 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
526 | + | |
527 | + /** | |
528 | + * 唐山零时限制 | |
529 | + */ | |
530 | + Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) request.getAttribute("loginContext")).getId()).getOrgId()); | |
531 | + if ("4".equals(organization.getCityId())) | |
532 | + { | |
533 | + String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(), -3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); | |
534 | + patientsQueryRequest.setBuildTime(date); | |
535 | + } | |
536 | + | |
537 | + | |
513 | 538 | return patientFacade.queryHighRisk(patientsQueryRequest, null, 1, loginState.getId(), "true", Boolean.TRUE); |
514 | 539 | } |
515 | 540 | |
541 | + @Autowired | |
542 | + private OrganizationService organizationService; | |
543 | + | |
544 | + @Autowired | |
545 | + private UsersService usersService; | |
516 | 546 | /** |
517 | 547 | * @auther HuJiaqi |
518 | 548 | * @createTime 2016年12月20日 15时03分 |
... | ... | @@ -524,6 +554,17 @@ |
524 | 554 | public BaseListResponse patientManager(@RequestBody PatientManagerRequest patientManagerRequest, HttpServletRequest httpServletRequest) { |
525 | 555 | BaseListResponse baseListResponse; |
526 | 556 | try { |
557 | + | |
558 | + /** | |
559 | + * 唐山零时限制 | |
560 | + */ | |
561 | + Organization organization = organizationService.getOrganization(usersService.getUsers(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()).getOrgId()); | |
562 | + if ("4".equals(organization.getCityId())) | |
563 | + { | |
564 | + String date = DateUtil.getyyyy_MM_dd(DateUtil.addMonth(new Date(),-3))+" - "+DateUtil.getyyyy_MM_dd(new Date()); | |
565 | + patientManagerRequest.setBookBuildingDate(date); | |
566 | + } | |
567 | + | |
527 | 568 | patientManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); |
528 | 569 | // PatientManagerResult patientManagerResult = patientFacade.patientManager(patientManagerRequest); |
529 | 570 | PatientManagerResult patientManagerResult = patientFacade.patientManager(patientManagerRequest); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
f7fe244
... | ... | @@ -1289,7 +1289,7 @@ |
1289 | 1289 | bm.setmHighRiskReason(b.getmHighRiskReason()); |
1290 | 1290 | bm.setYn(YnEnums.YES.getId()); |
1291 | 1291 | |
1292 | - bm.setHighRiskInfo(b.getHighRiskInfo()); | |
1292 | + bm.setHighRiskInfo(CollectionUtils.isNotEmpty(b.getHighRiskInfo()) ? b.getHighRiskInfo() : null); | |
1293 | 1293 | bm.setWeakSon(b.getWeakSon()); |
1294 | 1294 | bm.setWeakSonInfo(b.getWeakSonInfo()); |
1295 | 1295 |