Commit cb6425fd95b1649591667c0556759815d9c8c423

Authored by yangfei
1 parent aed2574632

查询号bug修改

Showing 1 changed file with 31 additions and 32 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ cb6425f
... ... @@ -258,7 +258,7 @@
258 258 * @param num 当前位置
259 259 * @return
260 260 */
261   - public Map<String, Object> exFuData(String id, int num,Integer userId) {
  261 + public Map<String, Object> exFuData(String id, int num, Integer userId) {
262 262 Map<String, Object> map = new HashedMap();
263 263 AntenatalExaminationModel[] exData = new AntenatalExaminationModel[4];
264 264 AntenatalExaminationModel antenatalExaminationModel = antExService.findOneById(id);
265 265  
... ... @@ -358,11 +358,10 @@
358 358 referralApplyOrderQuery.setParentId(data.getParentId());
359 359 referralApplyOrderQuery.setOutHospitalId(hospital);
360 360 List<ReferralApplyOrderModel> orderModels = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery);
361   - if (CollectionUtils.isNotEmpty(orderModels))
362   - {
  361 + if (CollectionUtils.isNotEmpty(orderModels)) {
363 362 boolean isZhuan = false;
364   - for(ReferralApplyOrderModel raom:orderModels){//获取转院时间
365   - if(raom.getCreated().before(data.getCheckDate())){
  363 + for (ReferralApplyOrderModel raom : orderModels) {//获取转院时间
  364 + if (raom.getCreated().before(data.getCheckDate())) {
366 365 isZhuan = true;
367 366 continue;
368 367 }
... ... @@ -378,8 +377,7 @@
378 377  
379 378 }
380 379 }
381   - } else
382   - {
  380 + } else {
383 381 map.put(numStr + "isZhuan", "1");
384 382 }
385 383  
... ... @@ -505,8 +503,7 @@
505 503 map.put("mDay", String.valueOf(mDay));
506 504 }
507 505  
508   - if (patients.getDueDate() != null)
509   - {
  506 + if (patients.getDueDate() != null) {
510 507 Calendar dueCal = Calendar.getInstance();
511 508 dueCal.setTime(patients.getDueDate());
512 509 int yYear = dueCal.get(Calendar.YEAR);
513 510  
514 511  
515 512  
516 513  
... ... @@ -608,24 +605,19 @@
608 605 }
609 606  
610 607 List<String> grs = new ArrayList<>();
611   - if (personalHistory.contains("吸烟"))
612   - {//1吸烟
  608 + if (personalHistory.contains("吸烟")) {//1吸烟
613 609 grs.add("1");
614 610 }
615   - if (personalHistory.contains("饮酒"))
616   - {//2饮酒
  611 + if (personalHistory.contains("饮酒")) {//2饮酒
617 612 grs.add("2");
618 613 }
619   - if (personalHistory.contains("服用药物"))
620   - {//3服用药物
  614 + if (personalHistory.contains("服用药物")) {//3服用药物
621 615 grs.add("3");
622 616 }
623   - if (personalHistory.contains("接触有毒有害物质"))
624   - {//4接触有毒有害物质
  617 + if (personalHistory.contains("接触有毒有害物质")) {//4接触有毒有害物质
625 618 grs.add("4");
626 619 }
627   - if (personalHistory.contains("接触放射线"))
628   - {//5接触放射线
  620 + if (personalHistory.contains("接触放射线")) {//5接触放射线
629 621 grs.add("5");
630 622 }
631 623  
632 624  
633 625  
634 626  
635 627  
... ... @@ -1025,23 +1017,30 @@
1025 1017 referralApplyOrderQuery.setOutHospitalId(hospital);
1026 1018 List<ReferralApplyOrderModel> orderModels = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery);
1027 1019 if (CollectionUtils.isNotEmpty(orderModels)) {
1028   - //转院必要性
1029   - if (NumberUtils.isNumber(hospital)) {
1030   - try {
1031   - Organization zhuanc1 = organizationService.getOrganization(Integer.valueOf(hospital));
1032   - if (null != zhuanc1) {
1033   - map.put("zhuancl", zhuanc1.getName());
1034   - map.put("isZhuan", "2");
  1020 + boolean isZhuan = false;
  1021 + for (ReferralApplyOrderModel raom : orderModels) {//获取转院时间
  1022 + if (raom.getCreated().before(data.getCheckTime())) {
  1023 + isZhuan = true;
  1024 + continue;
  1025 + }
  1026 + }
  1027 + if (isZhuan) {
  1028 + if (NumberUtils.isNumber(hospital)) {
  1029 + try {
  1030 + Organization zhuanc1 = organizationService.getOrganization(Integer.valueOf(hospital));
  1031 + if (null != zhuanc1) {
  1032 + map.put("zhuancl", zhuanc1.getName());
  1033 + map.put("isZhuan", "2");
  1034 + }
  1035 + } catch (Exception e) {
  1036 + e.printStackTrace();
1035 1037 }
1036   - } catch (Exception e) {
1037   -
1038 1038 }
  1039 + } else {
  1040 + map.put("isZhuan", "1");
1039 1041 }
1040   - } else
1041   -
1042   - {
1043   - map.put("isZhuan", "1");
1044 1042 }
  1043 +
1045 1044 if (data.getNextCheckTime() != null) {
1046 1045 Calendar nextCheck = Calendar.getInstance();
1047 1046 nextCheck.setTime(data.getNextCheckTime());