Commit 307bc4b8cff25ea2c9db1afa44e2c06eb1513321
1 parent
13179208e6
Exists in
master
and in
1 other branch
code update
Showing 5 changed files with 45 additions and 33 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PostReviewDaoImpl.java
- platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
- platform-data-api/src/main/java/com/lyms/platform/data/controller/SmsController.java
- platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java
View file @
307bc4b
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 | @Override |
72 | 72 | public List<AntenatalExaminationModel> queryYuyueAntenatalExamination(Date startDate,String hospitalId,String pid) { |
73 | 73 | |
74 | - AggregationOperation match = Aggregation.match(Criteria.where("nextCheckTime").gte("startDate").lte(startDate).and("parentId").is("pid").and("hospitalId").is(hospitalId)); | |
74 | + AggregationOperation match = Aggregation.match(Criteria.where("nextCheckTime").gte(startDate).and("parentId").is("pid").and("hospitalId").is(hospitalId)); | |
75 | 75 | AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); |
76 | 76 | Aggregation aggregation = Aggregation.newAggregation(match, group); |
77 | 77 | AggregationResults<AntenatalExaminationModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_antex", AntenatalExaminationModel.class); |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PostReviewDaoImpl.java
View file @
307bc4b
... | ... | @@ -86,7 +86,7 @@ |
86 | 86 | } |
87 | 87 | @Override |
88 | 88 | public List<PostReviewModel> queryPostOrder(Date orderDate, String hospitalId,String parentId) { |
89 | - AggregationOperation match = Aggregation.match(Criteria.where("nextCheckDate").gte(orderDate).lte(orderDate).and("hospitalId").is(hospitalId).and("parentId").is(parentId)); | |
89 | + AggregationOperation match = Aggregation.match(Criteria.where("nextCheckDate").gte(orderDate).and("hospitalId").is(hospitalId).and("parentId").is(parentId)); | |
90 | 90 | AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); |
91 | 91 | Aggregation aggregation = Aggregation.newAggregation(match, group); |
92 | 92 | AggregationResults<PostReviewModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_postreview", PostReviewModel.class); |
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
307bc4b
... | ... | @@ -742,12 +742,12 @@ |
742 | 742 | // System.out.println(s); |
743 | 743 | // Date s = addDay(parseYMD("2016-02-26"), 168); |
744 | 744 | |
745 | - int start = 0; | |
746 | - int end = 1; | |
745 | + int start = 37; | |
746 | + int end = 37; | |
747 | 747 | |
748 | 748 | |
749 | - Date startDate = DateUtil.getNewDate(-end-1,"周",0); | |
750 | - Date endDate = DateUtil.getNewDate(-start,"周",0); | |
749 | + Date startDate = DateUtil.getNewDate(-end-1,"周",1+1); | |
750 | + Date endDate = DateUtil.getNewDate(-start,"周",0+1); | |
751 | 751 | |
752 | 752 | System.out.println(startDate + "==="+ endDate); |
753 | 753 | } catch (Exception e) |
platform-data-api/src/main/java/com/lyms/platform/data/controller/SmsController.java
View file @
307bc4b
... | ... | @@ -23,25 +23,34 @@ |
23 | 23 | @RequestMapping(value = "/template") |
24 | 24 | public void productSms(HttpServletResponse response){ |
25 | 25 | smsService.productTemplateSms(); |
26 | + smsService.productChanAmsSms(); | |
27 | + smsService.productYunAmsSms(); | |
28 | + smsService.productChildAmsSms(); | |
29 | + writeString(response, "success"); | |
30 | + } | |
26 | 31 | |
27 | -// smsService.productChanAmsSms(); | |
28 | -// smsService.productYunAmsSms(); | |
29 | -// smsService.productChildAmsSms(); | |
32 | + @RequestMapping(value = "/smsTemplate") | |
33 | + public void smsTemplate(HttpServletResponse response){ | |
34 | + smsService.productTemplateSms(); | |
35 | + writeString(response, "sms template success"); | |
36 | + } | |
30 | 37 | |
31 | -// MessageListRequest list = new MessageListRequest(); | |
32 | -// List<MessageRequest> messages = new ArrayList<>(); | |
33 | -// MessageRequest request = new MessageRequest(); | |
34 | -// request.setTypeId(1); | |
35 | -// request.setContent("aaaa"); | |
36 | -// request.setObjType(1); | |
37 | -// request.setPhone("123333"); | |
38 | -// request.setPlanTime("2015-01-06 15:22:12"); | |
39 | -// request.setServiceType(1); | |
40 | -// messages.add(request); | |
41 | -// list.setTypeId(1); | |
42 | -// list.setMessages(messages); | |
43 | -// SaveMessageService.saveSmsCenter(list); | |
44 | - writeString(response, "success"); | |
38 | + @RequestMapping(value = "/productChanAmsSms") | |
39 | + public void productChanAmsSms(HttpServletResponse response){ | |
40 | + smsService.productChanAmsSms(); | |
41 | + writeString(response, "chan ams success"); | |
42 | + } | |
43 | + | |
44 | + @RequestMapping(value = "/productYunAmsSms") | |
45 | + public void productYunAmsSms(HttpServletResponse response){ | |
46 | + smsService.productYunAmsSms(); | |
47 | + writeString(response, "yun ams success"); | |
48 | + } | |
49 | + | |
50 | + @RequestMapping(value = "/productChildAmsSms") | |
51 | + public void productChildAmsSms(HttpServletResponse response){ | |
52 | + smsService.productChildAmsSms(); | |
53 | + writeString(response, "child ams success"); | |
45 | 54 | } |
46 | 55 | } |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
307bc4b
... | ... | @@ -550,12 +550,7 @@ |
550 | 550 | { |
551 | 551 | for(MessageContent message : messageContents) |
552 | 552 | { |
553 | - //判断当前短信是否已经发送 通过短信ID和孕妇ID | |
554 | - boolean isExist = SaveMessageService.isExistSms(pat.getId(), message.getId()); | |
555 | - if (isExist) | |
556 | - { | |
557 | - continue; | |
558 | - } | |
553 | + | |
559 | 554 | String messageContent = "【"+messagePrefix+"】" + message.getContent(); |
560 | 555 | |
561 | 556 | MessageRequest request = getMessageRequest( messageContent,pat.getPhone(),ServiceObjEnums.CHANOBJ.getId(), SmsServiceEnums.YBZD.getId(), |
... | ... | @@ -623,7 +618,7 @@ |
623 | 618 | SmsConfigQuery configQuery = new SmsConfigQuery(); |
624 | 619 | configQuery.setYn(YnEnums.YES.getId()); |
625 | 620 | configQuery.setPrefixTypes(new Integer[]{0, 1}); |
626 | -// configQuery.setHospitalId(221+""); | |
621 | + configQuery.setHospitalId(221 + ""); | |
627 | 622 | |
628 | 623 | //查询出对应医院配置 |
629 | 624 | List<SmsConfigModel> configs = smsConfigService.querySmsConfig(configQuery); |
... | ... | @@ -764,7 +759,7 @@ |
764 | 759 | |
765 | 760 | if (start != null && end != null) |
766 | 761 | { |
767 | - Date startDate = DateUtil.getNewDate(-end-1,"周",sendTimeType); | |
762 | + Date startDate = DateUtil.getNewDate(-end-1,"周",sendTimeType+1); | |
768 | 763 | Date endDate = DateUtil.getNewDate(-start,"周",sendTimeType); |
769 | 764 | patientsQuery.setLastMensesStart(startDate); |
770 | 765 | patientsQuery.setLastMensesEnd(endDate); |
... | ... | @@ -2117,7 +2112,15 @@ |
2117 | 2112 | List<AntExChuModel> chus = antenatalExaminationService.queryAntExChu(antExChuQuery); |
2118 | 2113 | for (AntExChuModel chu : chus) |
2119 | 2114 | { |
2120 | - idset.add(chu.getParentId()); | |
2115 | + AntExQuery antExQuery = new AntExQuery(); | |
2116 | + antExQuery.setParentId(chu.getParentId()); | |
2117 | + antExQuery.setYn(YnEnums.YES.getId()); | |
2118 | + //复诊不存在 才添加 | |
2119 | + List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
2120 | + if (CollectionUtils.isNotEmpty(list)) | |
2121 | + { | |
2122 | + idset.add(chu.getParentId()); | |
2123 | + } | |
2121 | 2124 | } |
2122 | 2125 | List<AntenatalExaminationModel> fuzs = antenatalExaminationService.queryYuyueAntenatalExamination(yuYueDate, tempHid); |
2123 | 2126 |