|
|
|
@ -11,12 +11,7 @@ import apelet.common.flow.model.FlowTaskExt; |
|
|
|
import apelet.common.flow.model.FlowTaskInstanceExt; |
|
|
|
import apelet.common.flow.model.FlowTaskInstanceExt; |
|
|
|
import apelet.common.flow.model.FlowWorkOrder; |
|
|
|
import apelet.common.flow.model.FlowWorkOrder; |
|
|
|
import apelet.common.flow.model.constant.FlowBindFormType; |
|
|
|
import apelet.common.flow.model.constant.FlowBindFormType; |
|
|
|
import apelet.common.flow.service.FlowApiService; |
|
|
|
import apelet.common.flow.service.*; |
|
|
|
import apelet.common.flow.service.FlowEntryService; |
|
|
|
|
|
|
|
import apelet.common.flow.service.FlowTaskExtService; |
|
|
|
|
|
|
|
import apelet.common.flow.service.FlowTaskInstanceExtService; |
|
|
|
|
|
|
|
import apelet.common.flow.service.FlowTaskTitleBackfillService; |
|
|
|
|
|
|
|
import apelet.common.flow.service.FlowWorkOrderService; |
|
|
|
|
|
|
|
import apelet.common.flow.vo.FlowTaskTitleBackfillVo; |
|
|
|
import apelet.common.flow.vo.FlowTaskTitleBackfillVo; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.util.BooleanUtil; |
|
|
|
import cn.hutool.core.util.BooleanUtil; |
|
|
|
@ -30,11 +25,7 @@ import org.flowable.task.api.history.HistoricTaskInstance; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Collections; |
|
|
|
import java.util.*; |
|
|
|
import java.util.HashSet; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 节点标题回填服务实现。 |
|
|
|
* 节点标题回填服务实现。 |
|
|
|
@ -84,7 +75,7 @@ public class FlowTaskTitleBackfillServiceImpl implements FlowTaskTitleBackfillSe |
|
|
|
result.setDryRun(onlyCount); |
|
|
|
result.setDryRun(onlyCount); |
|
|
|
// 回填是没有登录态的运维动作,且要跨租户跑;关掉数据权限过滤,
|
|
|
|
// 回填是没有登录态的运维动作,且要跨租户跑;关掉数据权限过滤,
|
|
|
|
// 否则 getMasterData -> buildDataPermFilter -> processDataPerm 会因 TokenData 为空而 NPE。
|
|
|
|
// 否则 getMasterData -> buildDataPermFilter -> processDataPerm 会因 TokenData 为空而 NPE。
|
|
|
|
boolean dataFilterEnabled = GlobalThreadLocal.setDataFilter(false); |
|
|
|
boolean dataFilterEnabled = false; |
|
|
|
try { |
|
|
|
try { |
|
|
|
List<FlowWorkOrder> workOrderList = flowWorkOrderService.getListByWorkOrderIdAfter(cursorWorkOrderId, size); |
|
|
|
List<FlowWorkOrder> workOrderList = flowWorkOrderService.getListByWorkOrderIdAfter(cursorWorkOrderId, size); |
|
|
|
for (FlowWorkOrder workOrder : workOrderList) { |
|
|
|
for (FlowWorkOrder workOrder : workOrderList) { |
|
|
|
@ -113,8 +104,10 @@ public class FlowTaskTitleBackfillServiceImpl implements FlowTaskTitleBackfillSe |
|
|
|
if (StrUtil.isBlank(processInstanceId)) { |
|
|
|
if (StrUtil.isBlank(processInstanceId)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
FlowEntry flowEntry = StrUtil.isBlank(workOrder.getProcessDefinitionKey()) ? null |
|
|
|
if (StrUtil.isBlank(workOrder.getProcessDefinitionKey())) { |
|
|
|
: flowEntryService.getFlowEntryFromCache(workOrder.getProcessDefinitionKey()); |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
FlowEntry flowEntry = flowEntryService.getFlowEntryFromCache(workOrder.getProcessDefinitionKey(), false); |
|
|
|
// 路由表单流程本来就没有标题,跳过
|
|
|
|
// 路由表单流程本来就没有标题,跳过
|
|
|
|
if (flowEntry == null || !ObjectUtil.equal(flowEntry.getBindFormType(), FlowBindFormType.ONLINE_FORM)) { |
|
|
|
if (flowEntry == null || !ObjectUtil.equal(flowEntry.getBindFormType(), FlowBindFormType.ONLINE_FORM)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
|