update 优化工作流常量使用

This commit is contained in:
疯狂的狮子Li
2025-09-26 11:27:19 +08:00
parent c87601ce39
commit 63f1deddc3
2 changed files with 7 additions and 2 deletions

View File

@@ -487,9 +487,9 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
Map<String, Object> variable = new HashMap<>();
// 消息类型
variable.put("messageType", messageType);
variable.put(FlowConstant.MESSAGE_TYPE, messageType);
// 消息通知
variable.put("notice", notice);
variable.put(FlowConstant.MESSAGE_NOTICE, notice);
FlowParams flowParams = FlowParams.build()
.nodeCode(bo.getNodeCode())

View File

@@ -23,6 +23,7 @@ import org.dromara.workflow.api.event.ProcessDeleteEvent;
import org.dromara.workflow.api.event.ProcessEvent;
import org.dromara.workflow.api.event.ProcessTaskEvent;
import org.dromara.workflow.common.ConditionalOnEnable;
import org.dromara.workflow.common.constant.FlowConstant;
import org.dromara.workflow.domain.TestLeave;
import org.dromara.workflow.domain.bo.TestLeaveBo;
import org.dromara.workflow.domain.vo.TestLeaveVo;
@@ -195,6 +196,10 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
String message = Convert.toStr(params.get("message"));
}
if (processEvent.getSubmit()) {
if (StringUtils.isBlank(testLeave.getApplyCode())) {
String businessCode = MapUtil.getStr(params, FlowConstant.BUSINESS_CODE, StrUtil.EMPTY);
testLeave.setApplyCode(businessCode);
}
testLeave.setStatus(BusinessStatusEnum.WAITING.getStatus());
}
baseMapper.updateById(testLeave);