Commit 5bafbe9a9a87a20e934afcda0397c781ceadfbe9

Authored by liquanyu
1 parent 45e572039c

产筛统计报表

Showing 1 changed file with 38 additions and 22 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java View file @ 5bafbe9
... ... @@ -1158,16 +1158,33 @@
1158 1158 //图标数据
1159 1159 List<Map<String, Object>> series = new LinkedList<>();
1160 1160  
  1161 + if (CollectionUtils.isNotEmpty(configList)) {
  1162 + Map<String, Object> map = new HashMap();
  1163 + map.put("name", "产筛人数");
  1164 + map.put("type", "bar");
1161 1165  
  1166 + Map<String, Object> dMap = new HashMap();
  1167 + dMap.put("name", "诊断人数");
  1168 + dMap.put("type", "bar");
1162 1169  
1163   - List<List<String>> result = new ArrayList<>();
1164   -
1165   - int num = 1;
1166   - if (CollectionUtils.isNotEmpty(configList))
1167   - {
  1170 + List<String> csItems = new ArrayList<>();
  1171 + List<String> dItems = new ArrayList<>();
1168 1172 for (BasicConfig c : configList) {
  1173 +
  1174 + OrganizationQuery idQuery = new OrganizationQuery();
  1175 + idQuery.setYn(YnEnums.YES.getId());
  1176 +
  1177 + //查询机构数
  1178 + if (addrType == 1) {
  1179 + idQuery.setCityId(c.getId());
  1180 + } else if (addrType == 2) {
  1181 + idQuery.setAreaId(c.getId());
  1182 + }
  1183 + List<Organization> orgs = organizationService.queryOrganization(idQuery);
  1184 + List<String> hids = getConditionHospitalIds(currentUserHospPermissions, orgs);
  1185 +
1169 1186 SieveQuery sieveQuery = new SieveQuery();
1170   - sieveQuery.setHospitalIds(currentUserHospPermissions);
  1187 + sieveQuery.setHospitalIds(hids);
1171 1188 sieveQuery.setYn(YnEnums.YES.getId());
1172 1189 sieveQuery.setStatus(3);
1173 1190 if (dates != null) {
1174 1191  
1175 1192  
1176 1193  
1177 1194  
1178 1195  
1179 1196  
1180 1197  
1181 1198  
... ... @@ -1176,36 +1193,35 @@
1176 1193 sieveQuery.setResultTimeEnd(DateUtil.parseYMDHMS(dates[1] + " 23:59:59"));
1177 1194 }
1178 1195 }
1179   -
1180 1196 int sieveFinishCount = sieveService.queryListCount(sieveQuery);
1181   - List<String> csItems = new ArrayList<>();
1182 1197 csItems.add(String.valueOf(sieveFinishCount));
1183   - Map<String, Object> map = new HashMap();
1184   - map.put("name", "产筛人数");
1185   - map.put("type", "bar");
1186   - map.put("data", csItems);
1187   - series.add(map);
1188 1198  
1189 1199 DiagnosisQuery diagnosisQuery = new DiagnosisQuery();
1190   - diagnosisQuery.setHospitalIds(currentUserHospPermissions);
1191   -
  1200 + diagnosisQuery.setHospitalIds(hids);
1192 1201 if (dates != null) {
1193 1202 diagnosisQuery.setResultDateStart(DateUtil.parseYMD(dates[0]));
1194 1203 if (dates.length == 2) {
1195 1204 diagnosisQuery.setResultDateEnd(DateUtil.parseYMDHMS(dates[1] + " 23:59:59"));
1196 1205 }
1197 1206 }
1198   -
1199 1207 int diagnosisCount = diagnosisService.queryDiagnosisCount(diagnosisQuery);
1200   - List<String> dItems = new ArrayList<>();
1201 1208 dItems.add(String.valueOf(diagnosisCount));
1202   - Map<String, Object> dMap = new HashMap();
1203   - dMap.put("name", "诊断人数");
1204   - dMap.put("type", "bar");
1205   - dMap.put("data", dItems);
1206   - series.add(dMap);
  1209 + }
1207 1210  
  1211 + map.put("data", csItems);
  1212 + series.add(map);
1208 1213  
  1214 + dMap.put("data", dItems);
  1215 + series.add(dMap);
  1216 + }
  1217 +
  1218 +
  1219 + List<List<String>> result = new ArrayList<>();
  1220 +
  1221 + int num = 1;
  1222 + if (CollectionUtils.isNotEmpty(configList))
  1223 + {
  1224 + for (BasicConfig c : configList) {
1209 1225  
1210 1226 List<String> items = new ArrayList<>();
1211 1227 items.add(String.valueOf(num));