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
4fba45b1
Commit
4fba45b1
authored
Jan 14, 2021
by
sml
Browse files
Options
Browse Files
Download
Plain Diff
冲突提交
parents
1d492b05
da644070
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
20 deletions
+95
-20
DmpDevExamplesController.java
...es/controller/dataOperation/DmpDevExamplesController.java
+60
-0
DmpDevTaskController.java
...odules/controller/dataOperation/DmpDevTaskController.java
+20
-4
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+11
-12
OfflineSynchServiceImpl.java
.../jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
+2
-2
OfflineSynchMapper.xml
src/main/resources/mapper/dmp/OfflineSynchMapper.xml
+2
-2
No files found.
src/main/java/com/jz/dmp/modules/controller/dataOperation/DmpDevExamplesController.java
0 → 100644
View file @
4fba45b1
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataOperation
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq
;
import
com.jz.dmp.modules.service.DmpDevelopTaskService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
/**
* 数据运维-数据开发实例
*
* @author Bellamy
* @since 2021-01-13 10:56:18
*/
@RestController
@RequestMapping
(
"/dataDevExamples"
)
@Api
(
tags
=
"数据运维-数据开发实例"
)
public
class
DmpDevExamplesController
{
@Autowired
private
DmpDevelopTaskService
dmpDevelopTaskService
;
/**
* 列表分页查询
*
* @return
* @author Bellamy
* @since 2021-01-05
*/
@ApiOperation
(
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
@PostMapping
(
value
=
"/listPage"
)
public
PageInfoResponse
<
DataDevTaskListDto
>
getDevTaskListPage
(
@RequestBody
@Validated
DataDevTaskListReq
req
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DataDevTaskListDto
>
pageInfo
=
new
PageInfoResponse
<
DataDevTaskListDto
>();
if
(
StringUtils
.
isEmpty
(
req
.
getProjectId
()))
{
pageInfo
.
setMessage
(
"项目id不能为空!"
);
pageInfo
.
setCode
(
ResultCode
.
PARAMS_ERROR
);
return
pageInfo
;
}
try
{
pageInfo
=
dmpDevelopTaskService
.
queryDevTaskListPage
(
req
);
}
catch
(
Exception
e
)
{
pageInfo
.
setMessage
(
"查询失败"
);
pageInfo
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
e
.
printStackTrace
();
}
return
pageInfo
;
}
}
src/main/java/com/jz/dmp/modules/controller/dataOperation/DmpDevTaskController.java
View file @
4fba45b1
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataOperation
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.RealTimeSyncListDto
;
...
...
@@ -8,14 +9,12 @@ import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq
;
import
com.jz.dmp.modules.service.DmpDevelopTaskService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -58,4 +57,21 @@ public class DmpDevTaskController {
}
return
pageInfo
;
}
/**
* 执行任务
*
* @return
* @author Bellamy
*/
@ApiOperation
(
value
=
"执行"
,
notes
=
"执行"
)
@GetMapping
(
value
=
"/runTask"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
public
JsonResult
runTaskByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"任务id不能为空!"
);
}
JsonResult
list
=
dmpDevelopTaskService
.
runTaskByTaskId
(
taskId
);
return
list
;
}
}
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
4fba45b1
...
...
@@ -764,18 +764,6 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
return
pageInfoResponse
;
}
/**
* 数据运维-执行任务
*
* @return
* @author Bellamy
*/
@Override
public
JsonResult
runTaskByTaskId
(
String
taskId
)
throws
Exception
{
return
offlineSynchService
.
taskRunNowByTaskId
(
taskId
);
}
/*
* (non-Javadoc)
*
...
...
@@ -926,4 +914,15 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/**
* 数据运维-执行任务
*
* @return
* @author Bellamy
*/
@Override
public
JsonResult
runTaskByTaskId
(
String
taskId
)
throws
Exception
{
return
offlineSynchService
.
taskRunNowByTaskId
(
taskId
);
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
View file @
4fba45b1
...
...
@@ -161,10 +161,10 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
/**
* 发布流程
*/
private
boolean
publish
(
Map
<
String
,
Object
>
map
)
{
private
boolean
publish
(
Map
<
String
,
Object
>
map
)
throws
Exception
{
String
taskId
=
map
.
get
(
"taskId"
).
toString
();
//任务id
String
projectId
=
map
.
get
(
"projectId"
).
toString
();
//项目id
String
treeName
=
map
.
get
(
"treeName"
).
toString
();
//流程名称
String
treeName
=
map
.
get
(
"treeName"
).
toString
();
//
任务
流程名称
String
azkabanExectorXmlExec
=
map
.
get
(
"azkabanExectorXmlExec"
).
toString
();
//执行数据同步任务命令
String
azkabanLocalTaskFilePath
=
map
.
get
(
"azkabanLocalTaskFilePath"
).
toString
();
//文件路径
String
azkabanMonitorUrl
=
map
.
get
(
"azkabanMonitorUrl"
).
toString
();
//AZKABAN WEB服务地址
...
...
src/main/resources/mapper/dmp/OfflineSynchMapper.xml
View file @
4fba45b1
...
...
@@ -142,9 +142,9 @@
t3.AZKABAN_LOCAL_TASK_FILE_PATH as azkabanLocalTaskFilePath,
t3.AZKABAN_MONITOR_URL as azkabanMonitorUrl
from dmp_develop_task t1
left
join dmp_navigation_tree t2 on t1.TREE_ID=t2.ID
inner
join dmp_navigation_tree t2 on t1.TREE_ID=t2.ID
left join dmp_project_system_info t3 on t2.PROJECT_ID=t3.PROJECT_ID and t3.data_status = '1'
where 1=1 and t
1
.id = #{taskId}
where 1=1 and t
2
.id = #{taskId}
</select>
<!-- 根据执行实例id查询规则执行结果表 -->
...
...
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