feat(notify、workReport、Project):

- 移除月报审批请求VO中面谈时间字段的非空验证
- 新增站内信跳转参数常量类NotifyJumpConstants
- 在执行任务分配通知中添加跳转类型和项目ID参数
- 在项目创建通知中添加跳转类型和项目ID参数
- 在任务分配通知中添加跳转类型和项目ID参数
- 添加工作日报内容分隔符常量用于区分不同日期的工作内容
- 修改工作内容拼接方式使用新的分隔符替代分号
This commit is contained in:
dk
2026-07-07 16:48:41 +08:00
parent 66c187f3de
commit 796c79d58f
9 changed files with 42 additions and 3 deletions

View File

@@ -19,7 +19,6 @@ public class MonthlyReportApproveReqVO extends WorkReportStatusActionReqVO {
@Schema(description = "面谈时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
@NotNull
private LocalDate meetingDate;
@Schema(description = "优势描述")

View File

@@ -0,0 +1,18 @@
package com.njcn.rdms.module.project.framework.notify;
/**
* 站内信跳转参数常量。
*/
public final class NotifyJumpConstants {
private NotifyJumpConstants() {
}
public static final String PARAM_JUMP_TYPE = "jumpType";
public static final String PARAM_PROJECT_ID = "projectId";
public static final String JUMP_TYPE_PROJECT = "project";
public static final String JUMP_TYPE_EXECUTION = "execution";
public static final String JUMP_TYPE_TASK = "task";
}

View File

@@ -49,6 +49,7 @@ import com.njcn.rdms.module.project.dal.mysql.status.ObjectStatusModelMapper;
import com.njcn.rdms.module.project.dal.mysql.status.ObjectStatusTransitionMapper;
import com.njcn.rdms.module.project.enums.ErrorCodeConstants;
import com.njcn.rdms.module.project.enums.ProjectDictTypeConstants;
import com.njcn.rdms.module.project.framework.notify.NotifyJumpConstants;
import com.njcn.rdms.framework.mybatis.core.dataobject.BaseDO;
import com.njcn.rdms.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.njcn.rdms.module.project.service.datascope.ObjectDataScope;
@@ -279,6 +280,8 @@ class ProjectServiceImpl implements ProjectService {
Map<String, Object> params = new HashMap<>();
params.put("projectName", project.getProjectName());
params.put("roleName", r.roleName());
params.put(NotifyJumpConstants.PARAM_JUMP_TYPE, NotifyJumpConstants.JUMP_TYPE_PROJECT);
params.put(NotifyJumpConstants.PARAM_PROJECT_ID, String.valueOf(project.getId()));
applicationEventPublisher.publishEvent(
com.njcn.rdms.module.project.framework.notify.NotifySendEvent.of(
java.util.List.of(r.userId()),

View File

@@ -43,6 +43,7 @@ import com.njcn.rdms.module.project.dal.mysql.status.ObjectStatusModelMapper;
import com.njcn.rdms.module.project.dal.mysql.status.ObjectStatusTransitionMapper;
import com.njcn.rdms.module.project.enums.ErrorCodeConstants;
import com.njcn.rdms.module.project.enums.ProjectDictTypeConstants;
import com.njcn.rdms.module.project.framework.notify.NotifyJumpConstants;
import com.njcn.rdms.module.project.framework.notify.NotifySendEvent;
import com.njcn.rdms.module.project.framework.notify.NotifyTemplateCodeConstants;
import com.njcn.rdms.module.project.util.DueRangeSupport;
@@ -193,6 +194,8 @@ public class ProjectExecutionServiceImpl implements ProjectExecutionService {
ProjectDO project = projectMapper.selectById(execution.getProjectId());
params.put("projectName", project == null ? "" : project.getProjectName());
params.put("executionName", execution.getExecutionName());
params.put(NotifyJumpConstants.PARAM_JUMP_TYPE, NotifyJumpConstants.JUMP_TYPE_EXECUTION);
params.put(NotifyJumpConstants.PARAM_PROJECT_ID, String.valueOf(execution.getProjectId()));
applicationEventPublisher.publishEvent(NotifySendEvent.of(recipients,
NotifyTemplateCodeConstants.EXECUTION_ASSIGNED, params,
NotifyMessageLevelConstants.NORMAL, SecurityFrameworkUtils.getLoginUserId()));

View File

@@ -41,6 +41,7 @@ import com.njcn.rdms.module.project.dal.mysql.status.ObjectStatusTransitionMappe
import com.njcn.rdms.module.project.enums.ErrorCodeConstants;
import com.njcn.rdms.module.project.framework.attachment.AttachmentFileIdResolver;
import com.njcn.rdms.module.project.framework.attachment.AttachmentValidator;
import com.njcn.rdms.module.project.framework.notify.NotifyJumpConstants;
import com.njcn.rdms.module.project.framework.notify.NotifySendEvent;
import com.njcn.rdms.module.project.framework.notify.NotifyTemplateCodeConstants;
import com.njcn.rdms.module.project.framework.security.annotation.CheckObjectPermission;
@@ -207,6 +208,8 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
ProjectDO project = projectMapper.selectById(projectId);
params.put("projectName", project == null ? "" : project.getProjectName());
params.put("taskName", task.getTaskTitle());
params.put(NotifyJumpConstants.PARAM_JUMP_TYPE, NotifyJumpConstants.JUMP_TYPE_TASK);
params.put(NotifyJumpConstants.PARAM_PROJECT_ID, String.valueOf(projectId));
applicationEventPublisher.publishEvent(NotifySendEvent.of(recipients,
NotifyTemplateCodeConstants.TASK_ASSIGNED, params,
NotifyMessageLevelConstants.NORMAL, SecurityFrameworkUtils.getLoginUserId()));

View File

@@ -67,6 +67,7 @@ import static com.njcn.rdms.framework.common.exception.util.ServiceExceptionUtil
public class WorkReportDefaultDraftService {
private static final String WORK_ITEM_MY_ITEMS = "我的事项";
private static final String WORKLOG_DAY_SEPARATOR = "[[WR_DAY_SPLIT]]";
@Resource
private ObjectStatusModelMapper objectStatusModelMapper;
@@ -759,7 +760,7 @@ public class WorkReportDefaultDraftService {
builder.append(lineTitle);
appendBracket(builder, priority, latestProgressRate, totalWorkHours);
if (!workContents.isEmpty()) {
builder.append("").append(String.join("", workContents));
builder.append("").append(String.join(WORKLOG_DAY_SEPARATOR, workContents));
}
return builder.toString();
}
@@ -860,7 +861,7 @@ public class WorkReportDefaultDraftService {
builder.append("").append(String.join(" / ", parts)).append("");
}
if (weeklyMode && worklogAggregate.hasWorkContent()) {
builder.append("").append(String.join("", worklogAggregate.workContents()));
builder.append("").append(String.join(WORKLOG_DAY_SEPARATOR, worklogAggregate.workContents()));
}
return builder.toString();
}