feat(REQ-3340) - 调整获取打印模板的逻辑

This commit is contained in:
wangli 2025-02-13 15:38:24 +08:00
parent c6e775e365
commit 4c515355fe

View File

@ -1126,7 +1126,7 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
@Override
public boolean hasPrintTemplate(String processInstanceId, String processDefinitionId) {
return extAxReModelService.hasPrintTemplateConfig(getModelIdByProcessInstanceId(processInstanceId));
return extAxReModelService.hasPrintTemplateConfig(getModelIdByProcessDefinitionId(processInstanceId, processDefinitionId));
}
private void calcAuthorizedButtons(BpmnProcessInstanceLogVO logVO, BpmnTaskDelegateAssigner visitor) {
@ -1433,7 +1433,7 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
public String getModelIdByProcessInstanceId(String processInstanceId) {
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
.processInstanceId(processInstanceId)
.includeProcessVariables().singleResult();
.singleResult();
if (Objects.isNull(historicProcessInstance)) {
throw new WorkflowEngineException(PROCESS_INSTANCE_ID_NOT_EXISTS, processInstanceId);
}