Commit b7beac39ff3e6141e0ecf9dbe0e6a0bc52f14a6f
1 parent
c9e17d835e
Exists in
master
and in
6 other branches
update code
Showing 2 changed files with 27 additions and 0 deletions
platform-msg-generate/src/main/java/com/lyms/platform/msg/utils/HelperUtils.java
View file @
b7beac3
... | ... | @@ -281,6 +281,17 @@ |
281 | 281 | |
282 | 282 | |
283 | 283 | /** |
284 | + * 是否已经生成过消息 | |
285 | + * @param patientId | |
286 | + * @param tempId | |
287 | + * @return | |
288 | + */ | |
289 | + public static boolean isExistMsg(String patientId,String tempId) | |
290 | + { | |
291 | + return SaveMessageService.isExistMsg(patientId,tempId); | |
292 | + } | |
293 | + | |
294 | + /** | |
284 | 295 | * 儿童服务状态和服务类型条件 |
285 | 296 | * @param serviceType |
286 | 297 | * @param serviceStatus |
platform-msg-generate/src/main/java/com/lyms/platform/msg/worker/TempleteMsgGenerateWorker.java
View file @
b7beac3
... | ... | @@ -258,6 +258,11 @@ |
258 | 258 | continue; |
259 | 259 | } |
260 | 260 | |
261 | + if (HelperUtils.isExistMsg(model.getId(), template.getId())) | |
262 | + { | |
263 | + continue; | |
264 | + } | |
265 | + | |
261 | 266 | //短信前缀 |
262 | 267 | String messagePrefix = baseService.getSmsPrefix(config, model.getBuildDoctor()); |
263 | 268 | String messageContent = "【"+messagePrefix+"】"+template.getContent(); |
... | ... | @@ -307,6 +312,11 @@ |
307 | 312 | continue; |
308 | 313 | } |
309 | 314 | |
315 | + if (HelperUtils.isExistMsg(model.getId(),template.getId())) | |
316 | + { | |
317 | + continue; | |
318 | + } | |
319 | + | |
310 | 320 | //短信前缀 |
311 | 321 | String messagePrefix = baseService.getSmsPrefix(config, model.getBuildDoctor()); |
312 | 322 | String messageContent = "【"+messagePrefix+"】"+template.getContent(); |
... | ... | @@ -477,6 +487,12 @@ |
477 | 487 | { |
478 | 488 | continue; |
479 | 489 | } |
490 | + | |
491 | + if (HelperUtils.isExistMsg(pat.getId(),template.getId())) | |
492 | + { | |
493 | + continue; | |
494 | + } | |
495 | + | |
480 | 496 | //短信前缀 |
481 | 497 | String messagePrefix = baseService.getSmsPrefix(config, pat.getBookbuildingDoctor()); |
482 | 498 | String messageContent = "【"+messagePrefix+"】"+template.getContent(); |