Commit fa15c0bd1e2e8e94a1d30c8a46c78a18f1d0338d
1 parent
e1147d735f
Exists in
master
and in
6 other branches
update code
Showing 1 changed file with 17 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java
View file @
fa15c0b
| ... | ... | @@ -118,7 +118,7 @@ |
| 118 | 118 | |
| 119 | 119 | if (StringUtils.isNotEmpty(syxh)) |
| 120 | 120 | { |
| 121 | - sql+= " SYXH='"+syxh+"'"; | |
| 121 | + sql+= " and SYXH='"+syxh+"'"; | |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | List<FmItem> list = queryRunner.query(conn, sql, new BeanListHandler<FmItem>(FmItem.class)); |
| 125 | 125 | |
| ... | ... | @@ -251,9 +251,22 @@ |
| 251 | 251 | } |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | - List<FmItem> duoTaiList = queryRunner.query(conn, "select * from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null " + | |
| 254 | + 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 " + | |
| 255 | 255 | " and SH is not null and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ') and " + |
| 256 | - " 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)", new BeanListHandler<FmItem>(FmItem.class)); | |
| 256 | + " 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)"; | |
| 257 | + | |
| 258 | + if (StringUtils.isNotEmpty(syxh)) | |
| 259 | + { | |
| 260 | + sql1+= " and SYXH='"+syxh+"'"; | |
| 261 | + } | |
| 262 | + | |
| 263 | + | |
| 264 | + List<FmItem> duoTaiList = queryRunner.query(conn,sql1 | |
| 265 | + , new BeanListHandler<FmItem>(FmItem.class)); | |
| 266 | + | |
| 267 | + | |
| 268 | + ExceptionUtils.catchException("duo tai size====" + duoTaiList.size()); | |
| 269 | + | |
| 257 | 270 | if (CollectionUtils.isNotEmpty(duoTaiList)) { |
| 258 | 271 | Map<String,List<FmItem>> maps = new HashMap<>(); |
| 259 | 272 | for(FmItem item : duoTaiList) |
| ... | ... | @@ -581,7 +594,7 @@ |
| 581 | 594 | { |
| 582 | 595 | List<FmPatInfo> list1 = queryRunner.query(conn, "SELECT SYXH as syxh, BRXM as name,'' as cardNo,BRXB as sex,'' as birth,LXDH as phone FROM JHMK_BASY WHERE len(LXDH) = 11 and SYXH = '"+syxh+"'", new BeanListHandler<FmPatInfo>(FmPatInfo.class)); |
| 583 | 596 | if (CollectionUtils.isNotEmpty(list1)) { |
| 584 | - return list.get(0); | |
| 597 | + return list1.get(0); | |
| 585 | 598 | } |
| 586 | 599 | } |
| 587 | 600 | DbUtils.closeQuietly(conn); |