|
@@ -429,6 +429,9 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
// 扭转下一步
|
|
// 扭转下一步
|
|
|
resultMessage = toNextSubmit(task, req);
|
|
resultMessage = toNextSubmit(task, req);
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case "10":
|
|
|
|
|
+ // 催报
|
|
|
|
|
+ resultMessage = remindUnitTask(task, req);
|
|
|
default:
|
|
default:
|
|
|
return "未知的操作类型";
|
|
return "未知的操作类型";
|
|
|
}
|
|
}
|
|
@@ -891,12 +894,10 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
// 查询发送给当前用户的消息
|
|
// 查询发送给当前用户的消息
|
|
|
LambdaQueryWrapper<CostNotice> queryWrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<CostNotice> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(CostNotice::getIsDeleted, "0")
|
|
queryWrapper.eq(CostNotice::getIsDeleted, "0")
|
|
|
-// .eq(CostNotice::getSendTarget, currentUserId)
|
|
|
|
|
|
|
+ .eq(CostNotice::getSendTarget, currentUserId)
|
|
|
.orderByDesc(CostNotice::getCreateTime)
|
|
.orderByDesc(CostNotice::getCreateTime)
|
|
|
.last("limit 8");
|
|
.last("limit 8");
|
|
|
- if(!currentUser.isAdmin()){
|
|
|
|
|
- queryWrapper.eq(CostNotice::getSendTarget, currentUserId);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
return costNoticeManager.list(queryWrapper);
|
|
return costNoticeManager.list(queryWrapper);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1058,8 +1059,40 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
String orgId = getCurrentUserMainOrgId();
|
|
String orgId = getCurrentUserMainOrgId();
|
|
|
Org org = orgManager.getById(orgId);
|
|
Org org = orgManager.getById(orgId);
|
|
|
String noticeSource = (org.getName()) + " " + AuthenticationUtil.getCurrentUserFullname();
|
|
String noticeSource = (org.getName()) + " " + AuthenticationUtil.getCurrentUserFullname();
|
|
|
|
|
+ String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
|
|
+ // 使用传入的用户ID作为发送目标
|
|
|
|
|
+ costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, content, enterpriseId, noticeSource, sendTarget);
|
|
|
|
|
+ }
|
|
|
|
|
+ return title;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 催办任务,仅记录消息
|
|
|
|
|
+ * @param task 任务对象
|
|
|
|
|
+ * @param req 请求参数
|
|
|
|
|
+ * @return 催办结果消息
|
|
|
|
|
+ */
|
|
|
|
|
+ private String remindUnitTask(CostProjectTask task, CostTaskPageReq req) {
|
|
|
|
|
+ // 检查是否提供了用户ID
|
|
|
|
|
+ if (StringUtil.isEmpty(req.getAuditedUnitIds())) {
|
|
|
|
|
+ throw new RuntimeException("未指定催报企业");
|
|
|
|
|
+ }
|
|
|
|
|
+ String title = NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "催办";
|
|
|
|
|
+ // 分割用户ID并逐个发送通知
|
|
|
|
|
+ for (String unitId : req.getAuditedUnitIds().split(",")) {
|
|
|
|
|
+
|
|
|
|
|
+ // 发送催办通知
|
|
|
|
|
+ String content = "[" + NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "]" + AuthenticationUtil.getCurrentUserFullname() + "催报" + task.getAuditedUnitName() + "的项目(" + task.getProjectName() + ")";
|
|
|
|
|
+ if (StringUtil.isNotEmpty(req.getContent())) {
|
|
|
|
|
+ content += ",原因:" + req.getContent();
|
|
|
|
|
+ }
|
|
|
|
|
+ String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
|
|
+ String orgId = getCurrentUserMainOrgId();
|
|
|
|
|
+ Org org = orgManager.getById(orgId);
|
|
|
|
|
+ String noticeSource = (org.getName()) + " " + AuthenticationUtil.getCurrentUserFullname();
|
|
|
|
|
+ String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
// 使用传入的用户ID作为发送目标
|
|
// 使用传入的用户ID作为发送目标
|
|
|
- costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, content, enterpriseId, noticeSource, userId);
|
|
|
|
|
|
|
+ costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, content, enterpriseId, noticeSource, sendTarget);
|
|
|
}
|
|
}
|
|
|
return title;
|
|
return title;
|
|
|
}
|
|
}
|