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
Show 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
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.constant.JsonResult
;
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.DataDevTaskListReq
;
import
com.jz.dmp.modules.model.DmpDevelopTask
;
...
...
@@ -25,4 +29,21 @@ public interface DmpDevelopTaskService {
* @since 2021-01-13
*/
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
;
import
com.jz.dmp.modules.model.DmpNavigationTree
;
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)表服务接口
*
...
...
@@ -35,7 +40,7 @@ public interface DmpNavigationTreeService {
* @param dmpNavigationTree 实例对象
* @return 实例对象
*/
DmpNavigationTree
insert
(
DmpNavigationTree
dmpNavigationTree
);
DmpNavigationTree
insert
(
DmpNavigationTree
dmpNavigationTree
)
throws
Exception
;
/**
* 修改数据
...
...
@@ -53,4 +58,13 @@ public interface DmpNavigationTreeService {
*/
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
package
com
.
jz
.
dmp
.
modules
.
service
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
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
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest
;
import
com.jz.dmp.modules.dao.DmpDevelopTaskHistoryMapper
;
import
com.jz.dmp.modules.model.DmpDevelopTaskHistory
;
import
com.jz.dmp.modules.service.DmpDevelopTaskHistoryService
;
/**
* 任务历史版本服务的实现?
*
* @author ybz
*
*/
@Service
(
"dmpDevelopTaskHistoryService"
)
public
class
DmpDevelopTaskHistoryServiceImpl
extends
BaseService
implements
DmpDevelopTaskHistoryService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DmpDevelopTaskHistoryServiceImpl
.
class
);
@Autowired
private
DmpDevelopTaskHistoryMapper
dmpDevelopTaskHistoryMapper
;
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#findList(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
PageInfoResponse
<
DmpDevelopTaskHistoryDto
>
findListWithPage
(
DmpDevelopTaskHistoryRequest
dmpDevelopTaskHistoryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DmpDevelopTaskHistoryDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//主键
if
(
dmpDevelopTaskHistoryRequest
.
getId
()
!=
null
)
{
param
.
put
(
"id"
,
dmpDevelopTaskHistoryRequest
.
getId
());
}
//所属任务(关联任务主键)
if
(
dmpDevelopTaskHistoryRequest
.
getTaskId
()
!=
null
)
{
param
.
put
(
"taskId"
,
dmpDevelopTaskHistoryRequest
.
getTaskId
());
}
//tree ID
if
(
dmpDevelopTaskHistoryRequest
.
getTreeId
()
!=
null
)
{
param
.
put
(
"treeId"
,
dmpDevelopTaskHistoryRequest
.
getTreeId
());
}
//数据源ID
if
(
dmpDevelopTaskHistoryRequest
.
getDatasourceId
()
!=
null
)
{
param
.
put
(
"datasourceId"
,
dmpDevelopTaskHistoryRequest
.
getDatasourceId
());
}
//任务类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskType
()))
{
param
.
put
(
"taskType"
,
dmpDevelopTaskHistoryRequest
.
getTaskType
());
}
//类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getType
()))
{
param
.
put
(
"type"
,
dmpDevelopTaskHistoryRequest
.
getType
());
}
//调度类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getScheduleType
()))
{
param
.
put
(
"scheduleType"
,
dmpDevelopTaskHistoryRequest
.
getScheduleType
());
}
//是否已提交
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getIsSubmit
()))
{
param
.
put
(
"isSubmit"
,
dmpDevelopTaskHistoryRequest
.
getIsSubmit
());
}
//描述
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskDesc
()))
{
param
.
put
(
"taskDesc"
,
dmpDevelopTaskHistoryRequest
.
getTaskDesc
());
}
//脚本
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getScript
()))
{
param
.
put
(
"script"
,
dmpDevelopTaskHistoryRequest
.
getScript
());
}
//flow_header
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getFlowHeader
()))
{
param
.
put
(
"flowHeader"
,
dmpDevelopTaskHistoryRequest
.
getFlowHeader
());
}
//flow_json
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getFlowJson
()))
{
param
.
put
(
"flowJson"
,
dmpDevelopTaskHistoryRequest
.
getFlowJson
());
}
//版本
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getVersion
()))
{
param
.
put
(
"version"
,
dmpDevelopTaskHistoryRequest
.
getVersion
());
}
//is_gziped
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getIsGziped
()))
{
param
.
put
(
"isGziped"
,
dmpDevelopTaskHistoryRequest
.
getIsGziped
());
}
//任务数据状态
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskDataStatus
()))
{
param
.
put
(
"taskDataStatus"
,
dmpDevelopTaskHistoryRequest
.
getTaskDataStatus
());
}
//任务创建用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateUserId
()))
{
param
.
put
(
"taskCreateUserId"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateUserId
());
}
//任务创建时间起
if
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeStart
()
!=
null
)
{
param
.
put
(
"taskCreateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeStart
());
}
//任务创建时间止
if
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"taskCreateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeEnd
());
}
//任务修改用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateUserId
()))
{
param
.
put
(
"taskUpdateUserId"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateUserId
());
}
//任务修改时间起
if
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"taskUpdateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeStart
());
}
//任务修改时间止
if
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"taskUpdateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeEnd
());
}
//备注
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getRemark
()))
{
param
.
put
(
"remark"
,
dmpDevelopTaskHistoryRequest
.
getRemark
());
}
//数据状态(0:删除,1,未删除)
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getDataStatus
()))
{
param
.
put
(
"dataStatus"
,
dmpDevelopTaskHistoryRequest
.
getDataStatus
());
}
//创建用户ID
if
(
dmpDevelopTaskHistoryRequest
.
getCreateUserId
()
!=
null
)
{
param
.
put
(
"createUserId"
,
dmpDevelopTaskHistoryRequest
.
getCreateUserId
());
}
//创建时间起
if
(
dmpDevelopTaskHistoryRequest
.
getCreateTimeStart
()
!=
null
)
{
param
.
put
(
"createTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getCreateTimeStart
());
}
//创建时间止
if
(
dmpDevelopTaskHistoryRequest
.
getCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"createTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getCreateTimeEnd
());
}
//修改用户ID
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateUserId
()
!=
null
)
{
param
.
put
(
"updateUserId"
,
dmpDevelopTaskHistoryRequest
.
getUpdateUserId
());
}
//修改时间起
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"updateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeStart
());
}
//修改时间止
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"updateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
());
}
PageHelper
.
startPage
(
dmpDevelopTaskHistoryRequest
.
getPageNum
(),
dmpDevelopTaskHistoryRequest
.
getPageSize
());
List
<
DmpDevelopTaskHistoryDto
>
list
=
dmpDevelopTaskHistoryMapper
.
findList
(
param
);
PageInfo
<
DmpDevelopTaskHistoryDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#findList(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpDevelopTaskHistoryDto
>
findList
(
DmpDevelopTaskHistoryRequest
dmpDevelopTaskHistoryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpDevelopTaskHistoryDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//主键
if
(
dmpDevelopTaskHistoryRequest
.
getId
()
!=
null
)
{
param
.
put
(
"id"
,
dmpDevelopTaskHistoryRequest
.
getId
());
}
//所属任务(关联任务主键)
if
(
dmpDevelopTaskHistoryRequest
.
getTaskId
()
!=
null
)
{
param
.
put
(
"taskId"
,
dmpDevelopTaskHistoryRequest
.
getTaskId
());
}
//tree ID
if
(
dmpDevelopTaskHistoryRequest
.
getTreeId
()
!=
null
)
{
param
.
put
(
"treeId"
,
dmpDevelopTaskHistoryRequest
.
getTreeId
());
}
//数据源ID
if
(
dmpDevelopTaskHistoryRequest
.
getDatasourceId
()
!=
null
)
{
param
.
put
(
"datasourceId"
,
dmpDevelopTaskHistoryRequest
.
getDatasourceId
());
}
//任务类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskType
()))
{
param
.
put
(
"taskType"
,
dmpDevelopTaskHistoryRequest
.
getTaskType
());
}
//类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getType
()))
{
param
.
put
(
"type"
,
dmpDevelopTaskHistoryRequest
.
getType
());
}
//调度类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getScheduleType
()))
{
param
.
put
(
"scheduleType"
,
dmpDevelopTaskHistoryRequest
.
getScheduleType
());
}
//是否已提交
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getIsSubmit
()))
{
param
.
put
(
"isSubmit"
,
dmpDevelopTaskHistoryRequest
.
getIsSubmit
());
}
//描述
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskDesc
()))
{
param
.
put
(
"taskDesc"
,
dmpDevelopTaskHistoryRequest
.
getTaskDesc
());
}
//脚本
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getScript
()))
{
param
.
put
(
"script"
,
dmpDevelopTaskHistoryRequest
.
getScript
());
}
//flow_header
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getFlowHeader
()))
{
param
.
put
(
"flowHeader"
,
dmpDevelopTaskHistoryRequest
.
getFlowHeader
());
}
//flow_json
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getFlowJson
()))
{
param
.
put
(
"flowJson"
,
dmpDevelopTaskHistoryRequest
.
getFlowJson
());
}
//版本
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getVersion
()))
{
param
.
put
(
"version"
,
dmpDevelopTaskHistoryRequest
.
getVersion
());
}
//is_gziped
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getIsGziped
()))
{
param
.
put
(
"isGziped"
,
dmpDevelopTaskHistoryRequest
.
getIsGziped
());
}
//任务数据状态
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskDataStatus
()))
{
param
.
put
(
"taskDataStatus"
,
dmpDevelopTaskHistoryRequest
.
getTaskDataStatus
());
}
//任务创建用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateUserId
()))
{
param
.
put
(
"taskCreateUserId"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateUserId
());
}
//任务创建时间起
if
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeStart
()
!=
null
)
{
param
.
put
(
"taskCreateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeStart
());
}
//任务创建时间止
if
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"taskCreateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeEnd
());
}
//任务修改用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateUserId
()))
{
param
.
put
(
"taskUpdateUserId"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateUserId
());
}
//任务修改时间起
if
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"taskUpdateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeStart
());
}
//任务修改时间止
if
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"taskUpdateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeEnd
());
}
//备注
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getRemark
()))
{
param
.
put
(
"remark"
,
dmpDevelopTaskHistoryRequest
.
getRemark
());
}
//数据状态(0:删除,1,未删除)
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getDataStatus
()))
{
param
.
put
(
"dataStatus"
,
dmpDevelopTaskHistoryRequest
.
getDataStatus
());
}
//创建用户ID
if
(
dmpDevelopTaskHistoryRequest
.
getCreateUserId
()
!=
null
)
{
param
.
put
(
"createUserId"
,
dmpDevelopTaskHistoryRequest
.
getCreateUserId
());
}
//创建时间起
if
(
dmpDevelopTaskHistoryRequest
.
getCreateTimeStart
()
!=
null
)
{
param
.
put
(
"createTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getCreateTimeStart
());
}
//创建时间止
if
(
dmpDevelopTaskHistoryRequest
.
getCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"createTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getCreateTimeEnd
());
}
//修改用户ID
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateUserId
()
!=
null
)
{
param
.
put
(
"updateUserId"
,
dmpDevelopTaskHistoryRequest
.
getUpdateUserId
());
}
//修改时间起
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"updateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeStart
());
}
//修改时间止
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"updateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
());
}
List
<
DmpDevelopTaskHistoryDto
>
list
=
dmpDevelopTaskHistoryMapper
.
findList
(
param
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setDatas
(
list
);
return
baseBeanResponse
;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#add(com.ycxc.vmts.entity.DmpDevelopTaskHistory,
* javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpDevelopTaskHistory
>
add
(
DmpDevelopTaskHistory
dmpDevelopTaskHistory
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpDevelopTaskHistory
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
// 创建人
dmpDevelopTaskHistory
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
// 创建时间
dmpDevelopTaskHistory
.
setCreateTime
(
new
Date
());
dmpDevelopTaskHistoryMapper
.
insertSelective
(
dmpDevelopTaskHistory
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"新增成功"
);
baseBeanResponse
.
setData
(
dmpDevelopTaskHistory
);
return
baseBeanResponse
;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#edit(com.ycxc.vmts.entity.DmpDevelopTaskHistory,
* javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpDevelopTaskHistory
>
edit
(
DmpDevelopTaskHistory
dmpDevelopTaskHistory
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpDevelopTaskHistory
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
// 修改人
dmpDevelopTaskHistory
.
setUpdateUserId
(
getHttpRequestUserId
(
httpRequest
));
// 修改时间
dmpDevelopTaskHistory
.
setUpdateTime
(
new
Date
());
dmpDevelopTaskHistoryMapper
.
updateByPrimaryKeySelective
(
dmpDevelopTaskHistory
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"修改成功"
);
baseBeanResponse
.
setData
(
dmpDevelopTaskHistory
);
return
baseBeanResponse
;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#findById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpDevelopTaskHistoryDto
>
findById
(
Integer
id
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpDevelopTaskHistoryDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpDevelopTaskHistoryDto
dmpDevelopTaskHistoryDto
=
dmpDevelopTaskHistoryMapper
.
findById
(
id
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpDevelopTaskHistoryDto
);
return
baseBeanResponse
;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#deleteById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteById
(
Integer
id
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpDevelopTaskHistoryMapper
.
deleteByPrimaryKey
(
id
);
baseResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#deleteById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
softDeleteById
(
Integer
id
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpDevelopTaskHistoryMapper
.
softDeleteByPrimaryKey
(
id
);
baseResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseResponse
.
setMessage
(
"软删除成功"
);
return
baseResponse
;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#deleteById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
delete
(
DmpDevelopTaskHistoryRequest
dmpDevelopTaskHistoryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//主键
if
(
dmpDevelopTaskHistoryRequest
.
getId
()
!=
null
)
{
param
.
put
(
"id"
,
dmpDevelopTaskHistoryRequest
.
getId
());
}
//所属任务(关联任务主键)
if
(
dmpDevelopTaskHistoryRequest
.
getTaskId
()
!=
null
)
{
param
.
put
(
"taskId"
,
dmpDevelopTaskHistoryRequest
.
getTaskId
());
}
//tree ID
if
(
dmpDevelopTaskHistoryRequest
.
getTreeId
()
!=
null
)
{
param
.
put
(
"treeId"
,
dmpDevelopTaskHistoryRequest
.
getTreeId
());
}
//数据源ID
if
(
dmpDevelopTaskHistoryRequest
.
getDatasourceId
()
!=
null
)
{
param
.
put
(
"datasourceId"
,
dmpDevelopTaskHistoryRequest
.
getDatasourceId
());
}
//任务类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskType
()))
{
param
.
put
(
"taskType"
,
dmpDevelopTaskHistoryRequest
.
getTaskType
());
}
//类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getType
()))
{
param
.
put
(
"type"
,
dmpDevelopTaskHistoryRequest
.
getType
());
}
//调度类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getScheduleType
()))
{
param
.
put
(
"scheduleType"
,
dmpDevelopTaskHistoryRequest
.
getScheduleType
());
}
//是否已提交
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getIsSubmit
()))
{
param
.
put
(
"isSubmit"
,
dmpDevelopTaskHistoryRequest
.
getIsSubmit
());
}
//描述
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskDesc
()))
{
param
.
put
(
"taskDesc"
,
dmpDevelopTaskHistoryRequest
.
getTaskDesc
());
}
//脚本
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getScript
()))
{
param
.
put
(
"script"
,
dmpDevelopTaskHistoryRequest
.
getScript
());
}
//flow_header
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getFlowHeader
()))
{
param
.
put
(
"flowHeader"
,
dmpDevelopTaskHistoryRequest
.
getFlowHeader
());
}
//flow_json
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getFlowJson
()))
{
param
.
put
(
"flowJson"
,
dmpDevelopTaskHistoryRequest
.
getFlowJson
());
}
//版本
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getVersion
()))
{
param
.
put
(
"version"
,
dmpDevelopTaskHistoryRequest
.
getVersion
());
}
//is_gziped
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getIsGziped
()))
{
param
.
put
(
"isGziped"
,
dmpDevelopTaskHistoryRequest
.
getIsGziped
());
}
//任务数据状态
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskDataStatus
()))
{
param
.
put
(
"taskDataStatus"
,
dmpDevelopTaskHistoryRequest
.
getTaskDataStatus
());
}
//任务创建用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateUserId
()))
{
param
.
put
(
"taskCreateUserId"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateUserId
());
}
//任务创建时间起
if
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeStart
()
!=
null
)
{
param
.
put
(
"taskCreateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeStart
());
}
//任务创建时间止
if
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"taskCreateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeEnd
());
}
//任务修改用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateUserId
()))
{
param
.
put
(
"taskUpdateUserId"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateUserId
());
}
//任务修改时间起
if
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"taskUpdateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeStart
());
}
//任务修改时间止
if
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"taskUpdateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeEnd
());
}
//备注
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getRemark
()))
{
param
.
put
(
"remark"
,
dmpDevelopTaskHistoryRequest
.
getRemark
());
}
//数据状态(0:删除,1,未删除)
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getDataStatus
()))
{
param
.
put
(
"dataStatus"
,
dmpDevelopTaskHistoryRequest
.
getDataStatus
());
}
//创建用户ID
if
(
dmpDevelopTaskHistoryRequest
.
getCreateUserId
()
!=
null
)
{
param
.
put
(
"createUserId"
,
dmpDevelopTaskHistoryRequest
.
getCreateUserId
());
}
//创建时间起
if
(
dmpDevelopTaskHistoryRequest
.
getCreateTimeStart
()
!=
null
)
{
param
.
put
(
"createTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getCreateTimeStart
());
}
//创建时间止
if
(
dmpDevelopTaskHistoryRequest
.
getCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"createTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getCreateTimeEnd
());
}
//修改用户ID
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateUserId
()
!=
null
)
{
param
.
put
(
"updateUserId"
,
dmpDevelopTaskHistoryRequest
.
getUpdateUserId
());
}
//修改时间起
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"updateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeStart
());
}
//修改时间止
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"updateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
());
}
dmpDevelopTaskHistoryMapper
.
delete
(
param
);
baseResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#deleteById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
softDelete
(
DmpDevelopTaskHistoryRequest
dmpDevelopTaskHistoryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//主键
if
(
dmpDevelopTaskHistoryRequest
.
getId
()
!=
null
)
{
param
.
put
(
"id"
,
dmpDevelopTaskHistoryRequest
.
getId
());
}
//所属任务(关联任务主键)
if
(
dmpDevelopTaskHistoryRequest
.
getTaskId
()
!=
null
)
{
param
.
put
(
"taskId"
,
dmpDevelopTaskHistoryRequest
.
getTaskId
());
}
//tree ID
if
(
dmpDevelopTaskHistoryRequest
.
getTreeId
()
!=
null
)
{
param
.
put
(
"treeId"
,
dmpDevelopTaskHistoryRequest
.
getTreeId
());
}
//数据源ID
if
(
dmpDevelopTaskHistoryRequest
.
getDatasourceId
()
!=
null
)
{
param
.
put
(
"datasourceId"
,
dmpDevelopTaskHistoryRequest
.
getDatasourceId
());
}
//任务类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskType
()))
{
param
.
put
(
"taskType"
,
dmpDevelopTaskHistoryRequest
.
getTaskType
());
}
//类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getType
()))
{
param
.
put
(
"type"
,
dmpDevelopTaskHistoryRequest
.
getType
());
}
//调度类型
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getScheduleType
()))
{
param
.
put
(
"scheduleType"
,
dmpDevelopTaskHistoryRequest
.
getScheduleType
());
}
//是否已提交
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getIsSubmit
()))
{
param
.
put
(
"isSubmit"
,
dmpDevelopTaskHistoryRequest
.
getIsSubmit
());
}
//描述
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskDesc
()))
{
param
.
put
(
"taskDesc"
,
dmpDevelopTaskHistoryRequest
.
getTaskDesc
());
}
//脚本
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getScript
()))
{
param
.
put
(
"script"
,
dmpDevelopTaskHistoryRequest
.
getScript
());
}
//flow_header
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getFlowHeader
()))
{
param
.
put
(
"flowHeader"
,
dmpDevelopTaskHistoryRequest
.
getFlowHeader
());
}
//flow_json
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getFlowJson
()))
{
param
.
put
(
"flowJson"
,
dmpDevelopTaskHistoryRequest
.
getFlowJson
());
}
//版本
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getVersion
()))
{
param
.
put
(
"version"
,
dmpDevelopTaskHistoryRequest
.
getVersion
());
}
//is_gziped
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getIsGziped
()))
{
param
.
put
(
"isGziped"
,
dmpDevelopTaskHistoryRequest
.
getIsGziped
());
}
//任务数据状态
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskDataStatus
()))
{
param
.
put
(
"taskDataStatus"
,
dmpDevelopTaskHistoryRequest
.
getTaskDataStatus
());
}
//任务创建用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateUserId
()))
{
param
.
put
(
"taskCreateUserId"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateUserId
());
}
//任务创建时间起
if
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeStart
()
!=
null
)
{
param
.
put
(
"taskCreateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeStart
());
}
//任务创建时间止
if
(
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"taskCreateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getTaskCreateTimeEnd
());
}
//任务修改用户ID
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateUserId
()))
{
param
.
put
(
"taskUpdateUserId"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateUserId
());
}
//任务修改时间起
if
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"taskUpdateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeStart
());
}
//任务修改时间止
if
(
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"taskUpdateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getTaskUpdateTimeEnd
());
}
//备注
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getRemark
()))
{
param
.
put
(
"remark"
,
dmpDevelopTaskHistoryRequest
.
getRemark
());
}
//数据状态(0:删除,1,未删除)
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskHistoryRequest
.
getDataStatus
()))
{
param
.
put
(
"dataStatus"
,
dmpDevelopTaskHistoryRequest
.
getDataStatus
());
}
//创建用户ID
if
(
dmpDevelopTaskHistoryRequest
.
getCreateUserId
()
!=
null
)
{
param
.
put
(
"createUserId"
,
dmpDevelopTaskHistoryRequest
.
getCreateUserId
());
}
//创建时间起
if
(
dmpDevelopTaskHistoryRequest
.
getCreateTimeStart
()
!=
null
)
{
param
.
put
(
"createTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getCreateTimeStart
());
}
//创建时间止
if
(
dmpDevelopTaskHistoryRequest
.
getCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"createTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getCreateTimeEnd
());
}
//修改用户ID
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateUserId
()
!=
null
)
{
param
.
put
(
"updateUserId"
,
dmpDevelopTaskHistoryRequest
.
getUpdateUserId
());
}
//修改时间起
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"updateTimeStart"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeStart
());
}
//修改时间止
if
(
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"updateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
());
}
dmpDevelopTaskHistoryMapper
.
softDelete
(
param
);
baseResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseResponse
.
setMessage
(
"软删除成功"
);
return
baseResponse
;
}
/**
*批量删除
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteByIds
(
List
<
Integer
>
idList
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpDevelopTaskHistoryMapper
.
deleteByIds
(
idList
);
baseResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/**
*批量软删除
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
softDeleteByIds
(
List
<
Integer
>
idList
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpDevelopTaskHistoryMapper
.
softDeleteByIds
(
idList
);
baseResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseResponse
.
setMessage
(
"软删除成功"
);
return
baseResponse
;
}
/**
*任务版本回滚
*/
@Override
public
BaseResponse
taskVersionRollback
(
Integer
id
,
HttpServletRequest
httpRequest
)
throws
Exception
{
//修改task表中任务信息
//重新发布到azkaban
return
null
;
}
}
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
1d492b05
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.PageInfo
;
import
com.jz.agent.service.DmpDsAgentService
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.utils.JsonMapper
;
import
com.jz.common.utils.StringUtils
;
import
com.jz.common.utils.web.XmlUtils
;
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.DataDevTaskListReq
;
import
com.jz.dmp.modules.dao.DmpDevelopTaskDao
;
import
com.jz.dmp.modules.dao.DmpProjectDao
;
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.DmpSyncingDatasourceService
;
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
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Pattern
;
import
com.jz.dmp.modules.service.OfflineSynchService
;
/**
* 任务开发(DmpDevelopTask)表服务实现类
...
...
@@ -57,6 +69,9 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
@Autowired
private
DmpSyncingDatasourceService
dmpSyncingDatasourceService
;
@Autowired
private
OfflineSynchService
offlineSynchService
;
/**
* 添加保存dmp数据(包含校验数据)
*
...
...
@@ -733,9 +748,9 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
Pattern
pattern
=
Pattern
.
compile
(
"^[-\\+]?[\\d]*$"
);
if
(
pattern
.
matcher
(
req
.
getTreeIdOrName
().
trim
()).
matches
())
{
req
.
setTreeId
(
req
.
getTreeIdOrName
());
//id
req
.
setTreeIdOrName
(
null
);
}
else
{
req
.
setTreeIdOrName
(
req
.
getTreeIdOrName
().
trim
());
//节点名称
req
.
setTreeId
(
null
);
}
}
...
...
@@ -748,4 +763,167 @@ 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
);
}
/*
* (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
;
import
com.jz.dmp.modules.dao.DmpNavigationTreeDao
;
import
com.jz.dmp.modules.model.DmpNavigationTree
;
import
com.jz.dmp.modules.service.DmpNavigationTreeService
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
com.jz.common.bean.BaseBeanResponse
;
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)表服务实现类
...
...
@@ -16,7 +26,7 @@ import java.util.List;
* @since 2020-12-29 15:08:16
*/
@Service
(
"dmpNavigationTreeService"
)
public
class
DmpNavigationTreeServiceImpl
implements
DmpNavigationTreeService
{
public
class
DmpNavigationTreeServiceImpl
extends
BaseService
implements
DmpNavigationTreeService
{
@Autowired
private
DmpNavigationTreeDao
dmpNavigationTreeDao
;
...
...
@@ -49,9 +59,14 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService {
*
* @param dmpNavigationTree 实例对象
* @return 实例对象
* @throws Exception
*/
@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
);
return
dmpNavigationTree
;
}
...
...
@@ -78,4 +93,76 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService {
public
boolean
deleteById
(
Integer
id
)
{
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 {
* @throws
*/
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
List
<
DmpPermission
>
memberProjPermissions
=
dmpPermissionService
.
findPermissionByRoles
(
memberProjectRoles
);
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上用户信息
//生成当所有授权
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
*/
@Override
public
BaseBeanResponse
<
DmpPermissionDto
>
findListByParentCode
(
String
parentCode
,
HttpServletRequest
httpRequest
)
throws
Exception
{
String
type
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpPermissionDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
...
...
@@ -362,7 +362,23 @@ public class DmpPermissionServiceImpl extends BaseService implements DmpPermissi
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
);
...
...
src/main/resources/mapper/dmp/DmpDevelopTaskHistoryMapper.xml
0 → 100644
View file @
1d492b05
<?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" >
<mapper
namespace=
"com.jz.dmp.modules.dao.DmpDevelopTaskHistoryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpDevelopTaskHistory"
>
<result
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"task_id"
property=
"taskId"
jdbcType=
"INTEGER"
/>
<result
column=
"tree_id"
property=
"treeId"
jdbcType=
"INTEGER"
/>
<result
column=
"datasource_id"
property=
"datasourceId"
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_header"
property=
"flowHeader"
jdbcType=
"VARCHAR"
/>
<result
column=
"flow_json"
property=
"flowJson"
jdbcType=
"BLOB"
typeHandler=
"com.jz.common.persistence.CBTHandler"
/>
<result
column=
"version"
property=
"version"
jdbcType=
"VARCHAR"
/>
<result
column=
"is_gziped"
property=
"isGziped"
jdbcType=
"VARCHAR"
/>
<result
column=
"task_data_status"
property=
"taskDataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"task_create_user_id"
property=
"taskCreateUserId"
jdbcType=
"CHAR"
/>
<result
column=
"task_create_time"
property=
"taskCreateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"task_update_user_id"
property=
"taskUpdateUserId"
jdbcType=
"CHAR"
/>
<result
column=
"task_update_time"
property=
"taskUpdateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
id, task_id, tree_id, datasource_id, task_type,
type, schedule_type, is_submit, task_desc, script,
flow_header, flow_json, version, is_gziped, task_data_status,
task_create_user_id, task_create_time, task_update_user_id, task_update_time, remark,
data_status, create_user_id, create_time, update_user_id, update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询任务历史版本 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_develop_task_history
where id = #{id,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键删除任务历史版本 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_develop_task_history
where id = #{id,jdbcType=INTEGER}
</delete>
<!-- 根据主键软删除任务历史版本 -->
<update
id=
"softDeleteByPrimaryKey"
parameterType=
"java.lang.String"
>
update dmp_develop_task_history
<set>
data_status = '0'
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<!-- 条件删除任务历史版本 -->
<delete
id=
"delete"
parameterType=
"java.lang.String"
>
delete from dmp_develop_task_history
<where>
<if
test=
"id != null"
>
AND id = #{id,jdbcType=INTEGER}
</if>
<if
test=
"taskId != null"
>
AND task_id = #{taskId,jdbcType=INTEGER}
</if>
<if
test=
"treeId != null"
>
AND tree_id = #{treeId,jdbcType=INTEGER}
</if>
<if
test=
"datasourceId != null"
>
AND datasource_id = #{datasourceId,jdbcType=INTEGER}
</if>
<if
test=
"taskType != null"
>
AND task_type = #{taskType,jdbcType=CHAR}
</if>
<if
test=
"type != null"
>
AND type = #{type,jdbcType=CHAR}
</if>
<if
test=
"scheduleType != null"
>
AND schedule_type = #{scheduleType,jdbcType=CHAR}
</if>
<if
test=
"isSubmit != null"
>
AND is_submit = #{isSubmit,jdbcType=CHAR}
</if>
<if
test=
"taskDesc != null"
>
AND task_desc = #{taskDesc,jdbcType=VARCHAR}
</if>
<if
test=
"script != null"
>
AND script = #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if
test=
"flowHeader != null"
>
AND flow_header = #{flowHeader,jdbcType=VARCHAR}
</if>
<if
test=
"flowJson != null"
>
AND flow_json = #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if
test=
"version != null"
>
AND version = #{version,jdbcType=VARCHAR}
</if>
<if
test=
"isGziped != null"
>
AND is_gziped = #{isGziped,jdbcType=VARCHAR}
</if>
<if
test=
"taskDataStatus != null"
>
AND task_data_status = #{taskDataStatus,jdbcType=CHAR}
</if>
<if
test=
"taskCreateUserId != null"
>
AND task_create_user_id = #{taskCreateUserId,jdbcType=CHAR}
</if>
<if
test=
"taskCreateTimeStart != null"
>
AND task_create_time >= #{taskCreateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"taskCreateTimeEnd != null"
>
AND task_create_time
<![CDATA[ <= ]]>
#{taskCreateTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"taskUpdateUserId != null"
>
AND task_update_user_id = #{taskUpdateUserId,jdbcType=CHAR}
</if>
<if
test=
"taskUpdateTimeStart != null"
>
AND task_update_time >= #{taskUpdateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"taskUpdateTimeEnd != null"
>
AND task_update_time
<![CDATA[ <= ]]>
#{taskUpdateTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</delete>
<!-- 条件软删除任务历史版本 -->
<update
id=
"softDelete"
parameterType=
"java.lang.String"
>
update dmp_develop_task_history
<set>
data_status = '0'
</set>
<where>
<if
test=
"id != null"
>
AND id = #{id,jdbcType=INTEGER}
</if>
<if
test=
"taskId != null"
>
AND task_id = #{taskId,jdbcType=INTEGER}
</if>
<if
test=
"treeId != null"
>
AND tree_id = #{treeId,jdbcType=INTEGER}
</if>
<if
test=
"datasourceId != null"
>
AND datasource_id = #{datasourceId,jdbcType=INTEGER}
</if>
<if
test=
"taskType != null"
>
AND task_type = #{taskType,jdbcType=CHAR}
</if>
<if
test=
"type != null"
>
AND type = #{type,jdbcType=CHAR}
</if>
<if
test=
"scheduleType != null"
>
AND schedule_type = #{scheduleType,jdbcType=CHAR}
</if>
<if
test=
"isSubmit != null"
>
AND is_submit = #{isSubmit,jdbcType=CHAR}
</if>
<if
test=
"taskDesc != null"
>
AND task_desc = #{taskDesc,jdbcType=VARCHAR}
</if>
<if
test=
"script != null"
>
AND script = #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if
test=
"flowHeader != null"
>
AND flow_header = #{flowHeader,jdbcType=VARCHAR}
</if>
<if
test=
"flowJson != null"
>
AND flow_json = #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if
test=
"version != null"
>
AND version = #{version,jdbcType=VARCHAR}
</if>
<if
test=
"isGziped != null"
>
AND is_gziped = #{isGziped,jdbcType=VARCHAR}
</if>
<if
test=
"taskDataStatus != null"
>
AND task_data_status = #{taskDataStatus,jdbcType=CHAR}
</if>
<if
test=
"taskCreateUserId != null"
>
AND task_create_user_id = #{taskCreateUserId,jdbcType=CHAR}
</if>
<if
test=
"taskCreateTimeStart != null"
>
AND task_create_time >= #{taskCreateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"taskCreateTimeEnd != null"
>
AND task_create_time
<![CDATA[ <= ]]>
#{taskCreateTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"taskUpdateUserId != null"
>
AND task_update_user_id = #{taskUpdateUserId,jdbcType=CHAR}
</if>
<if
test=
"taskUpdateTimeStart != null"
>
AND task_update_time >= #{taskUpdateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"taskUpdateTimeEnd != null"
>
AND task_update_time
<![CDATA[ <= ]]>
#{taskUpdateTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</update>
<!-- 插入任务历史版本 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpDevelopTaskHistory"
>
insert into dmp_develop_task_history (
id, task_id, tree_id, datasource_id, task_type,
type, schedule_type, is_submit, task_desc, script,
flow_header, flow_json, version, is_gziped, task_data_status,
task_create_user_id, task_create_time, task_update_user_id, task_update_time, remark,
data_status, create_user_id, create_time, update_user_id, update_time
)
values (
#{id,jdbcType=INTEGER}, #{taskId,jdbcType=INTEGER}, #{treeId,jdbcType=INTEGER}, #{datasourceId,jdbcType=INTEGER}, #{taskType,jdbcType=CHAR},
#{type,jdbcType=CHAR}, #{scheduleType,jdbcType=CHAR}, #{isSubmit,jdbcType=CHAR}, #{taskDesc,jdbcType=VARCHAR}, #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
#{flowHeader,jdbcType=VARCHAR}, #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}, #{version,jdbcType=VARCHAR}, #{isGziped,jdbcType=VARCHAR}, #{taskDataStatus,jdbcType=CHAR},
#{taskCreateUserId,jdbcType=CHAR}, #{taskCreateTime,jdbcType=TIMESTAMP}, #{taskUpdateUserId,jdbcType=CHAR}, #{taskUpdateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
#{dataStatus,jdbcType=CHAR}, #{createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增任务历史版本 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpDevelopTaskHistory"
>
insert into dmp_develop_task_history (
id, task_id, tree_id, datasource_id, task_type,
type, schedule_type, is_submit, task_desc, script,
flow_header, flow_json, version, is_gziped, task_data_status,
task_create_user_id, task_create_time, task_update_user_id, task_update_time, remark,
data_status, create_user_id, create_time, update_user_id, update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.id,jdbcType=INTEGER}, #{item.taskId,jdbcType=INTEGER}, #{item.treeId,jdbcType=INTEGER}, #{item.datasourceId,jdbcType=INTEGER}, #{item.taskType,jdbcType=CHAR},
#{item.type,jdbcType=CHAR}, #{item.scheduleType,jdbcType=CHAR}, #{item.isSubmit,jdbcType=CHAR}, #{item.taskDesc,jdbcType=VARCHAR}, #{item.script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
#{item.flowHeader,jdbcType=VARCHAR}, #{item.flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}, #{item.version,jdbcType=VARCHAR}, #{item.isGziped,jdbcType=VARCHAR}, #{item.taskDataStatus,jdbcType=CHAR},
#{item.taskCreateUserId,jdbcType=CHAR}, #{item.taskCreateTime,jdbcType=TIMESTAMP}, #{item.taskUpdateUserId,jdbcType=CHAR}, #{item.taskUpdateTime,jdbcType=TIMESTAMP}, #{item.remark,jdbcType=VARCHAR},
#{item.dataStatus,jdbcType=CHAR}, #{item.createUserId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<!-- 选择性插入任务历史版本 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.modules.model.DmpDevelopTaskHistory"
>
insert into dmp_develop_task_history
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"taskId != null"
>
task_id,
</if>
<if
test=
"treeId != null"
>
tree_id,
</if>
<if
test=
"datasourceId != null"
>
datasource_id,
</if>
<if
test=
"taskType != null"
>
task_type,
</if>
<if
test=
"type != null"
>
type,
</if>
<if
test=
"scheduleType != null"
>
schedule_type,
</if>
<if
test=
"isSubmit != null"
>
is_submit,
</if>
<if
test=
"taskDesc != null"
>
task_desc,
</if>
<if
test=
"script != null"
>
script,
</if>
<if
test=
"flowHeader != null"
>
flow_header,
</if>
<if
test=
"flowJson != null"
>
flow_json,
</if>
<if
test=
"version != null"
>
version,
</if>
<if
test=
"isGziped != null"
>
is_gziped,
</if>
<if
test=
"taskDataStatus != null"
>
task_data_status,
</if>
<if
test=
"taskCreateUserId != null"
>
task_create_user_id,
</if>
<if
test=
"taskCreateTime != null"
>
task_create_time,
</if>
<if
test=
"taskUpdateUserId != null"
>
task_update_user_id,
</if>
<if
test=
"taskUpdateTime != null"
>
task_update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"dataStatus != null"
>
data_status,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"taskId != null"
>
#{taskId,jdbcType=INTEGER},
</if>
<if
test=
"treeId != null"
>
#{treeId,jdbcType=INTEGER},
</if>
<if
test=
"datasourceId != null"
>
#{datasourceId,jdbcType=INTEGER},
</if>
<if
test=
"taskType != null"
>
#{taskType,jdbcType=CHAR},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=CHAR},
</if>