Commit 932afcc3be079a38cf37bb3bc467d44ba81f183d

Authored by gengxiaokai
1 parent c761ba06db

德州分娩接口

Showing 4 changed files with 32 additions and 8 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/ConnTools.java View file @ 932afcc
... ... @@ -25,7 +25,13 @@
25 25 private static String risUser1="lw";
26 26 private static String risPassword1="lw";
27 27  
  28 + private static String gDirverClassName="oracle.jdbc.driver.OracleDriver";
  29 + private static String gUrl="jdbc:oracle:thin:@localhost:1521:HBITDB";
  30 + private static String gUser="house";
  31 + private static String gPassword="123";
28 32  
  33 +
  34 +
29 35 public static Connection makeHisConnection() {
30 36 Connection conn = null;
31 37 try {
... ... @@ -67,6 +73,22 @@
67 73 }
68 74 try {
69 75 conn = DriverManager.getConnection(risUrl1, risUser1, risPassword1);
  76 + } catch (SQLException e) {
  77 + e.printStackTrace();
  78 + }
  79 + return conn;
  80 + }
  81 +
  82 +
  83 + public static Connection makeLocalConnection() {
  84 + Connection conn = null;
  85 + try {
  86 + Class.forName(gDirverClassName);
  87 + } catch (ClassNotFoundException e) {
  88 + e.printStackTrace();
  89 + }
  90 + try {
  91 + conn = DriverManager.getConnection(gUrl, gUser, gPassword);
70 92 } catch (SQLException e) {
71 93 e.printStackTrace();
72 94 }
platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyFmService.java View file @ 932afcc
... ... @@ -128,7 +128,7 @@
128 128 " NAME as NAME,\n" +
129 129 " IDCARD as IDCARD,\n" +
130 130 " CREATED as CREATED,\t\n" +
131   - " BABY_DELIVERY_TIME as BABY_DELIVERY_TIME,\n" +
  131 + " to_char(BABY_DELIVERY_TIME,'yyyy-mm-dd hh24:mi:ss') as BABY_DELIVERY_TIME,\n" +
132 132 " BABY_SEX as BABY_SEX,\n" +
133 133 " DUE_WEEK as DUE_WEEK,\n" +
134 134 " DUE_DAY as DUE_DAY,\n" +
... ... @@ -156,7 +156,8 @@
156 156 " DELIVER_DOCTOR as DELIVER_DOCTOR";
157 157  
158 158  
159   - Connection conn = com.lyms.hospitalapi.dzfy.ConnTools.makeHisConnection();
  159 + //Connection conn = com.lyms.hospitalapi.dzfy.ConnTools.makeHisConnection();
  160 + Connection conn = com.lyms.hospitalapi.dzfy.ConnTools.makeLocalConnection();
160 161 QueryRunner queryRunner = new QueryRunner();
161 162 SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
162 163 try {
... ... @@ -190,7 +191,7 @@
190 191 //查询这个孕妇最近日期所有分娩记录的sql
191 192 String allSql = "select "+cloumns+" from zlhis.v_deliveryinfo where " +
192 193 " BABY_DELIVERY_TIME > to_date('"+startDate+"', 'yyyy-mm-dd hh24:mi:ss') and BABY_DELIVERY_TIME <= to_date('"+endDate+"', 'yyyy-mm-dd hh24:mi:ss')" +
193   - " ID='"+id+"'" ;
  194 + " and ID='"+id+"'" ;
194 195  
195 196 //查出这个ID对应孕妇在这个时间段的分娩记录
196 197 List<Fm> allList = queryRunner.query(conn, allSql, new BeanListHandler<Fm>(Fm.class));
... ... @@ -233,7 +234,7 @@
233 234  
234 235 if (CollectionUtils.isNotEmpty(users) && users.get(0).getId() != null) {
235 236  
236   - Date dateTime = allFm.getBABY_DELIVERY_TIME();
  237 + Date dateTime = fmt.parse(allFm.getBABY_DELIVERY_TIME());
237 238 if(dateTime!=null){
238 239 if (!com.lyms.platform.common.utils.StringUtils.isNotEmpty(allFm.getBABY_DELIVERY_TIME().toString())) {
239 240 continue;
platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/Fm.java View file @ 932afcc
... ... @@ -44,7 +44,7 @@
44 44 private String BABY_FETAL_PRESENTATION; //胎先露(头|臀|足|肩)
45 45 private String BABY_FETAL_POSITION; //胎方位
46 46 private String BABY_SEX; //新生儿性别
47   - private Date BABY_DELIVERY_TIME; //新生儿娩出时间
  47 + private String BABY_DELIVERY_TIME; //新生儿娩出时间
48 48 private String BABY_PREGNANCY_OUT; //妊娠结局(活产|死胎|浸软胎|死产)
49 49 private Integer BABY_WEIGHT; //新生儿重量
50 50 private Integer BABY_HEIGHT; //新生儿身长
51 51  
... ... @@ -375,11 +375,11 @@
375 375 this.BABY_SEX = BABY_SEX;
376 376 }
377 377  
378   - public Date getBABY_DELIVERY_TIME() {
  378 + public String getBABY_DELIVERY_TIME() {
379 379 return BABY_DELIVERY_TIME;
380 380 }
381 381  
382   - public void setBABY_DELIVERY_TIME(Date BABY_DELIVERY_TIME) {
  382 + public void setBABY_DELIVERY_TIME(String BABY_DELIVERY_TIME) {
383 383 this.BABY_DELIVERY_TIME = BABY_DELIVERY_TIME;
384 384 }
385 385  
platform-operate-api/src/main/resources/config.properties View file @ 932afcc
... ... @@ -11,7 +11,8 @@
11 11 #\u5C71\u4E1C\u5FB7\u5DDE\u4F18\u60E0\u5238\u91D1\u989D_shanDong dezhou youHuiQuan jinE
12 12 shanDong_Dezhou_youHuiQuan_money_Number=500
13 13  
14   -
  14 +#医院ID 德州:1000000114,秦皇岛:216
  15 +hospitalId=216
15 16  
16 17 #His系统版本 0:未使用,1:桓台,2:新乐,3:青龙县医院,4:秦皇岛妇幼,5:抚宁妇幼, 6: 德州妇幼,7:南充中心医院
17 18 his_version=0