Commit 5c7ee7eff9c9ad2d0010f755ea95e43cafb8fcd1
1 parent
586527a629
Exists in
master
and in
6 other branches
查看丰润区机构列表,查看第10页数据时接口返回的是该区域下的全部数据
Showing 1 changed file with 53 additions and 9 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
5c7ee7e
... | ... | @@ -6,9 +6,7 @@ |
6 | 6 | import com.lyms.platform.common.enums.YnEnums; |
7 | 7 | import com.lyms.platform.common.result.BaseListResponse; |
8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
9 | -import com.lyms.platform.common.utils.DateUtil; | |
10 | -import com.lyms.platform.common.utils.ExcelUtil; | |
11 | -import com.lyms.platform.common.utils.ExceptionUtils; | |
9 | +import com.lyms.platform.common.utils.*; | |
12 | 10 | import com.lyms.platform.common.utils.StringUtils; |
13 | 11 | import com.lyms.platform.operate.web.request.AntExManagerQueryRequest; |
14 | 12 | import com.lyms.platform.operate.web.request.CjStatisticsQueryRequest; |
15 | 13 | |
... | ... | @@ -22,14 +20,12 @@ |
22 | 20 | import com.lyms.platform.permission.model.Users; |
23 | 21 | import com.lyms.platform.permission.service.OrganizationService; |
24 | 22 | import com.lyms.platform.permission.service.UsersService; |
25 | -import com.lyms.platform.pojo.AntExRecordModel; | |
26 | -import com.lyms.platform.pojo.BasicConfig; | |
27 | -import com.lyms.platform.pojo.DataPermissionsModel; | |
28 | -import com.lyms.platform.pojo.Patients; | |
23 | +import com.lyms.platform.pojo.*; | |
29 | 24 | import com.lyms.platform.query.AntExRecordQuery; |
30 | 25 | import com.lyms.platform.query.DataPermissionsModelQuery; |
31 | 26 | import com.lyms.platform.query.PatientsQuery; |
32 | 27 | import org.apache.commons.collections.CollectionUtils; |
28 | +import org.apache.commons.lang.*; | |
33 | 29 | import org.apache.commons.lang.math.NumberUtils; |
34 | 30 | import org.springframework.beans.factory.annotation.Autowired; |
35 | 31 | import org.springframework.beans.factory.annotation.Qualifier; |
36 | 32 | |
... | ... | @@ -232,11 +228,11 @@ |
232 | 228 | AntExRecordQuery antExRecordQuery = complayRequest(userId, antExManagerQueryRequest, isRegion, isPage); |
233 | 229 | if (CollectionUtils.isNotEmpty(patientses)) { |
234 | 230 | List<String> parentIds = new LinkedList<>(); |
235 | - for(Patients pa:patientses){ | |
231 | + for (Patients pa : patientses) { | |
236 | 232 | parentIds.add(pa.getId()); |
237 | 233 | } |
238 | 234 | antExRecordQuery.setParentIds(parentIds); |
239 | - }else if(StringUtils.isNotEmpty(antExManagerQueryRequest.getQueryNo())){ | |
235 | + } else if (StringUtils.isNotEmpty(antExManagerQueryRequest.getQueryNo())) { | |
240 | 236 | return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(antExRecordQuery.getPageInfo()); |
241 | 237 | } |
242 | 238 | |
243 | 239 | |
... | ... | @@ -427,7 +423,55 @@ |
427 | 423 | cjStatisticsListResult.setrRisk(sb.toString()); |
428 | 424 | } |
429 | 425 | } |
426 | + String fxys = ""; | |
427 | + Map olevel = new HashMap(); | |
428 | + if (StringUtils.isNotEmpty(record.getfId())) { | |
429 | + String risk = null; | |
430 | + if (record.getType() == 1) { | |
431 | + AntExChuModel model = antExService.findOne(record.getfId()); | |
432 | + if (null != model) { | |
433 | + risk = model.getOtherHighRisk(); | |
434 | + } | |
435 | + } else if (record.getType() == 2) { | |
436 | + AntenatalExaminationModel model = antExService.findOneById(record.getfId()); | |
437 | + if (null != model) { | |
438 | + risk = model.getOtherRisk(); | |
439 | + } | |
440 | + } | |
441 | + | |
442 | + try { | |
443 | + Map map = JsonUtil.str2Obj(risk, Map.class); | |
444 | + Object obj = map.get("fxysu"); | |
445 | + Object idObj1 = map.get("fyyse"); | |
446 | + if (null != obj) { | |
447 | + fxys = obj.toString(); | |
448 | + } | |
449 | + if (null != idObj1 && !"null".equals(idObj1.toString()) && !"".equals(idObj1.toString())) { | |
450 | + | |
451 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(idObj1.toString()); | |
452 | + if (null != basicConfig) { | |
453 | + String name = basicConfig.getName(); | |
454 | + if (name.indexOf("预警") > -1) { | |
455 | + name = name.replace("预警", ""); | |
456 | + } | |
457 | + olevel.put("name", name); | |
458 | + olevel.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name)); | |
459 | + } | |
460 | + } | |
461 | + } catch (Exception e1) { | |
462 | + } | |
463 | + } | |
464 | + if (org.apache.commons.lang.StringUtils.isEmpty(cjStatisticsListResult.getrRisk())) { | |
465 | + cjStatisticsListResult.setrRisk(fxys); | |
466 | + } else if (StringUtils.isNotEmpty(fxys)) { | |
467 | + cjStatisticsListResult.setrRisk(cjStatisticsListResult.getrRisk() + "," + fxys); | |
468 | + } | |
469 | + | |
470 | + | |
430 | 471 | List level = new ArrayList(); |
472 | + if(!olevel.isEmpty()){ | |
473 | + level.add(olevel); | |
474 | + } | |
431 | 475 | try { |
432 | 476 | for (Object str : record.gethLevel()) { |
433 | 477 | if (null != str && StringUtils.isNotEmpty(str.toString())) { |