Commit 5321b95f57b2ca212db73338d089234bbf0da20b

Authored by liquanyu
1 parent f9d7ce1696

筛查

Showing 8 changed files with 78 additions and 47 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java View file @ 5321b95
... ... @@ -798,6 +798,7 @@
798 798 public BaseObjectResponse findList(String userId, String hospitalId, String url, Integer type) {
799 799 Integer year = DateUtil.getCurrentYear();
800 800 String peopleNum = null;
  801 + System.out.println("start1="+System.currentTimeMillis());
801 802 PlantformConfigModel model = mongoTemplate.findOne(Query.query(Criteria.where("key").is(hospitalId).and("type").is(SequenceConstant.QUEUE_TYPE)), PlantformConfigModel.class);
802 803 if (model != null) {
803 804 String value = model.getValue();
804 805  
805 806  
806 807  
... ... @@ -809,16 +810,19 @@
809 810 }
810 811 }
811 812 }
812   -
  813 + System.out.println("start2="+System.currentTimeMillis());
813 814 Map<String, Object> param = new HashMap<>();
814 815 param.put("userId", userId);
815 816 param.put("hospitalId", hospitalId);
816 817  
817 818 Map<String, Object> restMap = new HashMap<>();
818 819 restMap.put("topName", couponMapper.findTopName(hospitalId));
  820 + System.out.println("start3="+System.currentTimeMillis());
819 821 List<Map<String, Object>> couponInfos = couponMapper.findInfo(param);
  822 + System.out.println("start4="+System.currentTimeMillis());
820 823 for (Map<String, Object> map : couponInfos) {
821   - map.put("url", findUrl(map.get("sequence_id").toString(), type));
  824 +// map.put("url", findUrl(map.get("sequence_id").toString(), type));
  825 + map.put("url", "http://weixin.qq.com/r/Fi9bQyLEgH--rWYg93oE");
822 826 if (StringUtils.isNotEmpty(peopleNum)) {
823 827 map.put("peopleNum", peopleNum);
824 828 }
... ... @@ -838,6 +842,7 @@
838 842 }
839 843 }
840 844 }
  845 + System.out.println("start5="+System.currentTimeMillis());
841 846 restMap.put("couponInfos", couponInfos);
842 847 return RespBuilder.buildSuccess(restMap);
843 848 }
platform-job-index/src/main/java/com/lyms/platform/job/index/restore/data/ConvertHelper.java View file @ 5321b95
... ... @@ -1468,10 +1468,19 @@
1468 1468 // 血压
1469 1469 String ssy = "";
1470 1470 String szy = "";
1471   - Map<String, String> chBpMap = JsonUtil.getMap(antExFuModel.getBp());
1472   - if (MapUtils.isNotEmpty(chBpMap)) {
1473   - ssy = chBpMap.get("ssy");
1474   - szy = chBpMap.get("szy");
  1471 + try {
  1472 + Map <String, String> chBpMap = JsonUtil.getMap(antExFuModel.getBp());
  1473 + if (MapUtils.isNotEmpty(chBpMap)) {
  1474 + ssy = chBpMap.get("ssy");
  1475 + szy = chBpMap.get("szy");
  1476 + }
  1477 + }catch (Exception e) {
  1478 + List<Map> list = JsonUtil.jsonToList(antExFuModel.getBp(),Map.class);
  1479 + if (list != null && MapUtils.isNotEmpty(list.get(0))) {
  1480 + ssy = String.valueOf(list.get(0).get("ssy"));
  1481 + szy = String.valueOf(list.get(0).get("szy"));
  1482 + }
  1483 + ExceptionUtils.catchException(e,"getBp error.");
1475 1484 }
1476 1485 antFuJson.put("bp", StringUtils.unitHandle(ssy + "/" + szy, UnitConstants.MMHG));
1477 1486 //体重
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdPuerService.java View file @ 5321b95
... ... @@ -114,10 +114,17 @@
114 114 Organization org = organizationService.getOrganization(Integer.parseInt( antExChuModel.getHospitalId()));
115 115 model.put("buildHospital",org.getName());
116 116 model.put("isBuild","已建档");
117   - String byUsedId = couponMapper.findByUsedId(pats.get(0).getPid());
118   - if (StringUtils.isNotEmpty(byUsedId)) {
119   - model.put("isCoupon","已领取");
  117 + for (Patients patients : pats){
  118 + if (patients.isSendCoupon() != null && patients.isSendCoupon()){
  119 + model.put("isCoupon","已领取");
  120 + break;
  121 + }
120 122 }
  123 +
  124 +// String byUsedId = couponMapper.findByUsedId(pats.get(0).getPid());
  125 +// if (StringUtils.isNotEmpty(byUsedId)) {
  126 +// model.put("isCoupon","已领取");
  127 +// }
121 128  
122 129 }
123 130 }
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java View file @ 5321b95
... ... @@ -651,23 +651,23 @@
651 651 SimpleDateFormat fmt2 = new SimpleDateFormat("yyyyMMdd");
652 652 SimpleDateFormat fmt1 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
653 653 String cloumns = getPolyembryonyStr();
654   - try {
655 654  
656   - String sql = "select " + cloumns + " from JHMK_FMJL_LYMS where CONVERT(DATETIME,left(JLRQ,8)+' '+RIGHT(JLRQ,8),20) > CONVERT(DATETIME,'" + start
657   - + "', 120) and CONVERT(DATETIME,left(JLRQ,8)+' '+RIGHT(JLRQ,8),20) <= CONVERT(DATETIME,'" + end
658   - + "', 120) and 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 <> '' ";
  655 + String sql = "select " + cloumns + " from JHMK_FMJL_LYMS where CONVERT(DATETIME,left(JLRQ,8)+' '+RIGHT(JLRQ,8),20) > CONVERT(DATETIME,'" + start
  656 + + "', 120) and CONVERT(DATETIME,left(JLRQ,8)+' '+RIGHT(JLRQ,8),20) <= CONVERT(DATETIME,'" + end
  657 + + "', 120) and 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 <> '' ";
  658 + String sql1 = "select " + cloumns + " from JHMK_FMJL_LYMS where CONVERT(DATETIME,left(JLRQ,8)+' '+RIGHT(JLRQ,8),20) > CONVERT(DATETIME,'" + start
  659 + + "', 120) and CONVERT(DATETIME,left(JLRQ,8)+' '+RIGHT(JLRQ,8),20) <= CONVERT(DATETIME,'" + end
  660 + + "', 120) and 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 <> '' ";
659 661  
  662 + try {
  663 +
660 664 if (StringUtils.isNotEmpty(syxh)) {
661 665 sql += " and SYXH= " + syxh;
662 666 }
663 667 List<FmItem> list = queryRunner.query(conn, sql, new BeanListHandler<FmItem>(FmItem.class));
664 668 if (CollectionUtils.isNotEmpty(list)) {
665   - System.out.println("======================"+list.size());
666 669 for (FmItem item : list) {
667   - System.out.println("SYXH==============="+item.getSyxh());
668   - String sql1 = "select " + cloumns + " from JHMK_FMJL_LYMS where CONVERT(DATETIME,left(JLRQ,8)+' '+RIGHT(JLRQ,8),20) > CONVERT(DATETIME,'" + start
669   - + "', 120) and CONVERT(DATETIME,left(JLRQ,8)+' '+RIGHT(JLRQ,8),20) <= CONVERT(DATETIME,'" + end
670   - + "', 120) and 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 <> '' ";
  670 + ExceptionUtils.catchException("=================SYXH="+item.getSyxh());
671 671  
672 672 if (StringUtils.isNotEmpty(item.getSyxh())) {
673 673 sql1 += " and SYXH= " + item.getSyxh();
... ... @@ -699,7 +699,7 @@
699 699 dueTime = fmt2.parse(list1.get(i).getCsrq());
700 700 }
701 701 FmPatInfo patInfo = getFmPatInfoById(list1.get(i).getSyxh());
702   - System.out.println("================="+patInfo.getCardNo());
  702 + ExceptionUtils.catchException("================="+patInfo.getCardNo());
703 703 if (patInfo != null && (StringUtils.isNotEmpty(patInfo.getPhone()) || StringUtils.isNotEmpty(patInfo.getCardNo()))) {
704 704 PatientsQuery query = new PatientsQuery();
705 705 query.setYn(YnEnums.YES.getId());
... ... @@ -782,7 +782,8 @@
782 782 }
783 783  
784 784 } catch (SQLException e) {
785   - ExceptionUtils.catchException(e, "sql执行异常");
  785 + ExceptionUtils.catchException(e, "sql执行异常"+sql);
  786 + ExceptionUtils.catchException(e, "sql执行异常1"+sql1);
786 787 e.printStackTrace();
787 788 } catch (Exception e) {
788 789 ExceptionUtils.catchException(e, "发生异常");
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java View file @ 5321b95
... ... @@ -1166,24 +1166,24 @@
1166 1166  
1167 1167 public List<BabyDischargeDiagnosisModel> queryNewBabyDiagnose(String lrrqStart, String lrrqEnd) {
1168 1168  
1169   - Connection conn = null;
1170   - String sql = "select blh,syxh,hzxm,birth,birthtime,sex,sfzh,lxdh,lxdz,lxr,lxrdh,curraddr,lrrq,ryrq,rqrq,cyrq,cqrq,cyzddm,cyzdmc,ksdm,bqdm,mblh,msyxh from VW_LYMS_XSE_BRSYK where cyrq is not null and mblh is null ";
1171   - try {
1172   -
1173   - if (StringUtils.isNotEmpty(lrrqStart) && StringUtils.isNotEmpty(lrrqEnd)) {
1174   - sql += " and lrrq >= CONVERT(varchar(100),'" + lrrqStart + "', 120) and lrrq <= CONVERT(varchar(100),'" + lrrqEnd + "', 120)";
1175   - }
1176   -
1177   - conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection();
1178   - QueryRunner queryRunner = new QueryRunner();
1179   -
1180   - List<BabyDischargeDiagnosisModel> list = queryRunner.query(conn, sql, new BeanListHandler<BabyDischargeDiagnosisModel>(BabyDischargeDiagnosisModel.class));
1181   - return list;
1182   - } catch (Exception e) {
1183   - ExceptionUtils.catchException(e, "queryNewBabyDiagnose error. sql:" + sql);
1184   - } finally {
1185   - DbUtils.closeQuietly(conn);
1186   - }
  1169 +// Connection conn = null;
  1170 +// String sql = "select blh,syxh,hzxm,birth,birthtime,sex,sfzh,lxdh,lxdz,lxr,lxrdh,curraddr,lrrq,ryrq,rqrq,cyrq,cqrq,cyzddm,cyzdmc,ksdm,bqdm,mblh,msyxh from VW_LYMS_XSE_BRSYK where cyrq is not null and mblh is null ";
  1171 +// try {
  1172 +//
  1173 +// if (StringUtils.isNotEmpty(lrrqStart) && StringUtils.isNotEmpty(lrrqEnd)) {
  1174 +// sql += " and lrrq >= CONVERT(varchar(100),'" + lrrqStart + "', 120) and lrrq <= CONVERT(varchar(100),'" + lrrqEnd + "', 120)";
  1175 +// }
  1176 +//
  1177 +// conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection();
  1178 +// QueryRunner queryRunner = new QueryRunner();
  1179 +//
  1180 +// List<BabyDischargeDiagnosisModel> list = queryRunner.query(conn, sql, new BeanListHandler<BabyDischargeDiagnosisModel>(BabyDischargeDiagnosisModel.class));
  1181 +// return list;
  1182 +// } catch (Exception e) {
  1183 +// ExceptionUtils.catchException(e, "queryNewBabyDiagnose error. sql:" + sql);
  1184 +// } finally {
  1185 +// DbUtils.closeQuietly(conn);
  1186 +// }
1187 1187 return null;
1188 1188 }
1189 1189  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java View file @ 5321b95
... ... @@ -46,7 +46,7 @@
46 46 // urls.put("rp-hbnq-api.healthbaby.com.cn:18019","内丘");
47 47 // urls.put("area-kaifeng-api.healthbaby.com.cn:12356","开封");
48 48 // urls.put("area-weixian-api.healthbaby.com.cn:12356","威县");
49   - urls.put("rp-zk-api.healthbaby.com.cn:8094","周口市妇幼保健院");
  49 + //urls.put("rp-zk-api.healthbaby.com.cn:8094","周口市妇幼保健院");
50 50 // urls.put("area-huaiyang-api.healthbaby.com.cn:12356","淮阳县人民医院");
51 51 // urls.put("area-changyi-api.healthbaby.com.cn:12356","昌邑");
52 52 // urls.put("area-xtrm-api.healthbaby.com.cn:12356","邢台人民医院系统");
53 53  
... ... @@ -56,12 +56,12 @@
56 56 // urls.put("area-nc-api.healthbaby.com.cn:12356","南充");
57 57 //urls.put("area-laoling-api.healthbaby.com.cn:12356","乐陵");
58 58 // urls.put("area-zhuchengrenmin-api.healthbaby.com.cn:12356","诸城人民医院");
59   - urls.put("area-hengshui-api.healthbaby.com.cn:8787","衡水区域");
  59 + // urls.put("area-hengshui-api.healthbaby.com.cn:8787","衡水区域");
60 60 urls.put("area-rongcheng-api.healthbaby.com.cn:12356","荣成");
61 61 urls.put("area-zhucheng-api.healthbaby.com.cn:12356","诸城市妇幼保健院");
62 62 urls.put("area-weihai-api.healthbaby.com.cn:12356","威海市妇幼");
63   - urls.put("area-chengde-api.healthbaby.com.cn:12356","承德");
64   - urls.put("area-lingcheng-api.healthbaby.com.cn:12356","陵城");
  63 + //urls.put("area-chengde-api.healthbaby.com.cn:12356","承德");
  64 + //urls.put("area-lingcheng-api.healthbaby.com.cn:12356","陵城");
65 65 }
66 66  
67 67 @Autowired
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 5321b95
... ... @@ -5412,6 +5412,9 @@
5412 5412 if(StringUtils.isNotEmpty(query.getName()) || StringUtils.isNotEmpty(query.getCardNo()) ||
5413 5413 StringUtils.isNotEmpty(query.getYyzyfmHospitalId())){
5414 5414 PatientsQuery patientsQuery = new PatientsQuery();
  5415 +// //排查本院隐藏建档
  5416 +// patientsQuery.setExtEnable(false);
  5417 +// patientsQuery.setBuildTypeNot(1);
5415 5418 patientsQuery.setYn(YnEnums.YES.getId());
5416 5419 if (StringUtils.isNotEmpty(query.getName())) {
5417 5420 patientsQuery.setName(query.getName());
5418 5421  
... ... @@ -5467,10 +5470,11 @@
5467 5470 map.put("hospitalName", bookbuildingCoupon.get("hospitalname"));
5468 5471 String yyzyfmHospitalId_name = "";
5469 5472 for (Patients patient : patients) {
5470   - if (StringUtils.isNotEmpty(patient.getYyzyfmHospitalId())) {
  5473 + if (StringUtils.isNotEmpty(patient.getYyzyfmHospitalId()) && !"undifend".equals(patient.getYyzyfmHospitalId())) {
5471 5474 yyzyfmHospitalId_name = couponMapper.findHospitalNameById(patientsModel.getYyzyfmHospitalId());
5472 5475  
5473 5476 map.put("yyzyfmHospitalId", StringUtils.isNotEmpty(yyzyfmHospitalId_name)?yyzyfmHospitalId_name:"");
  5477 + break;
5474 5478 } else {
5475 5479 map.put("yyzyfmHospitalId","");
5476 5480 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java View file @ 5321b95
... ... @@ -245,12 +245,17 @@
245 245 // } else {
246 246 // chanResult.setFirstBH(organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())).getName());
247 247 // }
248   - String hname = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())).getName();
249   - if ((hname.contains("医院")) || (hname.contains("秦皇岛市妇幼保健院"))) {/* if (!(hname.contains("卫生服务站") || hname.contains("卫生服务中心") || hname.contains("卫生院"))) {*/
  248 +// String hname = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())).getName();
  249 +// if ((hname.contains("医院")) || (hname.contains("秦皇岛市妇幼保健院"))) {/* if (!(hname.contains("卫生服务站") || hname.contains("卫生服务中心") || hname.contains("卫生院"))) {*/
  250 +// chanResult.setFirstBH(hname);
  251 +// } else {
  252 +// chanResult.setCouponCommunity(hname);
  253 +// }
  254 + if (CollectionUtils.isNotEmpty(chu)) {
  255 + String hname = organizationService.getOrganization(Integer.valueOf(chu.get(0).getHospitalId())).getName();
250 256 chanResult.setFirstBH(hname);
251   - } else {
252   - chanResult.setCouponCommunity(hname);
253 257 }
  258 +
254 259 } catch (Exception e) {
255 260 chanResult.setFirstBH("");
256 261 chanResult.setCouponCommunity("");