Commit a38d37bbe4d5f41d8d149b69f45a75be10d27b8f
1 parent
9037207b45
Exists in
master
and in
6 other branches
诸城妇幼分娩接口测试完成
Showing 1 changed file with 12 additions and 37 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/zcfy/ZcfyFmService.java
View file @
a38d37b
| ... | ... | @@ -116,32 +116,7 @@ |
| 116 | 116 | public void queryFmPatient(String start,String end,String phone) { |
| 117 | 117 | |
| 118 | 118 | |
| 119 | - Fm fm1 = new Fm(); | |
| 120 | - fm1.setBHNUM("1801520"); | |
| 121 | - fm1.setNAME("何蒙蒙"); | |
| 122 | - fm1.setPHONE("10279889449"); | |
| 123 | - fm1.setIDCARD("451023198706122487"); | |
| 124 | - fm1.setADDR("河北省秦皇岛市海港区西港镇地址"); | |
| 125 | - fm1.setDUE_WEEK("38"); | |
| 126 | - fm1.setDUE_DAY(""); | |
| 127 | - fm1.setFETUS_NUM(1); | |
| 128 | - fm1.setDELIVERY_MODE("剖宫产"); | |
| 129 | - fm1.setDELIVER_HOSPITAL("诸城市妇幼保健院"); | |
| 130 | - fm1.setDELIVER_DOCTOR("王芳萍"); | |
| 131 | - fm1.setBABY_SEX("女"); | |
| 132 | - fm1.setBABY_DELIVERY_TIME("2018/1/4 14:54:25"); | |
| 133 | - fm1.setBABY_PREGNANCY_OUT("活胎"); | |
| 134 | - fm1.setBABY_WEIGHT(4300); | |
| 135 | - fm1.setBABY_HEIGHT(56); | |
| 136 | - fm1.setBABY_APGAR_SCORE_ONE(10); | |
| 137 | - fm1.setBABY_APGAR_SCORE_FIVE(10); | |
| 138 | - fm1.setBABY_APGAR_SCORE_TEN(10); | |
| 139 | - | |
| 140 | - | |
| 141 | - | |
| 142 | - | |
| 143 | - | |
| 144 | - String cloumns = " 住院编号 as BHNUM,\n" + | |
| 119 | + String cloumns = " BHNUM as BHNUM,\n" + | |
| 145 | 120 | " PHONE as PHONE,\n" + |
| 146 | 121 | " NAME as NAME,\n" + |
| 147 | 122 | " IDCARD as IDCARD,\n" + |
| ... | ... | @@ -171,7 +146,7 @@ |
| 171 | 146 | " DELIVER_DOCTOR as DELIVER_DOCTOR"; |
| 172 | 147 | |
| 173 | 148 | |
| 174 | - //Connection conn = com.lyms.hospitalapi.zcfy.ConnTools.makeFmConnection(); | |
| 149 | + Connection conn = com.lyms.hospitalapi.zcfy.ConnTools.makeFmConnection(); | |
| 175 | 150 | QueryRunner queryRunner = new QueryRunner(); |
| 176 | 151 | SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| 177 | 152 | try { |
| 178 | 153 | |
| ... | ... | @@ -182,11 +157,11 @@ |
| 182 | 157 | { |
| 183 | 158 | sql+=" and 手机号码 = '"+phone+"'"; |
| 184 | 159 | } |
| 185 | - //List<Fm> list = queryRunner.query(conn, sql, new BeanListHandler<Fm>(Fm.class)); | |
| 186 | - //ExceptionUtils.catchException("size====" + list.size()); | |
| 160 | + List<Fm> list = queryRunner.query(conn, sql, new BeanListHandler<Fm>(Fm.class)); | |
| 161 | + ExceptionUtils.catchException("size====" + list.size()); | |
| 187 | 162 | |
| 188 | - List<Fm> list=new ArrayList<Fm>(); | |
| 189 | - list.add(fm1); | |
| 163 | + /* List<Fm> list=new ArrayList<Fm>(); | |
| 164 | + list.add(fm1);*/ | |
| 190 | 165 | if(CollectionUtils.isNotEmpty(list)){ |
| 191 | 166 | |
| 192 | 167 | for(Fm fm:list){ |
| ... | ... | @@ -201,7 +176,7 @@ |
| 201 | 176 | " IDCARD ='"+idCard+"'" ; |
| 202 | 177 | |
| 203 | 178 | //获取到这个孕妇的最近的分娩日期 |
| 204 | - /*List<Fm> dateList = queryRunner.query(conn, dateSql, new BeanListHandler<Fm>(Fm.class)); | |
| 179 | + List<Fm> dateList = queryRunner.query(conn, dateSql, new BeanListHandler<Fm>(Fm.class)); | |
| 205 | 180 | Calendar calendar = Calendar.getInstance(); |
| 206 | 181 | calendar.setTime(fmt.parse(dateList.get(0).getBabyDate())); |
| 207 | 182 | calendar.add(Calendar.DAY_OF_MONTH, -1); |
| 208 | 183 | |
| ... | ... | @@ -215,10 +190,10 @@ |
| 215 | 190 | " and IDCARD='"+idCard+"'" ; |
| 216 | 191 | |
| 217 | 192 | //查出这个IDCARD对应孕妇在这个时间段的分娩记录 |
| 218 | - List<Fm> allList = queryRunner.query(conn, allSql, new BeanListHandler<Fm>(Fm.class));*/ | |
| 193 | + List<Fm> allList = queryRunner.query(conn, allSql, new BeanListHandler<Fm>(Fm.class)); | |
| 219 | 194 | |
| 220 | - List<Fm> allList = new ArrayList<Fm>(); | |
| 221 | - allList.add(fm); | |
| 195 | + /* List<Fm> allList = new ArrayList<Fm>(); | |
| 196 | + allList.add(fm);*/ | |
| 222 | 197 | |
| 223 | 198 | Date dueDate = null; |
| 224 | 199 | List<MatDeliverAddRequest.Baby> babies = new ArrayList<>(); |
| 225 | 200 | |
| ... | ... | @@ -506,12 +481,12 @@ |
| 506 | 481 | } |
| 507 | 482 | } |
| 508 | 483 | } |
| 509 | - //DbUtils.closeQuietly(conn); | |
| 484 | + DbUtils.closeQuietly(conn); | |
| 510 | 485 | } catch (Exception e) { |
| 511 | 486 | ExceptionUtils.catchException(e, "sql执行异常"); |
| 512 | 487 | e.printStackTrace(); |
| 513 | 488 | } finally { |
| 514 | - //DbUtils.closeQuietly(conn); | |
| 489 | + DbUtils.closeQuietly(conn); | |
| 515 | 490 | } |
| 516 | 491 | } |
| 517 | 492 |