|
@ -14,6 +14,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
|
|
|
import org.dromara.business.api.RemoteBusinessAlertService; |
|
|
|
|
|
import org.dromara.business.api.domain.vo.RemoteBusinessAlertVo; |
|
|
import org.dromara.common.core.enums.BusinessStatusEnum; |
|
|
import org.dromara.common.core.enums.BusinessStatusEnum; |
|
|
import org.dromara.common.core.exception.ServiceException; |
|
|
import org.dromara.common.core.exception.ServiceException; |
|
|
import org.dromara.common.core.utils.SpringUtils; |
|
|
import org.dromara.common.core.utils.SpringUtils; |
|
@ -25,6 +27,7 @@ import org.dromara.common.core.validate.EditGroup; |
|
|
import org.dromara.common.mybatis.core.page.PageQuery; |
|
|
import org.dromara.common.mybatis.core.page.PageQuery; |
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
|
|
|
import org.dromara.system.api.RemoteSubmailConfigService; |
|
|
import org.dromara.system.api.RemoteUserService; |
|
|
import org.dromara.system.api.RemoteUserService; |
|
|
import org.dromara.system.api.domain.vo.RemoteUserVo; |
|
|
import org.dromara.system.api.domain.vo.RemoteUserVo; |
|
|
import org.dromara.warm.flow.core.dto.FlowParams; |
|
|
import org.dromara.warm.flow.core.dto.FlowParams; |
|
@ -98,6 +101,12 @@ public class FlwTaskServiceImpl implements IFlwTaskService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private ApplicationContext applicationContext; |
|
|
private ApplicationContext applicationContext; |
|
|
|
|
|
|
|
|
|
|
|
@DubboReference(timeout = 30000) |
|
|
|
|
|
private RemoteSubmailConfigService remoteSubmailConfigService; |
|
|
|
|
|
|
|
|
|
|
|
@DubboReference |
|
|
|
|
|
private RemoteBusinessAlertService remoteBusinessAlertService; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 启动任务 |
|
|
* 启动任务 |
|
|
* |
|
|
* |
|
@ -213,10 +222,29 @@ public class FlwTaskServiceImpl implements IFlwTaskService { |
|
|
this.setHandler(instance, flowTask, flowCopyList); |
|
|
this.setHandler(instance, flowTask, flowCopyList); |
|
|
// 消息通知
|
|
|
// 消息通知
|
|
|
try { |
|
|
try { |
|
|
flwCommonService.sendMessage(definition.getFlowName(), ins.getId(), messageType, notice); |
|
|
//根据业务id查找他是属于哪一个部门的
|
|
|
|
|
|
RemoteBusinessAlertVo remoteBusinessAlertVo = remoteBusinessAlertService.getAlertInfo(ins.getBusinessId()); |
|
|
|
|
|
|
|
|
|
|
|
//构建推送信息
|
|
|
|
|
|
Map<String,Object> noticeMap = new HashMap<>(); |
|
|
|
|
|
noticeMap.put("deptId",remoteBusinessAlertVo.getDeptId()); |
|
|
|
|
|
noticeMap.put("deptName",remoteBusinessAlertVo.getDeptName()); |
|
|
|
|
|
noticeMap.put("labelCn",remoteBusinessAlertVo.getLabelCn()); |
|
|
|
|
|
noticeMap.put("labelEn",remoteBusinessAlertVo.getLabelEn()); |
|
|
|
|
|
noticeMap.put("jobName",remoteBusinessAlertVo.getJobName()); |
|
|
|
|
|
|
|
|
|
|
|
//发送短信是否属于指派
|
|
|
|
|
|
if(completeTaskBo.getAssign()){ |
|
|
|
|
|
|
|
|
|
|
|
remoteSubmailConfigService.remoteSendUser("smsMultixsend",List.of(Long.valueOf(completeTaskBo.getHandler())),noticeMap); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error(e.getMessage(), e); |
|
|
log.error(e.getMessage(), e); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//设置下一环节处理人
|
|
|
//设置下一环节处理人
|
|
|
setNextHandler(ins.getId()); |
|
|
setNextHandler(ins.getId()); |
|
|
return String.valueOf(ins.getId()); |
|
|
return String.valueOf(ins.getId()); |
|
|