Commit b0d0fd1655e1a9a6e5e2ccdebf28a977a96bc944
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 6 changed files
- platform-common/src/main/java/com/lyms/platform/common/enums/FuZhongEnums.java
- 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/BookbuildingController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
platform-common/src/main/java/com/lyms/platform/common/enums/FuZhongEnums.java
View file @
b0d0fd1
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
b0d0fd1
... | ... | @@ -38,11 +38,12 @@ |
38 | 38 | @RequestMapping(method = RequestMethod.GET, value = "/antexmanage") |
39 | 39 | @ResponseBody |
40 | 40 | @TokenRequired |
41 | - public BaseResponse queryAntenatalExamination(@Valid AntenatalExaminationQueryRequest antenatalExaminationQueryRequest) { | |
41 | + public BaseResponse queryAntenatalExamination(@Valid AntenatalExaminationQueryRequest antenatalExaminationQueryRequest,HttpServletRequest request) { | |
42 | 42 | if (StringUtils.isEmpty(antenatalExaminationQueryRequest.getCardNo()) && StringUtils.isEmpty(antenatalExaminationQueryRequest.getVcCardNo())) { |
43 | 43 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请输入查询条件"); |
44 | 44 | } |
45 | - return antenatalExaminationFacade.queryAntenatalExamination(antenatalExaminationQueryRequest); | |
45 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
46 | + return antenatalExaminationFacade.queryAntenatalExamination(antenatalExaminationQueryRequest,loginState.getId()); | |
46 | 47 | } |
47 | 48 | |
48 | 49 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BookbuildingController.java
View file @
b0d0fd1
1 | 1 | package com.lyms.platform.operate.web.controller; |
2 | 2 | |
3 | 3 | |
4 | +import javax.servlet.http.HttpServletRequest; | |
4 | 5 | import javax.validation.Valid; |
5 | 6 | |
7 | +import com.lyms.platform.common.annotation.TokenRequired; | |
8 | +import com.lyms.platform.common.base.LoginContext; | |
6 | 9 | import com.lyms.platform.common.utils.StringUtils; |
7 | 10 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
8 | 11 | import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest; |
9 | 12 | |
... | ... | @@ -119,10 +122,12 @@ |
119 | 122 | */ |
120 | 123 | @RequestMapping(value = "/queryThisBabyPatient/{id}", method = RequestMethod.GET) |
121 | 124 | @ResponseBody |
122 | - public BaseResponse queryThisBabyPatient(@PathVariable("id")String id){ | |
125 | + @TokenRequired | |
126 | + public BaseResponse queryThisBabyPatient(@PathVariable("id")String id,HttpServletRequest request){ | |
123 | 127 | AntenatalExaminationQueryRequest antenatalExaminationQueryRequest = new AntenatalExaminationQueryRequest(); |
124 | 128 | antenatalExaminationQueryRequest.setPatientId(id); |
125 | - return antenatalExaminationFacade.queryAntenatalExamination(antenatalExaminationQueryRequest); | |
129 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
130 | + return antenatalExaminationFacade.queryAntenatalExamination(antenatalExaminationQueryRequest,loginState.getId()); | |
126 | 131 | } |
127 | 132 | |
128 | 133 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
View file @
b0d0fd1
... | ... | @@ -37,8 +37,9 @@ |
37 | 37 | @RequestMapping(value = "/matmanger",method = RequestMethod.GET) |
38 | 38 | @ResponseBody |
39 | 39 | @TokenRequired |
40 | - public BaseResponse queryMatDeliver(@Valid MatDeliverQueryRequest deliverQueryRequest) { | |
41 | - return matDeliverFacade.queryMatDeliver(deliverQueryRequest); | |
40 | + public BaseResponse queryMatDeliver(@Valid MatDeliverQueryRequest deliverQueryRequest,HttpServletRequest request) { | |
41 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
42 | + return matDeliverFacade.queryMatDeliver(deliverQueryRequest,loginState.getId()); | |
42 | 43 | } |
43 | 44 | |
44 | 45 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
b0d0fd1
... | ... | @@ -10,7 +10,10 @@ |
10 | 10 | import com.lyms.platform.common.utils.JsonUtil; |
11 | 11 | import com.lyms.platform.common.utils.SystemConfig; |
12 | 12 | import com.lyms.platform.operate.web.request.*; |
13 | -import com.lyms.platform.operate.web.result.*; | |
13 | +import com.lyms.platform.operate.web.result.AntData; | |
14 | +import com.lyms.platform.operate.web.result.AntenatalExaminationResult; | |
15 | +import com.lyms.platform.operate.web.result.AntexChuResult; | |
16 | +import com.lyms.platform.operate.web.result.AntexListResult; | |
14 | 17 | import com.lyms.platform.permission.model.Organization; |
15 | 18 | import com.lyms.platform.permission.service.OrganizationService; |
16 | 19 | import com.lyms.platform.pojo.*; |
17 | 20 | |
... | ... | @@ -71,12 +74,12 @@ |
71 | 74 | if (CollectionUtils.isNotEmpty(list1)) { |
72 | 75 | model.setHospitalId(list1.get(0) + ""); |
73 | 76 | } |
74 | - AntExQuery antExQuery=new AntExQuery(); | |
77 | + AntExQuery antExQuery = new AntExQuery(); | |
75 | 78 | antExQuery.setYn(YnEnums.YES.getId()); |
76 | 79 | antExQuery.setParentId(antExAddRequest.getParentId()); |
77 | 80 | antExQuery.setStart(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date()))); |
78 | 81 | List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); |
79 | - if(CollectionUtils.isNotEmpty(list)){ | |
82 | + if (CollectionUtils.isNotEmpty(list)) { | |
80 | 83 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("同一天只能建一次复诊"); |
81 | 84 | } |
82 | 85 | antenatalExaminationService.addOneBabyAnt(model); |
83 | 86 | |
84 | 87 | |
85 | 88 | |
... | ... | @@ -116,20 +119,20 @@ |
116 | 119 | List list1 = autoMatchFacade.matchOrgId(userId); |
117 | 120 | if (CollectionUtils.isNotEmpty(list1)) { |
118 | 121 | antExChuModel.setHospitalId(list1.get(0) + ""); |
119 | - AntExChuQuery antExChuQuery=new AntExChuQuery(); | |
122 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
120 | 123 | antExChuQuery.setYn(YnEnums.YES.getId()); |
121 | 124 | antExChuQuery.setHospitalId(list1.get(0) + ""); |
122 | 125 | |
123 | 126 | Patients patients = patientsService.findOnePatientById(excAddRequest.getParentId()); |
124 | - PatientsQuery patientsQuery=new PatientsQuery(); | |
127 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
125 | 128 | patientsQuery.setPid(patients.getPid()); |
126 | 129 | patientsQuery.setYn(YnEnums.YES.getId()); |
127 | 130 | |
128 | - List<Patients> list = patientsService.queryPatient(patientsQuery); | |
131 | + List<Patients> list = patientsService.queryPatient(patientsQuery); | |
129 | 132 | antExChuQuery.setStart(list.get(0).getCreated()); |
130 | 133 | antExChuQuery.setParentId(excAddRequest.getParentId()); |
131 | - List<AntExChuModel> data = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
132 | - if(CollectionUtils.isNotEmpty(data)){ | |
134 | + List<AntExChuModel> data = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
135 | + if (CollectionUtils.isNotEmpty(data)) { | |
133 | 136 | return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("您本次妊娠中已在本医院建档"); |
134 | 137 | } |
135 | 138 | } |
... | ... | @@ -141,7 +144,7 @@ |
141 | 144 | |
142 | 145 | /** |
143 | 146 | * 获取最后一次高危产检的高危信息 |
144 | - * | |
147 | + * <p> | |
145 | 148 | * 先取复诊最后一条,在取初诊 |
146 | 149 | * |
147 | 150 | * @return |
... | ... | @@ -153,7 +156,7 @@ |
153 | 156 | model = list.get(0); |
154 | 157 | } |
155 | 158 | try { |
156 | - if(null!=model&&StringUtils.isNotEmpty(model.getRiskFactor())){ | |
159 | + if (null != model && StringUtils.isNotEmpty(model.getRiskFactor())) { | |
157 | 160 | List list1 = JsonUtil.toList(model.getRiskFactor(), List.class); |
158 | 161 | return queryRisk(list1); |
159 | 162 | } |
... | ... | @@ -168,7 +171,7 @@ |
168 | 171 | antExChuModel = list1.get(0); |
169 | 172 | } |
170 | 173 | try { |
171 | - if(null!=antExChuModel &&StringUtils.isNotEmpty(antExChuModel.getHighrisk())){ | |
174 | + if (null != antExChuModel && StringUtils.isNotEmpty(antExChuModel.getHighrisk())) { | |
172 | 175 | List list2 = JsonUtil.toList(antExChuModel.getHighrisk(), List.class); |
173 | 176 | return queryRisk(list2); |
174 | 177 | } |
175 | 178 | |
176 | 179 | |
... | ... | @@ -196,15 +199,15 @@ |
196 | 199 | if (CollectionUtils.isNotEmpty(list)) { |
197 | 200 | antexListResult.convertToResult(null, list.get(0), null); |
198 | 201 | for (Patients patients : list) { |
199 | - List<StopPregModel> stopPregs =null; | |
202 | + List<StopPregModel> stopPregs = null; | |
200 | 203 | List<AntData> data = new ArrayList<>(); |
201 | 204 | MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); |
202 | 205 | matDeliverQuery.setYn(YnEnums.YES.getId()); |
203 | 206 | matDeliverQuery.setParentId(patients.getId()); |
204 | - Organization organization=null; | |
207 | + Organization organization = null; | |
205 | 208 | //建档记录 |
206 | - if(null!=patients.getHospitalId()){ | |
207 | - organization = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())); | |
209 | + if (null != patients.getHospitalId()) { | |
210 | + organization = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())); | |
208 | 211 | } |
209 | 212 | data.add(new AntData(patients, null != organization ? organization.getName() : "")); |
210 | 213 | //分娩记录 |
211 | 214 | |
212 | 215 | |
213 | 216 | |
... | ... | @@ -213,17 +216,18 @@ |
213 | 216 | if (CollectionUtils.isNotEmpty(modelList)) { |
214 | 217 | MaternalDeliverModel model = modelList.get(0); |
215 | 218 | dueDate = model.getDueDate(); |
216 | - }else { | |
219 | + } else { | |
217 | 220 | //终止妊娠 |
218 | - StopPregQuery query = new StopPregQuery(); | |
221 | + StopPregQuery query = new StopPregQuery(); | |
219 | 222 | query.setYn(YnEnums.YES.getId()); |
220 | 223 | query.setPid(patients.getPid()); |
221 | - stopPregs = stopPregnancyService.queryStopPreg(query); | |
222 | - if(CollectionUtils.isNotEmpty(stopPregs)){ | |
223 | - dueDate=DateUtil.getyyyy_MM_dd(stopPregs.get(0).getStopDate()); | |
224 | + stopPregs = stopPregnancyService.queryStopPreg(query); | |
225 | + if (CollectionUtils.isNotEmpty(stopPregs)) { | |
226 | + dueDate = DateUtil.getyyyy_MM_dd(stopPregs.get(0).getStopDate()); | |
224 | 227 | } |
225 | 228 | } |
226 | - PostReviewQuery postReviewQuery = new PostReviewQuery();; | |
229 | + PostReviewQuery postReviewQuery = new PostReviewQuery(); | |
230 | + ; | |
227 | 231 | if (StringUtils.isNotEmpty(dueDate)) { |
228 | 232 | Date date = DateUtil.parseYMD(dueDate); |
229 | 233 | //初诊记录 |
... | ... | @@ -235,7 +239,7 @@ |
235 | 239 | List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); |
236 | 240 | if (CollectionUtils.isNotEmpty(antExChuModels)) { |
237 | 241 | for (AntExChuModel an : antExChuModels) { |
238 | - if(null!=an.getHospitalId()) { | |
242 | + if (null != an.getHospitalId()) { | |
239 | 243 | organization = organizationService.getOrganization(Integer.valueOf(an.getHospitalId())); |
240 | 244 | } |
241 | 245 | data.add(new AntData(an, null != organization ? organization.getName() : "")); |
... | ... | @@ -250,7 +254,7 @@ |
250 | 254 | List<AntenatalExaminationModel> list1 = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); |
251 | 255 | if (CollectionUtils.isNotEmpty(list1)) { |
252 | 256 | for (AntenatalExaminationModel an : list1) { |
253 | - if(null!=an.getHospitalId()) { | |
257 | + if (null != an.getHospitalId()) { | |
254 | 258 | organization = organizationService.getOrganization(Integer.valueOf(an.getHospitalId())); |
255 | 259 | } |
256 | 260 | data.add(new AntData(an, null != organization ? organization.getName() : "")); |
... | ... | @@ -272,7 +276,7 @@ |
272 | 276 | if (CollectionUtils.isNotEmpty(modelList)) { |
273 | 277 | organization = organizationService.getOrganization(Integer.valueOf(modelList.get(0).getHospitalId())); |
274 | 278 | data.add(new AntData(modelList.get(0), patients.getLastMenses(), null != organization ? organization.getName() : "")); |
275 | - }else if(CollectionUtils.isNotEmpty(stopPregs)){ | |
279 | + } else if (CollectionUtils.isNotEmpty(stopPregs)) { | |
276 | 280 | //终止妊娠记录 |
277 | 281 | organization = organizationService.getOrganization(Integer.valueOf(modelList.get(0).getHospitalId())); |
278 | 282 | data.add(new AntData(stopPregs.get(0), patients.getLastMenses(), null != organization ? organization.getName() : "")); |
... | ... | @@ -281,7 +285,7 @@ |
281 | 285 | List<PostReviewModel> reviewModels = postReviewService.findWithList(postReviewQuery); |
282 | 286 | if (CollectionUtils.isNotEmpty(reviewModels)) { |
283 | 287 | for (PostReviewModel postReviewModel : reviewModels) { |
284 | - if(null!=postReviewModel.getHospitalId()) { | |
288 | + if (null != postReviewModel.getHospitalId()) { | |
285 | 289 | organization = organizationService.getOrganization(Integer.valueOf(postReviewModel.getHospitalId())); |
286 | 290 | } |
287 | 291 | data.add(new AntData(postReviewModel, null != organization ? organization.getName() : "")); |
... | ... | @@ -325,7 +329,7 @@ |
325 | 329 | * @param vcCardNo |
326 | 330 | * @return |
327 | 331 | */ |
328 | - public Patients findOnePatient(String cardNo, String vcCardNo, String id) { | |
332 | + public Patients findOnePatient(String cardNo, String vcCardNo, String id, String hospitalId) { | |
329 | 333 | PatientsQuery patientsQuery = new PatientsQuery(); |
330 | 334 | if (StringUtils.isNotEmpty(cardNo)) { |
331 | 335 | patientsQuery.setCardNo(cardNo); |
332 | 336 | |
333 | 337 | |
334 | 338 | |
335 | 339 | |
336 | 340 | |
337 | 341 | |
338 | 342 | |
339 | 343 | |
... | ... | @@ -334,41 +338,47 @@ |
334 | 338 | } else if (StringUtils.isNotEmpty(id)) { |
335 | 339 | patientsQuery.setId(id); |
336 | 340 | } |
337 | - | |
341 | + patientsQuery.setHospitalId(hospitalId); | |
338 | 342 | patientsQuery.setYn(YnEnums.YES.getId()); |
339 | 343 | Patients patients = null; |
340 | 344 | List<Patients> list = patientsService.queryPatient(patientsQuery); |
341 | 345 | if (CollectionUtils.isNotEmpty(list)) { |
342 | - patients = list.get(0); | |
346 | + return list.get(0); | |
343 | 347 | } |
348 | + patientsQuery.setHospitalId(null); | |
349 | + list = patientsService.queryPatient(patientsQuery); | |
350 | + if (CollectionUtils.isNotEmpty(list)) { | |
351 | + return list.get(0); | |
352 | + } | |
344 | 353 | return patients; |
345 | 354 | } |
346 | 355 | |
347 | 356 | /** |
348 | 357 | * 查看是否满足产筛申请条件 |
349 | - * | |
358 | + * <p> | |
350 | 359 | * 1.孕周 15周-到20 周 并且没有做过产筛 |
360 | + * | |
351 | 361 | * @param date |
352 | 362 | * @param parentId |
353 | 363 | * @return |
354 | 364 | */ |
355 | - public String cap(Date date,String parentId){ | |
356 | - if(null==date){ | |
365 | + public String cap(Date date, String parentId) { | |
366 | + if (null == date) { | |
357 | 367 | return "0"; |
358 | 368 | } |
359 | - int day= DateUtil.getDays(date,new Date()); | |
360 | - int start = 15*7; | |
361 | - int end = 20*7+6; | |
362 | - if(day>=start&&day<=end){ | |
363 | - SieveApplyOrderQuery sieveApplyOrderQuery=new SieveApplyOrderQuery(); | |
369 | + int day = DateUtil.getDays(date, new Date()); | |
370 | + int start = 15 * 7; | |
371 | + int end = 20 * 7 + 6; | |
372 | + if (day >= start && day <= end) { | |
373 | + SieveApplyOrderQuery sieveApplyOrderQuery = new SieveApplyOrderQuery(); | |
364 | 374 | sieveApplyOrderQuery.setYn(YnEnums.YES.getId()); |
365 | 375 | sieveApplyOrderQuery.setParentId(parentId); |
366 | 376 | List<SieveApplyOrderModel> list = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery); |
367 | - if(CollectionUtils.isEmpty(list)){ | |
377 | + if (CollectionUtils.isEmpty(list)) { | |
368 | 378 | return "1"; |
369 | 379 | } |
370 | 380 | } |
371 | - return "0"; | |
381 | + return "0"; | |
372 | 382 | } |
373 | 383 | |
374 | 384 | /** |
375 | 385 | |
... | ... | @@ -377,9 +387,10 @@ |
377 | 387 | * @param queryRequest |
378 | 388 | * @return |
379 | 389 | */ |
380 | - public BaseResponse queryAntenatalExamination(AntenatalExaminationQueryRequest queryRequest) { | |
390 | + public BaseResponse queryAntenatalExamination(AntenatalExaminationQueryRequest queryRequest,Integer userId) { | |
381 | 391 | |
382 | 392 | Patients patients = null; |
393 | + Patients patients1 = null; | |
383 | 394 | if (!StringUtils.isEmpty(queryRequest.getPatientId())) { |
384 | 395 | PatientsQuery patientsQuery = new PatientsQuery(); |
385 | 396 | patientsQuery.setId(queryRequest.getPatientId()); |
386 | 397 | |
387 | 398 | |
... | ... | @@ -388,10 +399,17 @@ |
388 | 399 | List<Patients> list = patientsService.queryPatient(patientsQuery); |
389 | 400 | if (CollectionUtils.isNotEmpty(list)) { |
390 | 401 | patients = list.get(0); |
402 | + patients1=patients; | |
391 | 403 | } |
392 | 404 | } else { |
405 | + List<Integer> list1 =autoMatchFacade.matchOrgId(userId); | |
406 | + String hospital =null; | |
407 | + if(CollectionUtils.isNotEmpty(list1)){ | |
408 | + hospital= list1.get(0) + ""; | |
409 | + } | |
393 | 410 | //查询产妇数据 |
394 | - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null); | |
411 | + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(),null, hospital); | |
412 | + patients1 = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(),null, null); | |
395 | 413 | } |
396 | 414 | |
397 | 415 | if (null == patients) { |
... | ... | @@ -400,7 +418,7 @@ |
400 | 418 | |
401 | 419 | AntexListResult antexListResult = new AntexListResult(); |
402 | 420 | AntExChuQuery antExChuQuery = new AntExChuQuery(); |
403 | - antExChuQuery.setParentId(patients.getId()); | |
421 | + antExChuQuery.setParentId(patients1.getId()); | |
404 | 422 | antExChuQuery.setYn(YnEnums.YES.getId()); |
405 | 423 | //获取初诊记录 |
406 | 424 | List<AntExChuModel> antExChulist = antenatalExaminationService.queryAntExChu(antExChuQuery); |
... | ... | @@ -409,7 +427,7 @@ |
409 | 427 | antExChuModel = antExChulist.get(0); |
410 | 428 | } |
411 | 429 | //查询产前检查记录 |
412 | - List list = antenatalExaminationService.findAllByParentId(patients.getId()); | |
430 | + List list = antenatalExaminationService.findAllByParentId(patients1.getId()); | |
413 | 431 | List data = new ArrayList(); |
414 | 432 | if (null != antExChuModel && StringUtils.isNotEmpty(antExChuModel.getHighrisk())) { |
415 | 433 | List l = JsonUtil.toList(antExChuModel.getHighrisk(), List.class); |
... | ... | @@ -417,7 +435,7 @@ |
417 | 435 | } |
418 | 436 | |
419 | 437 | antexListResult.convertToResult(list, patients, antExChulist); |
420 | - antexListResult.setIsSieve(cap(patients.getLastMenses(),patients.getId())); | |
438 | + antexListResult.setIsSieve(cap(patients.getLastMenses(), patients1.getId())); | |
421 | 439 | antexListResult.setRiskFactor(data); |
422 | 440 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(antexListResult); |
423 | 441 | } |
424 | 442 | |
... | ... | @@ -449,14 +467,14 @@ |
449 | 467 | AntenatalExaminationResult antenatalExaminationResult = new AntenatalExaminationResult(); |
450 | 468 | antenatalExaminationResult.convertToResult(examinationModel); |
451 | 469 | try { |
452 | - if(StringUtils.isNotEmpty(examinationModel.getRiskFactor())){ | |
470 | + if (StringUtils.isNotEmpty(examinationModel.getRiskFactor())) { | |
453 | 471 | List list1 = JsonUtil.toList(examinationModel.getRiskFactor(), List.class); |
454 | 472 | antenatalExaminationResult.setRiskFactor(queryRisk(list1)); |
455 | 473 | } |
456 | 474 | } catch (Exception e) { |
457 | 475 | } |
458 | 476 | try { |
459 | - if(StringUtils.isNotEmpty(examinationModel.getDiagnosis())) { | |
477 | + if (StringUtils.isNotEmpty(examinationModel.getDiagnosis())) { | |
460 | 478 | List list = JsonUtil.toList(examinationModel.getDiagnosis(), List.class); |
461 | 479 | antenatalExaminationResult.setDiagnosis(queryRisk(list)); |
462 | 480 | } |
... | ... | @@ -469,9 +487,9 @@ |
469 | 487 | applyOrderQuery.setParentId(examinationModel.getParentId()); |
470 | 488 | applyOrderQuery.setYn(YnEnums.YES.getId()); |
471 | 489 | Patients patients = patientsService.findOnePatientById(examinationModel.getParentId()); |
472 | - Date data = null; | |
473 | - if(null!=data){ | |
474 | - data=patients.getLastMenses(); | |
490 | + Date data = null; | |
491 | + if (null != data) { | |
492 | + data = patients.getLastMenses(); | |
475 | 493 | } |
476 | 494 | antenatalExaminationResult.setIsSieve(cap(data, examinationModel.getParentId())); |
477 | 495 | antenatalExaminationResult.setHasSieve(CollectionUtils.isEmpty(applyOrderService.querySieveApplyOrderWithQuery(applyOrderQuery)) ? 0 : 1); |
478 | 496 | |
479 | 497 | |
... | ... | @@ -487,17 +505,17 @@ |
487 | 505 | if (CollectionUtils.isNotEmpty(antExChuModels)) { |
488 | 506 | antExChuModel = antExChuModels.get(0); |
489 | 507 | } |
490 | - if(null!=antExChuModel){ | |
508 | + if (null != antExChuModel) { | |
491 | 509 | antexChuResult.convertToResult(antExChuModel); |
492 | 510 | try { |
493 | - if(StringUtils.isNotEmpty(antExChuModel.getDiagnosis())){ | |
511 | + if (StringUtils.isNotEmpty(antExChuModel.getDiagnosis())) { | |
494 | 512 | List list = JsonUtil.toList(antExChuModel.getDiagnosis(), List.class); |
495 | 513 | antexChuResult.setDiagnosis(queryRisk(list)); |
496 | 514 | } |
497 | 515 | } catch (Exception e) { |
498 | 516 | } |
499 | 517 | try { |
500 | - if(StringUtils.isNotEmpty(antExChuModel.getHighrisk())) { | |
518 | + if (StringUtils.isNotEmpty(antExChuModel.getHighrisk())) { | |
501 | 519 | List list1 = JsonUtil.toList(antExChuModel.getHighrisk(), List.class); |
502 | 520 | antexChuResult.setHighrisk(queryRisk(list1)); |
503 | 521 | } |
... | ... | @@ -510,7 +528,7 @@ |
510 | 528 | applyOrderQuery.setParentId(antExChuModel.getParentId()); |
511 | 529 | applyOrderQuery.setYn(YnEnums.YES.getId()); |
512 | 530 | antexChuResult.setHasSieve(CollectionUtils.isEmpty(applyOrderService.querySieveApplyOrderWithQuery(applyOrderQuery)) ? 0 : 1); |
513 | - antexChuResult.setIsSieve(cap(antExChuModel.getLastMenses(),antExChuModel.getParentId())); | |
531 | + antexChuResult.setIsSieve(cap(antExChuModel.getLastMenses(), antExChuModel.getParentId())); | |
514 | 532 | object = antexChuResult; |
515 | 533 | } |
516 | 534 | } |
517 | 535 | |
... | ... | @@ -554,9 +572,10 @@ |
554 | 572 | map.put("fxys", basicConfigFacade.getBaseicConfigByParentId(SystemConfig.FXYS)); |
555 | 573 | map.put("gwfz", basicConfigFacade.getBaseicConfigByParentId(SystemConfig.GWFZ)); |
556 | 574 | map.put("organizations", convert()); |
557 | - map.put("cTime",DateUtil.getyyyy_MM_dd(new Date())); | |
575 | + map.put("cTime", DateUtil.getyyyy_MM_dd(new Date())); | |
558 | 576 | return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
559 | 577 | } |
578 | + | |
560 | 579 | //胎数 |
561 | 580 | public List getTaiShu() { |
562 | 581 | List<Object> list = new ArrayList<>(); |
... | ... | @@ -568,6 +587,7 @@ |
568 | 587 | } |
569 | 588 | return list; |
570 | 589 | } |
590 | + | |
571 | 591 | public List convert() { |
572 | 592 | List<Organization> organization = organizationService.queryHospital(); |
573 | 593 | List data = new ArrayList(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
b0d0fd1
... | ... | @@ -229,9 +229,14 @@ |
229 | 229 | * @param deliverQueryRequest |
230 | 230 | * @return |
231 | 231 | */ |
232 | - public BaseResponse queryMatDeliver(MatDeliverQueryRequest deliverQueryRequest) { | |
232 | + public BaseResponse queryMatDeliver(MatDeliverQueryRequest deliverQueryRequest,Integer userId) { | |
233 | + List<Integer> list1 =autoMatchFacade.matchOrgId(userId); | |
234 | + String hospital =null; | |
235 | + if(CollectionUtils.isNotEmpty(list1)){ | |
236 | + hospital= list1.get(0) + ""; | |
237 | + } | |
233 | 238 | //获取 |
234 | - Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null); | |
239 | + Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null,hospital); | |
235 | 240 | if (null == patients) { |
236 | 241 | return new BaseResponse().setErrormsg("没有相关的产妇记录").setErrorcode(ErrorCodeConstants.BUSINESS_ERROR); |
237 | 242 | } |