Commit 46c2e84c2ef4f5a7b88359d9065d1a9e9372ae91

Authored by gengxiaokai
1 parent 01cce7f1ea

聊城分娩接口

Showing 1 changed file with 6 additions and 5 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/lcdcf/LcdcfFmService.java View file @ 46c2e84
... ... @@ -24,7 +24,7 @@
24 24 @Service("LcdcfFmService")
25 25 public class LcdcfFmService {
26 26  
27   - public MaternalDeliverResult queryFmPatient(String bhnum){
  27 + public static MaternalDeliverResult queryFmPatient(String bhnum){
28 28  
29 29 String cloumns = " ID as ID,\n" +
30 30 " BHNUM as BHNUM,\n" +
31 31  
32 32  
33 33  
... ... @@ -63,14 +63,15 @@
63 63 Connection conn = com.lyms.hospitalapi.lcdcf.ConnTools.makeHisConnection();
64 64 QueryRunner queryRunner = new QueryRunner();
65 65 SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  66 + MaternalDeliverResult maternalDeliverResult = new MaternalDeliverResult();
66 67 try {
67   -
68 68 String sql = "select "+cloumns+" from v_deliveryinfo where BHNUM="+bhnum+"and BABY_PREGNANCY_OUT='活胎'";
69 69 List<Fm> list = queryRunner.query(conn, sql, new BeanListHandler<Fm>(Fm.class));
  70 +
70 71 if(list!=null && list.size()>0){
71 72  
72 73 List<MaternalDeliverResult.Baby> babys = new ArrayList<MaternalDeliverResult.Baby>();
73   - MaternalDeliverResult maternalDeliverResult = new MaternalDeliverResult();
  74 +
74 75 Map deliveryMode = new HashMap(); //分娩方式
75 76 for(Fm fm:list){
76 77 maternalDeliverResult.setParentId(fm.getID());
77 78  
... ... @@ -180,14 +181,14 @@
180 181  
181 182 }
182 183  
183   -
  184 + maternalDeliverResult.setBabies(babys);
184 185 }else
185 186 return null;
186 187 }catch (Exception e){
187 188 e.printStackTrace();
188 189 }
189 190  
190   - return null;
  191 + return maternalDeliverResult;
191 192 }
192 193  
193 194 }