Commit b821542a317f63d9082a93c7560a1951b8688288
1 parent
0cd7f6bb60
Exists in
master
and in
6 other branches
update code
Showing 2 changed files with 30 additions and 8 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
b821542
... | ... | @@ -1086,12 +1086,22 @@ |
1086 | 1086 | } |
1087 | 1087 | |
1088 | 1088 | if (null != pv) { |
1089 | - if (StringUtils.isNotEmpty(pv[0])) { | |
1090 | - condition = condition.and("phone", pv[0], MongoOper.IS); | |
1089 | + | |
1090 | + if (StringUtils.isNotEmpty(pv[0]) && StringUtils.isNotEmpty(pv[1])) | |
1091 | + { | |
1092 | + MongoCondition con1 = MongoCondition.newInstance("phone", pv[0], MongoOper.IS); | |
1093 | + MongoCondition con = MongoCondition.newInstance("vcCardNo", pv[1], MongoOper.IS); | |
1094 | + condition = condition.orCondition(new MongoCondition[]{con1, con}); | |
1091 | 1095 | } |
1096 | + else | |
1097 | + { | |
1098 | + if (StringUtils.isNotEmpty(pv[0])) { | |
1099 | + condition = condition.and("phone", pv[0], MongoOper.IS); | |
1100 | + } | |
1092 | 1101 | |
1093 | - if (StringUtils.isNotEmpty(pv[1])) { | |
1094 | - condition = condition.and("vcCardNo", pv[1], MongoOper.IS); | |
1102 | + if (StringUtils.isNotEmpty(pv[1])) { | |
1103 | + condition = condition.and("vcCardNo", pv[1], MongoOper.IS); | |
1104 | + } | |
1095 | 1105 | } |
1096 | 1106 | } |
1097 | 1107 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/LisHandleTask.java
View file @
b821542
... | ... | @@ -54,18 +54,30 @@ |
54 | 54 | String[] strs = new String[]{lisReportModel.getPhone(), lisReportModel.getVcCardNo()}; |
55 | 55 | patientsQuery.setPv(strs); |
56 | 56 | patientsQuery.setYn(YnEnums.YES.getId()); |
57 | - List<Patients> list= patientsService.queryPatient(patientsQuery); | |
57 | + List<Patients> list= patientsService.queryPatient1(patientsQuery, "modified"); | |
58 | 58 | if (CollectionUtils.isNotEmpty(list)) |
59 | 59 | { |
60 | - Patients pat = list.get(0); | |
61 | - String patientId = pat.getId(); | |
60 | + StringBuffer sb = new StringBuffer(); | |
61 | + for(int i = 0 ; i < list.size() ; i++) | |
62 | + { | |
63 | + if (list.get(i) == null) | |
64 | + { | |
65 | + continue; | |
66 | + } | |
67 | + sb.append(list.get(i).getId()); | |
68 | + if (i != list.size() - 1) | |
69 | + { | |
70 | + sb.append(","); | |
71 | + } | |
72 | + } | |
62 | 73 | |
74 | + Patients pat = list.get(0); | |
63 | 75 | map.put("vcCardNo", pat.getVcCardNo()); |
64 | 76 | map.put("name",pat.getUsername()); |
65 | 77 | map.put("phone",pat.getPhone()); |
66 | 78 | map.put("checkTime",lisReportModel.getPublishTime() == null ? DateUtil.getyyyy_MM_dd_hms(lisReportModel.getCheckTime()) |
67 | 79 | : DateUtil.getyyyy_MM_dd_hms(lisReportModel.getPublishTime())); |
68 | - map.put("patientId",patientId); | |
80 | + map.put("patientIds",sb.toString()); | |
69 | 81 | map.put("hospitalId",lisReportModel.getHospitalId()); |
70 | 82 | map.put("title", lisReportModel.getTitle()); |
71 | 83 | map.put("id",lisReportModel.getId()+""); |