消息待办
parent
5ec6822f64
commit
824f448f4f
|
|
@ -49,3 +49,10 @@ openapi:
|
|||
apiCode: test:01
|
||||
#多个可以逗号隔开,可以为空
|
||||
tenantIds: 1838408702262321152
|
||||
# 消息能力配置列表
|
||||
message:
|
||||
code:
|
||||
task-assign: MS000108 # 课题任务待分配
|
||||
score-result: MS000107 # 专项任务评分结果
|
||||
score-pending: MS000106 # 任务课题评分待处理
|
||||
score-task-assign: MS000105 # 评分任务待分配
|
||||
|
|
@ -49,3 +49,10 @@ openapi:
|
|||
apiCode: test:01
|
||||
#多个可以逗号隔开,可以为空
|
||||
tenantIds: 1838408702262321152
|
||||
# 消息能力配置列表
|
||||
message:
|
||||
code:
|
||||
task-assign: MS000108 # 课题任务待分配
|
||||
score-result: MS000107 # 专项任务评分结果
|
||||
score-pending: MS000106 # 任务课题评分待处理
|
||||
score-task-assign: MS000105 # 评分任务待分配
|
||||
|
|
@ -11,6 +11,7 @@ import com.jjb.saas.message.client.message.request.MessageTargetCmd;
|
|||
import com.zcloud.domain.command.convertor.ProjectTaskGroupUserCoConvertor;
|
||||
import com.zcloud.domain.command.convertor.ProjectTaskInfoCoConvertor;
|
||||
import com.zcloud.domain.command.convertor.ProjectTaskScoreInfoCoConvertor;
|
||||
import com.zcloud.domain.domain.config.MessageConfig;
|
||||
import com.zcloud.domain.domain.enums.CommonFlagEnum;
|
||||
import com.zcloud.domain.domain.enums.ProjectTaskExecuteStatusEnum;
|
||||
import com.zcloud.domain.domain.gateway.ProjectTaskGateway;
|
||||
|
|
@ -33,6 +34,7 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
|
@ -59,6 +61,8 @@ public class ProjectTaskAddExe {
|
|||
private final CorpInfoRepository corpInfoRepository;
|
||||
@DubboReference
|
||||
private MessageFacade messageFacade;
|
||||
@Resource
|
||||
private MessageConfig messageConfig;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(ProjectTaskAddCmd cmd) {
|
||||
ProjectTaskE projectTaskE = new ProjectTaskE();
|
||||
|
|
@ -131,9 +135,9 @@ public class ProjectTaskAddExe {
|
|||
//通知department
|
||||
String domainDepartmentId = projectTaskE.getDomainDepartmentId();
|
||||
DomainDepartmentDO infoByUUID = domainDepartmentRepository.getInfoByUUID(domainDepartmentId);
|
||||
messageNotice(infoByUUID.getMasterUserId(),"MS000105",projectTaskE.getId(),null);
|
||||
messageNotice(infoByUUID.getMasterUserId(),messageConfig.getScoreTaskAssign(),projectTaskE.getId(),null);
|
||||
//股份端主账号,写死
|
||||
messageNotice(2018148156138532864L,"MS000105",projectTaskE.getId(),null);
|
||||
messageNotice(2018148156138532864L,messageConfig.getScoreTaskAssign(),projectTaskE.getId(),null);
|
||||
|
||||
|
||||
} else if (CollUtil.isEmpty(projectTaskGroupUserAddCmdList) && CollUtil.isNotEmpty(projectTaskScoreInfoAddCmdList)) {
|
||||
|
|
@ -146,8 +150,8 @@ public class ProjectTaskAddExe {
|
|||
|
||||
Map<String, Object> sendParams = new HashMap<String, Object>();
|
||||
sendParams.put("DomainDepartment", infoByUUID.getMasterDepartmentName());
|
||||
messageNotice(info.getTeamUserId(),"MS000108",projectTaskE.getId(),sendParams);
|
||||
messageNotice(info.getCorpinfoId(),"MS000108",projectTaskE.getId(),sendParams);
|
||||
messageNotice(info.getTeamUserId(),messageConfig.getTaskAssign(),projectTaskE.getId(),sendParams);
|
||||
messageNotice(info.getCorpinfoId(),messageConfig.getTaskAssign(),projectTaskE.getId(),sendParams);
|
||||
}
|
||||
|
||||
projectTaskGateway.update(projectTaskE);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.jjb.saas.framework.auth.utils.AuthContext;
|
|||
import com.jjb.saas.message.client.message.facede.MessageFacade;
|
||||
import com.jjb.saas.message.client.message.request.MessageSendCmd;
|
||||
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
|
||||
import com.zcloud.domain.domain.config.MessageConfig;
|
||||
import com.zcloud.domain.domain.enums.CommonFlagEnum;
|
||||
import com.zcloud.domain.domain.enums.ScoreStatusEnum;
|
||||
import com.zcloud.domain.domain.gateway.ProjectTaskScoreInfoGateway;
|
||||
|
|
@ -30,6 +31,7 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -56,6 +58,8 @@ public class ProjectTaskScoreInfoUpdateExe {
|
|||
private final MessageFacade messageFacade;
|
||||
private final TodoListEventPusherUtil todoListEventPusherUtil;
|
||||
private final DomainGroupRepository domainGroupRepository;
|
||||
@Resource
|
||||
private MessageConfig messageConfig;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(ProjectTaskScoreInfoUpdateCmd projectTaskScoreInfoUpdateCmd) {
|
||||
|
|
@ -127,7 +131,7 @@ public class ProjectTaskScoreInfoUpdateExe {
|
|||
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
|
||||
messageTargetCmd.setUserId(projectTaskGroupUserDO.getUserId());
|
||||
messageSendCmd.setTargetCmd(messageTargetCmd);
|
||||
messageSendCmd.setSourceCode("MS000107");
|
||||
messageSendCmd.setSourceCode(messageConfig.getScoreResult());
|
||||
messageSendCmd.setNeedTokenEnum(false);
|
||||
Map<String, Object> sendParams = new HashMap<String, Object>();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.jjb.saas.message.client.message.request.MessageTargetCmd;
|
|||
import com.zcloud.domain.command.convertor.ProjectTaskGroupUserCoConvertor;
|
||||
import com.zcloud.domain.command.convertor.ProjectTaskInfoCoConvertor;
|
||||
import com.zcloud.domain.command.convertor.ProjectTaskScoreInfoCoConvertor;
|
||||
import com.zcloud.domain.domain.config.MessageConfig;
|
||||
import com.zcloud.domain.domain.enums.CommonFlagEnum;
|
||||
import com.zcloud.domain.domain.enums.ProjectTaskExecuteStatusEnum;
|
||||
import com.zcloud.domain.domain.gateway.ProjectTaskGateway;
|
||||
|
|
@ -59,6 +60,7 @@ public class ProjectTaskUpdateExe {
|
|||
private final DomainGroupRepository domainGroupRepository;
|
||||
@DubboReference
|
||||
private MessageFacade messageFacade;
|
||||
private MessageConfig messageConfig;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(ProjectTaskUpdateCmd projectTaskUpdateCmd) {
|
||||
|
|
@ -186,7 +188,7 @@ public class ProjectTaskUpdateExe {
|
|||
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
|
||||
messageTargetCmd.setUserId(projectTaskScoreInfoDO.getUserId());
|
||||
messageSendCmd.setTargetCmd(messageTargetCmd);
|
||||
messageSendCmd.setSourceCode("MS000106");
|
||||
messageSendCmd.setSourceCode(messageConfig.getScorePending());
|
||||
messageSendCmd.setNeedTokenEnum(false);
|
||||
Map<String, Object> sendParams = new HashMap<String, Object>();
|
||||
sendParams.put("SpecialLaskForceName", infoByGroupId.getDomainGroupName());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.domain.domain.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Configuration
|
||||
@RefreshScope
|
||||
@ConfigurationProperties(prefix = "message.code")
|
||||
public class MessageConfig {
|
||||
/**
|
||||
* 课题任务待分配
|
||||
*/
|
||||
private String taskAssign;
|
||||
|
||||
/**
|
||||
* 专项任务评分结果
|
||||
*/
|
||||
private String scoreResult;
|
||||
|
||||
/**
|
||||
* 任务课题评分待处理
|
||||
*/
|
||||
private String scorePending;
|
||||
|
||||
/**
|
||||
* 评分任务待分配
|
||||
*/
|
||||
private String scoreTaskAssign;
|
||||
}
|
||||
Loading…
Reference in New Issue