Commit edbc2a96f87d6f7849a17f37a2eda013f1595d06

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 1 changed file

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyStatisticsManagerFacade.java View file @ edbc2a9
... ... @@ -557,35 +557,34 @@
557 557 "WHEN A.BIRTH_HOSPITAL_NO IS NULL THEN '未知'" +
558 558 "END)";
559 559 // jdbc查oracle
560   -// List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("com.mysql.jdbc.Driver", "jdbc:oracle:thin:@127.0.0.1:1521:orcl", "LYMS_ODS", "Welcome1", sql);
561 560 ExceptionUtils.catchException("babyStatisticsManagerBuildSourceList: " + sql);
562   - // List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@127.0.0.1:1521:orcl", "LYMS_ODS", "Welcome1", sql);
563   - List<Map<String, Object>> list = new ArrayList<>();
564   - Map<String,Object> m1 = new HashMap<>();
565   - m1.put("LB_NAME","本院分娩");
566   - m1.put("CNT",1594);
567   - m1.put("CHILD_CATEGORY_ID",2);
568   - Map<String,Object> m2 = new HashMap<>();
569   - m2.put("LB_NAME","未知");
570   - m2.put("CNT",630);
571   - m2.put("CHILD_CATEGORY_ID",2);
572   - Map<String,Object> m3 = new HashMap<>();
573   - m3.put("LB_NAME","外院分娩");
574   - m3.put("CNT",2);
575   - m3.put("CHILD_CATEGORY_ID",2);
576   - Map<String,Object> m4 = new HashMap<>();
577   - m4.put("LB_NAME","本院分娩");
578   - m4.put("CNT",172);
579   - m4.put("CHILD_CATEGORY_ID",1);
580   - Map<String,Object> m5 = new HashMap<>();
581   - m5.put("LB_NAME","未知");
582   - m5.put("CNT",7186);
583   - m5.put("CHILD_CATEGORY_ID",1);
584   - list.add(m1);
585   - list.add(m2);
586   - list.add(m3);
587   - list.add(m4);
588   - list.add(m5);
  561 + List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@192.168.1.32:1521:orcl", "LYMS_ODS", "Welcome1", sql);
  562 + // List<Map<String, Object>> list = new ArrayList<>();
  563 + // Map<String, Object> m1 = new HashMap<>();
  564 + // m1.put("LB_NAME", "本院分娩");
  565 + // m1.put("CNT", 1594);
  566 + // m1.put("CHILD_CATEGORY_ID", 2);
  567 + // Map<String, Object> m2 = new HashMap<>();
  568 + // m2.put("LB_NAME", "未知");
  569 + // m2.put("CNT", 630);
  570 + // m2.put("CHILD_CATEGORY_ID", 2);
  571 + // Map<String, Object> m3 = new HashMap<>();
  572 + // m3.put("LB_NAME", "外院分娩");
  573 + // m3.put("CNT", 2);
  574 + // m3.put("CHILD_CATEGORY_ID", 2);
  575 + // Map<String, Object> m4 = new HashMap<>();
  576 + // m4.put("LB_NAME", "本院分娩");
  577 + // m4.put("CNT", 172);
  578 + // m4.put("CHILD_CATEGORY_ID", 1);
  579 + // Map<String, Object> m5 = new HashMap<>();
  580 + // m5.put("LB_NAME", "未知");
  581 + // m5.put("CNT", 7186);
  582 + // m5.put("CHILD_CATEGORY_ID", 1);
  583 + // list.add(m1);
  584 + // list.add(m2);
  585 + // list.add(m3);
  586 + // list.add(m4);
  587 + // list.add(m5);
589 588 // 构造返回list,这里写死的4条,因为高帆说只有4条
590 589 BabyStatisticsManagerBuildSourceListQueryModel babyStatisticsManagerBuildSourceListQueryModel1 = new BabyStatisticsManagerBuildSourceListQueryModel();
591 590 babyStatisticsManagerBuildSourceListQueryModel1.setLbName("本院分娩");
592 591  
593 592  
594 593  
... ... @@ -611,23 +610,23 @@
611 610 for (Map<String, Object> map : list) {
612 611 if ("本院分娩".equals(map.get("LB_NAME"))) {
613 612 buildCnt1 += Integer.valueOf(map.get("CNT").toString());
614   - if ("2".equals(map.get("CHILD_CATEGORY_ID"))) {
  613 + if ("2".equals(map.get("CHILD_CATEGORY_ID").toString())) {
615 614 highRiskCnt1 += Integer.valueOf(map.get("CNT").toString());
616 615 }
617 616 } else if ("外院分娩".equals(map.get("LB_NAME"))) {
618 617 buildCnt2 += Integer.valueOf(map.get("CNT").toString());
619   - if ("2".equals(map.get("CHILD_CATEGORY_ID"))) {
  618 + if ("2".equals(map.get("CHILD_CATEGORY_ID").toString())) {
620 619 highRiskCnt2 += Integer.valueOf(map.get("CNT").toString());
621 620 }
622 621 } else if ("未知".equals(map.get("LB_NAME"))) {
623 622 buildCnt3 += Integer.valueOf(map.get("CNT").toString());
624   - if ("2".equals(map.get("CHILD_CATEGORY_ID"))) {
  623 + if ("2".equals(map.get("CHILD_CATEGORY_ID").toString())) {
625 624 highRiskCnt3 += Integer.valueOf(map.get("CNT").toString());
626 625 }
627 626 }
628 627 // 总计
629 628 buildCnt4 += Integer.valueOf(map.get("CNT").toString());
630   - if ("2".equals(map.get("CHILD_CATEGORY_ID"))) {
  629 + if ("2".equals(map.get("CHILD_CATEGORY_ID").toString())) {
631 630 highRiskCnt4 += Integer.valueOf(map.get("CNT").toString());
632 631 }
633 632 }
... ... @@ -714,7 +713,6 @@
714 713 "TRUNC(MONTHS_BETWEEN(C.EXAMINE_DATE,A.BIRTHDAY))";
715 714  
716 715 // jdbc查oracle
717   -// List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("com.mysql.jdbc.Driver", "jdbc:oracle:thin:@127.0.0.1:1521:orcl", "LYMS_ODS", "Welcome1", sql);
718 716 ExceptionUtils.catchException("babyStatisticsManagerSelfConversionList: " + sql);
719 717 List<Map<String, Object>> list = JdbcUtil.getOracleListDataBySql("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@192.168.1.32:1521:orcl", "LYMS_ODS", "Welcome1", sql);
720 718 // List<Map<String, Object>> list = new ArrayList<>();
... ... @@ -787,7 +785,7 @@
787 785 // }
788 786 // }
789 787  
790   - if (CollectionUtils.isEmpty(list)||i>list.size()-1 || list.get(i) == null || null == list.get(i).get("EXAMINE_MONTH")) {
  788 + if (CollectionUtils.isEmpty(list) || i > list.size() - 1 || list.get(i) == null || null == list.get(i).get("EXAMINE_MONTH")) {
791 789 result.add(0);
792 790 } else {
793 791 try {
794 792  
795 793  
796 794  
... ... @@ -804,16 +802,16 @@
804 802 Integer check30 = 0;
805 803 Integer check36 = 0;
806 804 for (Map<String, Object> other : list) {
807   - if (null!=other.get("EXAMINE_MONTH")&&"18".equals(other.get("EXAMINE_MONTH").toString())) {
  805 + if (null != other.get("EXAMINE_MONTH") && "18".equals(other.get("EXAMINE_MONTH").toString())) {
808 806 check18 = Integer.valueOf(other.get("CNT").toString());
809 807 }
810   - if (null!=other.get("EXAMINE_MONTH")&&"24".equals(other.get("EXAMINE_MONTH").toString())) {
  808 + if (null != other.get("EXAMINE_MONTH") && "24".equals(other.get("EXAMINE_MONTH").toString())) {
811 809 check24 = Integer.valueOf(other.get("CNT").toString());
812 810 }
813   - if (null!=other.get("EXAMINE_MONTH")&&"30".equals(other.get("EXAMINE_MONTH").toString())) {
  811 + if (null != other.get("EXAMINE_MONTH") && "30".equals(other.get("EXAMINE_MONTH").toString())) {
814 812 check30 = Integer.valueOf(other.get("CNT").toString());
815 813 }
816   - if (null!=other.get("EXAMINE_MONTH")&&"36".equals(other.get("EXAMINE_MONTH").toString())) {
  814 + if (null != other.get("EXAMINE_MONTH") && "36".equals(other.get("EXAMINE_MONTH").toString())) {
817 815 check36 = Integer.valueOf(other.get("CNT").toString());
818 816 }
819 817 }
... ... @@ -835,21 +833,11 @@
835 833  
836 834 // 下面的表格
837 835 Integer check1 = result.get(0);
838   - Integer check3 = 0;
839   - Integer check6 = 0;
840   - Integer check12 = 0;
841   - for (int i = 0; i < 12; i++) {
842   - if (i < 3) {
843   - check3 += result.get(i);
844   - }
845   - if (i < 6) {
846   - check6 += result.get(i);
847   - }
848   - if (i < 12) {
849   - check12 += result.get(i);
850   - }
851   - }
852   - Integer checkOther = total - check12;
  836 + Integer check3 = result.get(2) - result.get(0);
  837 + Integer check6 = result.get(5) - result.get(2);
  838 + Integer check12 = result.get(11) - result.get(5);
  839 +
  840 + Integer checkOther = total - result.get(11);
853 841  
854 842 List<Integer> babyCount = new ArrayList<>();
855 843 List<String> percent = new ArrayList<>();