Commit 7fcb9fdbf0fe7f509b19c38f787cee1442e7735b

Authored by liquanyu
1 parent d709168cb0

his接口

Showing 2 changed files with 24 additions and 2 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/pojo/PregPatientinfo.java View file @ 7fcb9fd
... ... @@ -26,10 +26,18 @@
26 26 private String P_MOBILEPHONE;
27 27 private String P_IDNUM;
28 28 private Date P_BIRTHDAY;
  29 + private String BIRTH;
29 30 private Date CREATED;
30 31 //门诊或者是住院
31 32 private String SICKTYPE;
32 33  
  34 + public String getBIRTH() {
  35 + return BIRTH;
  36 + }
  37 +
  38 + public void setBIRTH(String BIRTH) {
  39 + this.BIRTH = BIRTH;
  40 + }
33 41  
34 42 public String getSICKTYPE() {
35 43 return SICKTYPE;
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java View file @ 7fcb9fd
... ... @@ -26,6 +26,7 @@
26 26 import java.io.File;
27 27 import java.sql.Connection;
28 28 import java.sql.SQLException;
  29 +import java.text.SimpleDateFormat;
29 30 import java.util.*;
30 31  
31 32 /**
... ... @@ -335,7 +336,7 @@
335 336 Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection();
336 337 QueryRunner queryRunner = new QueryRunner();
337 338 try {
338   - List<PregPatientinfo> list = queryRunner.query(conn, "select top 1 patid as P_ID,cardno as P_CARDNO,hzxm as P_NAME, sex as P_SEX, birth as P_BIRTHDAY, sfzh as P_IDNUM, lxdh as P_MOBILEPHONE from SF_BRXXK where cardno= '"+cardNo+"'", new BeanListHandler<PregPatientinfo>(PregPatientinfo.class));
  339 + 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));
339 340 if (list.size() > 0) {
340 341 for (PregPatientinfo info:list) {
341 342 Map<String,Object> map = new HashMap<>();
... ... @@ -348,7 +349,7 @@
348 349 map.put("name", info.getP_NAME());
349 350 map.put("cardNo", info.getP_CARDNO());
350 351 map.put("phone", info.getP_MOBILEPHONE());
351   - map.put("birth", DateUtil.getyyyy_MM_dd(info.getP_BIRTHDAY()));
  352 + map.put("birth", DateUtil.getyyyy_MM_dd(parseYmd(info.getBIRTH())));
352 353 result.add(map);
353 354 }
354 355 }
... ... @@ -359,6 +360,19 @@
359 360 }
360 361 }
361 362 return result;
  363 + }
  364 +
  365 +
  366 + public static Date parseYmd(String s) {
  367 + SimpleDateFormat ymd = new SimpleDateFormat("yyyyMMdd");
  368 + if (s == null) {
  369 + return null;
  370 + }
  371 + try {
  372 + return ymd.parse(s);
  373 + } catch (Exception e) {
  374 + return null;
  375 + }
362 376 }
363 377  
364 378 public List<Map<String,Object>> queryHisBabyDiagnosis(String blNo) {