Commit b96b193acf68b5fbedac63eb9371755e6ed9b04e
1 parent
65ef5b3624
Exists in
master
and in
1 other branch
code update
Showing 4 changed files with 52 additions and 41 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.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-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java
View file @
b96b193
... | ... | @@ -62,8 +62,7 @@ |
62 | 62 | |
63 | 63 | @Override |
64 | 64 | public List<AntenatalExaminationModel> queryYuyueAntenatalExamination(Date yuYueDate,String hospitalId) { |
65 | - AggregationOperation match = Aggregation.match(Criteria.where("hospitalId").gte(yuYueDate).lte(yuYueDate).and("hospitalId").is(hospitalId)); | |
66 | -// AggregationOperation match = Aggregation.match(Criteria.where("nextCheckTime").gte(yuYueDate).lte(yuYueDate).and("hospitalId").is(hospitalId)); | |
65 | + AggregationOperation match = Aggregation.match(Criteria.where("nextCheckTime").gte(yuYueDate).lte(yuYueDate).and("hospitalId").is(hospitalId)); | |
67 | 66 | AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); |
68 | 67 | Aggregation aggregation = Aggregation.newAggregation(match, group); |
69 | 68 | AggregationResults<AntenatalExaminationModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_antex", AntenatalExaminationModel.class); |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
b96b193
... | ... | @@ -253,8 +253,9 @@ |
253 | 253 | { |
254 | 254 | message.setHighRiskId(String.valueOf(riskMap.get("id"))); |
255 | 255 | } |
256 | + highRiskContents.addAll(messageContents); | |
256 | 257 | } |
257 | - highRiskContents.addAll(messageContents); | |
258 | + | |
258 | 259 | } |
259 | 260 | if (CollectionUtils.isNotEmpty(highRiskContents)) |
260 | 261 | { |
... | ... | @@ -725,6 +726,9 @@ |
725 | 726 | continue; |
726 | 727 | } |
727 | 728 | |
729 | + try { | |
730 | + | |
731 | + | |
728 | 732 | //循环每一个模板,根据模板条件查询到用户 发送短信 |
729 | 733 | for (SmsTemplateModel template : templates) |
730 | 734 | { |
731 | 735 | |
... | ... | @@ -1819,12 +1823,15 @@ |
1819 | 1823 | sendSms(list); |
1820 | 1824 | } |
1821 | 1825 | } |
1822 | - | |
1826 | + } | |
1827 | + catch (Exception e) | |
1828 | + { | |
1829 | + System.out.println("模板生成异常"+e); | |
1830 | + e.printStackTrace(); | |
1831 | + continue; | |
1832 | + } | |
1823 | 1833 | } |
1824 | 1834 | } |
1825 | - | |
1826 | - | |
1827 | - | |
1828 | 1835 | for (MessageRequest msg :allMsgs) |
1829 | 1836 | { |
1830 | 1837 | System.out.println("=======" + msg.getContent()); |
... | ... | @@ -2230,19 +2237,19 @@ |
2230 | 2237 | |
2231 | 2238 | for (AntenatalExaminationModel f : fuzs) |
2232 | 2239 | { |
2233 | - | |
2234 | - AntExQuery antExQuery = new AntExQuery(); | |
2235 | - antExQuery.setYn(YnEnums.YES.getId()); | |
2236 | - antExQuery.setParentId(f.getId()); | |
2237 | - | |
2238 | - List<AntenatalExaminationModel> list = antenatalExaminationService.queryLastAntenatalExamination(antExQuery.convertToQuery()); | |
2239 | - if (CollectionUtils.isNotEmpty(list)) | |
2240 | - { | |
2241 | - if (list.get(0).getNextCheckTime() != null) | |
2242 | - { | |
2243 | - idset.add(f.getId()); //这里的id就是parentid | |
2244 | - } | |
2245 | - } | |
2240 | + idset.add(f.getId()); //这里的id就是parentid | |
2241 | +// AntExQuery antExQuery = new AntExQuery(); | |
2242 | +// antExQuery.setYn(YnEnums.YES.getId()); | |
2243 | +// antExQuery.setParentId(f.getId()); | |
2244 | +// | |
2245 | +// List<AntenatalExaminationModel> list = antenatalExaminationService.queryLastAntenatalExamination(antExQuery.convertToQuery()); | |
2246 | +// if (CollectionUtils.isNotEmpty(list)) | |
2247 | +// { | |
2248 | +// if (list.get(0).getNextCheckTime() != null) | |
2249 | +// { | |
2250 | +// idset.add(f.getId()); //这里的id就是parentid | |
2251 | +// } | |
2252 | +// } | |
2246 | 2253 | } |
2247 | 2254 | return idset; |
2248 | 2255 | } |
2249 | 2256 | |
... | ... | @@ -2288,18 +2295,20 @@ |
2288 | 2295 | |
2289 | 2296 | for (AntenatalExaminationModel f : fuzs) |
2290 | 2297 | { |
2291 | - AntExQuery antExQuery = new AntExQuery(); | |
2292 | - antExQuery.setYn(YnEnums.YES.getId()); | |
2293 | - antExQuery.setParentId(f.getId()); | |
2298 | + idset.add(f.getId()); //这里的id就是parentid | |
2294 | 2299 | |
2295 | - List<AntenatalExaminationModel> list = antenatalExaminationService.queryLastAntenatalExamination(antExQuery.convertToQuery()); | |
2296 | - if (CollectionUtils.isNotEmpty(list)) | |
2297 | - { | |
2298 | - if (list.get(0).getNextCheckTime() != null) | |
2299 | - { | |
2300 | - idset.add(f.getId()); //这里的id就是parentid | |
2301 | - } | |
2302 | - } | |
2300 | +// AntExQuery antExQuery = new AntExQuery(); | |
2301 | +// antExQuery.setYn(YnEnums.YES.getId()); | |
2302 | +// antExQuery.setParentId(f.getId()); | |
2303 | +// | |
2304 | +// List<AntenatalExaminationModel> list = antenatalExaminationService.queryLastAntenatalExamination(antExQuery.convertToQuery()); | |
2305 | +// if (CollectionUtils.isNotEmpty(list)) | |
2306 | +// { | |
2307 | +// if (list.get(0).getNextCheckTime() != null) | |
2308 | +// { | |
2309 | +// idset.add(f.getId()); //这里的id就是parentid | |
2310 | +// } | |
2311 | +// } | |
2303 | 2312 | } |
2304 | 2313 | return idset.size() > 0; |
2305 | 2314 | } |
platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
View file @
b96b193
... | ... | @@ -183,15 +183,18 @@ |
183 | 183 | |
184 | 184 | |
185 | 185 | public static void main(String[] args) { |
186 | -// Map<String,List<MessageContent>> list = getMessageTemplateMap("242", | |
187 | -// AmsServiceTypeEnum.CHILD_GUIDE); | |
188 | -// | |
189 | -// List<MessageContent> msgs = list.get("新生儿感染"); | |
190 | - for (int i = 0;i< 100 ;i++) | |
191 | - { | |
192 | - int index = (int)(Math.random()*8); | |
193 | - System.out.println(index); | |
194 | - } | |
186 | + Map<String,List<MessageContent>> list = getMessageTemplateMap("221", | |
187 | + AmsServiceTypeEnum.CHILD_GUIDE); | |
188 | + | |
189 | + List<MessageContent> msgs = list.get("甲亢"); | |
190 | + | |
191 | + System.out.println(msgs); | |
192 | + | |
193 | +// for (int i = 0;i< 100 ;i++) | |
194 | +// { | |
195 | +// int index = (int)(Math.random()*8); | |
196 | +// System.out.println(index); | |
197 | +// } | |
195 | 198 | |
196 | 199 | // String result = "头:9.5|胸:10.0|腹:10.0"; |
197 | 200 | // String b = ""; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
b96b193
... | ... | @@ -1595,7 +1595,7 @@ |
1595 | 1595 | } |
1596 | 1596 | } |
1597 | 1597 | |
1598 | - List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
1598 | + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery, "modified", Sort.Direction.DESC); | |
1599 | 1599 | |
1600 | 1600 | return models; |
1601 | 1601 | } |