Commit b7f8dfec authored by sml's avatar sml

冲突解决

parent 52021917
......@@ -78,18 +78,34 @@ public interface DmpDevelopTaskService {
* @throws Exception
*/
public BaseBeanResponse<DmpDevelopTask> add(DmpDevelopTask dmpDevelopTask, HttpServletRequest httpRequest)throws Exception;
/**树ID查询任务开发
* @param treeId
* @param httpRequest
* @return
* @throws Exception
*/
public BaseBeanResponse<DmpDevelopTaskDto> findByTreeId(Integer treeId, HttpServletRequest httpRequest)throws Exception;
/**修改任务开发
* @param dmpDevelopTask
* @param httpRequest
* @return
* @throws Exception
*/
public BaseBeanResponse<DmpDevelopTask> edit(DmpDevelopTask dmpDevelopTask, HttpServletRequest httpRequest)throws Exception;
/**
* @Title: flowSubmit
* @Description: TODO(工作任务流保存提交)
* @param @param flowPro
* @Description: TODO(任务流程发布到azkaban)
* @param @param treeId
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public BaseResponse flowSubmit(DmpDevelopTask dmpDevelopTask, HttpServletRequest httpRequest)throws Exception;
public BaseResponse flowSubmit(Long treeId, HttpServletRequest httpRequest)throws Exception;
/**
* @Title: getExecXmlFileName
......@@ -102,5 +118,60 @@ public interface DmpDevelopTaskService {
*/
public String getExecXmlFileName(Long syncTaskTreeId)throws Exception;
/**
* @Title: taskAzkabanRun
* @Description: TODO(运行任务)
* @param @param treeId
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public BaseResponse taskAzkabanRun(Long treeId, HttpServletRequest httpRequest)throws Exception;
/**
* @Title: taskAzkabanStop
* @Description: TODO(停止任务)
* @param @param treeId
* @param @param httpRequest
* @param @return 参数
* @return BaseBeanResponse<String> 返回类型
* @throws
*/
public BaseBeanResponse<String> taskAzkabanStop(Long treeId, HttpServletRequest httpRequest)throws Exception;
/**
* @Title: taskPublish
* @Description: TODO(SHELL/SQL发布接口)
* @param @param treeId
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public BaseResponse taskPublish(Long treeId, HttpServletRequest httpRequest)throws Exception;
/**
* @Title: softDeleteByTreeId
* @Description: TODO(软删除任务)
* @param @param treeId
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public BaseResponse softDeleteByTreeId(Integer treeId, HttpServletRequest httpRequest)throws Exception;
/**
* 获取执行实例的日志详情
*
* @return
* @author Bellamy
* @since 2021-02-03
*/
JsonResult queryExamplesLogByExecId(String execId) throws Exception;
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.jz.dmp.modules.service;
import com.jz.common.bean.BaseResponse;
import com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro;
import com.jz.dmp.modules.model.DmpDevelopTask;
/**
* @ClassName: FlowService
......@@ -22,5 +23,16 @@ public interface FlowService {
* @throws
*/
public BaseResponse publishFlow(FlowPro flowPro)throws Exception;
/**
* @Title: deleteAzkabanFlow
* @Description: TODO(删除azkanba的任务)
* @param @param developTask
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public BaseResponse deleteAzkabanFlow(DmpDevelopTask developTask) throws Exception;
}
......@@ -354,12 +354,6 @@ public class DmpDevelopTaskHistoryServiceImpl extends BaseService implements Dmp
// 创建时间
dmpDevelopTaskHistory.setCreateTime(new Date());
//版本设置
//获取已存在版本
String maxVersion = dmpDevelopTaskHistoryMapper.getMaxVersionByTaskId(dmpDevelopTaskHistory.getTaskId());
String version = CodeGeneratorUtils.generatorNextTaskVesion(maxVersion);
dmpDevelopTaskHistory.setVersion(version);
dmpDevelopTaskHistoryMapper.insertSelective(dmpDevelopTaskHistory);
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
......
......@@ -75,7 +75,14 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi
dmpNavigationTree.setCreateUserId(getHttpRequestUserId(null).toString());
// 创建时间
dmpNavigationTree.setCreateTime(new Date());
dmpNavigationTree.setIsLevel("0");
//dmpNavigationTree.setIsLevel("0");
DmpNavigationTree dmpNavigationTreeParam = new DmpNavigationTree();
//查询未删除数据
dmpNavigationTreeParam.setDataStatus("1");
List<DmpNavigationTree> list = dmpNavigationTreeDao.queryAll(dmpNavigationTreeParam);
this.dmpNavigationTreeDao.insertSelective(dmpNavigationTree);
return dmpNavigationTree;
}
......
package com.jz.dmp.modules.service.impl;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import com.google.common.io.BaseEncoding;
import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse;
import com.jz.common.constant.CommConstant;
import com.jz.common.constant.StatuConstant;
import com.jz.common.utils.AzkabanApiUtils2;
import com.jz.common.utils.FlowParseTool;
import com.jz.common.utils.GZIPUtils;
import com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowNodeChangeInfo;
......@@ -19,6 +25,7 @@ import com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto;
import com.jz.dmp.modules.dao.DmpProjectDao;
import com.jz.dmp.modules.dao.DmpWorkFlowSubmitDetailsDao;
import com.jz.dmp.modules.dao.projconfig.DmpProjectConfigInfoMapper;
import com.jz.dmp.modules.model.DmpDevelopTask;
import com.jz.dmp.modules.model.DmpProject;
import com.jz.dmp.modules.model.DmpProjectSystemInfo;
import com.jz.dmp.modules.model.DmpWorkFlowSubmitDetails;
......@@ -59,6 +66,9 @@ public class FlowServiceImpl implements FlowService {
@Autowired
private DmpProjectConfigInfoService dmpProjectConfigInfoService;
@Autowired
private DmpProjectConfigInfoMapper dmpProjectConfigInfoMapper;
@Autowired
private RedisTemplate redisTemplate;
......@@ -141,4 +151,33 @@ public class FlowServiceImpl implements FlowService {
return baseResponse;
}
/**
*删除azkaban任务
*/
@Override
public BaseResponse deleteAzkabanFlow(DmpDevelopTask developTask) throws Exception {
BaseResponse baseResponse = new BaseResponse();
Integer projectId = developTask.getProjectId();
//获取项目配置信息
Map<String, Object> param = new HashMap<String, Object>();
param.put("projectId", projectId);
List<DmpProjectConfigInfoDto> list = dmpProjectConfigInfoMapper.findList(param);
if (CollectionUtils.isEmpty(list)) {
baseResponse.setCode(StatuConstant.FAILURE_CODE);
baseResponse.setMessage("项目没有设置配置信息,请联系管理员!");
return baseResponse;
}
DmpProjectConfigInfoDto dmpProjectConfigInfoDto = list.get(0);
String azkabanMonitorUrl = dmpProjectConfigInfoDto.getDmpPublicConfigInfoDto().getAzkabanMonitorUrl();//AZKABAN WEB服务地址
AzkabanApiUtils2 azkabanApiUtils = new AzkabanApiUtils2(azkabanMonitorUrl, redisTemplate);
azkabanApiUtils.deleteAzkabanFlow(CommConstant.AZKABAN_PROJECTNAME_PREFIX+projectId, developTask.getName());
baseResponse.setCode(StatuConstant.SUCCESS_CODE);
baseResponse.setMessage("删除成功");
return baseResponse;
}
}
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