|
@@ -350,8 +350,7 @@ public class NoticeService {
|
|
|
* @return
|
|
|
*/
|
|
|
private Integer insertNoticeUsers(HmNoticeDto dto, HmEmployRelation relation) {
|
|
|
-
|
|
|
- String content = "";
|
|
|
+ Integer noticeId =null;
|
|
|
if (dto.getRtype().equals(HmNoticeEnum.NOTICE_NUM_1.getType())
|
|
|
|| dto.getRtype().equals(HmNoticeEnum.NOTICE_NUM_2.getType())
|
|
|
|| dto.getRtype().equals(HmNoticeEnum.NOTICE_NUM_3.getType())
|
|
@@ -365,32 +364,36 @@ public class NoticeService {
|
|
|
|| dto.getRtype().equals(HmNoticeEnum.NOTICE_NUM_12.getType())
|
|
|
|| dto.getRtype().equals(HmNoticeEnum.NOTICE_NUM_13.getType())
|
|
|
|| dto.getRtype().equals(HmNoticeEnum.NOTICE_NUM_14.getType())) {
|
|
|
+ String content = "";
|
|
|
content = HmNoticeEnum.getContentUser(dto.getRtype(),dto.getRemark());
|
|
|
- }
|
|
|
-
|
|
|
- HmNotice notice = new HmNotice();
|
|
|
- BeanUtils.copyProperties(dto, notice);
|
|
|
-
|
|
|
- notice.setContent(content);
|
|
|
- notice.setrType(dto.getRtype().toString());
|
|
|
- Integer noticeId = noticeService.insertNotice(notice);
|
|
|
-
|
|
|
- List<Long> appUserId = dto.getAppUserId();
|
|
|
- for (Long u : appUserId) {
|
|
|
- if(u.equals(relation.getUserButlerId())) {
|
|
|
- //跳过管家的,管家的单独下面处理
|
|
|
- continue;
|
|
|
+ HmNotice notice = new HmNotice();
|
|
|
+ BeanUtils.copyProperties(dto, notice);
|
|
|
+
|
|
|
+ notice.setContent(content);
|
|
|
+ notice.setrType(dto.getRtype().toString());
|
|
|
+ noticeId = noticeService.insertNotice(notice);
|
|
|
+
|
|
|
+ List<Long> appUserId = dto.getAppUserId();
|
|
|
+ for (Long u : appUserId) {
|
|
|
+ if(u.equals(relation.getUserButlerId())) {
|
|
|
+ //跳过管家的,管家的单独下面处理
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ HmNoticeUser noticeUser = new HmNoticeUser();
|
|
|
+ noticeUser.setNoticeId(notice.getId());
|
|
|
+ noticeUser.setAppUserId(u);
|
|
|
+ noticeUser.setTicketStatus("0");
|
|
|
+ noticeUser.setNoticeContent(content);// getContent(dto.getRtype(), relation)
|
|
|
+ noticeUserService.insert(noticeUser);
|
|
|
}
|
|
|
- HmNoticeUser noticeUser = new HmNoticeUser();
|
|
|
- noticeUser.setNoticeId(notice.getId());
|
|
|
- noticeUser.setAppUserId(u);
|
|
|
- noticeUser.setTicketStatus("0");
|
|
|
- noticeUser.setNoticeContent(content);// getContent(dto.getRtype(), relation)
|
|
|
- noticeUserService.insert(noticeUser);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
//保姆缺勤打卡,通知管家雇主保姆,有工单
|
|
|
if (dto.getRtype().equals(HmNoticeEnum.NOTICE_NUM_6.getType())) {
|
|
|
+ HmNotice notice = new HmNotice();
|
|
|
+ BeanUtils.copyProperties(dto, notice);
|
|
|
+ noticeId=noticeService.insertNotice(notice);
|
|
|
+
|
|
|
List<UserNoticeDto> userNoticeList = dto.getUserNoticeList();
|
|
|
for(UserNoticeDto u:userNoticeList) {
|
|
|
HmNoticeUser noticeUser = new HmNoticeUser();
|
|
@@ -466,7 +469,7 @@ public class NoticeService {
|
|
|
HmNoticeUser noticeUser = new HmNoticeUser();
|
|
|
noticeUser.setCreateTime(LocalDateTime.now());
|
|
|
noticeUser.setNoticeContent(content);
|
|
|
- noticeUser.setIsRead(0);
|
|
|
+ noticeUser.setIsRead(1);//这个时候不通知,只是记录
|
|
|
noticeUser.setNoticeId(notice.getId());
|
|
|
noticeUser.setTicketStatus(ticketStatus);
|
|
|
|