Commit d46ffdbb6b00fcc354af1bec4d8185db4647e2d7
1 parent
8c76040529
Exists in
master
and in
8 other branches
code update
Showing 4 changed files with 28 additions and 8 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java
- platform-common/src/main/java/com/lyms/platform/common/utils/HttpRequest.java
- platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
- platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java
View file @
d46ffdb
... | ... | @@ -73,7 +73,7 @@ |
73 | 73 | public List<AntenatalExaminationModel> queryYuyueAntenatalExamination(Date yuYueDate,String hospitalId) { |
74 | 74 | AggregationOperation match = Aggregation.match(Criteria.where("nextCheckTime").gte(yuYueDate).lte(yuYueDate).and("hospitalId").is(hospitalId)); |
75 | 75 | AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); |
76 | - Aggregation aggregation = Aggregation.newAggregation(group,match); | |
76 | + Aggregation aggregation = Aggregation.newAggregation(match,group); | |
77 | 77 | AggregationResults<AntenatalExaminationModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_antex", AntenatalExaminationModel.class); |
78 | 78 | return result.getMappedResults(); |
79 | 79 | // AggregationOperation match = Aggregation.match(Criteria.where("hospitalId").is(hospitalId)); |
platform-common/src/main/java/com/lyms/platform/common/utils/HttpRequest.java
View file @
d46ffdb
... | ... | @@ -117,9 +117,10 @@ |
117 | 117 | // 获取所有响应头字段 |
118 | 118 | Map<String, List<String>> map = connection.getHeaderFields(); |
119 | 119 | // 遍历所有的响应头字段 |
120 | - for (String key : map.keySet()) { | |
121 | - System.out.println(key + "--->" + map.get(key)); | |
122 | - } | |
120 | +// for (String key : map.keySet()) { | |
121 | +// System.out.println(key + "--->" + map.get(key)); | |
122 | +// } | |
123 | + System.out.println("--->" + map); | |
123 | 124 | // 定义 BufferedReader输入流来读取URL的响应 |
124 | 125 | in = new BufferedReader(new InputStreamReader( |
125 | 126 | connection.getInputStream(),"utf-8")); |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
d46ffdb
... | ... | @@ -37,6 +37,9 @@ |
37 | 37 | |
38 | 38 | public static final String SEND_TIME= PropertiesUtils.getPropertyValue("send_time"); |
39 | 39 | |
40 | + | |
41 | + private List<MessageRequest> allMsgs = new ArrayList<>(); | |
42 | + | |
40 | 43 | @Autowired |
41 | 44 | private SmsConfigService smsConfigService; |
42 | 45 | |
... | ... | @@ -88,7 +91,7 @@ |
88 | 91 | String week = DateUtil.getWeekOfDate(new Date()); |
89 | 92 | query.setGuideTime(week); |
90 | 93 | |
91 | -// query.setHospitalId(221+""); | |
94 | +// query.setHospitalId(221 + ""); | |
92 | 95 | |
93 | 96 | //查询出对应周几要发送的的医院配置 |
94 | 97 | List<SmsConfigModel> configs = smsConfigService.querySmsConfig(query); |
... | ... | @@ -349,6 +352,11 @@ |
349 | 352 | } |
350 | 353 | } |
351 | 354 | |
355 | + for (MessageRequest msg :allMsgs) | |
356 | + { | |
357 | + System.out.println("孕妇ams短信=======" + msg.getContent()); | |
358 | + } | |
359 | + | |
352 | 360 | } |
353 | 361 | |
354 | 362 | |
... | ... | @@ -519,6 +527,12 @@ |
519 | 527 | } |
520 | 528 | } |
521 | 529 | |
530 | + for (MessageRequest msg :allMsgs) | |
531 | + { | |
532 | + System.out.println("儿童ams短信=======" + msg.getContent()); | |
533 | + } | |
534 | + | |
535 | + | |
522 | 536 | } |
523 | 537 | |
524 | 538 | |
... | ... | @@ -638,6 +652,12 @@ |
638 | 652 | } |
639 | 653 | } |
640 | 654 | |
655 | + for (MessageRequest msg :allMsgs) | |
656 | + { | |
657 | + System.out.println("产妇ams短信=======" + msg.getContent()); | |
658 | + } | |
659 | + | |
660 | + | |
641 | 661 | } |
642 | 662 | |
643 | 663 | /** |
... | ... | @@ -1830,7 +1850,7 @@ |
1830 | 1850 | } |
1831 | 1851 | for (MessageRequest msg :allMsgs) |
1832 | 1852 | { |
1833 | - System.out.println("=======" + msg.getContent()); | |
1853 | + System.out.println("模板短信=======" + msg.getContent()); | |
1834 | 1854 | } |
1835 | 1855 | } |
1836 | 1856 | |
... | ... | @@ -2347,7 +2367,6 @@ |
2347 | 2367 | return request; |
2348 | 2368 | } |
2349 | 2369 | |
2350 | - private List<MessageRequest> allMsgs = new ArrayList<>(); | |
2351 | 2370 | |
2352 | 2371 | /** |
2353 | 2372 | * 发送短信到短信中心 |
platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
View file @
d46ffdb
... | ... | @@ -186,7 +186,7 @@ |
186 | 186 | Map<String,List<MessageContent>> list = getMessageTemplateMap("221", |
187 | 187 | AmsServiceTypeEnum.CHILD_GUIDE); |
188 | 188 | |
189 | - List<MessageContent> msgs = list.get("甲亢"); | |
189 | + List<MessageContent> msgs = list.get("肺结核"); | |
190 | 190 | |
191 | 191 | System.out.println(msgs); |
192 | 192 |