Commit a012c1cdaecab74253129559cc01310b2353aecd

Authored by liquanyu
1 parent 44701538af

分娩

Showing 2 changed files with 44 additions and 20 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java View file @ a012c1c
... ... @@ -106,14 +106,11 @@
106 106 Date start = new Date(end.getTime()-1000*60*60);
107 107 String startStr = fmt.format(start);
108 108 String endStr = fmt.format(end);
109   - System.out.println("start="+startStr+"end="+endStr);
110   - ExceptionUtils.catchException("start="+startStr+"end="+endStr);
  109 + System.out.println("start=" + startStr + "end=" + endStr);
111 110 queryFmPatient(startStr, endStr,null);
112 111 }
113 112  
114 113 public void syncWorker(String startStr,String endStr) {
115   - System.out.println("sync start="+startStr+"end="+endStr);
116   - ExceptionUtils.catchException("start="+startStr+"end="+endStr);
117 114 queryFmPatient(startStr, endStr,null);
118 115 }
119 116  
120 117  
... ... @@ -173,10 +170,16 @@
173 170 }
174 171  
175 172  
176   - public void syncByCardNo(String startStr,String endStr,String syxh) {
177   - queryFmPatient(startStr, endStr, syxh);
  173 + public void syncByCardNo(String startStr,String endStr,String cardNo) {
  174 + FmPatInfo patInfo = getFmPatInfoByCardNo(cardNo);
  175 + if (patInfo != null && patInfo.getSyxh() != null)
  176 + {
  177 + System.out.println("cardNo=" + cardNo + ";syxh=" + patInfo.getSyxh());
  178 + queryFmPatient(startStr, endStr, patInfo.getSyxh());
  179 + }
178 180 }
179 181  
  182 +
180 183 public void syncByPhone(String startStr,String endStr,String syxh) {
181 184 queryFmPatient(startStr, endStr,syxh);
182 185 }
183 186  
184 187  
185 188  
... ... @@ -868,12 +871,39 @@
868 871 patInfo = list1.get(0);
869 872 }
870 873 }
871   - DbUtils.closeQuietly(conn);
872 874 return patInfo;
873 875  
  876 + }catch (SQLException e) {
  877 + System.out.println(e.getMessage());
  878 + }
  879 + finally {
  880 + DbUtils.closeQuietly(conn);
  881 + }
  882 + return null;
  883 + }
  884 +
  885 + /**
  886 + * 分娩用户信息,通过身份证号码
  887 + * @param cardNo
  888 + * @return
  889 + */
  890 + public FmPatInfo getFmPatInfoByCardNo(String cardNo)
  891 + {
  892 + Connection conn = ConnTools.makeFmConnection();
  893 + QueryRunner queryRunner = new QueryRunner();
  894 + try {
  895 + FmPatInfo patInfo = null;
  896 +
  897 + List<FmPatInfo> list = queryRunner.query(conn, "SELECT syxh,hzxm as name,sfzh as cardNo,sex as sex,birth,lxrdh as phone, blh FROM THIS4_BASY WHERE hzxm is not null and hzxm <> '' and sfzh = '"+cardNo+"'", new BeanListHandler<FmPatInfo>(FmPatInfo.class));
  898 + if (CollectionUtils.isNotEmpty(list)) {
  899 + patInfo = list.get(0);
  900 + }
  901 + return patInfo;
874 902 } catch (SQLException e) {
  903 + System.out.println(e.getMessage());
  904 + }
  905 + finally {
875 906 DbUtils.closeQuietly(conn);
876   - e.printStackTrace();
877 907 }
878 908 return null;
879 909 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ a012c1c
... ... @@ -861,18 +861,12 @@
861 861 LcdcfHisModel lcdcfHisModel = null;
862 862  
863 863 //聊城东昌府分娩界面通过住院号从his中查询到孕妇的身份号码,然后用身份证号码作为院内系统的查询条件查询孕妇信息
864   - if ("1000000116".equals(hospital) && StringUtils.isNotEmpty(deliverQueryRequest.getZhuYuanNo())) {
865   - //if ("2100001305".equals(hospital) && StringUtils.isNotEmpty(deliverQueryRequest.getZhuYuanNo())) {
866   -// lcdcfHisModel = lcdcfHisService.getHisPatientByZyh(deliverQueryRequest.getZhuYuanNo());
867   -// if (lcdcfHisModel != null && StringUtils.isNotEmpty(lcdcfHisModel.getIdCard())) {
868   -// //deliverQueryRequest.setCardNo(lcdcfHisModel.getIdCard());
869   -//
870   -//
871   -// } else {
872   -// return new BaseResponse().setErrormsg("该孕妇还未在本院建档不能进行分娩").setErrorcode(ErrorCodeConstants.NO_DATA);
873   -// }
  864 + if ("2100001305".equals(hospital) && StringUtils.isNotEmpty(deliverQueryRequest.getZhuYuanNo())) {
  865 + lcdcfHisModel = lcdcfHisService.getHisPatientByZyh(deliverQueryRequest.getZhuYuanNo());
  866 + if (lcdcfHisModel != null && StringUtils.isNotEmpty(lcdcfHisModel.getIdCard())) {
  867 + deliverQueryRequest.setCardNo(lcdcfHisModel.getIdCard());
  868 + }
874 869 }
875   - deliverQueryRequest.setCardNo("63010419900906852X");
876 870 //获取
877 871 /* Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, hospital, -1);
878 872 if (null == patients) {
... ... @@ -1027,7 +1021,7 @@
1027 1021 {
1028 1022 matDeliverListResult.setDeliverData(lcdcfFmService.queryFmPatient(deliverQueryRequest.getZhuYuanNo()));
1029 1023 }
1030   - matDeliverListResult.setDeliverData(lcdcfFmService.queryFmPatient(deliverQueryRequest.getZhuYuanNo()));
  1024 +
1031 1025 } catch (Exception e) {
1032 1026 }
1033 1027 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(matDeliverListResult);