Commit 486e1f5dc66a68a63affbefbc03fc560ffeeeb1b
1 parent
3150078505
Exists in
master
and in
6 other branches
儿童出院诊断查询修改
Showing 3 changed files with 63 additions and 57 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java
View file @
486e1f5
... | ... | @@ -864,7 +864,7 @@ |
864 | 864 | public List<Map<String, Object>> getBabyDiacrisis(String startDischargeDate, String endDischargeDate, |
865 | 865 | String startBirthDate, String endBirthDate, |
866 | 866 | String hospitalizationNo, String babyName, |
867 | - Integer finalDiagnosis, Integer page, Integer limit) { | |
867 | + String finalDiagnosis, Integer page, Integer limit) { | |
868 | 868 | List<Map<String, Object>> result = new ArrayList<>(); |
869 | 869 | String startDate = startDischargeDate + " 00:00:00"; |
870 | 870 | String endDate = endDischargeDate + " 00:00:00"; |
871 | 871 | |
872 | 872 | |
873 | 873 | |
874 | 874 | |
... | ... | @@ -882,43 +882,44 @@ |
882 | 882 | |
883 | 883 | long start = System.currentTimeMillis(); |
884 | 884 | |
885 | - /* Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection(); | |
885 | +// Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection(); | |
886 | + Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeClConnection(); | |
886 | 887 | QueryRunner queryRunner = new QueryRunner(); |
887 | - */ | |
888 | + | |
888 | 889 | long end = System.currentTimeMillis(); |
889 | 890 | System.out.println("times3 = " + (end - start)); |
890 | - //try { | |
891 | - String sql = ""; | |
892 | - String hospitalizationNoSql = ""; | |
893 | - String babyNameSql = ""; | |
894 | - String finalDiagnosisSql = ""; | |
895 | - String dischargeDateSql = ""; | |
896 | - String birthDateSql = ""; | |
897 | - if (StringUtils.isNotEmpty(hospitalizationNo) || StringUtils.isNotEmpty(startDischargeDate) || StringUtils.isNotEmpty(endDischargeDate) | |
898 | - || StringUtils.isNotEmpty(babyName) || null != finalDiagnosis || StringUtils.isNotEmpty(startBirthDate) || StringUtils.isNotEmpty(endBirthDate)) { | |
899 | - if (StringUtils.isNotEmpty(hospitalizationNo)) { | |
900 | - hospitalizationNoSql = " and blh= " + "'" + hospitalizationNo + "'"; | |
891 | + try { | |
892 | + String sql = ""; | |
893 | + String hospitalizationNoSql = ""; | |
894 | + String babyNameSql = ""; | |
895 | + String finalDiagnosisSql = ""; | |
896 | + String dischargeDateSql = ""; | |
897 | + String birthDateSql = ""; | |
898 | + if (StringUtils.isNotEmpty(hospitalizationNo) || StringUtils.isNotEmpty(startDischargeDate) || StringUtils.isNotEmpty(endDischargeDate) | |
899 | + || StringUtils.isNotEmpty(babyName) || null != finalDiagnosis || StringUtils.isNotEmpty(startBirthDate) || StringUtils.isNotEmpty(endBirthDate)) { | |
900 | + if (StringUtils.isNotEmpty(hospitalizationNo)) { | |
901 | + hospitalizationNoSql = " and blh= " + "'" + hospitalizationNo + "'"; | |
902 | + } | |
903 | + if (StringUtils.isNotEmpty(babyName)) { | |
904 | + babyNameSql = " and hzxm= " + "'" + babyName + "'"; | |
905 | + } | |
906 | + if (null != finalDiagnosis) { | |
907 | + finalDiagnosisSql = " and cyzddm like " + "'" + finalDiagnosis + "%" + "'"; | |
908 | + } | |
909 | + if (StringUtils.isNotEmpty(startBirthDate) && StringUtils.isNotEmpty(endBirthDate)) { | |
910 | + birthDateSql = " and birth >= CONVERT(varchar(100),'" + startBirthDate + "', 112) and birth <= CONVERT(varchar(100),'" + endBirthDate + "', 112)"; | |
911 | + } | |
912 | + if (StringUtils.isNotEmpty(startDischargeDate) && StringUtils.isNotEmpty(endDischargeDate)) { | |
913 | + dischargeDateSql = " and cyrq >= CONVERT(varchar(100),'" + startDate + "', 120) and cyrq <= CONVERT(varchar(100),'" + endDate + "', 120)"; | |
914 | + } | |
915 | + sql = hospitalizationNoSql + babyNameSql + finalDiagnosisSql + dischargeDateSql + birthDateSql; | |
901 | 916 | } |
902 | - if (StringUtils.isNotEmpty(babyName)) { | |
903 | - babyNameSql = " and hzxm= " + "'" + babyName + "'"; | |
904 | - } | |
905 | - if (null != finalDiagnosis) { | |
906 | - finalDiagnosisSql = " and cyzddm like " + "'" + finalDiagnosis + "%" + "'"; | |
907 | - } | |
908 | - if (StringUtils.isNotEmpty(startBirthDate) && StringUtils.isNotEmpty(endBirthDate)) { | |
909 | - birthDateSql = " and birth >= CONVERT(varchar(100),'" + startBirthDate + "', 112) and birth <= CONVERT(varchar(100),'" + endBirthDate + "', 112)"; | |
910 | - } | |
911 | - if (StringUtils.isNotEmpty(startDischargeDate) && StringUtils.isNotEmpty(endDischargeDate)) { | |
912 | - dischargeDateSql = " and cyrq >= CONVERT(varchar(100),'" + startDate + "', 120) and cyrq <= CONVERT(varchar(100),'" + endDate + "', 120)"; | |
913 | - } | |
914 | - sql = hospitalizationNoSql + babyNameSql + finalDiagnosisSql + dischargeDateSql + birthDateSql; | |
915 | - } | |
916 | - System.out.println("select * from (select top 99999999 ROW_NUMBER() OVER(ORDER BY lrrq DESC ) " + | |
917 | - "AS ROWID,blh,cyrq,hzxm,sex,birth,cyzdmc from VW_LYMS_XSE_BRSYK where cyrq is not null " + sql + ") " + | |
918 | - "AS TEMP where ROWID BETWEEN " + startPage + " and " + endlimit + " order by ROWID Asc"); | |
917 | + System.out.println("select * from (select top 99999999 ROW_NUMBER() OVER(ORDER BY lrrq DESC ) " + | |
918 | + "AS ROWID,blh,cyrq,hzxm,sex,birth,cyzdmc from VW_LYMS_XSE_BRSYK where cyrq is not null " + sql + ") " + | |
919 | + "AS TEMP where ROWID BETWEEN " + startPage + " and " + endlimit + " order by ROWID Asc"); | |
919 | 920 | |
920 | 921 | |
921 | - Map<String, Object> map = new HashMap<>(); | |
922 | + /*Map<String, Object> map = new HashMap<>(); | |
922 | 923 | map.put("dischargeDate", "20190524"); |
923 | 924 | map.put("babyName", "陈晨"); |
924 | 925 | map.put("sex", "女"); |
925 | 926 | |
926 | 927 | |
927 | 928 | |
... | ... | @@ -926,34 +927,39 @@ |
926 | 927 | map.put("monthAge", "2月2天"); |
927 | 928 | map.put("hospitalizationNo", "123456"); |
928 | 929 | map.put("dischargeDiagnosis", "新生儿肺炎"); |
929 | - result.add(map); | |
930 | + result.add(map);*/ | |
930 | 931 | |
931 | - /*List<BabyDischargeDiagnosisModel> list = queryRunner.query(conn, "select * from (select top 99999999 ROW_NUMBER() OVER(ORDER BY lrrq DESC ) " + | |
932 | - "AS ROWID,blh,cyrq,hzxm,sex,birth,cyzdmc from VW_LYMS_XSE_BRSYK where cyrq is not null " + sql + ") " + | |
933 | - "AS TEMP where ROWID BETWEEN " + startPage + " and " + endlimit + " order by ROWID Asc", new BeanListHandler<BabyDischargeDiagnosisModel>(BabyDischargeDiagnosisModel.class)); | |
934 | - if (list.size() > 0) { | |
935 | - for (BabyDischargeDiagnosisModel info : list) { | |
936 | - Map<String, Object> map = new HashMap<>(); | |
937 | - map.put("dischargeDate", DateUtil.getyyyy_MM_dd(info.getCyrq())); | |
938 | - map.put("babyName", info.getHzxm()); | |
939 | - map.put("sex", info.getSex()); | |
940 | - map.put("birth", info.getBirth()); | |
941 | - map.put("monthAge", ""); | |
942 | - map.put("hospitalizationNo", info.getBlh()); | |
943 | - map.put("dischargeDiagnosis", info.getCyzdmc()); | |
944 | - result.add(map); | |
945 | - } | |
946 | - }*/ | |
947 | - long end1 = System.currentTimeMillis(); | |
948 | - System.out.println("times4 = " + (end1 - end)); | |
949 | - //DbUtils.closeQuietly(conn); | |
950 | - /*} catch (SQLException e) { | |
932 | +// List<BabyDischargeDiagnosisModel> list = queryRunner.query(conn, "select * from (select top 99999999 ROW_NUMBER() OVER(ORDER BY lrrq DESC ) " + | |
933 | +// "AS ROWID,blh,cyrq,hzxm,sex,birth,cyzdmc from VW_LYMS_XSE_BRSYK where cyrq is not null " + sql + ") " + | |
934 | +// "AS TEMP where ROWID BETWEEN " + startPage + " and " + endlimit + " order by ROWID Asc", new BeanListHandler<BabyDischargeDiagnosisModel>(BabyDischargeDiagnosisModel.class)); | |
935 | +// if (list.size() > 0) { | |
936 | +// for (BabyDischargeDiagnosisModel info : list) { | |
937 | +// Map<String, Object> map = new HashMap<>(); | |
938 | +// map.put("dischargeDate", DateUtil.getyyyy_MM_dd(info.getCyrq())); | |
939 | +// map.put("babyName", info.getHzxm()); | |
940 | +// map.put("sex", info.getSex()); | |
941 | +// map.put("birth", info.getBirth()); | |
942 | +// map.put("monthAge", ""); | |
943 | +// map.put("hospitalizationNo", info.getBlh()); | |
944 | +// map.put("dischargeDiagnosis", info.getCyzdmc()); | |
945 | +// result.add(map); | |
946 | +// } | |
947 | +// } | |
948 | +// long end1 = System.currentTimeMillis(); | |
949 | +// System.out.println("times4 = " + (end1 - end)); | |
950 | +// DbUtils.closeQuietly(conn); | |
951 | + } catch ( | |
952 | + Exception e) { | |
951 | 953 | DbUtils.closeQuietly(conn); |
952 | 954 | ExceptionUtils.catchException(e, "qhd his exception "); |
953 | 955 | e.printStackTrace(); |
954 | 956 | |
955 | - }*/ | |
957 | + } | |
956 | 958 | return result; |
959 | + } | |
960 | + | |
961 | + public static void main(String[] args) { | |
962 | + | |
957 | 963 | } |
958 | 964 | |
959 | 965 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
486e1f5
... | ... | @@ -559,7 +559,7 @@ |
559 | 559 | @RequestParam(value = "endBirthDate", required = false) String endBirthDate, |
560 | 560 | @RequestParam(value = "hospitalizationNo", required = false) String hospitalizationNo, |
561 | 561 | @RequestParam(value = "babyName", required = false) String babyName, |
562 | - @RequestParam(value = "finalDiagnosis", required = false) Integer finalDiagnosis, | |
562 | + @RequestParam(value = "finalDiagnosis", required = false) String finalDiagnosis, | |
563 | 563 | @RequestParam("page") Integer page, |
564 | 564 | @RequestParam("limit") Integer limit) { |
565 | 565 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
486e1f5
... | ... | @@ -4035,7 +4035,7 @@ |
4035 | 4035 | public BaseListResponse getBabyDiacrisis(String startDischargeDate, String endDischargeDate, |
4036 | 4036 | String startBirthDate, String endBirthDate, |
4037 | 4037 | String hospitalizationNo, String babyName, |
4038 | - Integer finalDiagnosis, Integer page, Integer limit) { | |
4038 | + String finalDiagnosis, Integer page, Integer limit) { | |
4039 | 4039 | |
4040 | 4040 | List list = qhdfyHisService.getBabyDiacrisis(startDischargeDate, endDischargeDate, startBirthDate, endBirthDate, hospitalizationNo, babyName, finalDiagnosis, page, limit); |
4041 | 4041 | BaseListResponse objectResponse = new BaseListResponse(); |