Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
jz-dmp-service
Commits
b7f8dfec
Commit
b7f8dfec
authored
Feb 18, 2021
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突解决
parent
52021917
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
499 additions
and
25 deletions
+499
-25
DmpDevelopTaskService.java
...ava/com/jz/dmp/modules/service/DmpDevelopTaskService.java
+74
-3
FlowService.java
src/main/java/com/jz/dmp/modules/service/FlowService.java
+12
-0
DmpDevelopTaskHistoryServiceImpl.java
...odules/service/impl/DmpDevelopTaskHistoryServiceImpl.java
+0
-6
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+366
-15
DmpNavigationTreeServiceImpl.java
...mp/modules/service/impl/DmpNavigationTreeServiceImpl.java
+8
-1
FlowServiceImpl.java
...java/com/jz/dmp/modules/service/impl/FlowServiceImpl.java
+39
-0
No files found.
src/main/java/com/jz/dmp/modules/service/DmpDevelopTaskService.java
View file @
b7f8dfec
...
...
@@ -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
src/main/java/com/jz/dmp/modules/service/FlowService.java
View file @
b7f8dfec
...
...
@@ -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
;
}
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskHistoryServiceImpl.java
View file @
b7f8dfec
...
...
@@ -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
);
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
b7f8dfec
This diff is collapsed.
Click to expand it.
src/main/java/com/jz/dmp/modules/service/impl/DmpNavigationTreeServiceImpl.java
View file @
b7f8dfec
...
...
@@ -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
;
}
...
...
src/main/java/com/jz/dmp/modules/service/impl/FlowServiceImpl.java
View file @
b7f8dfec
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
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment