Commit 7b6cc6a6 authored by sml's avatar sml

冲突处理

parent 25fad8a5
......@@ -21,6 +21,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.jz.dmp.cmdexectool.scheduler.common.task.sync.SyncParameters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -161,15 +162,15 @@ public class ProcessService {
String taskType = dmpDevelopTaskDto.getTaskType();//任务类型
if (taskType.equals(CommConstant.TASK_TYPE_DEVSHELL)) {
jobType = JobType.SHELL;
jobType = JobType.shell;
script = dmpDevelopTaskDto.getScript();
taskAppId = dmpDevelopTaskDto.getName();
}else if (taskType.equals(CommConstant.TASK_TYPE_DEVSQL)) {
jobType = JobType.SQL;
jobType = JobType.sql;
script = dmpDevelopTaskDto.getScript();
taskAppId = dmpDevelopTaskDto.getName();
}else if (taskType.equals(CommConstant.TASK_TYPE_OFFLINE)) {
jobType = JobType.SYNC;
jobType = JobType.sync;
script = dmpDevelopTaskDto.getScript();
taskAppId = dmpDevelopTaskDto.getName();
}else if (taskType.equals(CommConstant.TASK_TYPE_DEVELOP)) {
......@@ -189,45 +190,46 @@ public class ProcessService {
}
switch (jobType) {
case SHELL:
case shell:
ShellParameters shellParameters = new ShellParameters();
shellParameters.setScript(script);
shellParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(shellParameters, projectConfigInfoDto);
break;
case SQL:
case sql:
SqlParameters sqlParameters = new SqlParameters(script, projectConfigInfoDto, dmpSyncingDatasourceDao, freeMarkerConfigurer);
sqlParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(sqlParameters, projectConfigInfoDto);
break;
case SYNC:
case sync:
SyncParameters sync = new SyncParameters(script, projectConfigInfoDto, dmpSyncingDatasourceDao, freeMarkerConfigurer);
sync.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(sync, projectConfigInfoDto);
break;
case SUBPROCESS:
case subprocess:
break;
case FTP:
FtpParameters ftpParameters = new FtpParameters();
ftpParameters.setScript(script);
case ftp:
FtpParameters ftpParameters = new FtpParameters(script, freeMarkerConfigurer);
ftpParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(ftpParameters, projectConfigInfoDto);
break;
case UNZIPFILE:
UnzipfileParameters unzipfileParameters = new UnzipfileParameters();
case unzipFile:
UnzipfileParameters unzipfileParameters = new UnzipfileParameters(script, freeMarkerConfigurer);
unzipfileParameters.setScript(script);
unzipfileParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(unzipfileParameters, projectConfigInfoDto);
break;
case DOCTRANS:
DoctransParameters doctransParameters = new DoctransParameters();
case docTrans:
DoctransParameters doctransParameters = new DoctransParameters(script, freeMarkerConfigurer);
doctransParameters.setScript(script);
doctransParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(doctransParameters, projectConfigInfoDto);
break;
case HDFS:
HdfsParameters hdfsParameters = new HdfsParameters();
case hdfs:
HdfsParameters hdfsParameters = new HdfsParameters(script, freeMarkerConfigurer);
hdfsParameters.setScript(script);
hdfsParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(hdfsParameters, projectConfigInfoDto);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment