diff --git a/platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyFmService.java b/platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyFmService.java index c1ff844..7c137ce 100644 --- a/platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyFmService.java +++ b/platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyFmService.java @@ -136,7 +136,6 @@ public class DzfyFmService { " BABY_ASPHYXIAM as BABY_ASPHYXIAM,\n" + " BABY_WEIGHT as BABY_WEIGHT,\n" + " BABY_HEIGHT as BABY_HEIGHT,\n" + - " BABY_DEFORMITY as BABY_DEFORMITY,\n" + " BABY_APGAR_SCORE_ONE as BABY_APGAR_SCORE_ONE,\n" + " BABY_APGAR_SCORE_FIVE as BABY_APGAR_SCORE_FIVE,\n" + " BABY_APGAR_SCORE_TEN as BABY_APGAR_SCORE_TEN,\n" + @@ -161,8 +160,8 @@ public class DzfyFmService { SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { - String sql ="select ID as ID from zlhis.v_deliveryinfo where " + - " to_date(BABY_DELIVERY_TIME,'yyyy-mm-dd hh24:mm:ss') > to_date('"+start+"', 'yyyy-mm-dd hh24:mm:ss') and to_date(BABY_DELIVERY_TIME,'yyyy-mm-dd hh24:mm:ss') <= to_date('"+end+"', 'yyyy-mm-dd hh24:mm:ss')" ; + String sql ="select "+cloumns+" from zlhis.v_deliveryinfo where BABY_DELIVERY_TIME > to_date('"+start+"', 'yyyy-MM-dd hh24:mi:ss') " + + " and BABY_DELIVERY_TIME <= to_date('"+end+"', 'yyyy-MM-dd hh24:mi:ss')" ; if (phone != null) { sql+=" and phone = '"+phone+"'"; @@ -177,13 +176,14 @@ public class DzfyFmService { int a = 0;//用来判断是否建了儿童档案,如果建了儿童档案就不保存分娩记录 int count = 0; List users = new ArrayList(); - String id = fm.getID();//获取所有的孕妇ID,方便孕妇产下双胞胎而用 - String allSql = "select "+cloumns+" from zlhis.v_deliveryinfo where " + - " to_date(BABY_DELIVERY_TIME,'yyyy-mm-dd hh24:mm:ss') > to_date('"+start+"', 'yyyy-mm-dd hh24:mm:ss') and to_date(BABY_DELIVERY_TIME,'yyyy-mm-dd hh24:mm:ss') <= to_date('"+end+"', 'yyyy-mm-dd hh24:mm:ss')" + - " and ID='"+id+"'" ; +// String id = fm.getID();//获取所有的孕妇ID,方便孕妇产下双胞胎而用 +// String allSql = "select "+cloumns+" from zlhis.v_deliveryinfo where ID='"+id+"'" ; //查出这个ID对应孕妇在这个时间段的分娩记录 - List allList = queryRunner.query(conn, allSql, new BeanListHandler(Fm.class)); +// List allList = queryRunner.query(conn, allSql, new BeanListHandler(Fm.class)); + + List allList = new ArrayList<>(); + allList.add(fm); Date dueDate = null; List babies = new ArrayList<>(); @@ -195,6 +195,11 @@ public class DzfyFmService { continue; } + if (StringUtils.isEmpty(allFm.getPHONE()) || StringUtils.isEmpty(allFm.getIDCARD())) + { + continue; + } + PatientsQuery query = new PatientsQuery(); query.setYn(YnEnums.YES.getId()); query.setType(1); //孕妇