Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into develop

# Conflicts:
#	yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/api/api.ts.vm
This commit is contained in:
YunaiV
2025-10-01 09:50:48 +08:00
599 changed files with 22350 additions and 13554 deletions

View File

@@ -28,6 +28,11 @@ public class BpmProcessInstanceStatusEvent extends ApplicationEvent {
*/
@NotNull(message = "流程实例的状态不能为空")
private Integer status;
/**
* 流程实例结束的原因
*/
private String reason;
/**
* 流程实例对应的业务标识
* 例如说,请假

View File

@@ -122,8 +122,9 @@ public interface BpmProcessInstanceConvert {
@Mapping(source = "from.id", target = "to.id", ignore = true)
void copyTo(BpmProcessDefinitionInfoDO from, @MappingTarget BpmProcessDefinitionRespVO to);
default BpmProcessInstanceStatusEvent buildProcessInstanceStatusEvent(Object source, ProcessInstance instance, Integer status) {
return new BpmProcessInstanceStatusEvent(source).setId(instance.getId()).setStatus(status)
default BpmProcessInstanceStatusEvent buildProcessInstanceStatusEvent(Object source, ProcessInstance instance,
Integer status, String reason) {
return new BpmProcessInstanceStatusEvent(source).setId(instance.getId()).setStatus(status).setReason(reason)
.setProcessDefinitionKey(instance.getProcessDefinitionKey()).setBusinessKey(instance.getBusinessKey());
}

View File

@@ -51,8 +51,8 @@ public class BpmProcessIdRedisDAO {
String noPrefix = processIdRule.getPrefix() + infix + processIdRule.getPostfix();
String key = RedisKeyConstants.BPM_PROCESS_ID + noPrefix;
Long no = stringRedisTemplate.opsForValue().increment(key);
if (StrUtil.isNotEmpty(infix)) {
// 特殊:没有前缀,则不能过期,不能每次都是从 0 开始
if (StrUtil.isEmpty(infix)) {
// 特殊:没有前缀,则不能过期,不能每次都是从 0 开始。可见 https://t.zsxq.com/MU1E2 讨论
stringRedisTemplate.expire(key, Duration.ofDays(1L));
}
return noPrefix + String.format("%0" + processIdRule.getLength() + "d", no);

View File

@@ -737,10 +737,10 @@ public class SimpleModelUtils {
BoundaryEvent boundaryEvent = null;
if (node.getDelaySetting().getDelayType().equals(BpmDelayTimerTypeEnum.FIXED_DATE_TIME.getType())) {
boundaryEvent = buildTimeoutBoundaryEvent(receiveTask, BpmBoundaryEventTypeEnum.DELAY_TIMER_TIMEOUT.getType(),
node.getDelaySetting().getDelayTime(), null, null);
null, null, node.getDelaySetting().getDelayTime());
} else if (node.getDelaySetting().getDelayType().equals(BpmDelayTimerTypeEnum.FIXED_TIME_DURATION.getType())) {
boundaryEvent = buildTimeoutBoundaryEvent(receiveTask, BpmBoundaryEventTypeEnum.DELAY_TIMER_TIMEOUT.getType(),
null, null, node.getDelaySetting().getDelayTime());
node.getDelaySetting().getDelayTime(), null, null);
} else {
throw new UnsupportedOperationException("不支持的延迟类型:" + node.getDelaySetting());
}

View File

@@ -960,7 +960,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
// 1.3.1 获取父流程实例 并标记为不通过
Execution execution = runtimeService.createExecutionQuery().executionId(instance.getSuperExecutionId()).singleResult();
ProcessInstance parentProcessInstance = getProcessInstance(execution.getProcessInstanceId());
updateProcessInstanceReject(parentProcessInstance, REJECT_CHILD_PROCESS.getReason());
updateProcessInstanceReject(parentProcessInstance, BpmReasonEnum.REJECT_CHILD_PROCESS.getReason());
// 1.3.2 结束父流程。需要在子流程结束事务提交后执行
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@@ -971,7 +971,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
if (ObjectUtil.equal(transactionStatus, TransactionSynchronization.STATUS_ROLLED_BACK)) {
return;
}
taskService.moveTaskToEnd(parentProcessInstance.getId(),REJECT_CHILD_PROCESS.getReason());
taskService.moveTaskToEnd(parentProcessInstance.getId(), BpmReasonEnum.REJECT_CHILD_PROCESS.getReason());
}
});
}
@@ -987,7 +987,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
// 3. 发送流程实例的状态事件
processInstanceEventPublisher.sendProcessInstanceResultEvent(
BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, instance, status));
BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, instance, status, reason));
// 4. 流程后置通知
if (Objects.equals(status, BpmProcessInstanceStatusEnum.APPROVE.getStatus())) {