Commit ecaa363e37d9e4f31cf5583969ec2b7fd40001f7
1 parent
0eefa8b9dc
Exists in
master
and in
6 other branches
听力筛查建档
Showing 1 changed file with 13 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyFmService.java
View file @
ecaa363
... | ... | @@ -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 BABY_DELIVERY_TIME > to_date('"+start+"', 'yyyy-MM-dd hh24:mi:ss') " + | |
164 | + " 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,26 @@ |
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 ID='"+id+"'" ; | |
184 | 181 | |
185 | 182 | //查出这个ID对应孕妇在这个时间段的分娩记录 |
186 | - List<Fm> allList = queryRunner.query(conn, allSql, new BeanListHandler<Fm>(Fm.class)); | |
183 | +// List<Fm> allList = queryRunner.query(conn, allSql, new BeanListHandler<Fm>(Fm.class)); | |
187 | 184 | |
185 | + List<Fm> allList = new ArrayList<>(); | |
186 | + allList.add(fm); | |
187 | + | |
188 | 188 | Date dueDate = null; |
189 | 189 | List<MatDeliverAddRequest.Baby> babies = new ArrayList<>(); |
190 | 190 | MatDeliverAddRequest deliverAddRequest = new MatDeliverAddRequest(); |
191 | 191 | for(Fm allFm:allList){ |
192 | 192 | |
193 | 193 | if ("死胎".equals(allFm.getBABY_PREGNANCY_OUT())) |
194 | + { | |
195 | + continue; | |
196 | + } | |
197 | + | |
198 | + if (StringUtils.isEmpty(allFm.getPHONE()) || StringUtils.isEmpty(allFm.getIDCARD())) | |
194 | 199 | { |
195 | 200 | continue; |
196 | 201 | } |