Compare commits
No commits in common. "18febcd7afef337a5554911df215d7a70144dbc0" and "8921ce76dda7999fc7a199d03507e0ceccec692f" have entirely different histories.
18febcd7af
...
8921ce76dd
|
|
@ -38,4 +38,3 @@ build/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/start/src/main/resources/templates/
|
/start/src/main/resources/templates/
|
||||||
/start/src/main/resources/nacos/
|
/start/src/main/resources/nacos/
|
||||||
/.idea/
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# Ignored default folder with query files
|
|
||||||
/queries/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,13 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding">
|
|
||||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/start/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/web-adapter/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/web-app/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/web-client/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/web-domain/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/web-infrastructure/src/main/java" charset="UTF-8" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
||||||
<component name="MavenProjectsManager">
|
|
||||||
<option name="originalFiles">
|
|
||||||
<list>
|
|
||||||
<option value="$PROJECT_DIR$/pom.xml" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -49,9 +49,3 @@ openapi:
|
||||||
apiCode: test:01
|
apiCode: test:01
|
||||||
#多个可以逗号隔开,可以为空
|
#多个可以逗号隔开,可以为空
|
||||||
tenantIds: 1838408702262321152
|
tenantIds: 1838408702262321152
|
||||||
message:
|
|
||||||
code:
|
|
||||||
list-check-taskLogTemplate: MS000127
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,11 @@ import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.cola.dto.SingleResponse;
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
import com.alibaba.cola.exception.BizException;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
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.eightwork.command.convertor.TaskLogConvertUtil;
|
import com.zcloud.eightwork.command.convertor.TaskLogConvertUtil;
|
||||||
import com.zcloud.eightwork.domain.config.MessageConfig;
|
|
||||||
import com.zcloud.eightwork.domain.gateway.EightworkSupplementaryInfoGateway;
|
import com.zcloud.eightwork.domain.gateway.EightworkSupplementaryInfoGateway;
|
||||||
import com.zcloud.eightwork.domain.gateway.TaskFlowGateway;
|
import com.zcloud.eightwork.domain.gateway.TaskFlowGateway;
|
||||||
import com.zcloud.eightwork.domain.gateway.TaskLogGateway;
|
import com.zcloud.eightwork.domain.gateway.TaskLogGateway;
|
||||||
|
|
@ -36,17 +31,17 @@ import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
|
||||||
import com.zcloud.gbscommon.todolistmq.event.TodoListCompleteEvent;
|
import com.zcloud.gbscommon.todolistmq.event.TodoListCompleteEvent;
|
||||||
import com.zcloud.gbscommon.todolistmq.event.TodoListDeleteByForeignEvent;
|
import com.zcloud.gbscommon.todolistmq.event.TodoListDeleteByForeignEvent;
|
||||||
import com.zcloud.gbscommon.utils.Tools;
|
import com.zcloud.gbscommon.utils.Tools;
|
||||||
import com.zcloud.gbscommon.utils.UuidUtil;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
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.ArrayList;
|
||||||
import java.util.*;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -117,9 +112,7 @@ public class TaskLogUpdateExe {
|
||||||
private final EightworkSupplementaryInfoGateway eightworkSupplementaryInfoGateway;
|
private final EightworkSupplementaryInfoGateway eightworkSupplementaryInfoGateway;
|
||||||
private final EightworkSupplementaryInfoRepository eightworkSupplementaryInfoRepository;
|
private final EightworkSupplementaryInfoRepository eightworkSupplementaryInfoRepository;
|
||||||
private final EightworkSupplementaryInfoArchiveRepository eightworkSupplementaryInfoArchiveRepository;
|
private final EightworkSupplementaryInfoArchiveRepository eightworkSupplementaryInfoArchiveRepository;
|
||||||
@DubboReference
|
|
||||||
private MessageFacade messageFacade;
|
|
||||||
private MessageConfig messageConfig;
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void execute(TaskLogUpdateCmd taskLogUpdateCmd) {
|
public void execute(TaskLogUpdateCmd taskLogUpdateCmd) {
|
||||||
TaskLogE taskLogE = new TaskLogE();
|
TaskLogE taskLogE = new TaskLogE();
|
||||||
|
|
@ -666,7 +659,6 @@ public class TaskLogUpdateExe {
|
||||||
// 发送待办通知
|
// 发送待办通知
|
||||||
sendTodoAddEvent(workId, next, currentLog.getWorkType());
|
sendTodoAddEvent(workId, next, currentLog.getWorkType());
|
||||||
|
|
||||||
messageNotice(next.getActUser(),next, currentLog);
|
|
||||||
log.info("已激活下一步: {}", next.getStepName());
|
log.info("已激活下一步: {}", next.getStepName());
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1104,7 +1096,6 @@ public class TaskLogUpdateExe {
|
||||||
branchStep.setStatus(TaskLogStatus.IN_PROGRESS.getCode());
|
branchStep.setStatus(TaskLogStatus.IN_PROGRESS.getCode());
|
||||||
addActionLog(actionLogs, branchStep);
|
addActionLog(actionLogs, branchStep);
|
||||||
sendTodoAddEvent(getWorkId(currentLog.getWorkId()), branchStep, currentLog.getWorkType());
|
sendTodoAddEvent(getWorkId(currentLog.getWorkId()), branchStep, currentLog.getWorkType());
|
||||||
messageNotice(getWorkId(currentLog.getWorkId()),branchStep, currentLog);
|
|
||||||
log.info("已激活分支步骤: stepName={}, mergeTo={}", branchStep.getStepName(), branchStep.getBranchMergeStep());
|
log.info("已激活分支步骤: stepName={}, mergeTo={}", branchStep.getStepName(), branchStep.getBranchMergeStep());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1301,34 +1292,6 @@ public class TaskLogUpdateExe {
|
||||||
log.error("发送待办新增事件失败: stepId={}", nextStep.getId(), e);
|
log.error("发送待办新增事件失败: stepId={}", nextStep.getId(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void messageNotice(Long userId,TaskLogE nextStep, TaskLogE currentLog) {
|
|
||||||
//消息通知
|
|
||||||
try{
|
|
||||||
MessageSendCmd messageSendCmd = new MessageSendCmd();
|
|
||||||
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
|
|
||||||
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
|
|
||||||
messageTargetCmd.setUserId(userId);
|
|
||||||
messageSendCmd.setTargetCmd(messageTargetCmd);
|
|
||||||
messageSendCmd.setSourceCode(messageConfig.getTaskLogTemplate());
|
|
||||||
messageSendCmd.setNeedTokenEnum(false);
|
|
||||||
|
|
||||||
EightworkInfoDO eightworkInfoDO = getEightworkInfoDO(currentLog.getWorkId());
|
|
||||||
Map<String, Object> sendParams = new HashMap<String, Object>();
|
|
||||||
sendParams.put("approvalStatus", TaskLogStatus.getByCode(nextStep.getStatus()).getDesc());
|
|
||||||
sendParams.put("workType", WorkCodeEnum.getNameByWorkType(currentLog.getWorkType()));
|
|
||||||
sendParams.put("checkNo",eightworkInfoDO.getCheckNo());
|
|
||||||
sendParams.put("stepName", nextStep.getStepName());
|
|
||||||
|
|
||||||
messageSendCmd.setParams(sendParams);
|
|
||||||
|
|
||||||
log.info("消息提醒发送消息参数:messageSendCmd: {}", JSONUtil.toJsonStr(messageSendCmd));
|
|
||||||
SingleResponse<Boolean> d = messageFacade.send(messageSendCmd);
|
|
||||||
log.info("消息提醒发送消息结果:d: {}", JSONUtil.toJsonStr(d));
|
|
||||||
|
|
||||||
}catch (Exception e) {
|
|
||||||
log.error("消息提醒发送消息异常:", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除待办事件
|
* 删除待办事件
|
||||||
|
|
@ -1353,13 +1316,6 @@ public class TaskLogUpdateExe {
|
||||||
.eq(EightworkInfoDO::getWorkId, workId)
|
.eq(EightworkInfoDO::getWorkId, workId)
|
||||||
).getId();
|
).getId();
|
||||||
}
|
}
|
||||||
private EightworkInfoDO getEightworkInfoDO(String workId) {
|
|
||||||
return eightworkInfoRepository.getOne(
|
|
||||||
new LambdaQueryWrapper<EightworkInfoDO>()
|
|
||||||
.select(EightworkInfoDO::getId)
|
|
||||||
.eq(EightworkInfoDO::getWorkId, workId)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 智能添加步骤到待更新列表
|
* 智能添加步骤到待更新列表
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
package com.zcloud.eightwork.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;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Configuration
|
|
||||||
@RefreshScope
|
|
||||||
@ConfigurationProperties(prefix = "message.code")
|
|
||||||
public class MessageConfig {
|
|
||||||
/**
|
|
||||||
* 模板
|
|
||||||
*/
|
|
||||||
private String taskLogTemplate;
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue