Commit 569abcc7004bcf0323036d827f77e710dde2e17e

Authored by jiangjiazhi
Exists in master and in 1 other branch dev

Merge remote-tracking branch 'origin/master'

Showing 3 changed files

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyStatisticsManagerController.java View file @ 569abcc
... ... @@ -375,7 +375,7 @@
375 375 // jdbc查oracle
376 376 // List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("com.mysql.jdbc.Driver", "jdbc:oracle:thin:@127.0.0.1:1521:orcl", "LYMS_ODS", "Welcome1", sql);
377 377 ExceptionUtils.catchException("babyStatisticsManagerSelfConversionList: " + sql);
378   - List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@127.0.0.1:1521:orcl", "LYMS_ODS", "Welcome1", sql);
  378 + List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@192.168.1.32:1521:orcl", "LYMS_ODS", "Welcome1", sql);
379 379 // List<Map<String, Object>> list = new ArrayList<>();
380 380 // Map<String, Object> m1 = new HashMap<>();
381 381 // m1.put("1", "1");
... ... @@ -446,7 +446,7 @@
446 446 // jdbc查oracle
447 447 // List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("com.mysql.jdbc.Driver", "jdbc:oracle:thin:@127.0.0.1:1521:orcl", "LYMS_ODS", "Welcome1", sql);
448 448 ExceptionUtils.catchException("babyStatisticsManagerBuildSourceList: " + sql);
449   - List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@127.0.0.1:1521:orcl", "LYMS_ODS", "Welcome1", sql);
  449 + List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@192.168.1.32:1521:orcl", "LYMS_ODS", "Welcome1", sql);
450 450 // List<Map<String, Object>> list = new ArrayList<>();
451 451 // Map<String, Object> m1 = new HashMap<>();
452 452 // m1.put("1", "1");
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyStatisticsManagerFacade.java View file @ 569abcc
... ... @@ -393,11 +393,16 @@
393 393 } catch (Exception e) {
394 394 index++;
395 395 }
396   - if (CollectionUtils.isEmpty(babyStatisticsManagerWeekAgeGroupQueryModelList) || babyStatisticsManagerWeekAgeGroupQueryModelList.size() < index || babyStatisticsManagerWeekAgeGroupQueryModelList.get(index) == null || !i.toString().equals(babyStatisticsManagerWeekAgeGroupQueryModelList.get(index).getWeekAge())) {
  396 + if (CollectionUtils.isEmpty(babyStatisticsManagerWeekAgeGroupQueryModelList) || babyStatisticsManagerWeekAgeGroupQueryModelList.size() < index) {
397 397 BabyStatisticsManagerWeekAgeGroupQueryModel babyStatisticsManagerWeekAgeGroupQueryModel = new BabyStatisticsManagerWeekAgeGroupQueryModel();
398 398 babyStatisticsManagerWeekAgeGroupQueryModel.setCount("0");
399 399 babyStatisticsManagerWeekAgeGroupQueryModel.setWeekAge(i.toString());
400 400 babyStatisticsManagerWeekAgeGroupQueryModelListResult.add(babyStatisticsManagerWeekAgeGroupQueryModel);
  401 + } else if (babyStatisticsManagerWeekAgeGroupQueryModelList.size() > index && (babyStatisticsManagerWeekAgeGroupQueryModelList.get(index) == null || !i.toString().equals(babyStatisticsManagerWeekAgeGroupQueryModelList.get(index).getWeekAge()))) {
  402 + BabyStatisticsManagerWeekAgeGroupQueryModel babyStatisticsManagerWeekAgeGroupQueryModel = new BabyStatisticsManagerWeekAgeGroupQueryModel();
  403 + babyStatisticsManagerWeekAgeGroupQueryModel.setCount("0");
  404 + babyStatisticsManagerWeekAgeGroupQueryModel.setWeekAge(i.toString());
  405 + babyStatisticsManagerWeekAgeGroupQueryModelListResult.add(babyStatisticsManagerWeekAgeGroupQueryModel);
401 406 } else {
402 407 babyStatisticsManagerWeekAgeGroupQueryModelListResult.add(babyStatisticsManagerWeekAgeGroupQueryModelList.get(index));
403 408 index++;
404 409  
405 410  
406 411  
407 412  
408 413  
... ... @@ -717,21 +722,25 @@
717 722 List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@192.168.1.32:1521:orcl", "LYMS_ODS", "Welcome1", sql);
718 723 // List<Map<String, Object>> list = new ArrayList<>();
719 724 // Map<String, Object> test1 = new HashMap<>();
720   - // test1.put("EXAMINE_MONTH", 2);
721   - // test1.put("CNT", "2");
722 725 // Map<String, Object> test2 = new HashMap<>();
723   - // test2.put("EXAMINE_MONTH", 3);
724   - // test2.put("CNT", "3");
725 726 // Map<String, Object> test3 = new HashMap<>();
726   - // test3.put("EXAMINE_MONTH", 1);
727   - // test3.put("CNT", "1");
728 727 // Map<String, Object> test4 = new HashMap<>();
  728 + // Map<String, Object> test5 = new HashMap<>();
729 729 // test4.put("EXAMINE_MONTH", 0);
730   - // test4.put("CNT", "5");
  730 + // test4.put("CNT", "1");
  731 + // test3.put("EXAMINE_MONTH", 1);
  732 + // test3.put("CNT", "2");
  733 + // test1.put("EXAMINE_MONTH", 2);
  734 + // test1.put("CNT", "3");
  735 + // test2.put("EXAMINE_MONTH", 3);
  736 + // test2.put("CNT", "4");
  737 + // test5.put("EXAMINE_MONTH", 12);
  738 + // test5.put("CNT", "1");
731 739 // list.add(test1);
732 740 // list.add(test2);
733 741 // list.add(test3);
734 742 // list.add(test4);
  743 + // list.add(test5);
735 744  
736 745 Collections.sort(list, new Comparator<Map<String, Object>>() {
737 746 @Override
738 747  
739 748  
740 749  
... ... @@ -764,35 +773,26 @@
764 773 ExceptionUtils.catchException("babyStatisticsManagerSelfConversionList list result :" + list);
765 774 // 从0开始,没有也填充
766 775 int index = 0;
767   - for (Integer i = 0; i < 12 /*13*/; i++) {
768   -// try {
769   -// while (!i.toString().equals(list.get(index).get("EXAMINE_MONTH").toString()) && index > Integer.valueOf(list.get(index).get("EXAMINE_MONTH").toString())) {
770   -// index++;
771   -// }
772   -// } catch (Exception e) {
773   -// index++;
774   -// }
775   -// if (CollectionUtils.isEmpty(list) || list.size() /*< */>index || list.get(index) == null || !i.toString().equals(list.get(index).get("EXAMINE_MONTH").toString())) {
776   -// result.add(0);
777   -// } else {
778   -// try {
779   -// result.add(Integer.valueOf(list.get(index).get("CNT").toString()));
780   -// total += Integer.valueOf(list.get(index).get("CNT").toString());
781   -// index++;
782   -// } catch (Exception e) {
783   -// result.add(0);
784   -// index++;
785   -// }
786   -// }
787   -
788   - if (CollectionUtils.isEmpty(list) || i > list.size() - 1 || list.get(i) == null || null == list.get(i).get("EXAMINE_MONTH")) {
  776 + for (Integer i = 0; i < 13; i++) {
  777 + try {
  778 + while (!i.toString().equals(list.get(index).get("EXAMINE_MONTH").toString()) && i > Integer.valueOf(list.get(index).get("EXAMINE_MONTH").toString())) {
  779 + index++;
  780 + }
  781 + } catch (Exception e) {
  782 + index++;
  783 + }
  784 + if (CollectionUtils.isEmpty(list) || list.size() < index) {
789 785 result.add(0);
  786 + } else if (list.size() < index && (list.get(index) == null || !i.toString().equals(list.get(index).get("EXAMINE_MONTH").toString()))) {
  787 + result.add(0);
790 788 } else {
791 789 try {
792   - result.add(Integer.valueOf(list.get(i).get("CNT").toString()));
793   - total += Integer.valueOf(list.get(i).get("CNT").toString());
  790 + result.add(Integer.valueOf(list.get(index).get("CNT").toString()));
  791 + total += Integer.valueOf(list.get(index).get("CNT").toString());
  792 + index++;
794 793 } catch (Exception e) {
795 794 result.add(0);
  795 + index++;
796 796 }
797 797 }
798 798 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java View file @ 569abcc
... ... @@ -199,6 +199,10 @@
199 199 // 什么都不干
200 200 }
201 201  
  202 + if (CollectionUtils.isEmpty(dischargeAbstractQueryResult.getRiskFactoryResultModelList())) {
  203 + dischargeAbstractQueryResult.setRiskScore(null);
  204 + }
  205 +
202 206 dischargeAbstractQueryResult.setGestationalWeeks(PredictedStatisticsFacade.getGestationalWeeks(patients.getLastMenses(), patients.getType(), patients.getDueStatus()));
203 207 dischargeAbstractQueryResult.setDueDate(patients.getDueDate() == null ? "" : new SimpleDateFormat("yyyy年MM月dd日").format(patients.getDueDate()));
204 208