Commit c0bef10c1f1deb8e3ac566170b00e2f9c2d98094
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 13 changed files
- platform-common/src/main/java/com/lyms/platform/common/enums/SmsServiceEnums.java
- platform-common/src/main/java/com/lyms/platform/common/enums/WxTempleteIdEnums.java
- platform-msg-generate/src/main/java/com/lyms/platform/msg/service/impl/MsgGenerateServiceImpl.java
- platform-msg-generate/src/main/java/com/lyms/platform/msg/worker/TempleteMsgGenerateWorker.java
- platform-msg-generate/src/main/resources/config.properties
- platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdfyHisService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsTemplateFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BasicConfigUpdateRequest.java
platform-common/src/main/java/com/lyms/platform/common/enums/SmsServiceEnums.java
View file @
c0bef10
| ... | ... | @@ -35,7 +35,11 @@ |
| 35 | 35 | QT(21,"其他",0,""), |
| 36 | 36 | JRWH(22,"节日问候",21,"0,1,2,3"), |
| 37 | 37 | YQTX(23,"疫情提醒",21,"0,1,2,3"), |
| 38 | - EBYMTX(24,"疫苗接种提醒",14,"2"); | |
| 38 | + EBYMTX(24,"疫苗接种提醒",14,"2"), | |
| 39 | + YBYYTX(25,"儿童眼保键预约提醒",14,"2"), | |
| 40 | + TSYYTX(26,"儿童听力筛查预约提醒",14,"2"), | |
| 41 | + TYZDYYTX(27,"儿童听力诊断预约提醒",14,"2"), | |
| 42 | + TLZDYYTX(28,"儿童听力随访预约提醒",14,"2"); | |
| 39 | 43 | |
| 40 | 44 | private SmsServiceEnums(int id,String name,int pid,String serviceObj){ |
| 41 | 45 | this.id = id; |
platform-common/src/main/java/com/lyms/platform/common/enums/WxTempleteIdEnums.java
View file @
c0bef10
| ... | ... | @@ -22,8 +22,8 @@ |
| 22 | 22 | CHAN_YI_BAN_ZHI_DAO("H2_ucLqVEbsZAv-EZcmUDpD1Zul5NGqMoJktHT0u4gw","产妇一般指导"),//产妇 |
| 23 | 23 | BABY_YI_BAN_ZHI_DAO("dqvyESU8UXx1V3cIMQDqj4PLxI6T9-sgihQcs3ZGL9E","儿童一般指导"),//儿童 |
| 24 | 24 | |
| 25 | - YI_SHENG_ZHI_DAO("OggqiSHitLkCgSLCaCH72reCZzaw5NyG8iO56InQiQg","医生指导"),//指导 | |
| 26 | - WEI_JI_ZHI_DAO("fNkkLSp_gS-YWvzji6gwgdTddl4XBlk8SNP7FRksrfk","危急值提醒");//危急值提醒 | |
| 25 | + YI_SHENG_ZHI_DAO("OggqiSHitLkCgSLCaCH72reCZzaw5NyG8iO56InQiQg","医生指导");//指导 | |
| 26 | +// WEI_JI_ZHI_DAO("fNkkLSp_gS-YWvzji6gwgdTddl4XBlk8SNP7FRksrfk","危急值提醒");//危急值提醒 | |
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 |
platform-msg-generate/src/main/java/com/lyms/platform/msg/service/impl/MsgGenerateServiceImpl.java
View file @
c0bef10
| ... | ... | @@ -9,11 +9,15 @@ |
| 9 | 9 | import com.lyms.platform.msg.worker.TempleteMsgGenerateWorker; |
| 10 | 10 | import com.lyms.platform.msg.worker.YunAmsMsgGenerateWorker; |
| 11 | 11 | |
| 12 | +import com.lyms.platform.permission.service.BabyPatientExtendEarFollowUpService; | |
| 13 | +import com.lyms.platform.permission.service.BabyPatientExtendEarHearingDiagnoseService; | |
| 14 | +import com.lyms.platform.permission.service.BabyPatientExtendEarScreenService; | |
| 12 | 15 | import com.lyms.platform.pojo.SmsConfigModel; |
| 13 | 16 | import org.apache.commons.collections.CollectionUtils; |
| 14 | 17 | import org.slf4j.Logger; |
| 15 | 18 | import org.slf4j.LoggerFactory; |
| 16 | 19 | import org.springframework.beans.factory.annotation.Autowired; |
| 20 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
| 17 | 21 | import org.springframework.stereotype.Service; |
| 18 | 22 | |
| 19 | 23 | import java.util.*; |
| 20 | 24 | |
| ... | ... | @@ -38,12 +42,24 @@ |
| 38 | 42 | private IBaseService baseService; |
| 39 | 43 | |
| 40 | 44 | @Autowired |
| 45 | + private MongoTemplate mongoTemplate; | |
| 46 | + | |
| 47 | + @Autowired | |
| 41 | 48 | private YunBookbuildingService yunBookbuildingService; |
| 42 | 49 | |
| 43 | 50 | @Autowired |
| 44 | 51 | private SmsTemplateService smsTemplateService; |
| 45 | 52 | |
| 46 | 53 | @Autowired |
| 54 | + private BabyPatientExtendEarScreenService babyPatientExtendEarScreenService; | |
| 55 | + | |
| 56 | + @Autowired | |
| 57 | + private BabyPatientExtendEarHearingDiagnoseService hearingDiagnoseService; | |
| 58 | + | |
| 59 | + @Autowired | |
| 60 | + private BabyPatientExtendEarFollowUpService babyPatientExtendEarFollowUpService; | |
| 61 | + | |
| 62 | + @Autowired | |
| 47 | 63 | private HighRiskService highRiskService; |
| 48 | 64 | |
| 49 | 65 | @Autowired |
| ... | ... | @@ -147,7 +163,15 @@ |
| 147 | 163 | end = configModels.size(); |
| 148 | 164 | } |
| 149 | 165 | TempleteMsgGenerateWorker worker = new TempleteMsgGenerateWorker(configModels.subList(i,end), |
| 150 | - baseService,yunBookbuildingService,smsTemplateService,babyBookbuildingService,postReviewService); | |
| 166 | + baseService, | |
| 167 | + yunBookbuildingService, | |
| 168 | + smsTemplateService, | |
| 169 | + babyBookbuildingService, | |
| 170 | + postReviewService, | |
| 171 | + mongoTemplate, | |
| 172 | + babyPatientExtendEarScreenService, | |
| 173 | + hearingDiagnoseService, | |
| 174 | + babyPatientExtendEarFollowUpService); | |
| 151 | 175 | pool.execute(worker); |
| 152 | 176 | } |
| 153 | 177 | |
| ... | ... | @@ -159,20 +183,10 @@ |
| 159 | 183 | */ |
| 160 | 184 | @Override |
| 161 | 185 | public void generaterAllMsg() { |
| 162 | - try { | |
| 163 | - generateTemplateMsg(null); | |
| 164 | - Thread.sleep(1000 * 60 * 30); | |
| 165 | - generateChanAmsMsg(null); | |
| 166 | - Thread.sleep(1000 * 60 * 30); | |
| 167 | - generateBabyAmsMsg(null); | |
| 168 | - Thread.sleep(1000 * 60 * 30); | |
| 169 | - generatePatAmsMsg(null); | |
| 170 | - } | |
| 171 | - catch (Exception e) | |
| 172 | - { | |
| 173 | - | |
| 174 | - } | |
| 175 | - | |
| 186 | + generateTemplateMsg(null); | |
| 187 | + generateChanAmsMsg(null); | |
| 188 | + generateBabyAmsMsg(null); | |
| 189 | + generatePatAmsMsg(null); | |
| 176 | 190 | } |
| 177 | 191 | } |
platform-msg-generate/src/main/java/com/lyms/platform/msg/worker/TempleteMsgGenerateWorker.java
View file @
c0bef10
| ... | ... | @@ -8,11 +8,19 @@ |
| 8 | 8 | import com.lyms.platform.msg.service.IBaseService; |
| 9 | 9 | import com.lyms.platform.msg.utils.DateUtils; |
| 10 | 10 | import com.lyms.platform.msg.utils.HelperUtils; |
| 11 | +import com.lyms.platform.permission.model.*; | |
| 12 | +import com.lyms.platform.permission.service.BabyPatientExtendEarFollowUpService; | |
| 13 | +import com.lyms.platform.permission.service.BabyPatientExtendEarHearingDiagnoseService; | |
| 14 | +import com.lyms.platform.permission.service.BabyPatientExtendEarScreenService; | |
| 11 | 15 | import com.lyms.platform.pojo.*; |
| 12 | 16 | import com.lyms.platform.query.*; |
| 13 | 17 | import org.apache.commons.collections.CollectionUtils; |
| 14 | 18 | import org.slf4j.Logger; |
| 15 | 19 | import org.slf4j.LoggerFactory; |
| 20 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 21 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
| 22 | +import org.springframework.data.mongodb.core.query.Criteria; | |
| 23 | +import org.springframework.data.mongodb.core.query.Query; | |
| 16 | 24 | |
| 17 | 25 | import java.util.*; |
| 18 | 26 | import java.util.concurrent.ExecutorService; |
| 19 | 27 | |
| 20 | 28 | |
| ... | ... | @@ -33,18 +41,29 @@ |
| 33 | 41 | |
| 34 | 42 | private YunBookbuildingService yunBookbuildingService; |
| 35 | 43 | |
| 44 | + private MongoTemplate mongoTemplate; | |
| 36 | 45 | |
| 37 | 46 | private SmsTemplateService smsTemplateService; |
| 38 | 47 | |
| 39 | 48 | private BabyBookbuildingService babyBookbuildingService; |
| 40 | 49 | |
| 50 | + private BabyPatientExtendEarScreenService babyPatientExtendEarScreenService; | |
| 51 | + | |
| 52 | + private BabyPatientExtendEarHearingDiagnoseService hearingDiagnoseService; | |
| 53 | + | |
| 54 | + private BabyPatientExtendEarFollowUpService babyPatientExtendEarFollowUpService; | |
| 55 | + | |
| 41 | 56 | private PostReviewService postReviewService; |
| 42 | 57 | |
| 43 | 58 | public TempleteMsgGenerateWorker(List<SmsConfigModel> configs, IBaseService baseService, |
| 44 | 59 | YunBookbuildingService yunBookbuildingService, |
| 45 | 60 | SmsTemplateService smsTemplateService, |
| 46 | 61 | BabyBookbuildingService babyBookbuildingService, |
| 47 | - PostReviewService postReviewService) | |
| 62 | + PostReviewService postReviewService, | |
| 63 | + MongoTemplate mongoTemplate, | |
| 64 | + BabyPatientExtendEarScreenService babyPatientExtendEarScreenService, | |
| 65 | + BabyPatientExtendEarHearingDiagnoseService hearingDiagnoseService, | |
| 66 | + BabyPatientExtendEarFollowUpService babyPatientExtendEarFollowUpService) | |
| 48 | 67 | { |
| 49 | 68 | this.configs = configs; |
| 50 | 69 | this.baseService = baseService; |
| ... | ... | @@ -52,6 +71,10 @@ |
| 52 | 71 | this.smsTemplateService = smsTemplateService; |
| 53 | 72 | this.babyBookbuildingService = babyBookbuildingService; |
| 54 | 73 | this.postReviewService = postReviewService; |
| 74 | + this.mongoTemplate = mongoTemplate; | |
| 75 | + this.babyPatientExtendEarScreenService = babyPatientExtendEarScreenService; | |
| 76 | + this.hearingDiagnoseService = hearingDiagnoseService; | |
| 77 | + this.babyPatientExtendEarFollowUpService = babyPatientExtendEarFollowUpService; | |
| 55 | 78 | } |
| 56 | 79 | |
| 57 | 80 | @Override |
| ... | ... | @@ -537,6 +560,221 @@ |
| 537 | 560 | } |
| 538 | 561 | } |
| 539 | 562 | } |
| 563 | + } | |
| 564 | + //儿童眼保键预约提醒 | |
| 565 | + else if (smsType == SmsServiceEnums.YBYYTX.getId()) | |
| 566 | + { | |
| 567 | + //发送短信集合 | |
| 568 | + MsgListRequest list = new MsgListRequest(); | |
| 569 | + List<MsgRequest> messages = new ArrayList<>(); | |
| 570 | + | |
| 571 | + Date orderDate = DateUtils.addDay(new Date(), sendTimeType); | |
| 572 | + orderDate = DateUtils.formatDate(orderDate,DateUtils.Y_M_D); | |
| 573 | + | |
| 574 | + List<BabyEyeCheck> checkModels = mongoTemplate.find(Query.query(Criteria.where("nextCheckTime").is(orderDate) | |
| 575 | + .and("yn").ne("0").and("hospitalId").is(tempHid)), BabyEyeCheck.class); | |
| 576 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
| 577 | + { | |
| 578 | + for(BabyEyeCheck eyecheck : checkModels) | |
| 579 | + { | |
| 580 | + | |
| 581 | + BabyModelQuery query = new BabyModelQuery(); | |
| 582 | + query.setYn(YnEnums.YES.getId()); | |
| 583 | + query.setId(eyecheck.getBabyId()); | |
| 584 | + | |
| 585 | + //查询符合条件儿童 | |
| 586 | + List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(query); | |
| 587 | + if (CollectionUtils.isNotEmpty(babyModels)) | |
| 588 | + { | |
| 589 | + for (BabyModel model : babyModels) | |
| 590 | + { | |
| 591 | + //短信前缀 | |
| 592 | + String messagePrefix = baseService.getSmsPrefix(config, model.getBuildDoctor(),ServiceObjEnums.BABYOBJ.getId()); | |
| 593 | + String messageContent = "【"+messagePrefix+"】"+template.getContent(); | |
| 594 | + messageContent = HelperUtils.replaceEL(model.getName(), orderDate, messageContent); | |
| 595 | + | |
| 596 | + String itemName = "儿童保健"; | |
| 597 | + String nextCheckTime = DateUtils.getDateStr(orderDate,DateUtils.Y_M_D); | |
| 598 | + | |
| 599 | + MsgRequest request = HelperUtils.getMessageRequest(messageContent, model.getMphone(), | |
| 600 | + ServiceObjEnums.BABYOBJ.getId(), template.getSmsType(), | |
| 601 | + model.getHospitalId(), template.getId(), model.getId(), itemName, nextCheckTime, "", | |
| 602 | + WxTempleteIdEnums.ER_TONG_TI_XING.getId(),service); | |
| 603 | + | |
| 604 | + messages.add(request); | |
| 605 | + } | |
| 606 | + } | |
| 607 | + } | |
| 608 | + } | |
| 609 | + | |
| 610 | + list.setMessages(messages); | |
| 611 | + HelperUtils.sendMsg(list); | |
| 612 | + } | |
| 613 | + //儿童听力筛查预约提醒 | |
| 614 | + else if (smsType == SmsServiceEnums.TSYYTX.getId()) | |
| 615 | + { | |
| 616 | + //发送短信集合 | |
| 617 | + MsgListRequest list = new MsgListRequest(); | |
| 618 | + List<MsgRequest> messages = new ArrayList<>(); | |
| 619 | + | |
| 620 | + Date orderDate = DateUtils.addDay(new Date(), sendTimeType); | |
| 621 | + orderDate = DateUtils.formatDate(orderDate,DateUtils.Y_M_D); | |
| 622 | + | |
| 623 | + | |
| 624 | + BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery(); | |
| 625 | + screenQuery.setNextStartTime(DateUtils.getDateStr(orderDate, DateUtils.Y_M_D)); | |
| 626 | + screenQuery.setNextEndTime(DateUtils.getDateStr(orderDate, DateUtils.Y_M_D)); | |
| 627 | + screenQuery.setCheckHospitalId(tempHid); | |
| 628 | + screenQuery.setStatus(0); | |
| 629 | + | |
| 630 | + List<BabyPatientExtendEarScreen> babyPatientExtendEarScreens = babyPatientExtendEarScreenService.queryEarScreenList(screenQuery); | |
| 631 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarScreens)) | |
| 632 | + { | |
| 633 | + for(BabyPatientExtendEarScreen ear : babyPatientExtendEarScreens) | |
| 634 | + { | |
| 635 | + | |
| 636 | + BabyModelQuery query = new BabyModelQuery(); | |
| 637 | + query.setYn(YnEnums.YES.getId()); | |
| 638 | + query.setId(ear.getBabyId()); | |
| 639 | + | |
| 640 | + //查询符合条件儿童 | |
| 641 | + List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(query); | |
| 642 | + if (CollectionUtils.isNotEmpty(babyModels)) | |
| 643 | + { | |
| 644 | + for (BabyModel model : babyModels) | |
| 645 | + { | |
| 646 | + //短信前缀 | |
| 647 | + String messagePrefix = baseService.getSmsPrefix(config, model.getBuildDoctor(),ServiceObjEnums.BABYOBJ.getId()); | |
| 648 | + String messageContent = "【"+messagePrefix+"】"+template.getContent(); | |
| 649 | + messageContent = HelperUtils.replaceEL(model.getName(), orderDate, messageContent); | |
| 650 | + | |
| 651 | + String itemName = "儿童保健"; | |
| 652 | + String nextCheckTime = DateUtils.getDateStr(orderDate,DateUtils.Y_M_D); | |
| 653 | + | |
| 654 | + MsgRequest request = HelperUtils.getMessageRequest(messageContent, model.getMphone(), | |
| 655 | + ServiceObjEnums.BABYOBJ.getId(), template.getSmsType(), | |
| 656 | + model.getHospitalId(), template.getId(), model.getId(), itemName, nextCheckTime, "", | |
| 657 | + WxTempleteIdEnums.ER_TONG_TI_XING.getId(),service); | |
| 658 | + | |
| 659 | + messages.add(request); | |
| 660 | + } | |
| 661 | + } | |
| 662 | + } | |
| 663 | + } | |
| 664 | + | |
| 665 | + list.setMessages(messages); | |
| 666 | + HelperUtils.sendMsg(list); | |
| 667 | + } | |
| 668 | + //儿童听力诊断预约提醒 | |
| 669 | + else if (smsType == SmsServiceEnums.TYZDYYTX.getId()) | |
| 670 | + { | |
| 671 | + //发送短信集合 | |
| 672 | + MsgListRequest list = new MsgListRequest(); | |
| 673 | + List<MsgRequest> messages = new ArrayList<>(); | |
| 674 | + | |
| 675 | + Date orderDate = DateUtils.addDay(new Date(), sendTimeType); | |
| 676 | + orderDate = DateUtils.formatDate(orderDate,DateUtils.Y_M_D); | |
| 677 | + | |
| 678 | + BabyPatientExtendEarHearingDiagnoseQuery diagnoseQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); | |
| 679 | +// diagnoseQuery.setIfdel(0); | |
| 680 | + diagnoseQuery.setDiagnNextStartTime(orderDate); | |
| 681 | + diagnoseQuery.setDiagnNextEndTime(orderDate); | |
| 682 | + diagnoseQuery.setHospitalId(tempHid); | |
| 683 | + | |
| 684 | + //已经诊断的数据 | |
| 685 | + List<BabyPatientExtendEarHearingDiagnose> hearingDiagnoseList = hearingDiagnoseService.getHdAndScreen(diagnoseQuery); | |
| 686 | + if (CollectionUtils.isNotEmpty(hearingDiagnoseList)) | |
| 687 | + { | |
| 688 | + for(BabyPatientExtendEarHearingDiagnose diagnose : hearingDiagnoseList) | |
| 689 | + { | |
| 690 | + | |
| 691 | + BabyModelQuery query = new BabyModelQuery(); | |
| 692 | + query.setYn(YnEnums.YES.getId()); | |
| 693 | + query.setId(diagnose.getBabyId()); | |
| 694 | + | |
| 695 | + //查询符合条件儿童 | |
| 696 | + List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(query); | |
| 697 | + if (CollectionUtils.isNotEmpty(babyModels)) | |
| 698 | + { | |
| 699 | + for (BabyModel model : babyModels) | |
| 700 | + { | |
| 701 | + //短信前缀 | |
| 702 | + String messagePrefix = baseService.getSmsPrefix(config, model.getBuildDoctor(),ServiceObjEnums.BABYOBJ.getId()); | |
| 703 | + String messageContent = "【"+messagePrefix+"】"+template.getContent(); | |
| 704 | + messageContent = HelperUtils.replaceEL(model.getName(), orderDate, messageContent); | |
| 705 | + | |
| 706 | + String itemName = "儿童保健"; | |
| 707 | + String nextCheckTime = DateUtils.getDateStr(orderDate,DateUtils.Y_M_D); | |
| 708 | + | |
| 709 | + MsgRequest request = HelperUtils.getMessageRequest(messageContent, model.getMphone(), | |
| 710 | + ServiceObjEnums.BABYOBJ.getId(), template.getSmsType(), | |
| 711 | + model.getHospitalId(), template.getId(), model.getId(), itemName, nextCheckTime, "", | |
| 712 | + WxTempleteIdEnums.ER_TONG_TI_XING.getId(),service); | |
| 713 | + | |
| 714 | + messages.add(request); | |
| 715 | + } | |
| 716 | + } | |
| 717 | + } | |
| 718 | + } | |
| 719 | + | |
| 720 | + list.setMessages(messages); | |
| 721 | + HelperUtils.sendMsg(list); | |
| 722 | + } | |
| 723 | + //儿童听力随访预约提醒 | |
| 724 | + else if (smsType == SmsServiceEnums.TLZDYYTX.getId()) | |
| 725 | + { | |
| 726 | + //发送短信集合 | |
| 727 | + MsgListRequest list = new MsgListRequest(); | |
| 728 | + List<MsgRequest> messages = new ArrayList<>(); | |
| 729 | + | |
| 730 | + Date orderDate = DateUtils.addDay(new Date(), sendTimeType); | |
| 731 | + orderDate = DateUtils.formatDate(orderDate,DateUtils.Y_M_D); | |
| 732 | + | |
| 733 | + | |
| 734 | + //查询条件 | |
| 735 | + BabyPatientExtendEarFollowUpQuery followUpQuery = new BabyPatientExtendEarFollowUpQuery(); | |
| 736 | + followUpQuery.setIfdel(0); | |
| 737 | + followUpQuery.setNextStartTime(DateUtils.getDateStr(orderDate,DateUtils.Y_M_D)); | |
| 738 | + followUpQuery.setNextEndTime(DateUtils.getDateStr(orderDate,DateUtils.Y_M_D)); | |
| 739 | + followUpQuery.setHospitalId(tempHid); | |
| 740 | + | |
| 741 | + List<BabyPatientExtendEarFollowUp> BabyPatientExtendEarFollowUpList = babyPatientExtendEarFollowUpService.queryBabyPatientExtendEarFollowUp(followUpQuery); | |
| 742 | + if (CollectionUtils.isNotEmpty(BabyPatientExtendEarFollowUpList)) | |
| 743 | + { | |
| 744 | + for(BabyPatientExtendEarFollowUp follow : BabyPatientExtendEarFollowUpList) | |
| 745 | + { | |
| 746 | + | |
| 747 | + BabyModelQuery query = new BabyModelQuery(); | |
| 748 | + query.setYn(YnEnums.YES.getId()); | |
| 749 | + query.setId(follow.getBabyId()); | |
| 750 | + | |
| 751 | + //查询符合条件儿童 | |
| 752 | + List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(query); | |
| 753 | + if (CollectionUtils.isNotEmpty(babyModels)) | |
| 754 | + { | |
| 755 | + for (BabyModel model : babyModels) | |
| 756 | + { | |
| 757 | + //短信前缀 | |
| 758 | + String messagePrefix = baseService.getSmsPrefix(config, model.getBuildDoctor(),ServiceObjEnums.BABYOBJ.getId()); | |
| 759 | + String messageContent = "【"+messagePrefix+"】"+template.getContent(); | |
| 760 | + messageContent = HelperUtils.replaceEL(model.getName(), orderDate, messageContent); | |
| 761 | + | |
| 762 | + String itemName = "儿童保健"; | |
| 763 | + String nextCheckTime = DateUtils.getDateStr(orderDate,DateUtils.Y_M_D); | |
| 764 | + | |
| 765 | + MsgRequest request = HelperUtils.getMessageRequest(messageContent, model.getMphone(), | |
| 766 | + ServiceObjEnums.BABYOBJ.getId(), template.getSmsType(), | |
| 767 | + model.getHospitalId(), template.getId(), model.getId(), itemName, nextCheckTime, "", | |
| 768 | + WxTempleteIdEnums.ER_TONG_TI_XING.getId(),service); | |
| 769 | + | |
| 770 | + messages.add(request); | |
| 771 | + } | |
| 772 | + } | |
| 773 | + } | |
| 774 | + } | |
| 775 | + | |
| 776 | + list.setMessages(messages); | |
| 777 | + HelperUtils.sendMsg(list); | |
| 540 | 778 | } |
| 541 | 779 | } |
| 542 | 780 |
platform-msg-generate/src/main/resources/config.properties
View file @
c0bef10
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | |
| 5 | 5 | #AMS地址 线上:http://data.api.healthbaby.com.cn/v1/messages 测试:http://data.api.stage.healthbaby.com.cn/v1/messages |
| 6 | 6 | #演示地址 https://stage-rp-data-api.healthbaby.com.cn/v1/messages |
| 7 | -ams_url=http://data.api.stage.healthbaby.com.cn/v1/messages | |
| 7 | +ams_url=http://data.api.healthbaby.com.cn/v1/messages | |
| 8 | 8 | |
| 9 | 9 | #短信当天发送时间 如16:00 |
| 10 | 10 | send_time=16:00 |
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdfyHisService.java
View file @
c0bef10
| 1 | 1 | package com.lyms.hospitalapi.Cdfy; |
| 2 | 2 | |
| 3 | +import com.alibaba.fastjson.JSONObject; | |
| 3 | 4 | import com.lyms.hospitalapi.pojo.DzReplace; |
| 4 | 5 | import com.lyms.platform.common.utils.ExceptionUtils; |
| 6 | +import com.lyms.platform.operate.web.utils.HttpClientUtil; | |
| 5 | 7 | import org.apache.commons.collections.CollectionUtils; |
| 6 | 8 | import org.apache.commons.dbutils.DbUtils; |
| 7 | 9 | import org.apache.commons.dbutils.QueryRunner; |
| 8 | 10 | import org.apache.commons.dbutils.handlers.BeanListHandler; |
| 9 | 11 | import org.apache.commons.lang.StringUtils; |
| 12 | +import org.apache.http.HttpEntity; | |
| 13 | +import org.apache.http.HttpResponse; | |
| 14 | +import org.apache.http.client.methods.HttpPost; | |
| 15 | +import org.apache.http.entity.StringEntity; | |
| 16 | +import org.apache.http.impl.client.DefaultHttpClient; | |
| 17 | +import org.apache.http.impl.conn.PoolingClientConnectionManager; | |
| 18 | +import org.apache.http.util.EntityUtils; | |
| 10 | 19 | import org.springframework.stereotype.Service; |
| 11 | 20 | |
| 12 | 21 | import java.sql.Connection; |
| ... | ... | @@ -56,6 +65,54 @@ |
| 56 | 65 | DbUtils.closeQuietly(conn); |
| 57 | 66 | } |
| 58 | 67 | return "vcCardNo"; |
| 68 | + } | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 承德 | |
| 74 | + * 查询病人ID | |
| 75 | + * 承德查询lis报告先通过就诊卡号查询到病人id | |
| 76 | + * 通过病人id到院内系统mysql中查询 vCcardNo字段 | |
| 77 | + * @param vcCardNo 就诊卡号 | |
| 78 | + * @return | |
| 79 | + */ | |
| 80 | + public String getIdByVcCardNo(String vcCardNo){ | |
| 81 | + String id = null; | |
| 82 | + String url = "http://10.0.200.2:9090/his/getCdFyHis?vcCardNo="+vcCardNo; | |
| 83 | + DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager()); | |
| 84 | + try { | |
| 85 | + | |
| 86 | + HttpPost httpPost = new HttpPost(url); | |
| 87 | + /*StringEntity se = new StringEntity(vcCardNo,"UTF-8"); | |
| 88 | + se.setContentType("text/json"); | |
| 89 | + httpPost.setEntity(se);*/ | |
| 90 | + | |
| 91 | + //执行post请求 | |
| 92 | + HttpResponse respon = client.execute(httpPost); | |
| 93 | + if(respon != null && respon.getStatusLine().getStatusCode() == 200){ | |
| 94 | + String result= EntityUtils.toString(respon.getEntity()); | |
| 95 | + System.out.print(result); | |
| 96 | + // 生成 JSON 对象 | |
| 97 | + JSONObject obj = JSONObject.parseObject(result); | |
| 98 | + if(obj!=null){ | |
| 99 | + id = obj.getString("id"); | |
| 100 | + } | |
| 101 | + | |
| 102 | + return id; | |
| 103 | + }else{ | |
| 104 | + System.out.println("传输失败!"); | |
| 105 | + } | |
| 106 | + | |
| 107 | + | |
| 108 | + }catch (Exception e){ | |
| 109 | + e.printStackTrace(); | |
| 110 | + } | |
| 111 | + | |
| 112 | + | |
| 113 | + return id; | |
| 114 | + | |
| 115 | + | |
| 59 | 116 | } |
| 60 | 117 | |
| 61 | 118 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
c0bef10
| 1 | 1 | package com.lyms.platform.operate.web.controller; |
| 2 | 2 | |
| 3 | 3 | import com.alibaba.fastjson.JSON; |
| 4 | +import com.lyms.hospitalapi.Cdfy.CdfyHisService; | |
| 4 | 5 | import com.lyms.hospitalapi.dzfy.DzfyFmService; |
| 5 | 6 | import com.lyms.hospitalapi.qhdfy.QhdfyFmService; |
| 6 | 7 | import com.lyms.hospitalapi.qhdfy.QhdfyHisService; |
| 7 | 8 | |
| ... | ... | @@ -131,7 +132,10 @@ |
| 131 | 132 | @Autowired |
| 132 | 133 | private PatientMedicalRecordFacade patientMedicalRecordFacade; |
| 133 | 134 | |
| 135 | + @Autowired | |
| 136 | + private CdfyHisService cdfyHisService; | |
| 134 | 137 | |
| 138 | + | |
| 135 | 139 | static Map<String, String> highRisks = new HashMap<>(); |
| 136 | 140 | |
| 137 | 141 | static { |
| ... | ... | @@ -1673,5 +1677,15 @@ |
| 1673 | 1677 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 1674 | 1678 | return patientMedicalRecordFacade.findAntExListTwo(exListQueryRequest,loginState.getId()); |
| 1675 | 1679 | } |
| 1680 | + | |
| 1681 | + | |
| 1682 | + @RequestMapping("/test") | |
| 1683 | + @ResponseBody | |
| 1684 | + public String test(String code){ | |
| 1685 | + | |
| 1686 | + return cdfyHisService.getIdByVcCardNo(code); | |
| 1687 | + } | |
| 1688 | + | |
| 1689 | + | |
| 1676 | 1690 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
c0bef10
| ... | ... | @@ -302,6 +302,7 @@ |
| 302 | 302 | BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); |
| 303 | 303 | basicConfigQuery.setYn(YnEnums.YES.getId()); |
| 304 | 304 | basicConfigQuery.setParentId(parentId); |
| 305 | + basicConfigQuery.setEnable(1); | |
| 305 | 306 | List<BasicConfig> datas = basicConfigService.queryBasicConfig(basicConfigQuery); |
| 306 | 307 | List<BasicConfigResult> configResults = new ArrayList<>(); |
| 307 | 308 | if (datas != null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
c0bef10
| ... | ... | @@ -388,8 +388,8 @@ |
| 388 | 388 | //承德查询lis |
| 389 | 389 | else if ("16".equals(HIS_VERSION)) |
| 390 | 390 | { |
| 391 | - model.setVcCardNo(vcCardNo); | |
| 392 | - //model.setVcCardNo(cdfyHisService.getPatientIdByVcCardNo(vcCardNo)); | |
| 391 | + //model.setVcCardNo(vcCardNo); | |
| 392 | + model.setVcCardNo(cdfyHisService.getIdByVcCardNo(vcCardNo)); | |
| 393 | 393 | } |
| 394 | 394 | //威县人民医院lis |
| 395 | 395 | else if ("20".equals(HIS_VERSION)) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java
View file @
c0bef10
| ... | ... | @@ -509,7 +509,6 @@ |
| 509 | 509 | |
| 510 | 510 | List<CourseModel> courseModels = courseService.queryCourseList(query); |
| 511 | 511 | |
| 512 | - | |
| 513 | 512 | PatientCourseQuery patientCourseQuery = new PatientCourseQuery(); |
| 514 | 513 | patientCourseQuery.setYn(YnEnums.YES.getId()); |
| 515 | 514 | |
| ... | ... | @@ -587,7 +586,6 @@ |
| 587 | 586 | } |
| 588 | 587 | } |
| 589 | 588 | } |
| 590 | - | |
| 591 | 589 | patientCourseQuery.setPatientIds(patids); |
| 592 | 590 | |
| 593 | 591 | Integer patientStatus = 0; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsTemplateFacade.java
View file @
c0bef10
| ... | ... | @@ -254,7 +254,13 @@ |
| 254 | 254 | result.put("content", temp.getContent()); |
| 255 | 255 | |
| 256 | 256 | String str = "一次 预约短信"; |
| 257 | - if (temp.getSmsType() != null && temp.getSmsType() != SmsServiceEnums.CJYYTX.getId() && temp.getSmsType() != SmsServiceEnums.CHFCYUTX.getId() && temp.getSmsType() != SmsServiceEnums.EBYYTX.getId()) | |
| 257 | + if (temp.getSmsType() != null && temp.getSmsType() != SmsServiceEnums.CJYYTX.getId() | |
| 258 | + && temp.getSmsType() != SmsServiceEnums.CHFCYUTX.getId() && temp.getSmsType() != SmsServiceEnums.EBYYTX.getId() | |
| 259 | + && temp.getSmsType() != SmsServiceEnums.YBYYTX.getId() | |
| 260 | + && temp.getSmsType() != SmsServiceEnums.TSYYTX.getId() | |
| 261 | + && temp.getSmsType() != SmsServiceEnums.TYZDYYTX.getId() | |
| 262 | + && temp.getSmsType() != SmsServiceEnums.TLZDYYTX.getId() | |
| 263 | + ) | |
| 258 | 264 | { |
| 259 | 265 | //发送频次 |
| 260 | 266 | Integer sendFreq = temp.getSendFrequency(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
c0bef10
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BasicConfigUpdateRequest.java
View file @
c0bef10
| ... | ... | @@ -14,9 +14,30 @@ |
| 14 | 14 | private Integer score; |
| 15 | 15 | private String desc; |
| 16 | 16 | private String parentId; |
| 17 | + | |
| 18 | + private String parentName; | |
| 19 | + | |
| 20 | + private String leastUse; | |
| 21 | + | |
| 17 | 22 | //权重 |
| 18 | 23 | private Integer weight; |
| 19 | 24 | private List childConfigs; |
| 25 | + | |
| 26 | + public String getLeastUse() { | |
| 27 | + return leastUse; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void setLeastUse(String leastUse) { | |
| 31 | + this.leastUse = leastUse; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public String getParentName() { | |
| 35 | + return parentName; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public void setParentName(String parentName) { | |
| 39 | + this.parentName = parentName; | |
| 40 | + } | |
| 20 | 41 | |
| 21 | 42 | public Integer getWeight() { |
| 22 | 43 | return weight; |