|
@@ -147,6 +147,12 @@ public class NoticeService {
|
|
|
HmEmployRelation relation = employRelationService.queryById(no.getEmployRelationId());
|
|
|
tempNoticeUser = noticeUserService.getNoticeIduserIdList(no.getId(), relation.getUserButlerId());// 不用userId
|
|
|
}
|
|
|
+
|
|
|
+ if(null==tempNoticeUser||tempNoticeUser.size()==0) {
|
|
|
+ no.setStatus("0");
|
|
|
+ }else {
|
|
|
+ no.setStatus(tempNoticeUser.get(0).getTicketStatus());
|
|
|
+ }
|
|
|
|
|
|
// tb流程展示
|
|
|
boolean boo = true;
|
|
@@ -285,7 +291,7 @@ public class NoticeService {
|
|
|
|
|
|
// 新建工单
|
|
|
TicketAllinone ticketAllinone = new TicketAllinone();
|
|
|
- ticketAllinone.setAdminId(relation.getUserButlerId().intValue());
|
|
|
+ ticketAllinone.setAdminId(bulterId);
|
|
|
|
|
|
JzTicket ticket = new JzTicket();
|
|
|
ticket.setCustomerId(customerId);
|
|
@@ -344,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())
|
|
@@ -359,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();
|
|
@@ -460,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);
|
|
|
|