Commit b625a2e8efd0bbe850be6622b9a867ad6dfd9aaf
1 parent
4a8dd5acd4
Exists in
master
and in
6 other branches
update code
Showing 4 changed files with 68 additions and 20 deletions
- platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml
- platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyHisService.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/pojo/DzReplace.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml
View file @
b625a2e
... | ... | @@ -114,6 +114,15 @@ |
114 | 114 | <if test="vcCardNo != null and vcCardNo != ''"> |
115 | 115 | AND VCCARDNO = #{vcCardNo} |
116 | 116 | </if> |
117 | + | |
118 | + <if test="vcCardNos != null and vcCardNos.size() !=0 "> | |
119 | + AND VCCARDNO IN | |
120 | + <foreach collection="vcCardNos" item="vc" | |
121 | + index="index" open="(" close=")" separator=","> | |
122 | + #{vc} | |
123 | + </foreach> | |
124 | + </if> | |
125 | + | |
117 | 126 | <if test="phone != null and phone != ''"> |
118 | 127 | AND PHONE = #{phone} |
119 | 128 | </if> |
... | ... | @@ -132,6 +141,7 @@ |
132 | 141 | #{title} |
133 | 142 | </foreach> |
134 | 143 | </if> |
144 | + | |
135 | 145 | </select> |
136 | 146 | |
137 | 147 |
platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyHisService.java
View file @
b625a2e
... | ... | @@ -451,41 +451,58 @@ |
451 | 451 | |
452 | 452 | /**德州 |
453 | 453 | * 获取患者使用过的所有就诊卡号 |
454 | - * @param cardNo 就诊卡号 | |
454 | + * @param vcCardNo 就诊卡号 | |
455 | 455 | * @return |
456 | 456 | */ |
457 | - public List<DzReplace> findAllCradNo(String cardNo){ | |
457 | + public List<DzReplace> findAllVcCarddNo(String vcCardNo){ | |
458 | 458 | List<DzReplace> allCardNoList = new ArrayList<DzReplace>(); |
459 | - if (StringUtils.isNotBlank(cardNo)) { | |
459 | + if (StringUtils.isNotBlank(vcCardNo)) { | |
460 | + System.out.println("vcCardNo = " + vcCardNo); | |
460 | 461 | Connection conn = com.lyms.hospitalapi.dzfy.ConnTools.makeHisConnection(); |
461 | 462 | QueryRunner queryRunner = new QueryRunner(true); |
462 | - String sql = "select id as id from zlhis.v_patientinfo where cardno = '"+cardNo+"'"; | |
463 | + String sql = "select id as id from zlhis.v_patientinfo where cardno = '"+vcCardNo+"'"; | |
463 | 464 | try{ |
464 | - | |
465 | 465 | List<DzReplace> hisDzReplaceList = queryRunner.query(conn,sql,new BeanListHandler<DzReplace>(DzReplace.class)); |
466 | 466 | String jzkSql = "select 病人ID as id,卡号 as cardNo,登记记录 as combTime from zlhis.jzkghjl where 病人ID = '"+hisDzReplaceList.get(0).getId()+"'"; |
467 | - | |
468 | 467 | allCardNoList = queryRunner.query(conn,jzkSql,new BeanListHandler<DzReplace>(DzReplace.class)); |
469 | - | |
468 | + System.out.println("vcCardNo list " + allCardNoList); | |
470 | 469 | }catch (Exception e){ |
471 | - | |
472 | - e.printStackTrace(); | |
473 | - | |
470 | + DbUtils.closeQuietly(conn); | |
471 | + ExceptionUtils.catchException(e, "dz his exception "); | |
472 | + }finally { | |
473 | + DbUtils.closeQuietly(conn); | |
474 | 474 | } |
475 | - | |
476 | - | |
477 | 475 | } |
478 | - | |
479 | 476 | return allCardNoList; |
480 | 477 | } |
481 | 478 | |
482 | 479 | |
480 | + /** | |
481 | + * 通过就诊卡号查询到当前就诊卡号使用人的历史就诊卡号 | |
482 | + * @param vcCardNo | |
483 | + * @return | |
484 | + */ | |
485 | + public List<String> getDzVcCardNos(String vcCardNo) | |
486 | + { | |
487 | + List<String> vcCardNos = new ArrayList<>(); | |
488 | + List<DzReplace> list = findAllVcCarddNo(vcCardNo); | |
483 | 489 | |
484 | - | |
485 | - | |
486 | - | |
487 | - | |
488 | - | |
490 | + if (CollectionUtils.isNotEmpty(list)) | |
491 | + { | |
492 | + for (DzReplace dz : list) | |
493 | + { | |
494 | + if (dz != null && StringUtils.isNotEmpty(dz.getCardNo())) | |
495 | + { | |
496 | + vcCardNos.add(dz.getCardNo()); | |
497 | + } | |
498 | + } | |
499 | + } | |
500 | + else | |
501 | + { | |
502 | + vcCardNos.add(vcCardNo); | |
503 | + } | |
504 | + return vcCardNos; | |
505 | + } | |
489 | 506 | |
490 | 507 | |
491 | 508 | public static Date parseYmd(String s) { |
platform-operate-api/src/main/java/com/lyms/hospitalapi/pojo/DzReplace.java
View file @
b625a2e
... | ... | @@ -32,5 +32,14 @@ |
32 | 32 | public void setCombTime(String combTime) { |
33 | 33 | this.combTime = combTime; |
34 | 34 | } |
35 | + | |
36 | + @Override | |
37 | + public String toString() { | |
38 | + return "DzReplace{" + | |
39 | + "id='" + id + '\'' + | |
40 | + ", cardNo='" + cardNo + '\'' + | |
41 | + ", combTime='" + combTime + '\'' + | |
42 | + '}'; | |
43 | + } | |
35 | 44 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
b625a2e
... | ... | @@ -59,6 +59,9 @@ |
59 | 59 | private QhdfyHisService qhdfyHisService; |
60 | 60 | |
61 | 61 | @Autowired |
62 | + private DzfyHisService dzfyHisService; | |
63 | + | |
64 | + @Autowired | |
62 | 65 | @Qualifier("commonThreadPool") |
63 | 66 | private ThreadPoolTaskExecutor commonThreadPool; |
64 | 67 | |
... | ... | @@ -464,7 +467,16 @@ |
464 | 467 | //通过就诊卡号和医院id查询到医院下面的lis记录 |
465 | 468 | if (StringUtils.isNotEmpty(vcCardNo)) |
466 | 469 | { |
467 | - model.setVcCardNo(vcCardNo); | |
470 | + //德州 | |
471 | + if ("6".equals(HIS_VERSION)) | |
472 | + { | |
473 | + model.setVcCardNos(dzfyHisService.getDzVcCardNos(vcCardNo)); | |
474 | + } | |
475 | + else | |
476 | + { | |
477 | + model.setVcCardNo(vcCardNo); | |
478 | + } | |
479 | + | |
468 | 480 | List<LisReportModel> lises = lisService.queryLisDataByModel(model); |
469 | 481 | if (CollectionUtils.isNotEmpty(lises)) |
470 | 482 | { |