diff --git a/.idea/artifacts/platform_sync_data_war_exploded.xml b/.idea/artifacts/platform_sync_data_war_exploded.xml index cd8e1d1..54f20f2 100644 --- a/.idea/artifacts/platform_sync_data_war_exploded.xml +++ b/.idea/artifacts/platform_sync_data_war_exploded.xml @@ -112,7 +112,7 @@ - + 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 7c137ce..06d6ae2 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 @@ -65,7 +65,7 @@ public class DzfyFmService { private static Map babyMap = new HashMap<>(); - private static final String HOSPITALID = "1000000114"; + private static final String HOSPITALID = PropertiesUtils.getPropertyValue("hospitalId"); static { ONE_ENUMS.put(0, "长"); ONE_ENUMS.put(1, "次"); @@ -136,6 +136,7 @@ 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" + @@ -160,8 +161,8 @@ public class DzfyFmService { SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { - 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')" ; + 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')" ; if (phone != null) { sql+=" and phone = '"+phone+"'"; @@ -176,14 +177,13 @@ 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 ID='"+id+"'" ; + 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+"'" ; //查出这个ID对应孕妇在这个时间段的分娩记录 -// List allList = queryRunner.query(conn, allSql, new BeanListHandler(Fm.class)); - - List allList = new ArrayList<>(); - allList.add(fm); + List allList = queryRunner.query(conn, allSql, new BeanListHandler(Fm.class)); Date dueDate = null; List babies = new ArrayList<>(); @@ -195,11 +195,6 @@ 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); //孕妇