|
|
@@ -39,10 +39,7 @@ import org.springblade.modules.publishevent.event.HangxinNoticeEvent;
|
|
|
import org.springblade.modules.system.entity.Dept;
|
|
|
import org.springblade.modules.system.entity.Role;
|
|
|
import org.springblade.modules.system.entity.User;
|
|
|
-import org.springblade.modules.system.service.IDeptService;
|
|
|
-import org.springblade.modules.system.service.IDictService;
|
|
|
-import org.springblade.modules.system.service.IRoleService;
|
|
|
-import org.springblade.modules.system.service.IUserService;
|
|
|
+import org.springblade.modules.system.service.*;
|
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -63,6 +60,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
private final IDictService dictService;
|
|
|
private final IDeptService deptService;
|
|
|
private final IRoleService roleService;
|
|
|
+ private final IParamService paramService;
|
|
|
|
|
|
private final ApplicationEventPublisher eventPublisher;
|
|
|
|
|
|
@@ -91,7 +89,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean sendNotice(Notice notice) {
|
|
|
+ public boolean sendNotice(NoticeVO notice) {
|
|
|
notice.setType("0"); //系統
|
|
|
if (StringUtil.isBlank(notice.getTargetIds())){
|
|
|
List<String> deptIds = Func.toStrList(notice.getDeptId());
|
|
|
@@ -112,9 +110,11 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
notice.setTargetEhrs(StringUtil.join(userEhrList, "|"));
|
|
|
}
|
|
|
|
|
|
- // 發送行信通知
|
|
|
- HangxinNoticeEvent hangxinNoticeEvent = new HangxinNoticeEvent(notice);
|
|
|
- eventPublisher.publishEvent(hangxinNoticeEvent);
|
|
|
+ if (notice.getSendHangxin() == null || notice.getSendHangxin().equals(true)){
|
|
|
+ HangxinNoticeEvent hangxinNoticeEvent = new HangxinNoticeEvent(notice);
|
|
|
+ eventPublisher.publishEvent(hangxinNoticeEvent);
|
|
|
+ }
|
|
|
+
|
|
|
return save(notice);
|
|
|
}
|
|
|
|
|
|
@@ -161,7 +161,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
userEhrtList.add(user2.getEhr());
|
|
|
}
|
|
|
|
|
|
- Notice notice = new Notice();
|
|
|
+ NoticeVO notice = new NoticeVO();
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("keypwd");
|
|
|
notice.setTargetIds(StringUtil.join(targetList));
|
|
|
@@ -179,7 +179,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
title += "營運部已發佈新消息,請查閱";
|
|
|
Dept dept = deptService.getByOrgNo(cardSwallow.getSendOrgNo());
|
|
|
|
|
|
- Notice notice = new Notice();
|
|
|
+ NoticeVO notice = new NoticeVO();
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("cardswallow");
|
|
|
notice.setDeptId(dept.getId()+"");
|
|
|
@@ -196,7 +196,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
title += "營運部已發佈新消息,請查閱";
|
|
|
Dept dept = deptService.getByOrgNo(returns.getSubOrgNo());
|
|
|
|
|
|
- Notice notice = new Notice();
|
|
|
+ NoticeVO notice = new NoticeVO();
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("returns");
|
|
|
notice.setDeptId(dept.getId()+"");
|
|
|
@@ -211,7 +211,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
title += "更正:";
|
|
|
}
|
|
|
title += "營運部已發佈新消息,請查閱";
|
|
|
- Notice notice = new Notice();
|
|
|
+ NoticeVO notice = new NoticeVO();
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("message");
|
|
|
notice.setDeptId(message.getDeptId());
|
|
|
@@ -268,7 +268,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Notice notice = new Notice();
|
|
|
+ NoticeVO notice = new NoticeVO();
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("sealhandover");
|
|
|
notice.setTargetIds(StringUtil.join(userList));
|
|
|
@@ -290,7 +290,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
title += user.getName() + "已提交網點出納主管及專管員崗位變更記錄表,請登陸系統查詢";
|
|
|
}
|
|
|
|
|
|
- Notice notice = new Notice();
|
|
|
+ NoticeVO notice = new NoticeVO();
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("postchange");
|
|
|
notice.setTargetIds(postChange.getPersonId()+"");
|
|
|
@@ -310,7 +310,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
title += goodsUse.getFillingName() + "提交了使用及出入庫登記表,請登入系統進行確認。";
|
|
|
|
|
|
- Notice notice = new Notice();
|
|
|
+ NoticeVO notice = new NoticeVO();
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("goodsuse");
|
|
|
notice.setTargetIds(goodsUse.getPersonId()+"");
|
|
|
@@ -346,8 +346,11 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
checkType = "每週";
|
|
|
}
|
|
|
|
|
|
+ String hangxinSend = paramService.getValue("notice." + cycle);
|
|
|
+
|
|
|
String title = "ORM-通知【核對記錄表】" + dept.getDeptName() + "尚未完成" + checkType + "核對工作";
|
|
|
- Notice notice = new Notice();
|
|
|
+ NoticeVO notice = new NoticeVO();
|
|
|
+ notice.setSendHangxin("true".equals(hangxinSend));
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("checklist");
|
|
|
notice.setDeptId(dept.getId() + "");
|