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
2d72b7b0
Commit
2d72b7b0
authored
Mar 11, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
20162665
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
7 deletions
+57
-7
OfflineSynchController.java
...es/controller/DataIntegration/OfflineSynchController.java
+24
-0
OfflineSynchService.java
.../java/com/jz/dmp/modules/service/OfflineSynchService.java
+8
-0
OfflineSynchServiceImpl.java
.../jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
+24
-6
DmpDevelopTaskMapper.xml
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
+1
-1
No files found.
src/main/java/com/jz/dmp/modules/controller/DataIntegration/OfflineSynchController.java
View file @
2d72b7b0
...
@@ -285,6 +285,30 @@ public class OfflineSynchController {
...
@@ -285,6 +285,30 @@ public class OfflineSynchController {
return
list
;
return
list
;
}
}
/**
* 离线任务详情--编辑回显
*
* @return
* @author Bellamy
*/
@ApiOperation
(
value
=
"离线任务详情--编辑回显"
,
notes
=
"离线任务详情--编辑回显"
)
@GetMapping
(
value
=
"/getSyncTaskInfoById"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"离线任务id"
,
required
=
true
)
public
JsonResult
getSyncTaskInfoById
(
@RequestParam
String
id
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
id
)){
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"id不能为空"
);
}
JsonResult
list
=
new
JsonResult
();
try
{
list
=
offlineSynchService
.
querySyncTaskInfoById
(
id
);
}
catch
(
Exception
e
)
{
list
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
list
.
setMessage
(
"failed!"
);
e
.
printStackTrace
();
}
return
list
;
}
/**
/**
* 编辑离线任务数据
* 编辑离线任务数据
*
*
...
...
src/main/java/com/jz/dmp/modules/service/OfflineSynchService.java
View file @
2d72b7b0
...
@@ -138,4 +138,12 @@ public interface OfflineSynchService {
...
@@ -138,4 +138,12 @@ public interface OfflineSynchService {
* @author Bellamy
* @author Bellamy
*/
*/
JsonResult
getSyncSoureAndTargetColumns
(
Map
<
String
,
List
<
SynchTableColumnsReq
>>
req
)
throws
Exception
;
JsonResult
getSyncSoureAndTargetColumns
(
Map
<
String
,
List
<
SynchTableColumnsReq
>>
req
)
throws
Exception
;
/**
* 离线任务详情--编辑回显
*
* @return
* @author Bellamy
*/
JsonResult
querySyncTaskInfoById
(
String
id
)
throws
Exception
;
}
}
src/main/java/com/jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
View file @
2d72b7b0
...
@@ -172,10 +172,10 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -172,10 +172,10 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
Map
<
String
,
Object
>
map
=
offlineSynchDao
.
selectNavigationTreeByTaskId
(
taskId
);
Map
<
String
,
Object
>
map
=
offlineSynchDao
.
selectNavigationTreeByTaskId
(
taskId
);
if
(
map
.
size
()
>
0
&&
map
!=
null
)
{
if
(
map
.
size
()
>
0
&&
map
!=
null
)
{
Integer
execId
=
this
.
publish
(
map
);
Integer
execId
=
this
.
publish
(
map
);
if
(
execId
!=
null
)
{
if
(
execId
!=
null
)
{
flag
=
true
;
flag
=
true
;
}
}
if
(
flag
)
{
if
(
flag
)
{
return
new
JsonResult
(
ResultCode
.
SUCCESS
,
flag
);
return
new
JsonResult
(
ResultCode
.
SUCCESS
,
flag
);
}
else
{
}
else
{
...
@@ -647,15 +647,17 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -647,15 +647,17 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
//更新规则信息
//更新规则信息
List
<
Map
>
taskRules
=
(
List
<
Map
>)
body
.
get
(
"taskRules"
);
List
<
Map
>
taskRules
=
(
List
<
Map
>)
body
.
get
(
"taskRules"
);
//判断taskId是否存在,存在编辑,不存在新增
//判断taskId是否存在,存在编辑,不存在新增
Integer
id
=
null
;
if
(
StringUtils
.
isEmpty
(
taskId
))
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
task
.
setVersion
(
"1.0"
);
task
.
setVersion
(
"1.0"
);
task
.
setCreateUserId
(
SessionUtils
.
getCurrentUserId
());
task
.
setCreateUserId
(
SessionUtils
.
getCurrentUserId
());
task
.
setCreateTime
(
new
Date
());
task
.
setCreateTime
(
new
Date
());
dmpDevelopTaskDao
.
insert
(
task
);
//新增任务数据
dmpDevelopTaskDao
.
insert
(
task
);
//新增任务数据
id
=
task
.
getId
();
logger
.
info
(
"======== save sync task end ========"
);
logger
.
info
(
"======== save sync task end ========"
);
this
.
saveTaskHistory
(
task
);
//保存任务历史版本
this
.
saveTaskHistory
(
task
);
//保存任务历史版本
//保存dmp数据校验规则信息
//保存dmp数据校验规则信息
settRuleInfo
(
task
Id
,
taskRules
,
list
);
settRuleInfo
(
task
.
getId
().
toString
()
,
taskRules
,
list
);
}
else
{
}
else
{
DmpDevelopTask
devTask
=
dmpDevelopTaskDao
.
selectTaskById
(
taskId
);
DmpDevelopTask
devTask
=
dmpDevelopTaskDao
.
selectTaskById
(
taskId
);
BigDecimal
version
=
new
BigDecimal
(
devTask
.
getVersion
());
BigDecimal
version
=
new
BigDecimal
(
devTask
.
getVersion
());
...
@@ -665,6 +667,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -665,6 +667,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
task
.
setUpdateUserId
(
SessionUtils
.
getCurrentUserId
());
task
.
setUpdateUserId
(
SessionUtils
.
getCurrentUserId
());
task
.
setId
(
Integer
.
valueOf
(
taskId
));
task
.
setId
(
Integer
.
valueOf
(
taskId
));
dmpDevelopTaskDao
.
update
(
task
);
dmpDevelopTaskDao
.
update
(
task
);
id
=
task
.
getId
();
logger
.
info
(
"======== edit sync task end ========"
);
logger
.
info
(
"======== edit sync task end ========"
);
this
.
saveTaskHistory
(
task
);
//保存任务历史版本
this
.
saveTaskHistory
(
task
);
//保存任务历史版本
//更新规则信息
//更新规则信息
...
@@ -679,7 +682,9 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -679,7 +682,9 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
}
}
//保存时提交XML
//保存时提交XML
//dmpDevelopTaskService.submitSyncing(task);
//dmpDevelopTaskService.submitSyncing(task);
return
JsonResult
.
ok
();
Map
map
=
new
HashMap
();
map
.
put
(
"id"
,
id
);
return
JsonResult
.
ok
(
map
);
}
}
/**
/**
...
@@ -1036,4 +1041,17 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -1036,4 +1041,17 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
return
JsonResult
.
ok
(
data
);
return
JsonResult
.
ok
(
data
);
}
}
/**
* 离线任务详情--编辑回显
*
* @return
* @author Bellamy
*/
@Override
public
JsonResult
querySyncTaskInfoById
(
String
id
)
throws
Exception
{
DmpDevelopTask
dmpDevelopTask
=
dmpDevelopTaskDao
.
selectTaskById
(
id
);
return
JsonResult
.
ok
(
dmpDevelopTask
);
}
}
}
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
View file @
2d72b7b0
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<sql
id=
"FIND_ALL_COLUMN"
>
<sql
id=
"FIND_ALL_COLUMN"
>
id,task_type,type,schedule_type,is_submit,task_desc,script,data_status,create_user_id,create_time,update_user_id,update_time,tree_id,flow_header,
id,task_type,type,schedule_type,is_submit,task_desc,script,data_status,create_user_id,create_time,update_user_id,update_time,tree_id,flow_header,
flow_json, version, publish_version, is_gziped
flow_json, version, publish_version, is_gziped
,source_db_id,target_db_name,target_table_name,source_db_name,source_table_name
</sql>
</sql>
<select
id=
"getDmpTaskAndTreeInfo"
parameterType=
"string"
resultType=
"map"
>
<select
id=
"getDmpTaskAndTreeInfo"
parameterType=
"string"
resultType=
"map"
>
...
...
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