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
73273066
Commit
73273066
authored
Jan 15, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
b8dc5470
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
137 additions
and
27 deletions
+137
-27
DataSourceController.java
...ules/controller/DataIntegration/DataSourceController.java
+3
-0
OfflineSynchController.java
...es/controller/DataIntegration/OfflineSynchController.java
+1
-1
TaskListPageReq.java
...ules/controller/DataIntegration/bean/TaskListPageReq.java
+14
-0
DataDevTaskListDto.java
...les/controller/dataOperation/bean/DataDevTaskListDto.java
+14
-0
DataDevTaskListReq.java
...les/controller/dataOperation/bean/DataDevTaskListReq.java
+9
-9
DmpOrgMangeController.java
...modules/controller/dataService/DmpOrgMangeController.java
+27
-0
OfflineSynchDao.java
src/main/java/com/jz/dmp/modules/dao/OfflineSynchDao.java
+6
-0
DmpOrgMangeService.java
...n/java/com/jz/dmp/modules/service/DmpOrgMangeService.java
+11
-0
OfflineSynchService.java
.../java/com/jz/dmp/modules/service/OfflineSynchService.java
+6
-1
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+1
-1
DmpOrgMangeServiceImpl.java
...m/jz/dmp/modules/service/impl/DmpOrgMangeServiceImpl.java
+17
-0
DmpSyncingDatasourceServiceImpl.java
...modules/service/impl/DmpSyncingDatasourceServiceImpl.java
+9
-3
OfflineSynchServiceImpl.java
.../jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
+6
-0
DmpDevelopTaskMapper.xml
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
+3
-2
OfflineSynchMapper.xml
src/main/resources/mapper/dmp/OfflineSynchMapper.xml
+10
-10
No files found.
src/main/java/com/jz/dmp/modules/controller/DataIntegration/DataSourceController.java
View file @
73273066
...
@@ -124,6 +124,9 @@ public class DataSourceController {
...
@@ -124,6 +124,9 @@ public class DataSourceController {
@ApiOperation
(
value
=
"测试连通性"
,
notes
=
"测试连通性"
)
@ApiOperation
(
value
=
"测试连通性"
,
notes
=
"测试连通性"
)
@PostMapping
(
value
=
"/testConnection"
)
@PostMapping
(
value
=
"/testConnection"
)
public
JsonResult
testConnection
(
@RequestBody
@Validated
DmpSyncingDatasourceReq
saveBody
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
JsonResult
testConnection
(
@RequestBody
@Validated
DmpSyncingDatasourceReq
saveBody
,
HttpServletRequest
httpRequest
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
saveBody
.
getDatasourceType
()))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"数据源类型ID不能为空"
);
}
JsonResult
result
=
dmpSyncingDatasourceService
.
testConnection
(
saveBody
);
JsonResult
result
=
dmpSyncingDatasourceService
.
testConnection
(
saveBody
);
return
result
;
return
result
;
}
}
...
...
src/main/java/com/jz/dmp/modules/controller/DataIntegration/OfflineSynchController.java
View file @
73273066
...
@@ -34,7 +34,7 @@ public class OfflineSynchController {
...
@@ -34,7 +34,7 @@ public class OfflineSynchController {
private
OfflineSynchService
offlineSynchService
;
private
OfflineSynchService
offlineSynchService
;
/**
/**
* 任务列表分页查询
*
离线同步
任务列表分页查询
*
*
* @return
* @return
* @author Bellamy
* @author Bellamy
...
...
src/main/java/com/jz/dmp/modules/controller/DataIntegration/bean/TaskListPageReq.java
View file @
73273066
...
@@ -32,6 +32,12 @@ public class TaskListPageReq extends BasePageBean {
...
@@ -32,6 +32,12 @@ public class TaskListPageReq extends BasePageBean {
@ApiModelProperty
(
value
=
"创建人"
)
@ApiModelProperty
(
value
=
"创建人"
)
private
String
createUserId
;
private
String
createUserId
;
/*
* 任务名称
* */
@ApiModelProperty
(
value
=
"任务名称"
)
private
String
treeName
;
// /*
// /*
// * 父类ID
// * 父类ID
// * */
// * */
...
@@ -83,4 +89,12 @@ public class TaskListPageReq extends BasePageBean {
...
@@ -83,4 +89,12 @@ public class TaskListPageReq extends BasePageBean {
public
void
setCreateUserId
(
String
createUserId
)
{
public
void
setCreateUserId
(
String
createUserId
)
{
this
.
createUserId
=
createUserId
;
this
.
createUserId
=
createUserId
;
}
}
public
String
getTreeName
()
{
return
treeName
;
}
public
void
setTreeName
(
String
treeName
)
{
this
.
treeName
=
treeName
;
}
}
}
src/main/java/com/jz/dmp/modules/controller/dataOperation/bean/DataDevTaskListDto.java
View file @
73273066
...
@@ -21,6 +21,12 @@ public class DataDevTaskListDto {
...
@@ -21,6 +21,12 @@ public class DataDevTaskListDto {
@ApiModelProperty
(
value
=
"任务ID"
)
@ApiModelProperty
(
value
=
"任务ID"
)
private
String
taskId
;
private
String
taskId
;
/*
* treeId
* */
@ApiModelProperty
(
value
=
"treeId"
)
private
String
treeId
;
/*
/*
* 任务名称
* 任务名称
* */
* */
...
@@ -168,4 +174,12 @@ public class DataDevTaskListDto {
...
@@ -168,4 +174,12 @@ public class DataDevTaskListDto {
public
void
setType
(
String
type
)
{
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
String
getTreeId
()
{
return
treeId
;
}
public
void
setTreeId
(
String
treeId
)
{
this
.
treeId
=
treeId
;
}
}
}
src/main/java/com/jz/dmp/modules/controller/dataOperation/bean/DataDevTaskListReq.java
View file @
73273066
...
@@ -27,16 +27,16 @@ public class DataDevTaskListReq extends BasePageBean {
...
@@ -27,16 +27,16 @@ public class DataDevTaskListReq extends BasePageBean {
private
String
projectId
;
private
String
projectId
;
/*
/*
*
节点
名称或id
*
任务
名称或id
* */
* */
@ApiModelProperty
(
value
=
"
节点
名称或id"
)
@ApiModelProperty
(
value
=
"
任务
名称或id"
)
private
String
treeIdOrName
;
private
String
treeIdOrName
;
/*
/*
*
节点
id
*
任务
id
* */
* */
@ApiModelProperty
(
value
=
"
节点
id"
)
@ApiModelProperty
(
value
=
"
任务
id"
)
private
String
t
ree
Id
;
private
String
t
ask
Id
;
/*
/*
* 任务类型
* 任务类型
...
@@ -60,12 +60,12 @@ public class DataDevTaskListReq extends BasePageBean {
...
@@ -60,12 +60,12 @@ public class DataDevTaskListReq extends BasePageBean {
this
.
treeIdOrName
=
treeIdOrName
;
this
.
treeIdOrName
=
treeIdOrName
;
}
}
public
String
getT
ree
Id
()
{
public
String
getT
ask
Id
()
{
return
t
ree
Id
;
return
t
ask
Id
;
}
}
public
void
setT
reeId
(
String
tree
Id
)
{
public
void
setT
askId
(
String
task
Id
)
{
this
.
t
reeId
=
tree
Id
;
this
.
t
askId
=
task
Id
;
}
}
public
String
getTaskType
()
{
public
String
getTaskType
()
{
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/DmpOrgMangeController.java
0 → 100644
View file @
73273066
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataService
;
import
com.jz.dmp.modules.service.DmpOrgMangeService
;
import
com.jz.dmp.modules.service.DvRuleTService
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 数据服务组织管理
*
* @author Bellamy
* @since 2020-12-24 10:56:18
*/
@RestController
@RequestMapping
(
"/orgMange"
)
@Api
(
tags
=
"数据服务-组织管理"
)
public
class
DmpOrgMangeController
{
/**
* 服务对象
*/
@Autowired
private
DmpOrgMangeService
dmpOrgMangeService
;
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/dao/OfflineSynchDao.java
View file @
73273066
...
@@ -29,5 +29,11 @@ public interface OfflineSynchDao {
...
@@ -29,5 +29,11 @@ public interface OfflineSynchDao {
List
<
CheckJyRlueStatusDto
>
selectCheckJyStatusInfo
(
@Param
(
"executionId"
)
String
executionId
)
throws
Exception
;
List
<
CheckJyRlueStatusDto
>
selectCheckJyStatusInfo
(
@Param
(
"executionId"
)
String
executionId
)
throws
Exception
;
/**
* 离线同步任务列表分页查询
*
* @return
* @author Bellamy
*/
List
<
TaskListPageDto
>
selectOfflineTaskInfo
(
TaskListPageReq
taskListPageReq
)
throws
Exception
;
List
<
TaskListPageDto
>
selectOfflineTaskInfo
(
TaskListPageReq
taskListPageReq
)
throws
Exception
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/DmpOrgMangeService.java
0 → 100644
View file @
73273066
package
com
.
jz
.
dmp
.
modules
.
service
;
/**
* @ClassName: DmpOrgMangeService
* @Description: 数据服务组织管理
* @Author: Bellamy
* @Date 2021/1/15
* @Version 1.0
*/
public
interface
DmpOrgMangeService
{
}
src/main/java/com/jz/dmp/modules/service/OfflineSynchService.java
View file @
73273066
...
@@ -17,7 +17,12 @@ import java.util.Map;
...
@@ -17,7 +17,12 @@ import java.util.Map;
* @Version 1.0
* @Version 1.0
*/
*/
public
interface
OfflineSynchService
{
public
interface
OfflineSynchService
{
/**
* 离线同步任务列表分页查询
*
* @return
* @author Bellamy
*/
PageInfoResponse
<
TaskListPageDto
>
queryTaskListPage
(
TaskListPageReq
taskListPageReq
)
throws
Exception
;
PageInfoResponse
<
TaskListPageDto
>
queryTaskListPage
(
TaskListPageReq
taskListPageReq
)
throws
Exception
;
JsonResult
querygSourceDbList
(
Integer
projectId
)
throws
Exception
;
JsonResult
querygSourceDbList
(
Integer
projectId
)
throws
Exception
;
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
73273066
...
@@ -765,7 +765,7 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
...
@@ -765,7 +765,7 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
//判断是否为整数 是整数返回true,否则返回false
//判断是否为整数 是整数返回true,否则返回false
Pattern
pattern
=
Pattern
.
compile
(
"^[-\\+]?[\\d]*$"
);
Pattern
pattern
=
Pattern
.
compile
(
"^[-\\+]?[\\d]*$"
);
if
(
pattern
.
matcher
(
req
.
getTreeIdOrName
().
trim
()).
matches
())
{
if
(
pattern
.
matcher
(
req
.
getTreeIdOrName
().
trim
()).
matches
())
{
req
.
setT
ree
Id
(
req
.
getTreeIdOrName
());
//id
req
.
setT
ask
Id
(
req
.
getTreeIdOrName
());
//id
req
.
setTreeIdOrName
(
null
);
req
.
setTreeIdOrName
(
null
);
}
else
{
}
else
{
req
.
setTreeIdOrName
(
req
.
getTreeIdOrName
().
trim
());
//节点名称
req
.
setTreeIdOrName
(
req
.
getTreeIdOrName
().
trim
());
//节点名称
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpOrgMangeServiceImpl.java
0 → 100644
View file @
73273066
package
com
.
jz
.
dmp
.
modules
.
service
.
impl
;
import
com.jz.dmp.modules.service.DmpOrgMangeService
;
import
org.springframework.stereotype.Service
;
/**
* @ClassName: DmpOrgMangeServiceImpl
* @Description: 数据服务组织管理
* @Author: Bellamy
* @Date 2021/1/15
* @Version 1.0
*/
@Service
(
"dmpOrgMangeService"
)
public
class
DmpOrgMangeServiceImpl
implements
DmpOrgMangeService
{
}
src/main/java/com/jz/dmp/modules/service/impl/DmpSyncingDatasourceServiceImpl.java
View file @
73273066
...
@@ -7,6 +7,7 @@ import com.jz.agent.service.DmpDsAgentService;
...
@@ -7,6 +7,7 @@ import com.jz.agent.service.DmpDsAgentService;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.enums.TestConnectStatusEnum
;
import
com.jz.common.enums.TestConnectStatusEnum
;
import
com.jz.common.exception.ServiceException
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.common.utils.JsonMapper
;
import
com.jz.common.utils.JsonMapper
;
...
@@ -303,11 +304,12 @@ public class DmpSyncingDatasourceServiceImpl implements DmpSyncingDatasourceServ
...
@@ -303,11 +304,12 @@ public class DmpSyncingDatasourceServiceImpl implements DmpSyncingDatasourceServ
DmpAgentDatasourceInfo
ds
=
this
.
dsInfoDTO
(
saveBody
);
//查询数据源 对应的 数据库信息
DmpAgentDatasourceInfo
ds
=
this
.
dsInfoDTO
(
saveBody
);
//查询数据源 对应的 数据库信息
DmpAgentResult
rst
=
dmpDsAgentServiceImp
.
testConnect
(
ds
);
//连接测试
DmpAgentResult
rst
=
dmpDsAgentServiceImp
.
testConnect
(
ds
);
//连接测试
if
(!
rst
.
getCode
().
val
().
equals
(
"200"
))
{
if
(!
rst
.
getCode
().
val
().
equals
(
"200"
))
{
return
new
JsonResult
(
rst
.
getCode
(),
rst
.
getMessage
()
);
return
new
JsonResult
(
ResultCode
.
INTERNAL_SERVER_ERROR
,
"连接测试失败!"
);
}
else
{
}
else
{
//连接测试成功
//连接测试成功
rst
.
setResult
(
JsonMapper
.
fromJsonString
(
rst
.
getMessage
(),
Boolean
.
class
));
Object
flag
=
JsonMapper
.
fromJsonString
(
rst
.
getMessage
(),
Boolean
.
class
);
return
new
JsonResult
(
ResultCode
.
SUCCESS
,
rst
);
//rst.setResult(JsonMapper.fromJsonString(rst.getMessage(), Boolean.class));
return
new
JsonResult
(
ResultCode
.
SUCCESS
,
"连接测试成功!"
);
}
}
}
}
...
@@ -423,6 +425,10 @@ public class DmpSyncingDatasourceServiceImpl implements DmpSyncingDatasourceServ
...
@@ -423,6 +425,10 @@ public class DmpSyncingDatasourceServiceImpl implements DmpSyncingDatasourceServ
ds
.
setDefaultFs
(
body
.
getDefaultFs
());
ds
.
setDefaultFs
(
body
.
getDefaultFs
());
DmpProjectSystemInfo
info
=
dmpProjectDao
.
queryProjectSystemInfo
(
Long
.
valueOf
(
body
.
getProjectId
()));
DmpProjectSystemInfo
info
=
dmpProjectDao
.
queryProjectSystemInfo
(
Long
.
valueOf
(
body
.
getProjectId
()));
if
(
info
==
null
){
//throw new RuntimeException("未查询到对应的项目系统配置信息");
throw
new
ServiceException
(
"未查询到对应的项目系统配置信息"
);
}
ds
.
setKerberosIsenable
(
info
.
getKerberosIsenable
());
ds
.
setKerberosIsenable
(
info
.
getKerberosIsenable
());
ds
.
setKerberosJaasConf
(
info
.
getKerberosJaasConf
());
ds
.
setKerberosJaasConf
(
info
.
getKerberosJaasConf
());
ds
.
setKerberosKrb5Conf
(
info
.
getKerberosKrb5Conf
());
ds
.
setKerberosKrb5Conf
(
info
.
getKerberosKrb5Conf
());
...
...
src/main/java/com/jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
View file @
73273066
...
@@ -87,6 +87,12 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -87,6 +87,12 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
@Autowired
@Autowired
private
DvTaskRuleTService
dvTaskRuleTService
;
private
DvTaskRuleTService
dvTaskRuleTService
;
/**
* 离线同步任务列表分页查询
*
* @return
* @author Bellamy
*/
@Override
@Override
public
PageInfoResponse
<
TaskListPageDto
>
queryTaskListPage
(
TaskListPageReq
taskListPageReq
)
throws
Exception
{
public
PageInfoResponse
<
TaskListPageDto
>
queryTaskListPage
(
TaskListPageReq
taskListPageReq
)
throws
Exception
{
PageInfoResponse
<
TaskListPageDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
PageInfoResponse
<
TaskListPageDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
...
...
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
View file @
73273066
...
@@ -149,7 +149,8 @@
...
@@ -149,7 +149,8 @@
<select
id=
"queryDevTaskListPage"
resultType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto"
<select
id=
"queryDevTaskListPage"
resultType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto"
parameterType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq"
>
parameterType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq"
>
select
select
t1.id as taskId,
t1.id as treeId,
t2.id as taskId,
t1.name as taskName,
t1.name as taskName,
t1.type,
t1.type,
t1.create_user_id as createUserId,
t1.create_user_id as createUserId,
...
@@ -162,7 +163,7 @@
...
@@ -162,7 +163,7 @@
left join dmp_member t3 on t1.create_user_id=t3.user_id
left join dmp_member t3 on t1.create_user_id=t3.user_id
where 1=1 and t1.type='01'
where 1=1 and t1.type='01'
and t1.project_id = #{projectId}
and t1.project_id = #{projectId}
<if
test=
"t
reeId != null and treeId != ''"
>
and t1.id =#{tree
Id}
</if>
<if
test=
"t
askId != null and taskId != ''"
>
and t2.id =#{task
Id}
</if>
<if
test=
"treeIdOrName != null and treeIdOrName != ''"
>
and t1.name like concat('%',#{treeIdOrName},'%')
</if>
<if
test=
"treeIdOrName != null and treeIdOrName != ''"
>
and t1.name like concat('%',#{treeIdOrName},'%')
</if>
<if
test=
"taskType != null and taskType!= ''"
>
and t1.type=#{taskType}
</if>
<if
test=
"taskType != null and taskType!= ''"
>
and t1.type=#{taskType}
</if>
</select>
</select>
...
...
src/main/resources/mapper/dmp/OfflineSynchMapper.xml
View file @
73273066
...
@@ -171,23 +171,23 @@
...
@@ -171,23 +171,23 @@
</if>
</if>
</select>
</select>
<!--离线同步列表-->
<select
id=
"selectOfflineTaskInfo"
resultType=
"com.jz.dmp.modules.controller.DataIntegration.bean.TaskListPageDto"
<select
id=
"selectOfflineTaskInfo"
resultType=
"com.jz.dmp.modules.controller.DataIntegration.bean.TaskListPageDto"
parameterType=
"com.jz.dmp.modules.controller.DataIntegration.bean.TaskListPageReq"
>
parameterType=
"com.jz.dmp.modules.controller.DataIntegration.bean.TaskListPageReq"
>
SELECT
SELECT
ddt.id AS taskId,
ddt.id AS taskId,
ddt.tree_id AS treeId,
ddt.tree_id AS treeId,
dnt.NAME AS treeName,
dnt.NAME AS treeName,
dnt.CREATE_USER_ID
as createUserId,
t3.real_name
as createUserId,
DATE_FORMAT( ddt.create_time, '%Y-%m-%d %H:%i:%s' ) AS createTime,
DATE_FORMAT( ddt.create_time, '%Y-%m-%d %H:%i:%s' ) AS createTime,
DATE_FORMAT( ddt.update_time, '%Y-%m-%d %H:%i:%s' ) AS updateTime
DATE_FORMAT( ddt.update_time, '%Y-%m-%d %H:%i:%s' ) AS updateTime
FROM dmp_develop_task AS ddt
FROM dmp_develop_task ddt
INNER JOIN dmp_navigation_tree AS dnt ON ddt.TREE_ID = dnt.ID
INNER join dmp_navigation_tree dnt ON ddt.TREE_ID = dnt.ID
LEFT JOIN dmp_syncing_datasource AS dsd ON instr(script,concat('"targetDbConnection":"',dsd.datasource_name,'"'))>0
left join dmp_member t3 on ddt.create_user_id=t3.user_id
WHERE ddt.data_status ='1' AND ddt.TYPE='3' AND ddt.TASK_TYPE ='2'
left join dmp_syncing_datasource dsd ON instr(script,concat('"targetDbConnection":"',dsd.datasource_name,'"'))>0
AND dnt.CATEGORY='2' AND dnt.TYPE ='3'
WHERE ddt.data_status ='1' and dnt.TYPE ='01' and dnt.IS_LEVEL ='1'
AND dnt.IS_LEVEL ='1'
and dnt.PROJECT_ID =#{projectId}
AND dnt.PROJECT_ID =31
<if
test=
"treeName != null and treeName != ''"
>
dnt.NAME like concat('%',#{treeName},'%')
</if>
AND dsd.PROJECT_ID=31
ORDER BY ddt.create_time DESC
ORDER BY ddt.create_time DESC
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
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