Commit ced344de4e63758b342fb8b859e45d918bd74133
1 parent
cf8aac3113
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 80 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java
View file @
ced344d
| ... | ... | @@ -12,6 +12,8 @@ |
| 12 | 12 | import com.lyms.platform.common.utils.DateUtil; |
| 13 | 13 | import com.lyms.platform.common.utils.ExceptionUtils; |
| 14 | 14 | import com.lyms.platform.common.utils.JsonUtil; |
| 15 | +import com.lyms.platform.permission.model.LisReportItemModel; | |
| 16 | +import com.lyms.platform.permission.model.LisReportModel; | |
| 15 | 17 | import com.lyms.platform.pojo.*; |
| 16 | 18 | import com.lyms.platform.query.LisReportQuery; |
| 17 | 19 | import com.lyms.platform.query.PatientsQuery; |
| ... | ... | @@ -480,7 +482,7 @@ |
| 480 | 482 | }else{ |
| 481 | 483 | List<CheckResponse> result = new ArrayList<CheckResponse>(); |
| 482 | 484 | List<CheckByDate> CheckByDate=new ArrayList<CheckByDate>(); |
| 483 | - //List<CheckType> CheckType=new ArrayList<CheckType>(); | |
| 485 | + //List<CheckType> CheckType=new ArrayList<CheckType>(); | |
| 484 | 486 | //result.addAll(l); |
| 485 | 487 | result.addAll(queryLisCheckList(cardNo)); |
| 486 | 488 | //result.addAll(queryPacsCheckList(cardNo)); |
| ... | ... | @@ -663,6 +665,78 @@ |
| 663 | 665 | DbUtils.closeQuietly(conn); |
| 664 | 666 | e.printStackTrace(); |
| 665 | 667 | return result; |
| 668 | + } | |
| 669 | + } | |
| 670 | + return result; | |
| 671 | + } | |
| 672 | + | |
| 673 | + public List<LisReportModel> queryQhdCheckLisInfo(String vcCardNo,String phone,String titles,String checkTime) { | |
| 674 | + System.out.println("checktime = " + checkTime); | |
| 675 | + String startDate = DateUtil.getyyyy_MM_dd(DateUtil.parseYMD(checkTime))+" 00:00:00"; | |
| 676 | + String endDate = DateUtil.getyyyy_MM_dd(DateUtil.addDay(DateUtil.parseYMD(checkTime),2))+" 00:00:00"; | |
| 677 | + | |
| 678 | + List<LisReportModel> result = new ArrayList<>(); | |
| 679 | + Connection conn = ConnTools.makeLisConnection(); | |
| 680 | + QueryRunner queryRunner = new QueryRunner(true); | |
| 681 | + if (StringUtils.isNotBlank(vcCardNo)) { | |
| 682 | + | |
| 683 | + try { | |
| 684 | + String sql = " SELECT shenqinghao as lisId, " | |
| 685 | + + " baogaoleibiemingcheng as title, " | |
| 686 | + + " '' as type, " | |
| 687 | + + " kahao as vcCardNo, " | |
| 688 | + + " huanzhexingming as name, " | |
| 689 | + + " zhuyuanhao as bhnum, " | |
| 690 | + + " nianling as age, " | |
| 691 | + + " xingbie as sex, " | |
| 692 | + + " shengqingshijian as applyTime, " | |
| 693 | + + " jianchashijian as checkTime, " | |
| 694 | + + " baogaofabushijian as publishTime, " | |
| 695 | + + " shenqingyishengmingcheng as applyDoctor, " | |
| 696 | + + " shenqingkeshimingcheng as applyDept, " | |
| 697 | + + " '' as checker, " | |
| 698 | + + " baogaofabushijian as modified, " | |
| 699 | + + " baogaofabushijian as created, " | |
| 700 | + + " phone as phone " | |
| 701 | + + " from valllist_ex_en where kahao = '"+vcCardNo+"' " | |
| 702 | + + " and baogaofabushijian >= CONVERT(DATETIME,'" + startDate +"', 120) " | |
| 703 | + + " and baogaofabushijian <= CONVERT(DATETIME,'" + endDate +"', 120) " | |
| 704 | + + " and baogaoleibiemingcheng in "+ titles + " order by baogaofabushijian desc "; | |
| 705 | + String subSql = " select " | |
| 706 | + + " sheqingdanhao as lisId, " | |
| 707 | + + " xiangmudaima as code, " | |
| 708 | + + " xiangmumingcheng as name, " | |
| 709 | + + " zifujieguo as charResult, " | |
| 710 | + + " shuzijieguo as numberResult, " | |
| 711 | + + " zifujieguo as result, " | |
| 712 | + + " shuzijieguo as resultFlag, " | |
| 713 | + + " cankaozhi as ref, " | |
| 714 | + + " jieguoleixing as resultType," | |
| 715 | + + " danwei as unit, " | |
| 716 | + + " '216' as hospitalId " | |
| 717 | + + " from valresult_ex_en " | |
| 718 | + + " where sheqingdanhao ='"; | |
| 719 | + System.out.println("lis sql = " + sql); | |
| 720 | + List<LisReportModel> lisReportList = queryRunner.query(conn, sql, new BeanListHandler<LisReportModel>(LisReportModel.class)); | |
| 721 | + if (CollectionUtils.isNotEmpty(lisReportList)) { | |
| 722 | + for (LisReportModel lisReport : lisReportList) { | |
| 723 | + if (StringUtils.isNotBlank(lisReport.getLisId())) { | |
| 724 | + List<LisReportItemModel> lisReportItemList = | |
| 725 | + queryRunner.query(conn, subSql+lisReport.getLisId()+"'", | |
| 726 | + new BeanListHandler<LisReportItemModel>(LisReportItemModel.class)); | |
| 727 | + if (CollectionUtils.isNotEmpty(lisReportItemList)) { | |
| 728 | + System.out.println("items = " + lisReportItemList.size()); | |
| 729 | + lisReport.setItems(lisReportItemList); | |
| 730 | + } | |
| 731 | + } | |
| 732 | + } | |
| 733 | + return lisReportList; | |
| 734 | + } | |
| 735 | + } catch (SQLException e) { | |
| 736 | + e.printStackTrace(); | |
| 737 | + return result; | |
| 738 | + }finally { | |
| 739 | + DbUtils.closeQuietly(conn); | |
| 666 | 740 | } |
| 667 | 741 | } |
| 668 | 742 | return result; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
ced344d
| ... | ... | @@ -61,6 +61,9 @@ |
| 61 | 61 | @Autowired |
| 62 | 62 | private QhdfyHisService qhdfyHisService; |
| 63 | 63 | |
| 64 | + @Autowired | |
| 65 | + private NczxyyLisService nczxyyLisService; | |
| 66 | + | |
| 64 | 67 | public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version"); |
| 65 | 68 | |
| 66 | 69 | /** |
| ... | ... | @@ -76,7 +79,7 @@ |
| 76 | 79 | //获取lis数据 |
| 77 | 80 | if("7".equals(HIS_VERSION)){ |
| 78 | 81 | //根据调用接口获取四川南充中心医院的Lis数据 |
| 79 | - result.addAll(NczxyyLisService.queryLisCheckList(vcCardNo)); | |
| 82 | + result.addAll(nczxyyLisService.queryLisCheckList(vcCardNo)); | |
| 80 | 83 | }else{ |
| 81 | 84 | result.addAll(queryLisCheckList(vcCardNo,phone,userId)); |
| 82 | 85 | } |
| ... | ... | @@ -164,7 +167,7 @@ |
| 164 | 167 | List<CheckResponse> result = new ArrayList<CheckResponse>(); |
| 165 | 168 | if("7".equals(HIS_VERSION)){ |
| 166 | 169 | //根据调用接口获取四川南充中心医院的Lis数据 |
| 167 | - result.addAll(NczxyyLisService.queryLisCheckList(vcCardNo)); | |
| 170 | + result.addAll(nczxyyLisService.queryLisCheckList(vcCardNo)); | |
| 168 | 171 | }else{ |
| 169 | 172 | result.addAll(queryLisCheckList(vcCardNo,phone,userId)); |
| 170 | 173 | } |