Commit 7b6cc6a6 authored by sml's avatar sml

冲突处理

parent 25fad8a5
...@@ -21,6 +21,7 @@ import java.util.HashMap; ...@@ -21,6 +21,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.jz.dmp.cmdexectool.scheduler.common.task.sync.SyncParameters;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -161,15 +162,15 @@ public class ProcessService { ...@@ -161,15 +162,15 @@ public class ProcessService {
String taskType = dmpDevelopTaskDto.getTaskType();//任务类型 String taskType = dmpDevelopTaskDto.getTaskType();//任务类型
if (taskType.equals(CommConstant.TASK_TYPE_DEVSHELL)) { if (taskType.equals(CommConstant.TASK_TYPE_DEVSHELL)) {
jobType = JobType.SHELL; jobType = JobType.shell;
script = dmpDevelopTaskDto.getScript(); script = dmpDevelopTaskDto.getScript();
taskAppId = dmpDevelopTaskDto.getName(); taskAppId = dmpDevelopTaskDto.getName();
}else if (taskType.equals(CommConstant.TASK_TYPE_DEVSQL)) { }else if (taskType.equals(CommConstant.TASK_TYPE_DEVSQL)) {
jobType = JobType.SQL; jobType = JobType.sql;
script = dmpDevelopTaskDto.getScript(); script = dmpDevelopTaskDto.getScript();
taskAppId = dmpDevelopTaskDto.getName(); taskAppId = dmpDevelopTaskDto.getName();
}else if (taskType.equals(CommConstant.TASK_TYPE_OFFLINE)) { }else if (taskType.equals(CommConstant.TASK_TYPE_OFFLINE)) {
jobType = JobType.SYNC; jobType = JobType.sync;
script = dmpDevelopTaskDto.getScript(); script = dmpDevelopTaskDto.getScript();
taskAppId = dmpDevelopTaskDto.getName(); taskAppId = dmpDevelopTaskDto.getName();
}else if (taskType.equals(CommConstant.TASK_TYPE_DEVELOP)) { }else if (taskType.equals(CommConstant.TASK_TYPE_DEVELOP)) {
...@@ -189,45 +190,46 @@ public class ProcessService { ...@@ -189,45 +190,46 @@ public class ProcessService {
} }
switch (jobType) { switch (jobType) {
case SHELL: case shell:
ShellParameters shellParameters = new ShellParameters(); ShellParameters shellParameters = new ShellParameters();
shellParameters.setScript(script); shellParameters.setScript(script);
shellParameters.setTaskAppId(taskAppId); shellParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(shellParameters, projectConfigInfoDto); taskExecutionContext = new TaskExecutionContext(shellParameters, projectConfigInfoDto);
break; break;
case SQL: case sql:
SqlParameters sqlParameters = new SqlParameters(script, projectConfigInfoDto, dmpSyncingDatasourceDao, freeMarkerConfigurer); SqlParameters sqlParameters = new SqlParameters(script, projectConfigInfoDto, dmpSyncingDatasourceDao, freeMarkerConfigurer);
sqlParameters.setTaskAppId(taskAppId); sqlParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(sqlParameters, projectConfigInfoDto); taskExecutionContext = new TaskExecutionContext(sqlParameters, projectConfigInfoDto);
break; break;
case SYNC: case sync:
SyncParameters sync = new SyncParameters(script, projectConfigInfoDto, dmpSyncingDatasourceDao, freeMarkerConfigurer);
sync.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(sync, projectConfigInfoDto);
break; break;
case SUBPROCESS: case subprocess:
break; break;
case FTP: case ftp:
FtpParameters ftpParameters = new FtpParameters(); FtpParameters ftpParameters = new FtpParameters(script, freeMarkerConfigurer);
ftpParameters.setScript(script);
ftpParameters.setTaskAppId(taskAppId); ftpParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(ftpParameters, projectConfigInfoDto); taskExecutionContext = new TaskExecutionContext(ftpParameters, projectConfigInfoDto);
break; break;
case UNZIPFILE: case unzipFile:
UnzipfileParameters unzipfileParameters = new UnzipfileParameters(); UnzipfileParameters unzipfileParameters = new UnzipfileParameters(script, freeMarkerConfigurer);
unzipfileParameters.setScript(script); unzipfileParameters.setScript(script);
unzipfileParameters.setTaskAppId(taskAppId); unzipfileParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(unzipfileParameters, projectConfigInfoDto); taskExecutionContext = new TaskExecutionContext(unzipfileParameters, projectConfigInfoDto);
break; break;
case DOCTRANS: case docTrans:
DoctransParameters doctransParameters = new DoctransParameters(); DoctransParameters doctransParameters = new DoctransParameters(script, freeMarkerConfigurer);
doctransParameters.setScript(script); doctransParameters.setScript(script);
doctransParameters.setTaskAppId(taskAppId); doctransParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(doctransParameters, projectConfigInfoDto); taskExecutionContext = new TaskExecutionContext(doctransParameters, projectConfigInfoDto);
break; break;
case HDFS: case hdfs:
HdfsParameters hdfsParameters = new HdfsParameters(); HdfsParameters hdfsParameters = new HdfsParameters(script, freeMarkerConfigurer);
hdfsParameters.setScript(script); hdfsParameters.setScript(script);
hdfsParameters.setTaskAppId(taskAppId); hdfsParameters.setTaskAppId(taskAppId);
taskExecutionContext = new TaskExecutionContext(hdfsParameters, projectConfigInfoDto); 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