|
|
@ -1108,16 +1108,20 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
ProcessDefinition processDefinition = dagDataSchedule.getProcessDefinition(); |
|
|
|
ProcessDefinition processDefinition = dagDataSchedule.getProcessDefinition(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// generate import processDefinitionName
|
|
|
|
|
|
|
|
String processDefinitionName = recursionProcessDefinitionName(projectCode, processDefinition.getName(), 1); |
|
|
|
|
|
|
|
String importProcessDefinitionName = processDefinitionName + "_import_" + DateUtils.getCurrentTimeStamp(); |
|
|
|
|
|
|
|
|
|
|
|
//unique check
|
|
|
|
//unique check
|
|
|
|
Map<String, Object> checkResult = verifyProcessDefinitionName(loginUser, projectCode, processDefinition.getName()); |
|
|
|
Map<String, Object> checkResult = verifyProcessDefinitionName(loginUser, projectCode, importProcessDefinitionName); |
|
|
|
if (Status.SUCCESS.equals(checkResult.get(Constants.STATUS))) { |
|
|
|
if (Status.SUCCESS.equals(checkResult.get(Constants.STATUS))) { |
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
result.putAll(checkResult); |
|
|
|
result.putAll(checkResult); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
String processDefinitionName = recursionProcessDefinitionName(projectCode, processDefinition.getName(), 1); |
|
|
|
processDefinition.setName(importProcessDefinitionName); |
|
|
|
processDefinition.setName(processDefinitionName + "_import_" + DateUtils.getCurrentTimeStamp()); |
|
|
|
|
|
|
|
processDefinition.setId(0); |
|
|
|
processDefinition.setId(0); |
|
|
|
processDefinition.setProjectCode(projectCode); |
|
|
|
processDefinition.setProjectCode(projectCode); |
|
|
|
processDefinition.setUserId(loginUser.getId()); |
|
|
|
processDefinition.setUserId(loginUser.getId()); |
|
|
|