From fe4f9b68a8f7efdd220bede150a5b08cc4d16251 Mon Sep 17 00:00:00 2001 From: liquanyu Date: Tue, 12 Jan 2021 16:04:02 +0800 Subject: [PATCH] update --- .../lyms/hospitalapi/qhdfy/QhdfyHisService.java | 84 ++++++++++++---------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java b/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java index 49e7da8..a215aa5 100644 --- a/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java +++ b/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java @@ -891,44 +891,52 @@ public class QhdfyHisService { public List> getPatientInfoList(String cardNo) { List> result = new ArrayList<>(); - - if (StringUtils.isNotBlank(cardNo)) { - long start = System.currentTimeMillis(); - - Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection(); - QueryRunner queryRunner = new QueryRunner(); - - long end = System.currentTimeMillis(); - - System.out.println("times3 = " + (end - start)); - try { - List 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.class)); - if (list.size() > 0) { - for (PregPatientinfo info : list) { - Map map = new HashMap<>(); - map.put("bhnum", info.getP_BHNUM()); - if ("男".equals(info.getP_SEX())) { - map.put("sex", "男"); - } else if ("女".equals(info.getP_SEX())) { - map.put("sex", "女"); - } - map.put("name", info.getP_NAME()); - map.put("idCardNo", info.getP_CARDNO()); //身份证号码 - map.put("cardNo", cardNo);//就诊卡号 - map.put("phone", info.getP_MOBILEPHONE()); - map.put("birth", DateUtil.getyyyy_MM_dd(parseYmd(info.getBIRTH()))); - result.add(map); - } - } - long end1 = System.currentTimeMillis(); - System.out.println("times4 = " + (end1 - end)); - DbUtils.closeQuietly(conn); - } catch (SQLException e) { - DbUtils.closeQuietly(conn); - ExceptionUtils.catchException(e, "qhd his exception "); - e.printStackTrace(); - } - } + Map map = new HashMap<>(); + map.put("bhnum", "3245234"); + map.put("sex", "女"); + map.put("name", "aaa"); + map.put("idCardNo", ""); //身份证号码 + map.put("cardNo", cardNo);//就诊卡号 + map.put("phone", "14554687987"); + map.put("birth","2020-04-12"); + result.add(map); +// if (StringUtils.isNotBlank(cardNo)) { +// long start = System.currentTimeMillis(); +// +// Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection(); +// QueryRunner queryRunner = new QueryRunner(); +// +// long end = System.currentTimeMillis(); +// +// System.out.println("times3 = " + (end - start)); +// try { +// List 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.class)); +// if (list.size() > 0) { +// for (PregPatientinfo info : list) { +// Map map = new HashMap<>(); +// map.put("bhnum", info.getP_BHNUM()); +// if ("男".equals(info.getP_SEX())) { +// map.put("sex", "男"); +// } else if ("女".equals(info.getP_SEX())) { +// map.put("sex", "女"); +// } +// map.put("name", info.getP_NAME()); +// map.put("idCardNo", info.getP_CARDNO()); //身份证号码 +// map.put("cardNo", cardNo);//就诊卡号 +// map.put("phone", info.getP_MOBILEPHONE()); +// map.put("birth", DateUtil.getyyyy_MM_dd(parseYmd(info.getBIRTH()))); +// result.add(map); +// } +// } +// long end1 = System.currentTimeMillis(); +// System.out.println("times4 = " + (end1 - end)); +// DbUtils.closeQuietly(conn); +// } catch (SQLException e) { +// DbUtils.closeQuietly(conn); +// ExceptionUtils.catchException(e, "qhd his exception "); +// e.printStackTrace(); +// } +// } return result; } -- 1.8.3.1