diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java index c642775fac..8a2cd30ea8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java @@ -83,9 +83,9 @@ public class IcEpidemicSpecialAttentionController { */ @PostMapping("vaccination-update") @NoRepeatSubmit - public Result vaccinationUpdate(@RequestBody IcEpidemicSpecialAttentionDTO formDTO){ + public Result vaccinationUpdate(@RequestBody IcEpidemicSpecialAttentionDTO formDTO,@LoginUser TokenDto tokenDto){ ValidatorUtils.validateEntity(formDTO, IcEpidemicSpecialAttentionDTO.IcEpidemicSpecialAttentionUpdate.class); - icEpidemicSpecialAttentionService.vaccinationUpdate(formDTO); + icEpidemicSpecialAttentionService.vaccinationUpdate(formDTO,tokenDto); return new Result(); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java index 75658ca720..8a6eb03f04 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java @@ -104,7 +104,7 @@ public interface IcEpidemicSpecialAttentionService extends BaseService page(Map params) { @@ -207,7 +207,19 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl needSedNotice = formDTO.getList().stream().filter(l -> CollectionUtils.isNotEmpty(l.getChannel())).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(needSedNotice)) { + SendNoticeFormDTO dto = new SendNoticeFormDTO(); + List userListBeans = ConvertUtils.sourceToTarget(needSedNotice, SendNoticeFormDTO.UserListBean.class); + dto.setCustomerId(formDTO.getCustomerId()); + dto.setUserList(userListBeans); + dto.setChannel(needSedNotice.get(NumConstant.ZERO).getChannel()); + dto.setOrigin(needSedNotice.get(NumConstant.ZERO).getAttentionType().toString()); + dto.setContent(needSedNotice.get(NumConstant.ZERO).getContent()); + dto.setStaffId(formDTO.getUserId()); + noticeService.sendNotice(dto); + } } /** @@ -220,7 +232,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl w = new LambdaQueryWrapper<>(); IcEpidemicSpecialAttentionEntity e = new IcEpidemicSpecialAttentionEntity(); w.eq(IcEpidemicSpecialAttentionEntity::getIdCard,formDTO.getIdCard()) @@ -229,7 +241,17 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl needSendList = needInsert.stream().filter(l -> CollectionUtils.isNotEmpty(l.getChannel())).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(needSendList)) { + SendNoticeFormDTO dto = new SendNoticeFormDTO(); + List userListBeans = ConvertUtils.sourceToTarget(needSendList, SendNoticeFormDTO.UserListBean.class); + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setUserList(userListBeans); + dto.setChannel(needSendList.get(NumConstant.ZERO).getChannel()); + dto.setOrigin(needSendList.get(NumConstant.ZERO).getAttentionType().toString()); + dto.setContent(needSendList.get(NumConstant.ZERO).getContent()); + dto.setStaffId(tokenDto.getUserId()); + noticeService.sendNotice(dto); + } } if (CollectionUtils.isNotEmpty(errorInfo)){ String url = importOssUpload(errorInfo, EpidemicSpecialAttentionErrorModel.class);