|
@@ -319,7 +319,6 @@ public class LeaveApplyService extends CrudService<LeaveApplyDao, LeaveApply> {
|
|
identityService.setAuthenticatedUserId(leaveApply.getCurrentUser().getId());
|
|
identityService.setAuthenticatedUserId(leaveApply.getCurrentUser().getId());
|
|
User createUser = UserUtils.getUser();
|
|
User createUser = UserUtils.getUser();
|
|
String contentStr = "请假编号:" + leaveApply.getNo() + ",请假日期:" + DateUtils.formatDate(leaveApply.getApplyTime());
|
|
String contentStr = "请假编号:" + leaveApply.getNo() + ",请假日期:" + DateUtils.formatDate(leaveApply.getApplyTime());
|
|
- userDao.get(leaveApply.getApplyer()).getName();
|
|
|
|
String titleStr = "请假人:" + userDao.get(leaveApply.getApplyer()).getName();
|
|
String titleStr = "请假人:" + userDao.get(leaveApply.getApplyer()).getName();
|
|
|
|
|
|
String businessKey = leaveApply.getId();
|
|
String businessKey = leaveApply.getId();
|
|
@@ -330,13 +329,16 @@ public class LeaveApplyService extends CrudService<LeaveApplyDao, LeaveApply> {
|
|
StringBuffer buffer = new StringBuffer();
|
|
StringBuffer buffer = new StringBuffer();
|
|
Activity activity = new Activity();
|
|
Activity activity = new Activity();
|
|
WorkProjectNotify workProjectNotify = UtilNotify
|
|
WorkProjectNotify workProjectNotify = UtilNotify
|
|
- .saveNotify(leaveApply.getId(), null, leaveApply.getCompanyId(), titleStr, contentStr, "80", "0", "待审批", ""
|
|
|
|
- );
|
|
|
|
|
|
+ .saveNotify(leaveApply.getId(), null, leaveApply.getCompanyId(), titleStr, contentStr, "80", "0", "待审批", "");
|
|
|
|
|
|
List<User> users = new ArrayList<>();
|
|
List<User> users = new ArrayList<>();
|
|
|
|
+// 部门责任人
|
|
List<User> bmzrList = UserUtils.getByRoleActivityEnname("bmzr", 2, office.getId(), "25", leaveApply.getCreateBy());
|
|
List<User> bmzrList = UserUtils.getByRoleActivityEnname("bmzr", 2, office.getId(), "25", leaveApply.getCreateBy());
|
|
|
|
+// 分管领导
|
|
List<User> fgldList = UserUtils.getByRoleActivityEnname("fgld", 2, office.getId(), "25", leaveApply.getCreateBy());
|
|
List<User> fgldList = UserUtils.getByRoleActivityEnname("fgld", 2, office.getId(), "25", leaveApply.getCreateBy());
|
|
|
|
+// 总经理
|
|
List<User> zjlList = UserUtils.getByRoleActivityEnname("zjl", 3, office.getId(), "25", leaveApply.getCreateBy());
|
|
List<User> zjlList = UserUtils.getByRoleActivityEnname("zjl", 3, office.getId(), "25", leaveApply.getCreateBy());
|
|
|
|
+
|
|
if (StringUtils.isNotBlank(workActivityMenu.getId())) {
|
|
if (StringUtils.isNotBlank(workActivityMenu.getId())) {
|
|
workProjectNotify.setNotifyRole("");
|
|
workProjectNotify.setNotifyRole("");
|
|
workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
|
|
workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
|
|
@@ -384,6 +386,8 @@ public class LeaveApplyService extends CrudService<LeaveApplyDao, LeaveApply> {
|
|
processType = "leaveApply";
|
|
processType = "leaveApply";
|
|
users.addAll(bmzrList);
|
|
users.addAll(bmzrList);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 向每个部门负责人发送审批通知
|
|
List<String> userIds = new ArrayList<>(users.size());
|
|
List<String> userIds = new ArrayList<>(users.size());
|
|
for (User u : users) {
|
|
for (User u : users) {
|
|
userIds.add(u.getId());
|
|
userIds.add(u.getId());
|