Commit 781c02c89fc87dc3d39ada3f3b64438dc146c5e0

Authored by liquanyu
1 parent c36033a7e5

儿童档案修改

Showing 1 changed file with 35 additions and 48 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java View file @ 781c02c
... ... @@ -889,56 +889,43 @@
889 889 public List<Map<String, Object>> getPatientInfoList(String cardNo) {
890 890 List<Map<String, Object>> result = new ArrayList<>();
891 891  
  892 + if (StringUtils.isNotBlank(cardNo)) {
  893 + long start = System.currentTimeMillis();
892 894  
  895 + Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection();
  896 + QueryRunner queryRunner = new QueryRunner();
893 897  
894   - Map<String, Object> map = new HashMap<>();
895   - map.put("bhnum", "a");
896   - map.put("sex", "男");
897   - map.put("name", "张三");
898   - map.put("idCardNo", ""); //身份证号码
899   - map.put("cardNo", "147852");//就诊卡号
900   - map.put("phone", "15777777777");
901   - map.put("birth", "2020-08-10");
902   - result.add(map);
  898 + long end = System.currentTimeMillis();
903 899  
904   -
905   -// if (StringUtils.isNotBlank(cardNo)) {
906   -// long start = System.currentTimeMillis();
907   -//
908   -// Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection();
909   -// QueryRunner queryRunner = new QueryRunner();
910   -//
911   -// long end = System.currentTimeMillis();
912   -//
913   -// System.out.println("times3 = " + (end - start));
914   -// try {
915   -// 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));
916   -// if (list.size() > 0) {
917   -// for (PregPatientinfo info : list) {
918   -// Map<String, Object> map = new HashMap<>();
919   -// map.put("bhnum", info.getP_BHNUM());
920   -// if ("男".equals(info.getP_SEX())) {
921   -// map.put("sex", "男");
922   -// } else if ("女".equals(info.getP_SEX())) {
923   -// map.put("sex", "女");
924   -// }
925   -// map.put("name", info.getP_NAME());
926   -// map.put("idCardNo", info.getP_CARDNO()); //身份证号码
927   -// map.put("cardNo", cardNo);//就诊卡号
928   -// map.put("phone", info.getP_MOBILEPHONE());
929   -// map.put("birth", DateUtil.getyyyy_MM_dd(parseYmd(info.getBIRTH())));
930   -// result.add(map);
931   -// }
932   -// }
933   -// long end1 = System.currentTimeMillis();
934   -// System.out.println("times4 = " + (end1 - end));
935   -// DbUtils.closeQuietly(conn);
936   -// } catch (SQLException e) {
937   -// DbUtils.closeQuietly(conn);
938   -// ExceptionUtils.catchException(e, "qhd his exception ");
939   -// e.printStackTrace();
940   -// }
941   -// }
  900 + System.out.println("times3 = " + (end - start));
  901 + try {
  902 + 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));
  903 + if (list.size() > 0) {
  904 + for (PregPatientinfo info : list) {
  905 + Map<String, Object> map = new HashMap<>();
  906 + map.put("bhnum", info.getP_BHNUM());
  907 + if ("男".equals(info.getP_SEX())) {
  908 + map.put("sex", "男");
  909 + } else if ("女".equals(info.getP_SEX())) {
  910 + map.put("sex", "女");
  911 + }
  912 + map.put("name", info.getP_NAME());
  913 + map.put("idCardNo", info.getP_CARDNO()); //身份证号码
  914 + map.put("cardNo", cardNo);//就诊卡号
  915 + map.put("phone", info.getP_MOBILEPHONE());
  916 + map.put("birth", DateUtil.getyyyy_MM_dd(parseYmd(info.getBIRTH())));
  917 + result.add(map);
  918 + }
  919 + }
  920 + long end1 = System.currentTimeMillis();
  921 + System.out.println("times4 = " + (end1 - end));
  922 + DbUtils.closeQuietly(conn);
  923 + } catch (SQLException e) {
  924 + DbUtils.closeQuietly(conn);
  925 + ExceptionUtils.catchException(e, "qhd his exception ");
  926 + e.printStackTrace();
  927 + }
  928 + }
942 929 return result;
943 930 }
944 931