消息待办
parent
5ec6822f64
commit
824f448f4f
|
|
@ -49,3 +49,10 @@ openapi:
|
||||||
apiCode: test:01
|
apiCode: test:01
|
||||||
#多个可以逗号隔开,可以为空
|
#多个可以逗号隔开,可以为空
|
||||||
tenantIds: 1838408702262321152
|
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
|
apiCode: test:01
|
||||||
#多个可以逗号隔开,可以为空
|
#多个可以逗号隔开,可以为空
|
||||||
tenantIds: 1838408702262321152
|
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.ProjectTaskGroupUserCoConvertor;
|
||||||
import com.zcloud.domain.command.convertor.ProjectTaskInfoCoConvertor;
|
import com.zcloud.domain.command.convertor.ProjectTaskInfoCoConvertor;
|
||||||
import com.zcloud.domain.command.convertor.ProjectTaskScoreInfoCoConvertor;
|
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.CommonFlagEnum;
|
||||||
import com.zcloud.domain.domain.enums.ProjectTaskExecuteStatusEnum;
|
import com.zcloud.domain.domain.enums.ProjectTaskExecuteStatusEnum;
|
||||||
import com.zcloud.domain.domain.gateway.ProjectTaskGateway;
|
import com.zcloud.domain.domain.gateway.ProjectTaskGateway;
|
||||||
|
|
@ -33,6 +34,7 @@ import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -59,6 +61,8 @@ public class ProjectTaskAddExe {
|
||||||
private final CorpInfoRepository corpInfoRepository;
|
private final CorpInfoRepository corpInfoRepository;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
private MessageFacade messageFacade;
|
private MessageFacade messageFacade;
|
||||||
|
@Resource
|
||||||
|
private MessageConfig messageConfig;
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean execute(ProjectTaskAddCmd cmd) {
|
public boolean execute(ProjectTaskAddCmd cmd) {
|
||||||
ProjectTaskE projectTaskE = new ProjectTaskE();
|
ProjectTaskE projectTaskE = new ProjectTaskE();
|
||||||
|
|
@ -131,9 +135,9 @@ public class ProjectTaskAddExe {
|
||||||
//通知department
|
//通知department
|
||||||
String domainDepartmentId = projectTaskE.getDomainDepartmentId();
|
String domainDepartmentId = projectTaskE.getDomainDepartmentId();
|
||||||
DomainDepartmentDO infoByUUID = domainDepartmentRepository.getInfoByUUID(domainDepartmentId);
|
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)) {
|
} else if (CollUtil.isEmpty(projectTaskGroupUserAddCmdList) && CollUtil.isNotEmpty(projectTaskScoreInfoAddCmdList)) {
|
||||||
|
|
@ -146,8 +150,8 @@ public class ProjectTaskAddExe {
|
||||||
|
|
||||||
Map<String, Object> sendParams = new HashMap<String, Object>();
|
Map<String, Object> sendParams = new HashMap<String, Object>();
|
||||||
sendParams.put("DomainDepartment", infoByUUID.getMasterDepartmentName());
|
sendParams.put("DomainDepartment", infoByUUID.getMasterDepartmentName());
|
||||||
messageNotice(info.getTeamUserId(),"MS000108",projectTaskE.getId(),sendParams);
|
messageNotice(info.getTeamUserId(),messageConfig.getTaskAssign(),projectTaskE.getId(),sendParams);
|
||||||
messageNotice(info.getCorpinfoId(),"MS000108",projectTaskE.getId(),sendParams);
|
messageNotice(info.getCorpinfoId(),messageConfig.getTaskAssign(),projectTaskE.getId(),sendParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
projectTaskGateway.update(projectTaskE);
|
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.facede.MessageFacade;
|
||||||
import com.jjb.saas.message.client.message.request.MessageSendCmd;
|
import com.jjb.saas.message.client.message.request.MessageSendCmd;
|
||||||
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
|
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.CommonFlagEnum;
|
||||||
import com.zcloud.domain.domain.enums.ScoreStatusEnum;
|
import com.zcloud.domain.domain.enums.ScoreStatusEnum;
|
||||||
import com.zcloud.domain.domain.gateway.ProjectTaskScoreInfoGateway;
|
import com.zcloud.domain.domain.gateway.ProjectTaskScoreInfoGateway;
|
||||||
|
|
@ -30,6 +31,7 @@ import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -56,6 +58,8 @@ public class ProjectTaskScoreInfoUpdateExe {
|
||||||
private final MessageFacade messageFacade;
|
private final MessageFacade messageFacade;
|
||||||
private final TodoListEventPusherUtil todoListEventPusherUtil;
|
private final TodoListEventPusherUtil todoListEventPusherUtil;
|
||||||
private final DomainGroupRepository domainGroupRepository;
|
private final DomainGroupRepository domainGroupRepository;
|
||||||
|
@Resource
|
||||||
|
private MessageConfig messageConfig;
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void execute(ProjectTaskScoreInfoUpdateCmd projectTaskScoreInfoUpdateCmd) {
|
public void execute(ProjectTaskScoreInfoUpdateCmd projectTaskScoreInfoUpdateCmd) {
|
||||||
|
|
@ -127,7 +131,7 @@ public class ProjectTaskScoreInfoUpdateExe {
|
||||||
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
|
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
|
||||||
messageTargetCmd.setUserId(projectTaskGroupUserDO.getUserId());
|
messageTargetCmd.setUserId(projectTaskGroupUserDO.getUserId());
|
||||||
messageSendCmd.setTargetCmd(messageTargetCmd);
|
messageSendCmd.setTargetCmd(messageTargetCmd);
|
||||||
messageSendCmd.setSourceCode("MS000107");
|
messageSendCmd.setSourceCode(messageConfig.getScoreResult());
|
||||||
messageSendCmd.setNeedTokenEnum(false);
|
messageSendCmd.setNeedTokenEnum(false);
|
||||||
Map<String, Object> sendParams = new HashMap<String, Object>();
|
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.ProjectTaskGroupUserCoConvertor;
|
||||||
import com.zcloud.domain.command.convertor.ProjectTaskInfoCoConvertor;
|
import com.zcloud.domain.command.convertor.ProjectTaskInfoCoConvertor;
|
||||||
import com.zcloud.domain.command.convertor.ProjectTaskScoreInfoCoConvertor;
|
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.CommonFlagEnum;
|
||||||
import com.zcloud.domain.domain.enums.ProjectTaskExecuteStatusEnum;
|
import com.zcloud.domain.domain.enums.ProjectTaskExecuteStatusEnum;
|
||||||
import com.zcloud.domain.domain.gateway.ProjectTaskGateway;
|
import com.zcloud.domain.domain.gateway.ProjectTaskGateway;
|
||||||
|
|
@ -59,6 +60,7 @@ public class ProjectTaskUpdateExe {
|
||||||
private final DomainGroupRepository domainGroupRepository;
|
private final DomainGroupRepository domainGroupRepository;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
private MessageFacade messageFacade;
|
private MessageFacade messageFacade;
|
||||||
|
private MessageConfig messageConfig;
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void execute(ProjectTaskUpdateCmd projectTaskUpdateCmd) {
|
public void execute(ProjectTaskUpdateCmd projectTaskUpdateCmd) {
|
||||||
|
|
@ -186,7 +188,7 @@ public class ProjectTaskUpdateExe {
|
||||||
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
|
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
|
||||||
messageTargetCmd.setUserId(projectTaskScoreInfoDO.getUserId());
|
messageTargetCmd.setUserId(projectTaskScoreInfoDO.getUserId());
|
||||||
messageSendCmd.setTargetCmd(messageTargetCmd);
|
messageSendCmd.setTargetCmd(messageTargetCmd);
|
||||||
messageSendCmd.setSourceCode("MS000106");
|
messageSendCmd.setSourceCode(messageConfig.getScorePending());
|
||||||
messageSendCmd.setNeedTokenEnum(false);
|
messageSendCmd.setNeedTokenEnum(false);
|
||||||
Map<String, Object> sendParams = new HashMap<String, Object>();
|
Map<String, Object> sendParams = new HashMap<String, Object>();
|
||||||
sendParams.put("SpecialLaskForceName", infoByGroupId.getDomainGroupName());
|
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