Commit 47b3b732c8fc5dead35eba2cad9a33f9ff3151b9
1 parent
4614d8d685
Exists in
master
and in
6 other branches
德州分娩接口
Showing 1 changed file with 14 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyFmService.java
View file @
47b3b73
... | ... | @@ -136,7 +136,6 @@ |
136 | 136 | " BABY_ASPHYXIAM as BABY_ASPHYXIAM,\n" + |
137 | 137 | " BABY_WEIGHT as BABY_WEIGHT,\n" + |
138 | 138 | " BABY_HEIGHT as BABY_HEIGHT,\n" + |
139 | - " BABY_DEFORMITY as BABY_DEFORMITY,\n" + | |
140 | 139 | " BABY_APGAR_SCORE_ONE as BABY_APGAR_SCORE_ONE,\n" + |
141 | 140 | " BABY_APGAR_SCORE_FIVE as BABY_APGAR_SCORE_FIVE,\n" + |
142 | 141 | " BABY_APGAR_SCORE_TEN as BABY_APGAR_SCORE_TEN,\n" + |
... | ... | @@ -161,8 +160,8 @@ |
161 | 160 | SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
162 | 161 | try { |
163 | 162 | |
164 | - String sql ="select ID as ID from zlhis.v_deliveryinfo where " + | |
165 | - " 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')" ; | |
163 | + String sql ="select "+cloumns+" from zlhis.v_deliveryinfo where " + | |
164 | + " 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')" ; | |
166 | 165 | if (phone != null) |
167 | 166 | { |
168 | 167 | sql+=" and phone = '"+phone+"'"; |
169 | 168 | |
170 | 169 | |
171 | 170 | |
... | ... | @@ -177,20 +176,27 @@ |
177 | 176 | int a = 0;//用来判断是否建了儿童档案,如果建了儿童档案就不保存分娩记录 |
178 | 177 | int count = 0; |
179 | 178 | List<Users> users = new ArrayList<Users>(); |
180 | - String id = fm.getID();//获取所有的孕妇ID,方便孕妇产下双胞胎而用 | |
181 | - String allSql = "select "+cloumns+" from zlhis.v_deliveryinfo where " + | |
182 | - " 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')" + | |
183 | - " and ID='"+id+"'" ; | |
179 | + //String id = fm.getID();//获取所有的孕妇ID,方便孕妇产下双胞胎而用 | |
180 | + //String allSql = "select "+cloumns+" from zlhis.v_deliveryinfo where " + | |
181 | + // " 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')" + | |
182 | + // " and ID='"+id+"'" ; | |
184 | 183 | |
185 | 184 | //查出这个ID对应孕妇在这个时间段的分娩记录 |
186 | - List<Fm> allList = queryRunner.query(conn, allSql, new BeanListHandler<Fm>(Fm.class)); | |
185 | + //List<Fm> allList = queryRunner.query(conn, allSql, new BeanListHandler<Fm>(Fm.class)); | |
187 | 186 | |
187 | + List<Fm> allList = new ArrayList<Fm>(); | |
188 | + allList.add(fm); | |
189 | + | |
188 | 190 | Date dueDate = null; |
189 | 191 | List<MatDeliverAddRequest.Baby> babies = new ArrayList<>(); |
190 | 192 | MatDeliverAddRequest deliverAddRequest = new MatDeliverAddRequest(); |
191 | 193 | for(Fm allFm:allList){ |
192 | 194 | |
193 | 195 | if ("死胎".equals(allFm.getBABY_PREGNANCY_OUT())) |
196 | + { | |
197 | + continue; | |
198 | + } | |
199 | + if (StringUtils.isEmpty(allFm.getPHONE()) || StringUtils.isEmpty(allFm.getIDCARD())) | |
194 | 200 | { |
195 | 201 | continue; |
196 | 202 | } |