Commit b2b601dbf4540ce609010ecc51e150716296dcb0
1 parent
247e426a5a
Exists in
master
and in
6 other branches
产检医生统计
Showing 1 changed file with 22 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntexDoctorStatistController.java
View file @
b2b601d
| ... | ... | @@ -197,18 +197,19 @@ |
| 197 | 197 | if (childBirth != null) { |
| 198 | 198 | patientsQuery.setType(childBirth); |
| 199 | 199 | } |
| 200 | - Map<String, List<String>> patientMap = new HashMap<>(); | |
| 200 | + Map<String, Set<String>> patientMap = new HashMap<>(); | |
| 201 | 201 | //获取患者集合 |
| 202 | 202 | List<Patients> patientsList = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
| 203 | + patientId = new ArrayList<>(); | |
| 203 | 204 | for (Patients ps : patientsList) { |
| 204 | - if(patientMap.containsKey(ps.getPid())){//存在 | |
| 205 | - List<String> paId = patientMap.get(ps.getPid()); | |
| 206 | - | |
| 207 | - }else{ | |
| 208 | - List<String> paId = new ArrayList<>(); | |
| 205 | + if (patientMap.containsKey(ps.getPid())) {//存在 | |
| 206 | + patientMap.get(ps.getPid()).add(ps.getId()); | |
| 207 | + } else { | |
| 208 | + Set<String> paId = new HashSet<>(); | |
| 209 | 209 | paId.add(ps.getId()); |
| 210 | - patientMap.put(ps.getPid(),paId); | |
| 210 | + patientMap.put(ps.getPid(), paId); | |
| 211 | 211 | } |
| 212 | + patientId.add(ps.getId()); | |
| 212 | 213 | } |
| 213 | 214 | |
| 214 | 215 | //根据当前登录人获取医院id |
| ... | ... | @@ -232,7 +233,20 @@ |
| 232 | 233 | |
| 233 | 234 | //添加初诊结果 |
| 234 | 235 | for (AntExChuModel ac : antExChuModels) { |
| 235 | - AntextDoctorPatient doctorPatient = resultInfo.get(ac.getParentId()); | |
| 236 | + AntextDoctorPatient doctorPatient = null; | |
| 237 | + | |
| 238 | + if (!resultInfo.containsKey(ac.getParentId())) { | |
| 239 | + Set<String> pSet = patientMap.get(ac.getPid()); | |
| 240 | + for (String pid : pSet) { | |
| 241 | + if (resultInfo.containsKey(pid)) { | |
| 242 | + doctorPatient = resultInfo.get(pid); | |
| 243 | + continue; | |
| 244 | + } | |
| 245 | + } | |
| 246 | + }else{ | |
| 247 | + doctorPatient = resultInfo.get(ac.getParentId()); | |
| 248 | + } | |
| 249 | + | |
| 236 | 250 | doctorPatient.setAllCjNum(doctorPatient.getAllCjNum() + 1); |
| 237 | 251 | if (ac.getHospitalId().equals(hospital)) {//如果医院id相同, |
| 238 | 252 | if (hostNum.containsKey(ac.getPid())) { |