Commit 22c589d960aa543b4080d250c1d26898cf3579d3

Authored by liquanyu
1 parent 40338377b9

update code

Showing 1 changed file with 23 additions and 6 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java View file @ 22c589d
... ... @@ -114,7 +114,7 @@
114 114 try {
115 115 String sql ="select "+cloumns+" from JHMK_FMJL where " +
116 116 " CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) > CONVERT(DATETIME,'"+start+"', 120) and CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) <= CONVERT(DATETIME,'"+end+"', 120)" +
117   - " and SYXH not in (select SYXH from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null" +
  117 + " and SYXH not in (select SYXH from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null and CCQK is not null and CCQK <> '' " +
118 118 " and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ')) ";
119 119  
120 120 if (StringUtils.isNotEmpty(syxh))
... ... @@ -127,6 +127,11 @@
127 127 if (CollectionUtils.isNotEmpty(list)) {
128 128 for (FmItem item : list) {
129 129 try {
  130 +
  131 + if (!("活产".equals(item.getCcqk()) || "死胎".equals(item.getCcqk())))
  132 + {
  133 + continue;
  134 + }
130 135 ExceptionUtils.catchException("item===" + item);
131 136 String dueDateStr = item.getSsrq();
132 137 if (!StringUtils.isNotEmpty(dueDateStr)) {
... ... @@ -223,7 +228,7 @@
223 228 baby.setDeformity("无".equals(item.getJx()) ? 0 : 1); //畸形 0非畸形 1畸形
224 229 baby.setAsphyxiaM(item.getZx()); //窒息分钟
225 230 baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(item.getCcqk())); // 妊娠结局
226   - baby.setBabyHealthy(item.getYeqk()); //新生儿疾病
  231 + //baby.setBabyHealthy(item.getYeqk()); //新生儿疾病
227 232 baby.setDueTime(fmt1.format(dueDate));//分娩时间
228 233 babies.add(baby);
229 234 deliverAddRequest.setFmHospital("216"); //设置为秦皇岛分娩医院
... ... @@ -244,7 +249,6 @@
244 249 saveFmrecord(item.getSyxh());
245 250 }
246 251  
247   -
248 252 } catch (Exception e)
249 253 {
250 254 ExceptionUtils.catchException(e, "数据异常");
... ... @@ -253,7 +257,7 @@
253 257 }
254 258 }
255 259  
256   - String sql1="select * from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null " +
  260 + String sql1="select * from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and CCQK is not null and CCQK <> '' " +
257 261 " and SH is not null and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ') and " +
258 262 " CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) > CONVERT(DATETIME,'"+start+"', 120) and CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) <= CONVERT(DATETIME,'"+end+"', 120)";
259 263  
... ... @@ -292,6 +296,11 @@
292 296 List<FmItem> items = maps.get(key);
293 297 FmItem item = items.get(0);
294 298  
  299 + if (!("活产".equals(item.getCcqk()) || "死胎".equals(item.getCcqk())))
  300 + {
  301 + continue;
  302 + }
  303 +
295 304 String dueDateStr = item.getSsrq();
296 305 if (!StringUtils.isNotEmpty(dueDateStr))
297 306 {
298 307  
299 308  
... ... @@ -417,10 +426,12 @@
417 426 baby.setBabyGender("男".equals(item1.getYexb()) ? "1" : "0");
418 427 baby.setBabyHeight(item1.getSc());//新生儿生长
419 428 baby.setBabyWeight(item1.getTz());//新生儿重量
420   - baby.setDeformity("无".equals(item1.getJx()) ? 0 : 1); //畸形 0非畸形 1畸形
421 429 baby.setAsphyxiaM(item1.getZx()); //窒息分钟
  430 +
  431 + baby.setDeformity("无".equals(item1.getJx()) ? 0 : 1); //畸形 0非畸形 1畸形
  432 +
422 433 baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(item1.getCcqk())); // 妊娠结局
423   - baby.setBabyHealthy(item1.getYeqk()); //新生儿疾病
  434 +// baby.setBabyHealthy(item1.getYeqk()); //新生儿疾病
424 435 baby.setDueTime(fmt1.format(dueDate1));//分娩时间
425 436 babies.add(baby);
426 437  
... ... @@ -482,6 +493,12 @@
482 493 public void buildBaby(FmItem item,FmPatInfo patInfo, Date dueDate)
483 494 {
484 495 try{
  496 + // O("活产", "0"),O1("死胎", "1"),O2("浸软胎", "2"),O3("死产", "3");
  497 + if (!"活产".equals(item.getCcqk()))
  498 + {
  499 + return;
  500 + }
  501 +
485 502 UsersQuery usersQuery = new UsersQuery();
486 503 usersQuery.setYn(YnEnums.YES.getId());
487 504 usersQuery.setName("产房");