Commit 324386e8ac4639b6ac6659777b92a33ecd90b5f1
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 4 changed files
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/LisHandleTask.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
324386e
... | ... | @@ -368,7 +368,14 @@ |
368 | 368 | * 就诊卡号 |
369 | 369 | */ |
370 | 370 | private String vcCardNo; |
371 | + | |
372 | + | |
371 | 373 | /** |
374 | + * 就诊卡号 | |
375 | + */ | |
376 | + private List<String> vcCardNos; | |
377 | + | |
378 | + /** | |
372 | 379 | * 生日 |
373 | 380 | */ |
374 | 381 | private Date birthStart; |
... | ... | @@ -478,6 +485,14 @@ |
478 | 485 | // 是否自动分娩 |
479 | 486 | private Integer isAutoFm = -1; |
480 | 487 | |
488 | + public List<String> getVcCardNos() { | |
489 | + return vcCardNos; | |
490 | + } | |
491 | + | |
492 | + public void setVcCardNos(List<String> vcCardNos) { | |
493 | + this.vcCardNos = vcCardNos; | |
494 | + } | |
495 | + | |
481 | 496 | public List<Integer> getSmsBuildTypeList() { |
482 | 497 | return smsBuildTypeList; |
483 | 498 | } |
... | ... | @@ -1078,6 +1093,11 @@ |
1078 | 1093 | condition = condition.and("cardNo", cardNo, MongoOper.IS); |
1079 | 1094 | |
1080 | 1095 | } |
1096 | + | |
1097 | + if (null != vcCardNos) { | |
1098 | + condition = condition.and("vcCardNo", vcCardNos, MongoOper.IN); | |
1099 | + } | |
1100 | + | |
1081 | 1101 | if (StringUtils.isNotEmpty(phone)) { |
1082 | 1102 | condition = condition.and("phone", phone, MongoOper.IS); |
1083 | 1103 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
324386e
... | ... | @@ -593,7 +593,16 @@ |
593 | 593 | { |
594 | 594 | if (StringUtils.isNotEmpty(pat.getVcCardNo())) |
595 | 595 | { |
596 | - vcCardNos.add(pat.getVcCardNo()); | |
596 | + //德州市妇幼保健院 解决德州妇幼孕妇换卡的问题 | |
597 | + if ("6".equals(HIS_VERSION) && "1000000114".equals(pat.getHospitalId())) | |
598 | + { | |
599 | + vcCardNos.addAll(dzfyHisService.getDzVcCardNos(pat.getVcCardNo())); | |
600 | + } | |
601 | + else | |
602 | + { | |
603 | + vcCardNos.add(pat.getVcCardNo()); | |
604 | + } | |
605 | + | |
597 | 606 | } |
598 | 607 | if (StringUtils.isNotEmpty(pat.getPhone())) |
599 | 608 | { |
600 | 609 | |
601 | 610 | |
... | ... | @@ -773,14 +782,9 @@ |
773 | 782 | query.setSort(" APPLY_TIME DESC "); |
774 | 783 | query.setStatus(0); //未推送状态 |
775 | 784 | |
776 | - | |
777 | - | |
778 | 785 | Map<String,Object> result = new HashMap<>(); |
786 | + List<Map<String,String>> lists = new ArrayList<>(); | |
779 | 787 | |
780 | - | |
781 | - final CopyOnWriteArraySet<String> patientIds = new CopyOnWriteArraySet<>(); | |
782 | - List<Map<String,String>> lists = new ArrayList<>(); | |
783 | - | |
784 | 788 | List<LisReportModel> lises = lisService.queryLisDataByStatus(query); |
785 | 789 | if (CollectionUtils.isNotEmpty(lises)) |
786 | 790 | { |
... | ... | @@ -806,7 +810,7 @@ |
806 | 810 | end = lises.size(); |
807 | 811 | } |
808 | 812 | final List<LisReportModel> models = lises.subList(i, end); |
809 | - Callable c = new LisHandleTask(patientsService,models,map); | |
813 | + Callable c = new LisHandleTask(patientsService,models,map,dzfyHisService); | |
810 | 814 | Future f = commonThreadPool.submit(c); |
811 | 815 | futures.add(f); |
812 | 816 | } |
... | ... | @@ -823,8 +827,6 @@ |
823 | 827 | } |
824 | 828 | } |
825 | 829 | } |
826 | - long end2 = System.currentTimeMillis(); | |
827 | - patientIds.clear(); | |
828 | 830 | |
829 | 831 | result.put("list", lists); |
830 | 832 | result.put("hasNext",CollectionUtils.isNotEmpty(lises) && lises.size() >= limit ? "true" : "false"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/LisHandleTask.java
View file @
324386e
1 | 1 | package com.lyms.platform.operate.web.utils; |
2 | 2 | |
3 | +import com.lyms.hospitalapi.dzfy.DzfyHisService; | |
3 | 4 | import com.lyms.platform.biz.service.PatientsService; |
4 | 5 | import com.lyms.platform.common.enums.YnEnums; |
5 | 6 | import com.lyms.platform.common.utils.DateUtil; |
7 | +import com.lyms.platform.common.utils.PropertiesUtils; | |
6 | 8 | import com.lyms.platform.common.utils.StringUtils; |
7 | 9 | import com.lyms.platform.permission.model.LisReportModel; |
8 | 10 | import com.lyms.platform.pojo.Patients; |
9 | 11 | |
10 | 12 | |
11 | 13 | |
... | ... | @@ -19,18 +21,22 @@ |
19 | 21 | * Created by Administrator on 2017-05-15. |
20 | 22 | */ |
21 | 23 | public class LisHandleTask implements Callable { |
22 | - | |
24 | + public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version"); | |
23 | 25 | private PatientsService patientsService; |
24 | 26 | |
25 | 27 | private List<LisReportModel> lises; |
26 | 28 | |
27 | 29 | private Map<String, String> hospitalMap; |
30 | + private DzfyHisService dzfyHisService; | |
28 | 31 | |
29 | - public LisHandleTask(PatientsService patientsService,List<LisReportModel> lises,Map<String, String> hospitalMap) | |
32 | + public LisHandleTask(PatientsService patientsService,List<LisReportModel> lises, | |
33 | + Map<String, String> hospitalMap, | |
34 | + DzfyHisService dzfyHisService) | |
30 | 35 | { |
31 | 36 | this.patientsService = patientsService; |
32 | 37 | this.lises = lises; |
33 | 38 | this.hospitalMap = hospitalMap; |
39 | + this.dzfyHisService = dzfyHisService; | |
34 | 40 | } |
35 | 41 | |
36 | 42 | @Override |
... | ... | @@ -55,7 +61,16 @@ |
55 | 61 | patientsQuery.setYn(YnEnums.YES.getId()); |
56 | 62 | if (StringUtils.isNotEmpty(lisReportModel.getVcCardNo())) |
57 | 63 | { |
58 | - patientsQuery.setVcCardNo(lisReportModel.getVcCardNo()); | |
64 | + | |
65 | + //德州市妇幼保健院 解决德州妇幼孕妇换卡的问题 | |
66 | + if ("6".equals(HIS_VERSION) && "1000000114".equals(lisReportModel.getHospitalId())) | |
67 | + { | |
68 | + patientsQuery.setVcCardNos(dzfyHisService.getDzVcCardNos(lisReportModel.getVcCardNo())); | |
69 | + } | |
70 | + else | |
71 | + { | |
72 | + patientsQuery.setVcCardNo(lisReportModel.getVcCardNo()); | |
73 | + } | |
59 | 74 | list.addAll(patientsService.queryPatient1(patientsQuery, "modified")); |
60 | 75 | } |
61 | 76 | if (StringUtils.isNotEmpty(lisReportModel.getPhone())) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
View file @
324386e
... | ... | @@ -385,7 +385,7 @@ |
385 | 385 | Map<String, Object> tempMap = new HashedMap(); |
386 | 386 | tempMap.put("id", basicConfig.getId()); |
387 | 387 | tempMap.put("name", basicConfig.getName()); |
388 | - tempMap.put("color", RiskDefaultTypeEnum.getColor(parent.getName())); | |
388 | + tempMap.put("color", "risk_" + RiskDefaultTypeEnum.getColor(parent.getName())); | |
389 | 389 | rest.add(tempMap); |
390 | 390 | } |
391 | 391 |