Commit c6366d1b5a1b3a187a4a4ddef369c4d749bf6067

Authored by liquanyu
1 parent 62ad1321ec

update

Showing 1 changed file with 46 additions and 46 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java View file @ c6366d1
... ... @@ -891,52 +891,52 @@
891 891  
892 892 public List<Map<String, Object>> getPatientInfoList(String cardNo) {
893 893 List<Map<String, Object>> result = new ArrayList<>();
894   - Map<String, Object> map = new HashMap<>();
895   - map.put("bhnum", "3245234");
896   - map.put("sex", "女");
897   - map.put("name", "aaa");
898   - map.put("idCardNo", ""); //身份证号码
899   - map.put("cardNo", cardNo);//就诊卡号
900   - map.put("phone", "17485889958");
901   - map.put("birth","2020-04-12");
902   - result.add(map);
903   -// if (StringUtils.isNotBlank(cardNo)) {
904   -// long start = System.currentTimeMillis();
905   -//
906   -// Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection();
907   -// QueryRunner queryRunner = new QueryRunner();
908   -//
909   -// long end = System.currentTimeMillis();
910   -//
911   -// System.out.println("times3 = " + (end - start));
912   -// try {
913   -// List<PregPatientinfo> list = queryRunner.query(conn, "select top 1 patid as P_ID,hzxm as P_NAME, sex as P_SEX, birth as BIRTH, sfzh as P_CARDNO, lxdh as P_MOBILEPHONE from SF_BRXXK where cardno= '" + cardNo + "'", new BeanListHandler<PregPatientinfo>(PregPatientinfo.class));
914   -// if (list.size() > 0) {
915   -// for (PregPatientinfo info : list) {
916   -// Map<String, Object> map = new HashMap<>();
917   -// map.put("bhnum", info.getP_BHNUM());
918   -// if ("男".equals(info.getP_SEX())) {
919   -// map.put("sex", "男");
920   -// } else if ("女".equals(info.getP_SEX())) {
921   -// map.put("sex", "女");
922   -// }
923   -// map.put("name", info.getP_NAME());
924   -// map.put("idCardNo", info.getP_CARDNO()); //身份证号码
925   -// map.put("cardNo", cardNo);//就诊卡号
926   -// map.put("phone", info.getP_MOBILEPHONE());
927   -// map.put("birth", DateUtil.getyyyy_MM_dd(parseYmd(info.getBIRTH())));
928   -// result.add(map);
929   -// }
930   -// }
931   -// long end1 = System.currentTimeMillis();
932   -// System.out.println("times4 = " + (end1 - end));
933   -// DbUtils.closeQuietly(conn);
934   -// } catch (SQLException e) {
935   -// DbUtils.closeQuietly(conn);
936   -// ExceptionUtils.catchException(e, "qhd his exception ");
937   -// e.printStackTrace();
938   -// }
939   -// }
  894 +// Map<String, Object> map = new HashMap<>();
  895 +// map.put("bhnum", "3245234");
  896 +// map.put("sex", "女");
  897 +// map.put("name", "aaa");
  898 +// map.put("idCardNo", ""); //身份证号码
  899 +// map.put("cardNo", cardNo);//就诊卡号
  900 +// map.put("phone", "17485889958");
  901 +// map.put("birth","2020-04-12");
  902 +// result.add(map);
  903 + if (StringUtils.isNotBlank(cardNo)) {
  904 + long start = System.currentTimeMillis();
  905 +
  906 + Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection();
  907 + QueryRunner queryRunner = new QueryRunner();
  908 +
  909 + long end = System.currentTimeMillis();
  910 +
  911 + System.out.println("times3 = " + (end - start));
  912 + try {
  913 + List<PregPatientinfo> list = queryRunner.query(conn, "select top 1 patid as P_ID,hzxm as P_NAME, sex as P_SEX, birth as BIRTH, sfzh as P_CARDNO, lxdh as P_MOBILEPHONE from SF_BRXXK where cardno= '" + cardNo + "'", new BeanListHandler<PregPatientinfo>(PregPatientinfo.class));
  914 + if (list.size() > 0) {
  915 + for (PregPatientinfo info : list) {
  916 + Map<String, Object> map = new HashMap<>();
  917 + map.put("bhnum", info.getP_BHNUM());
  918 + if ("男".equals(info.getP_SEX())) {
  919 + map.put("sex", "男");
  920 + } else if ("女".equals(info.getP_SEX())) {
  921 + map.put("sex", "女");
  922 + }
  923 + map.put("name", info.getP_NAME());
  924 + map.put("idCardNo", info.getP_CARDNO()); //身份证号码
  925 + map.put("cardNo", cardNo);//就诊卡号
  926 + map.put("phone", info.getP_MOBILEPHONE());
  927 + map.put("birth", DateUtil.getyyyy_MM_dd(parseYmd(info.getBIRTH())));
  928 + result.add(map);
  929 + }
  930 + }
  931 + long end1 = System.currentTimeMillis();
  932 + System.out.println("times4 = " + (end1 - end));
  933 + DbUtils.closeQuietly(conn);
  934 + } catch (SQLException e) {
  935 + DbUtils.closeQuietly(conn);
  936 + ExceptionUtils.catchException(e, "qhd his exception ");
  937 + e.printStackTrace();
  938 + }
  939 + }
940 940 return result;
941 941 }
942 942