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
1d492b05
Commit
1d492b05
authored
Jan 14, 2021
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突解决
parent
2e1988ce
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
2004 additions
and
52 deletions
+2004
-52
DmpDevelopTaskHistoryService.java
.../jz/dmp/modules/service/DmpDevelopTaskHistoryService.java
+131
-0
DmpDevelopTaskService.java
...ava/com/jz/dmp/modules/service/DmpDevelopTaskService.java
+21
-0
DmpNavigationTreeService.java
.../com/jz/dmp/modules/service/DmpNavigationTreeService.java
+17
-3
DmpDevelopTaskHistoryServiceImpl.java
...odules/service/impl/DmpDevelopTaskHistoryServiceImpl.java
+759
-0
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+191
-13
DmpNavigationTreeServiceImpl.java
...mp/modules/service/impl/DmpNavigationTreeServiceImpl.java
+94
-7
DmpPermissionService.java
.../com/jz/dmp/modules/service/sys/DmpPermissionService.java
+1
-1
DmpMemberServiceImpl.java
...jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
+9
-0
DmpPermissionServiceImpl.java
...mp/modules/service/sys/impl/DmpPermissionServiceImpl.java
+18
-2
DmpDevelopTaskHistoryMapper.xml
...main/resources/mapper/dmp/DmpDevelopTaskHistoryMapper.xml
+707
-0
DmpDevelopTaskMapper.xml
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
+56
-26
No files found.
src/main/java/com/jz/dmp/modules/service/DmpDevelopTaskHistoryService.java
0 → 100644
View file @
1d492b05
package
com
.
jz
.
dmp
.
modules
.
service
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest
;
import
com.jz.dmp.modules.model.DmpDevelopTaskHistory
;
/**
* 任务历史版本服务接口
* @author ybz
*
*/
public
interface
DmpDevelopTaskHistoryService
{
/**条件分頁查询所有任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpDevelopTaskHistoryDto
>
findListWithPage
(
DmpDevelopTaskHistoryRequest
dmpDevelopTaskHistoryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**条件查询所有任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpDevelopTaskHistoryDto
>
findList
(
DmpDevelopTaskHistoryRequest
dmpDevelopTaskHistoryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增任务历史版本
* @param dmpDevelopTaskHistory
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpDevelopTaskHistory
>
add
(
DmpDevelopTaskHistory
dmpDevelopTaskHistory
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询任务历史版本
* @param id
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpDevelopTaskHistoryDto
>
findById
(
Integer
id
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改任务历史版本
* @param dmpDevelopTaskHistory
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpDevelopTaskHistory
>
edit
(
DmpDevelopTaskHistory
dmpDevelopTaskHistory
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除任务历史版本
* @param id
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
Integer
id
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键软删除任务历史版本
* @param id
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
softDeleteById
(
Integer
id
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**条件删除任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
delete
(
DmpDevelopTaskHistoryRequest
dmpDevelopTaskHistoryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**条件软删除任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
softDelete
(
DmpDevelopTaskHistoryRequest
dmpDevelopTaskHistoryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: deleteByIds
* @Description: TODO(根据主键批量删除)
* @param @param idList
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public
BaseResponse
deleteByIds
(
List
<
Integer
>
idList
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: softDeleteByIds
* @Description: TODO(根据主键批量软删除)
* @param @param idList
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public
BaseResponse
softDeleteByIds
(
List
<
Integer
>
idList
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: taskVersionRollback
* @Description: TODO(任务版本回滚)
* @param @param id
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public
BaseResponse
taskVersionRollback
(
Integer
id
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/DmpDevelopTaskService.java
View file @
1d492b05
package
com
.
jz
.
dmp
.
modules
.
service
;
package
com
.
jz
.
dmp
.
modules
.
service
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskRequest
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq
;
import
com.jz.dmp.modules.model.DmpDevelopTask
;
import
com.jz.dmp.modules.model.DmpDevelopTask
;
...
@@ -25,4 +29,21 @@ public interface DmpDevelopTaskService {
...
@@ -25,4 +29,21 @@ public interface DmpDevelopTaskService {
* @since 2021-01-13
* @since 2021-01-13
*/
*/
PageInfoResponse
<
DataDevTaskListDto
>
queryDevTaskListPage
(
DataDevTaskListReq
req
)
throws
Exception
;
PageInfoResponse
<
DataDevTaskListDto
>
queryDevTaskListPage
(
DataDevTaskListReq
req
)
throws
Exception
;
/**
* 数据运维-执行任务
*
* @return
* @author Bellamy
*/
JsonResult
runTaskByTaskId
(
String
taskId
)
throws
Exception
;
/**条件分頁查询所有任务开发
* @param dmpDevelopTaskRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
com
.
jz
.
common
.
bean
.
PageInfoResponse
<
DmpDevelopTaskDto
>
findListWithPage
(
DmpDevelopTaskRequest
dmpDevelopTaskRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/DmpNavigationTreeService.java
View file @
1d492b05
package
com
.
jz
.
dmp
.
modules
.
service
;
package
com
.
jz
.
dmp
.
modules
.
service
;
import
com.jz.dmp.modules.model.DmpNavigationTree
;
import
java.util.List
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto
;
import
com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest
;
import
com.jz.dmp.modules.model.DmpNavigationTree
;
/**
/**
* DMP资源导航树(DmpNavigationTree)表服务接口
* DMP资源导航树(DmpNavigationTree)表服务接口
*
*
...
@@ -35,7 +40,7 @@ public interface DmpNavigationTreeService {
...
@@ -35,7 +40,7 @@ public interface DmpNavigationTreeService {
* @param dmpNavigationTree 实例对象
* @param dmpNavigationTree 实例对象
* @return 实例对象
* @return 实例对象
*/
*/
DmpNavigationTree
insert
(
DmpNavigationTree
dmpNavigationTree
);
DmpNavigationTree
insert
(
DmpNavigationTree
dmpNavigationTree
)
throws
Exception
;
/**
/**
* 修改数据
* 修改数据
...
@@ -52,5 +57,14 @@ public interface DmpNavigationTreeService {
...
@@ -52,5 +57,14 @@ public interface DmpNavigationTreeService {
* @return 是否成功
* @return 是否成功
*/
*/
boolean
deleteById
(
Integer
id
);
boolean
deleteById
(
Integer
id
);
/**条件查询所有DMP资源导航树
* @param dmpNavigationTreeRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpNavigationTreeDto
>
findList
(
DmpNavigationTreeRequest
dmpNavigationTreeRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskHistoryServiceImpl.java
0 → 100644
View file @
1d492b05
This diff is collapsed.
Click to expand it.
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
1d492b05
package
com
.
jz
.
dmp
.
modules
.
service
.
impl
;
package
com
.
jz
.
dmp
.
modules
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Pattern
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.agent.service.DmpDsAgentService
;
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.constant.StatuConstant
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.utils.JsonMapper
;
import
com.jz.common.utils.JsonMapper
;
import
com.jz.common.utils.StringUtils
;
import
com.jz.common.utils.StringUtils
;
import
com.jz.common.utils.web.XmlUtils
;
import
com.jz.common.utils.web.XmlUtils
;
import
com.jz.dmp.agent.DmpAgentResult
;
import
com.jz.dmp.agent.DmpAgentResult
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskRequest
;
import
com.jz.dmp.modules.controller.bean.MyDmpDevelopTaskConverter
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq
;
import
com.jz.dmp.modules.dao.DmpDevelopTaskDao
;
import
com.jz.dmp.modules.dao.DmpDevelopTaskDao
;
import
com.jz.dmp.modules.dao.DmpProjectDao
;
import
com.jz.dmp.modules.dao.DmpProjectDao
;
import
com.jz.dmp.modules.dao.DmpSyncingDatasourceTypeDao
;
import
com.jz.dmp.modules.dao.DmpSyncingDatasourceTypeDao
;
import
com.jz.dmp.modules.model.*
;
import
com.jz.dmp.modules.model.DmpAgentDatasourceInfo
;
import
com.jz.dmp.modules.model.DmpDevelopTask
;
import
com.jz.dmp.modules.model.DmpProjectSystemInfo
;
import
com.jz.dmp.modules.model.DmpSyncingDatasource
;
import
com.jz.dmp.modules.model.DmpSyncingDatasourceType
;
import
com.jz.dmp.modules.service.DmpDevelopTaskService
;
import
com.jz.dmp.modules.service.DmpDevelopTaskService
;
import
com.jz.dmp.modules.service.DmpSyncingDatasourceService
;
import
com.jz.dmp.modules.service.DmpSyncingDatasourceService
;
import
org.slf4j.Logger
;
import
com.jz.dmp.modules.service.OfflineSynchService
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Pattern
;
/**
/**
* 任务开发(DmpDevelopTask)表服务实现类
* 任务开发(DmpDevelopTask)表服务实现类
...
@@ -57,6 +69,9 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
...
@@ -57,6 +69,9 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
@Autowired
@Autowired
private
DmpSyncingDatasourceService
dmpSyncingDatasourceService
;
private
DmpSyncingDatasourceService
dmpSyncingDatasourceService
;
@Autowired
private
OfflineSynchService
offlineSynchService
;
/**
/**
* 添加保存dmp数据(包含校验数据)
* 添加保存dmp数据(包含校验数据)
*
*
...
@@ -733,9 +748,9 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
...
@@ -733,9 +748,9 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
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
.
setTreeId
(
req
.
getTreeIdOrName
());
//id
req
.
setTreeId
(
req
.
getTreeIdOrName
());
//id
req
.
setTreeIdOrName
(
null
);
}
else
{
}
else
{
req
.
setTreeIdOrName
(
req
.
getTreeIdOrName
().
trim
());
//节点名称
req
.
setTreeIdOrName
(
req
.
getTreeIdOrName
().
trim
());
//节点名称
req
.
setTreeId
(
null
);
}
}
}
}
...
@@ -748,4 +763,167 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
...
@@ -748,4 +763,167 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
pageInfoResponse
.
setData
(
pageInfo
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
return
pageInfoResponse
;
}
}
/**
* 数据运维-执行任务
*
* @return
* @author Bellamy
*/
@Override
public
JsonResult
runTaskByTaskId
(
String
taskId
)
throws
Exception
{
return
offlineSynchService
.
taskRunNowByTaskId
(
taskId
);
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskService#findList(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
com
.
jz
.
common
.
bean
.
PageInfoResponse
<
DmpDevelopTaskDto
>
findListWithPage
(
DmpDevelopTaskRequest
dmpDevelopTaskRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
com
.
jz
.
common
.
bean
.
PageInfoResponse
<
DmpDevelopTaskDto
>
pageInfoResponse
=
new
com
.
jz
.
common
.
bean
.
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//ID
if
(
dmpDevelopTaskRequest
.
getId
()
!=
null
)
{
param
.
put
(
"id"
,
dmpDevelopTaskRequest
.
getId
());
}
//tree ID
if
(
dmpDevelopTaskRequest
.
getTreeId
()
!=
null
)
{
param
.
put
(
"treeId"
,
dmpDevelopTaskRequest
.
getTreeId
());
}
//数据源ID
if
(
dmpDevelopTaskRequest
.
getDatasourceId
()
!=
null
)
{
param
.
put
(
"datasourceId"
,
dmpDevelopTaskRequest
.
getDatasourceId
());
}
//任务类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getTaskType
()))
{
param
.
put
(
"taskType"
,
dmpDevelopTaskRequest
.
getTaskType
());
}
//类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getType
()))
{
param
.
put
(
"type"
,
dmpDevelopTaskRequest
.
getType
());
}
//调度类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getScheduleType
()))
{
param
.
put
(
"scheduleType"
,
dmpDevelopTaskRequest
.
getScheduleType
());
}
//是否已提交
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getIsSubmit
()))
{
param
.
put
(
"isSubmit"
,
dmpDevelopTaskRequest
.
getIsSubmit
());
}
//描述
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getTaskDesc
()))
{
param
.
put
(
"taskDesc"
,
dmpDevelopTaskRequest
.
getTaskDesc
());
}
//脚本
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getScript
()))
{
param
.
put
(
"script"
,
dmpDevelopTaskRequest
.
getScript
());
}
//数据状态
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getDataStatus
()))
{
param
.
put
(
"dataStatus"
,
dmpDevelopTaskRequest
.
getDataStatus
());
}
//创建用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getCreateUserId
()))
{
param
.
put
(
"createUserId"
,
dmpDevelopTaskRequest
.
getCreateUserId
());
}
//数据创建时间起
if
(
dmpDevelopTaskRequest
.
getCreateTimeStart
()
!=
null
)
{
param
.
put
(
"createTimeStart"
,
dmpDevelopTaskRequest
.
getCreateTimeStart
());
}
//数据创建时间止
if
(
dmpDevelopTaskRequest
.
getCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"createTimeEnd"
,
dmpDevelopTaskRequest
.
getCreateTimeEnd
());
}
//创建用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getUpdateUserId
()))
{
param
.
put
(
"updateUserId"
,
dmpDevelopTaskRequest
.
getUpdateUserId
());
}
//数据更新时间起
if
(
dmpDevelopTaskRequest
.
getUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"updateTimeStart"
,
dmpDevelopTaskRequest
.
getUpdateTimeStart
());
}
//数据更新时间止
if
(
dmpDevelopTaskRequest
.
getUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"updateTimeEnd"
,
dmpDevelopTaskRequest
.
getUpdateTimeEnd
());
}
//校验状态:SUCCEED 成功, FAIL 失败
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getChkResult
()))
{
param
.
put
(
"chkResult"
,
dmpDevelopTaskRequest
.
getChkResult
());
}
//同步状态:SUCCEED 成功,FAIL 失败
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getSyncResult
()))
{
param
.
put
(
"syncResult"
,
dmpDevelopTaskRequest
.
getSyncResult
());
}
//最终校验时间起
if
(
dmpDevelopTaskRequest
.
getChkTimeStart
()
!=
null
)
{
param
.
put
(
"chkTimeStart"
,
dmpDevelopTaskRequest
.
getChkTimeStart
());
}
//最终校验时间止
if
(
dmpDevelopTaskRequest
.
getChkTimeEnd
()
!=
null
)
{
param
.
put
(
"chkTimeEnd"
,
dmpDevelopTaskRequest
.
getChkTimeEnd
());
}
//最终同步时间起
if
(
dmpDevelopTaskRequest
.
getSyncTimeStart
()
!=
null
)
{
param
.
put
(
"syncTimeStart"
,
dmpDevelopTaskRequest
.
getSyncTimeStart
());
}
//最终同步时间止
if
(
dmpDevelopTaskRequest
.
getSyncTimeEnd
()
!=
null
)
{
param
.
put
(
"syncTimeEnd"
,
dmpDevelopTaskRequest
.
getSyncTimeEnd
());
}
//
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getFlowHeader
()))
{
param
.
put
(
"flowHeader"
,
dmpDevelopTaskRequest
.
getFlowHeader
());
}
//
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getFlowJson
()))
{
param
.
put
(
"flowJson"
,
dmpDevelopTaskRequest
.
getFlowJson
());
}
//
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getVersion
()))
{
param
.
put
(
"version"
,
dmpDevelopTaskRequest
.
getVersion
());
}
//
if
(
dmpDevelopTaskRequest
.
getIsGziped
()
!=
null
)
{
param
.
put
(
"isGziped"
,
dmpDevelopTaskRequest
.
getIsGziped
());
}
//源数据库ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getSourceDbId
()))
{
param
.
put
(
"sourceDbId"
,
dmpDevelopTaskRequest
.
getSourceDbId
());
}
//源数据库名称
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getSourceDbName
()))
{
param
.
put
(
"sourceDbName"
,
dmpDevelopTaskRequest
.
getSourceDbName
());
}
//源数据表名称
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getSourceTableName
()))
{
param
.
put
(
"sourceTableName"
,
dmpDevelopTaskRequest
.
getSourceTableName
());
}
//目标数据库名称
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getTargetDbName
()))
{
param
.
put
(
"targetDbName"
,
dmpDevelopTaskRequest
.
getTargetDbName
());
}
//目标数据表名称
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskRequest
.
getTargetTableName
()))
{
param
.
put
(
"targetTableName"
,
dmpDevelopTaskRequest
.
getTargetTableName
());
}
PageHelper
.
startPage
(
dmpDevelopTaskRequest
.
getPageNum
(),
dmpDevelopTaskRequest
.
getPageSize
());
List
<
DmpDevelopTask
>
list
=
dmpDevelopTaskDao
.
findList
(
param
);
List
<
DmpDevelopTaskDto
>
dtos
=
MyDmpDevelopTaskConverter
.
INSTANCE
().
domain2dto
(
list
);
PageInfo
<
DmpDevelopTaskDto
>
pageInfo
=
new
PageInfo
<>(
dtos
);
pageInfoResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/DmpNavigationTreeServiceImpl.java
View file @
1d492b05
package
com
.
jz
.
dmp
.
modules
.
service
.
impl
;
package
com
.
jz
.
dmp
.
modules
.
service
.
impl
;
import
com.jz.dmp.modules.dao.DmpNavigationTreeDao
;
import
java.util.Date
;
import
com.jz.dmp.modules.model.DmpNavigationTree
;
import
java.util.List
;
import
com.jz.dmp.modules.service.DmpNavigationTreeService
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
javax.annotation.Resource
;
import
com.jz.common.bean.BaseBeanResponse
;
import
java.util.List
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto
;
import
com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest
;
import
com.jz.dmp.modules.controller.bean.MyDmpNavigationTreeConverter
;
import
com.jz.dmp.modules.dao.DmpNavigationTreeDao
;
import
com.jz.dmp.modules.model.DmpNavigationTree
;
import
com.jz.dmp.modules.service.DmpNavigationTreeService
;
/**
/**
* DMP资源导航树(DmpNavigationTree)表服务实现类
* DMP资源导航树(DmpNavigationTree)表服务实现类
...
@@ -16,7 +26,7 @@ import java.util.List;
...
@@ -16,7 +26,7 @@ import java.util.List;
* @since 2020-12-29 15:08:16
* @since 2020-12-29 15:08:16
*/
*/
@Service
(
"dmpNavigationTreeService"
)
@Service
(
"dmpNavigationTreeService"
)
public
class
DmpNavigationTreeServiceImpl
implements
DmpNavigationTreeService
{
public
class
DmpNavigationTreeServiceImpl
extends
BaseService
implements
DmpNavigationTreeService
{
@Autowired
@Autowired
private
DmpNavigationTreeDao
dmpNavigationTreeDao
;
private
DmpNavigationTreeDao
dmpNavigationTreeDao
;
...
@@ -49,9 +59,14 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService {
...
@@ -49,9 +59,14 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService {
*
*
* @param dmpNavigationTree 实例对象
* @param dmpNavigationTree 实例对象
* @return 实例对象
* @return 实例对象
* @throws Exception
*/
*/
@Override
@Override
public
DmpNavigationTree
insert
(
DmpNavigationTree
dmpNavigationTree
)
{
public
DmpNavigationTree
insert
(
DmpNavigationTree
dmpNavigationTree
)
throws
Exception
{
// 创建人
dmpNavigationTree
.
setCreateUserId
(
getHttpRequestUserId
(
null
).
toString
());
// 创建时间
dmpNavigationTree
.
setCreateTime
(
new
Date
());
this
.
dmpNavigationTreeDao
.
insert
(
dmpNavigationTree
);
this
.
dmpNavigationTreeDao
.
insert
(
dmpNavigationTree
);
return
dmpNavigationTree
;
return
dmpNavigationTree
;
}
}
...
@@ -78,4 +93,76 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService {
...
@@ -78,4 +93,76 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService {
public
boolean
deleteById
(
Integer
id
)
{
public
boolean
deleteById
(
Integer
id
)
{
return
this
.
dmpNavigationTreeDao
.
deleteById
(
id
)
>
0
;
return
this
.
dmpNavigationTreeDao
.
deleteById
(
id
)
>
0
;
}
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpNavigationTreeService#findList(com.ycxc.vmts.controller.bas.
* bean.DmpNavigationTreeRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpNavigationTreeDto
>
findList
(
DmpNavigationTreeRequest
dmpNavigationTreeRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpNavigationTreeDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpNavigationTree
dmpNavigationTree
=
new
DmpNavigationTree
();
//ID
if
(
dmpNavigationTreeRequest
.
getId
()
!=
null
)
{
dmpNavigationTree
.
setId
(
dmpNavigationTreeRequest
.
getId
());
}
//项目ID
if
(
dmpNavigationTreeRequest
.
getProjectId
()
!=
null
)
{
dmpNavigationTree
.
setProjectId
(
dmpNavigationTreeRequest
.
getProjectId
());
}
//树类别
if
(!
StringUtils
.
isEmpty
(
dmpNavigationTreeRequest
.
getCategory
()))
{
dmpNavigationTree
.
setCategory
(
dmpNavigationTreeRequest
.
getCategory
());
}
//树类型
if
(!
StringUtils
.
isEmpty
(
dmpNavigationTreeRequest
.
getType
()))
{
dmpNavigationTree
.
setType
(
dmpNavigationTreeRequest
.
getType
());
}
//名称
if
(!
StringUtils
.
isEmpty
(
dmpNavigationTreeRequest
.
getName
()))
{
dmpNavigationTree
.
setName
(
dmpNavigationTreeRequest
.
getName
());
}
//序号
if
(
dmpNavigationTreeRequest
.
getTreeSort
()
!=
null
)
{
dmpNavigationTree
.
setTreeSort
(
dmpNavigationTreeRequest
.
getTreeSort
());
}
//是否叶子节点(0:否,1:是)
if
(!
StringUtils
.
isEmpty
(
dmpNavigationTreeRequest
.
getIsLevel
()))
{
dmpNavigationTree
.
setIsLevel
(
dmpNavigationTreeRequest
.
getIsLevel
());
}
//是否启用(0:否,1:是)
if
(!
StringUtils
.
isEmpty
(
dmpNavigationTreeRequest
.
getIsEnable
()))
{
dmpNavigationTree
.
setIsEnable
(
dmpNavigationTreeRequest
.
getIsEnable
());
}
//父节点ID
if
(
dmpNavigationTreeRequest
.
getParentId
()
!=
null
)
{
dmpNavigationTree
.
setParentId
(
dmpNavigationTreeRequest
.
getParentId
());
}
//数据状态
if
(!
StringUtils
.
isEmpty
(
dmpNavigationTreeRequest
.
getDataStatus
()))
{
dmpNavigationTree
.
setDataStatus
(
dmpNavigationTreeRequest
.
getDataStatus
());
}
//创建用户ID
if
(!
StringUtils
.
isEmpty
(
dmpNavigationTreeRequest
.
getCreateUserId
()))
{
dmpNavigationTree
.
setCreateUserId
(
dmpNavigationTreeRequest
.
getCreateUserId
());
}
//创建用户ID
if
(!
StringUtils
.
isEmpty
(
dmpNavigationTreeRequest
.
getUpdateUserId
()))
{
dmpNavigationTree
.
setUpdateUserId
(
dmpNavigationTreeRequest
.
getUpdateUserId
());
}
List
<
DmpNavigationTree
>
list
=
dmpNavigationTreeDao
.
queryAll
(
dmpNavigationTree
);
List
<
DmpNavigationTreeDto
>
dtos
=
MyDmpNavigationTreeConverter
.
INSTANCE
().
domain2dto
(
list
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setDatas
(
dtos
);
return
baseBeanResponse
;
}
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/sys/DmpPermissionService.java
View file @
1d492b05
...
@@ -101,6 +101,6 @@ public interface DmpPermissionService {
...
@@ -101,6 +101,6 @@ public interface DmpPermissionService {
* @throws
* @throws
*/
*/
public
BaseBeanResponse
<
DmpPermissionDto
>
findListByParentCode
(
String
parentCode
,
public
BaseBeanResponse
<
DmpPermissionDto
>
findListByParentCode
(
String
parentCode
,
HttpServletRequest
httpRequest
)
throws
Exception
;
String
type
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
View file @
1d492b05
...
@@ -467,6 +467,15 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic
...
@@ -467,6 +467,15 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic
List
<
DmpPermission
>
memberProjPermissions
=
dmpPermissionService
.
findPermissionByRoles
(
memberProjectRoles
);
List
<
DmpPermission
>
memberProjPermissions
=
dmpPermissionService
.
findPermissionByRoles
(
memberProjectRoles
);
member
.
setMemberProjectPermissionList
(
memberProjPermissions
);
member
.
setMemberProjectPermissionList
(
memberProjPermissions
);
List
<
DmpPermission
>
permissions
=
new
ArrayList
<
DmpPermission
>();
if
(!
CollectionUtils
.
isEmpty
(
memberProjPermissions
))
{
permissions
.
addAll
(
memberProjPermissions
);
}
if
(!
CollectionUtils
.
isEmpty
(
member
.
getMemberPermissionList
()))
{
permissions
.
addAll
(
member
.
getMemberPermissionList
());
}
member
.
setPermissionList
(
permissions
);
//修改session上用户信息
//修改session上用户信息
//生成当所有授权
//生成当所有授权
List
<
GrantedAuthority
>
grantedAuthorities
=
new
ArrayList
<
GrantedAuthority
>(
authentication
.
getAuthorities
());
List
<
GrantedAuthority
>
grantedAuthorities
=
new
ArrayList
<
GrantedAuthority
>(
authentication
.
getAuthorities
());
...
...
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpPermissionServiceImpl.java
View file @
1d492b05
...
@@ -350,7 +350,7 @@ public class DmpPermissionServiceImpl extends BaseService implements DmpPermissi
...
@@ -350,7 +350,7 @@ public class DmpPermissionServiceImpl extends BaseService implements DmpPermissi
*/
*/
@Override
@Override
public
BaseBeanResponse
<
DmpPermissionDto
>
findListByParentCode
(
String
parentCode
,
public
BaseBeanResponse
<
DmpPermissionDto
>
findListByParentCode
(
String
parentCode
,
HttpServletRequest
httpRequest
)
throws
Exception
{
String
type
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpPermissionDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
BaseBeanResponse
<
DmpPermissionDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
...
@@ -362,7 +362,23 @@ public class DmpPermissionServiceImpl extends BaseService implements DmpPermissi
...
@@ -362,7 +362,23 @@ public class DmpPermissionServiceImpl extends BaseService implements DmpPermissi
return
baseBeanResponse
;
return
baseBeanResponse
;
}
}
List
<
DmpPermission
>
dmpPermissions
=
dmpPermissionMapper
.
findByRoles
(
currentUser
.
getMemberProjectRoleList
());
List
<
DmpPermission
>
dmpPermissions
=
new
ArrayList
<
DmpPermission
>();
if
(
"0"
.
equals
(
type
))
{
dmpPermissions
=
dmpPermissionMapper
.
findByRoles
(
currentUser
.
getMemberProjectRoleList
());
}
else
if
(
"1"
.
equals
(
type
))
{
dmpPermissions
=
dmpPermissionMapper
.
findByRoles
(
currentUser
.
getMemberRoleList
());
}
else
{
List
<
DmpPermission
>
list1
=
dmpPermissionMapper
.
findByRoles
(
currentUser
.
getMemberProjectRoleList
());
List
<
DmpPermission
>
list2
=
dmpPermissionMapper
.
findByRoles
(
currentUser
.
getMemberRoleList
());
List
<
DmpPermission
>
permissions
=
new
ArrayList
<
DmpPermission
>();
if
(!
CollectionUtils
.
isEmpty
(
list1
))
{
permissions
.
addAll
(
list1
);
}
if
(!
CollectionUtils
.
isEmpty
(
list2
))
{
permissions
.
addAll
(
list2
);
}
dmpPermissions
=
permissions
;
}
//整理资源为树形结构
//整理资源为树形结构
List
<
DmpPermission
>
permissions
=
permissionArrangeTree
(
parentCode
,
dmpPermissions
);
List
<
DmpPermission
>
permissions
=
permissionArrangeTree
(
parentCode
,
dmpPermissions
);
...
...
src/main/resources/mapper/dmp/DmpDevelopTaskHistoryMapper.xml
0 → 100644
View file @
1d492b05
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
View file @
1d492b05
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.DmpDevelopTaskDao"
>
<mapper
namespace=
"com.jz.dmp.modules.dao.DmpDevelopTaskDao"
>
<resultMap
id=
"DmpDevelopTaskResultMap"
type=
"com.jz.dmp.modules.model.DmpDevelopTask"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"task_type"
property=
"taskType"
jdbcType=
"CHAR"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"CHAR"
/>
<result
column=
"schedule_type"
property=
"scheduleType"
jdbcType=
"CHAR"
/>
<result
column=
"is_submit"
property=
"isSubmit"
jdbcType=
"CHAR"
/>
<result
column=
"task_desc"
property=
"taskDesc"
jdbcType=
"VARCHAR"
/>
<result
column=
"script"
property=
"script"
jdbcType=
"BLOB"
typeHandler=
"com.jz.common.persistence.CBTHandler"
/>
<result
column=
"flow_json"
property=
"flowJson"
jdbcType=
"BLOB"
typeHandler=
"com.jz.common.persistence.CBTHandler"
/>
<result
column=
"flow_header"
property=
"flowHeader"
jdbcType=
"VARCHAR"
/>
<result
column=
"version"
property=
"version"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"tree_id"
property=
"treeId"
jdbcType=
"INTEGER"
/>
<result
column=
"is_gziped"
property=
"isGziped"
jdbcType=
"INTEGER"
/>
<!-- <result column="chk_result" property="chkResult" javaType="VARCHAR"/> -->
<!-- <result column="sync_result" property="syncResult" javaType="VARCHAR"/> -->
</resultMap>
<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,
flow_json, version,is_gziped
</sql>
<select
id=
"getDmpTaskAndTreeInfo"
parameterType=
"string"
resultType=
"map"
>
<select
id=
"getDmpTaskAndTreeInfo"
parameterType=
"string"
resultType=
"map"
>
select
select
...
@@ -119,41 +148,42 @@
...
@@ -119,41 +148,42 @@
<!--数据运维-数据开发任务列表分页查询-->
<!--数据运维-数据开发任务列表分页查询-->
<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
a.*,
b.real_name as userName
from(
select
select
t1.id as taskId,
t1.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,
date_format(t1.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
date_format(t1.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
date_format(t1.update_time,'%Y-%m-%d %H:%i:%s') as updateTime
date_format(t1.update_time,'%Y-%m-%d %H:%i:%s') as updateTime,
from
t3.real_name as userName
dmp_navigation_tree t1
left join dmp_develop_task t2 on t2.TREE_ID=t1.ID
where 1=1
and t1.project_id = #{projectId}
union all
select
t1.id as taskId,
t1.name as taskName,
t1.type,
t1.create_user_id as createUserId,
t1.create_time as createTime,
t1.update_time as updateTime
from
from
dmp_navigation_tree t1
dmp_navigation_tree t1
left join dmp_develop_task t2 on t2.TREE_ID=t1.ID
left join dmp_develop_task t2 on t2.TREE_ID=t1.ID
where 1=1
left join dmp_member t3 on t1.create_user_id=t3.user_id
where 1=1 and t1.type='01'
and t1.project_id = #{projectId}
and t1.project_id = #{projectId}
) a
<if
test=
"treeId != null and treeId != ''"
>
and t1.id =#{treeId}
</if>
left join dmp_member b on a.createUserId=b.user_id
<if
test=
"treeIdOrName != null and treeIdOrName != ''"
>
and t1.name like concat('%',#{treeIdOrName},'%')
</if>
where 1=1
<if
test=
"taskType != null and taskType!= ''"
>
and t1.type=#{taskType}
</if>
<if
test=
"treeId != null and treeId != ''"
>
and a.taskId =#{treeId}
</if>
<if
test=
"treeIdOrName != null and treeIdOrName != ''"
>
and a.taskName like concat('%',#{treeIdOrName},'%')
</if>
<if
test=
"taskType != null and taskType!= ''"
>
and a.type=#{taskType}
</if>
</select>
</select>
<select
id=
"findList"
resultMap=
"DmpDevelopTaskResultMap"
>
SELECT
<include
refid=
"FIND_ALL_COLUMN"
/>
FROM dmp_develop_task WHERE 1=1
<if
test=
"taskType != null"
>
AND task_type = #{taskType}
</if>
<if
test=
"type != null"
>
AND type = #{type}
</if>
<if
test=
"scheduleType != null"
>
AND schedule_type = #{scheduleType}
</if>
<if
test=
"isSubmit != null"
>
AND is_submit = #{isSubmit}
</if>
<if
test=
"taskDesc != null"
>
AND task_desc = #{taskDesc}
</if>
<if
test=
"script != null"
>
AND script = #{script, jdbcType=BLOB,
typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus}
</if>
<if
test=
"treeId != null"
>
AND tree_id = #{treeId}
</if>
<if
test=
"flowHeader != null"
>
AND flow_header = #{flowHeader}
</if>
<if
test=
"flowJson != null"
>
AND flow_json = #{flowJson}
</if>
<if
test=
"version != null"
>
AND version = #{version}
</if>
<if
test=
"gziped != null"
>
AND is_gziped = #{gziped}
</if>
</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