Commit a39b96fcba3799e195cfa786cd2a849fb0648907
1 parent
54d71fc2b0
Exists in
master
and in
8 other branches
add qinglongxian get his patient info api
Showing 1 changed file with 26 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/mmbb21/MmbbService.java
View file @
a39b96f
| ... | ... | @@ -2,6 +2,10 @@ |
| 2 | 2 | |
| 3 | 3 | import com.lyms.hospitalapi.pojo.PregPatientinfo; |
| 4 | 4 | import com.lyms.platform.common.utils.JsonUtil; |
| 5 | +import com.lyms.platform.common.utils.PropertiesUtils; | |
| 6 | +import com.lyms.platform.common.utils.SystemConfig; | |
| 7 | +import org.apache.commons.beanutils.BeanUtils; | |
| 8 | +import org.apache.commons.beanutils.BeanUtilsBean; | |
| 5 | 9 | import org.apache.commons.dbutils.DbUtils; |
| 6 | 10 | import org.apache.commons.dbutils.QueryRunner; |
| 7 | 11 | import org.apache.commons.dbutils.handlers.BeanListHandler; |
| ... | ... | @@ -32,7 +36,17 @@ |
| 32 | 36 | " left join PLAT_DATACONTENT pd on me.ME_WORNINGID = pd.DC_Id\n" + |
| 33 | 37 | " where mp.p_hospitalid = '"+hid+"' order by pp.p_id,first.fe_id,result.er_id", new MapListHandler()); |
| 34 | 38 | DbUtils.closeQuietly(conn); |
| 35 | - return JsonUtil.array2JsonString(list); | |
| 39 | + for (Map<String, Object> map:list) { | |
| 40 | + for (String key:map.keySet()) { | |
| 41 | + System.out.print(key); | |
| 42 | + System.out.print(":"); | |
| 43 | + System.out.print(map.get(key)); | |
| 44 | + System.out.print(","); | |
| 45 | + | |
| 46 | + } | |
| 47 | + System.out.println(); | |
| 48 | + } | |
| 49 | + return ""+list.size(); | |
| 36 | 50 | } catch (Exception e) { |
| 37 | 51 | DbUtils.closeQuietly(conn); |
| 38 | 52 | e.printStackTrace(); |
| ... | ... | @@ -49,7 +63,17 @@ |
| 49 | 63 | List<Map<String, Object>> list = queryRunner.query(conn, " select PI_ID,PI_NAME,PI_SEX,PI_KIDSTYPE,PI_BIRTHDAY,PI_MOTHERPHONE,PI_OPERUSER,PI_PLATPATIENTID,PI_ISDELETE,PI_SERVICETYPE,PI_ISVIP,PI_BOOKBUILDINGHOSPITALID" + |
| 50 | 64 | " from MOMMY_PATIENTINFO where PI_BOOKBUILDINGHOSPITALID = '"+hid+"'", new MapListHandler()); |
| 51 | 65 | DbUtils.closeQuietly(conn); |
| 52 | - return JsonUtil.array2JsonString(list); | |
| 66 | + for (Map<String, Object> map:list) { | |
| 67 | + for (String key:map.keySet()) { | |
| 68 | + System.out.print(key); | |
| 69 | + System.out.print(":"); | |
| 70 | + System.out.print(map.get(key)); | |
| 71 | + System.out.print(","); | |
| 72 | + | |
| 73 | + } | |
| 74 | + System.out.println(); | |
| 75 | + } | |
| 76 | + return ""+list.size(); | |
| 53 | 77 | } catch (Exception e) { |
| 54 | 78 | DbUtils.closeQuietly(conn); |
| 55 | 79 | e.printStackTrace(); |