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
01893647
Commit
01893647
authored
Jan 29, 2021
by
mcb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dmp_dev' of
http://gitlab.ioubuy.cn/yaobenzhang/jz-dmp-service
into dmp_dev
parents
cc0d2675
5f24ed50
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
568 additions
and
76 deletions
+568
-76
AzkabanApiUtils2.java
src/main/java/com/jz/common/utils/AzkabanApiUtils2.java
+53
-13
CommonUtils.java
src/main/java/com/jz/common/utils/CommonUtils.java
+65
-0
FlowParseTool.java
src/main/java/com/jz/common/utils/FlowParseTool.java
+73
-46
ReflectAssistUtils.java
src/main/java/com/jz/common/utils/ReflectAssistUtils.java
+68
-0
SFTPUtils.java
src/main/java/com/jz/common/utils/SFTPUtils.java
+3
-1
DmpNavigationTreeController.java
...z/dmp/modules/controller/DmpNavigationTreeController.java
+0
-1
MyDmpDevelopTaskConverter.java
...mp/modules/controller/bean/MyDmpDevelopTaskConverter.java
+20
-0
DmpProjectConfigInfoDto.java
...s/controller/projconfig/bean/DmpProjectConfigInfoDto.java
+17
-0
DmpPublicConfigInfoRequest.java
...ontroller/projconfig/bean/DmpPublicConfigInfoRequest.java
+52
-0
DmpNavigationTree.java
...main/java/com/jz/dmp/modules/model/DmpNavigationTree.java
+1
-1
DmpPublicConfigInfo.java
...in/java/com/jz/dmp/modules/model/DmpPublicConfigInfo.java
+56
-0
SSOUserInfo.java
src/main/java/com/jz/dmp/modules/model/SSOUserInfo.java
+30
-0
DmpNavigationTreeServiceImpl.java
...mp/modules/service/impl/DmpNavigationTreeServiceImpl.java
+2
-1
FlowServiceImpl.java
...java/com/jz/dmp/modules/service/impl/FlowServiceImpl.java
+20
-2
DmpProjectConfigInfoServiceImpl.java
...vice/projconfig/impl/DmpProjectConfigInfoServiceImpl.java
+13
-0
DmpPublicConfigInfoMapper.xml
...resources/mapper/projconfig/DmpPublicConfigInfoMapper.xml
+95
-11
No files found.
src/main/java/com/jz/common/utils/AzkabanApiUtils2.java
View file @
01893647
package
com
.
jz
.
common
.
utils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.jz.common.utils.web.HttpClientUtils
;
import
com.jz.common.utils.web.SessionUtils
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowExecution
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.io.FileSystemResource
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.client.SimpleClientHttpRequestFactory
;
...
...
@@ -19,11 +20,16 @@ import org.springframework.util.MultiValueMap;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.client.RestTemplate
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.jz.common.utils.web.HttpClientUtils
;
import
com.jz.common.utils.web.SessionUtils
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowExecution
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro
;
import
com.jz.dmp.modules.model.DmpMember
;
import
com.jz.dmp.modules.model.DmpRole
;
import
com.jz.dmp.modules.model.SSOUserInfo
;
/**
* azkaban ajax api 工具类
...
...
@@ -36,6 +42,9 @@ public class AzkabanApiUtils2 {
private
String
azkabanServerUrl
;
private
String
userName
;
private
String
password
;
@Autowired
RedisTemplate
<
String
,
SSOUserInfo
>
redisTemplate
;
public
AzkabanApiUtils2
(
String
azkabanServerUrl
,
String
userName
,
String
password
)
{
this
(
azkabanServerUrl
);
...
...
@@ -93,11 +102,42 @@ public class AzkabanApiUtils2 {
throw new RuntimeException("登陆失败");
}*/
String
sessionId
=
SessionUtils
.
getSession
().
getId
();
//"dcfc608c-c58a-45b7-adc7-9902b652496e";
//String sessionId = "f70d53fa-55da-4688-8d00-64350e4fb8ea";
//String sessionId = "f0d06f4a-874c-4dfc-8959-101b6add6bf5";
//通过redis方式登录Azkaban
String
redisKey
=
"spring:sessions:sessions:"
+
sessionId
;
SSOUserInfo
ssoUserInfo
=
redisTemplate
.
opsForValue
().
get
(
redisKey
);
if
(
ssoUserInfo
==
null
)
{
redisTemplate
.
opsForValue
().
set
(
redisKey
,
getSSOuserInfo
());
}
System
.
err
.
println
(
"----sessionId="
+
sessionId
);
return
sessionId
;
//SessionUtils.getSession().getId();
}
/**
* @Title: getSSOuserInfo
* @Description: TODO(生成azkaban登录需要保存的实体)
* @param @return 参数
* @return SSOUserInfo 返回类型
* @throws
*/
private
SSOUserInfo
getSSOuserInfo
(){
Map
<
String
,
String
>
rolePermissMap
=
new
HashMap
<>();
DmpMember
dmpMember
=
SessionUtils
.
getSecurityUser
();
List
<
DmpRole
>
memberProjectRoles
=
dmpMember
.
getMemberProjectRoleList
();
for
(
DmpRole
role
:
memberProjectRoles
)
{
rolePermissMap
.
put
(
role
.
getRoleType
(),
role
.
getRemark
());
}
SSOUserInfo
ssoUserInfo
=
new
SSOUserInfo
();
ssoUserInfo
.
setUserName
(
dmpMember
.
getUsername
());
ssoUserInfo
.
setAzkabanRoleRefPermissions
(
rolePermissMap
);
return
ssoUserInfo
;
}
/**
* 创建azkaban项目名
...
...
src/main/java/com/jz/common/utils/CommonUtils.java
View file @
01893647
package
com
.
jz
.
common
.
utils
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.util.CollectionUtils
;
public
class
CommonUtils
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
CommonUtils
.
class
);
/**
* UUID随机数
...
...
@@ -36,5 +44,62 @@ public class CommonUtils {
String
uuid
=
UUID
.
randomUUID
().
toString
().
toUpperCase
().
replaceAll
(
"-"
,
""
);
return
uuid
;
}
/**
* @param <T>
* @Title: objArrangeTree
* @Description: TODO(将所有的资源整理成树形结构)
* @param @param dmpPermissions
* @param @return
* @param @throws Exception 参数
* @return List<DmpPermission> 返回类型
* @throws
*/
public
static
<
T
>
List
<
T
>
objArrangeTree
(
Object
parentCode
,
List
<
T
>
objs
,
String
parentCodeFiledName
,
String
codeFieldName
,
String
childrenFieldName
)
throws
Exception
{
Map
<
Object
,
List
<
T
>>
dictMap
=
objs
.
stream
().
collect
(
Collectors
.
groupingBy
(
x
->{
try
{
return
ReflectAssistUtils
.
getFieldValueByFieldName
(
parentCodeFiledName
,
x
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"树形结构封装异常【{}】"
,
e
);
}
return
""
;
}));
List
<
T
>
tList
=
dictMap
.
get
(
parentCode
);
// 获取顶层资源
if
(!
CollectionUtils
.
isEmpty
(
tList
))
{
for
(
T
t
:
tList
)
{
t
=
arrangeChildren
(
t
,
dictMap
,
codeFieldName
,
childrenFieldName
);
}
}
return
tList
;
}
/**
* @Title: arrangeChildren
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param @param permission
* @param @param dictMap
* @param @return
* @param @throws Exception 参数
* @return DmpPermission 返回类型
* @throws
*/
private
static
<
T
>
T
arrangeChildren
(
T
t
,
Map
<
Object
,
List
<
T
>>
dictMap
,
String
codeFieldName
,
String
childrenFieldName
)
throws
Exception
{
Object
code
=
ReflectAssistUtils
.
getFieldValueByFieldName
(
codeFieldName
,
t
);
List
<
T
>
children
=
dictMap
.
get
(
code
);
if
(!
CollectionUtils
.
isEmpty
(
children
))
{
for
(
T
child
:
children
)
{
child
=
arrangeChildren
(
child
,
dictMap
,
codeFieldName
,
childrenFieldName
);
}
ReflectAssistUtils
.
setFieldValueByFieldName
(
childrenFieldName
,
t
,
children
);
}
return
t
;
}
}
src/main/java/com/jz/common/utils/FlowParseTool.java
View file @
01893647
This diff is collapsed.
Click to expand it.
src/main/java/com/jz/common/utils/ReflectAssistUtils.java
0 → 100644
View file @
01893647
package
com
.
jz
.
common
.
utils
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto
;
/**
* @ClassName: ReflectAssistUtils
* @Description: TODO(反射辅助工具类)
* @author ybz
* @date 2021年1月26日
*
*/
public
class
ReflectAssistUtils
{
/**
* @Title: getFieldValueByFieldName
* @Description: TODO(根据属性名称获取属性值)
* @param @param fieldName
* @param @param cls
* @param @return
* @param @throws Exception 参数
* @return Field 返回类型
* @throws
*/
public
static
Object
getFieldValueByFieldName
(
String
fieldName
,
Object
obj
)
throws
Exception
{
Class
<?>
cls
=
obj
.
getClass
();
String
getMethodName
=
"get"
+
fieldName
.
substring
(
0
,
1
).
toUpperCase
()+
fieldName
.
substring
(
1
);
Method
getMethod
=
cls
.
getMethod
(
getMethodName
);
return
getMethod
.
invoke
(
obj
);
}
/**
* @param <T>
* @Title: setFieldValueByFieldName
* @Description: TODO(设置属性值)
* @param @param fieldName
* @param @param cls
* @param @param fieldVaule
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
static
<
T
>
void
setFieldValueByFieldName
(
String
fieldName
,
Object
obj
,
T
fieldVaule
)
throws
Exception
{
Class
<?>
cls
=
obj
.
getClass
();
String
setMethodName
=
"set"
+
fieldName
.
substring
(
0
,
1
).
toUpperCase
()+
fieldName
.
substring
(
1
);
Class
<?>
fieldValueClass
=
fieldVaule
.
getClass
();
if
(
fieldVaule
instanceof
ArrayList
)
{
fieldValueClass
=
List
.
class
;
}
Method
setMethod
=
cls
.
getMethod
(
setMethodName
,
fieldValueClass
);
setMethod
.
invoke
(
obj
,
fieldVaule
);
}
public
static
void
main
(
String
[]
args
)
{
try
{
DmpNavigationTreeDto
dmpNavigationTreeDto
=
new
DmpNavigationTreeDto
();
List
<
DmpNavigationTreeDto
>
list
=
new
ArrayList
<
DmpNavigationTreeDto
>();
setFieldValueByFieldName
(
"children"
,
dmpNavigationTreeDto
,
list
);
System
.
out
.
println
(
getFieldValueByFieldName
(
"children"
,
dmpNavigationTreeDto
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
src/main/java/com/jz/common/utils/SFTPUtils.java
View file @
01893647
...
...
@@ -122,6 +122,7 @@ public class SFTPUtils {
* @param remoteFileDirPath 要上传到的远程文件路径
*/
public
void
singleUploadFile
(
String
localFileDirPath
,
String
uploadFileName
,
String
remoteFileDirPath
)
{
String
pathTeString
=
"C:\\opt\\dmp\\dmp_web\\35\\705\\execArgs\\"
;
//本地文件绝对路径
String
localFileAbsolutePath
=
localFileDirPath
+
uploadFileName
;
String
remoteFileAbsolutePath
=
remoteFileDirPath
+
"/"
+
uploadFileName
;
...
...
@@ -129,7 +130,8 @@ public class SFTPUtils {
createRemoteDirs
(
remoteFileDirPath
);
try
{
sftp
.
put
(
localFileAbsolutePath
,
remoteFileAbsolutePath
,
ChannelSftp
.
OVERWRITE
);
//sftp.put(localFileAbsolutePath, remoteFileAbsolutePath,ChannelSftp.OVERWRITE);
sftp
.
put
(
pathTeString
+
uploadFileName
,
remoteFileAbsolutePath
,
ChannelSftp
.
OVERWRITE
);
sftp
.
chmod
(
Integer
.
parseInt
(
"775"
,
8
),
remoteFileAbsolutePath
);
LOGGER
.
info
(
"上传"
+
localFileAbsolutePath
+
" 到 "
+
remoteFileAbsolutePath
+
" 成功"
);
}
catch
(
SftpException
e
)
{
...
...
src/main/java/com/jz/dmp/modules/controller/DmpNavigationTreeController.java
View file @
01893647
...
...
@@ -159,5 +159,4 @@ public class DmpNavigationTreeController {
return
baseBeanResponse
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/controller/bean/MyDmpDevelopTaskConverter.java
View file @
01893647
package
com
.
jz
.
dmp
.
modules
.
controller
.
bean
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -56,6 +58,8 @@ public class MyDmpDevelopTaskConverter {
flowPro
.
setPublishedToProjectId
(
dmpDevelopTask
.
getProjectId
().
longValue
());
//dmp里生成的任务id
flowPro
.
setTaskId
(
dmpDevelopTask
.
getId
().
longValue
());
//dmp生成树ID
flowPro
.
setTreeId
(
dmpDevelopTask
.
getTreeId
().
longValue
());
//是否带版本号进行节点变更查询?
//检查节点名称要用到的参数?
...
...
@@ -71,5 +75,21 @@ public class MyDmpDevelopTaskConverter {
return
flowPro
;
}
/**
* @Title: scriptToFlowProJson
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param @param script
* @param @return 参数
* @return String 返回类型
* @throws
*/
private
String
scriptToFlowProJson
(
String
script
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
script
);
map
.
put
(
"flowPro"
,
jsonObject
);
return
JSONObject
.
toJSONString
(
map
);
}
}
src/main/java/com/jz/dmp/modules/controller/projconfig/bean/DmpProjectConfigInfoDto.java
View file @
01893647
...
...
@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.projconfig.bean;
import
com.jz.dmp.modules.model.DmpProjectConfigInfo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**项目配置表Dto
* @author ybz
...
...
@@ -9,5 +10,21 @@ import io.swagger.annotations.ApiModel;
*/
@ApiModel
(
value
=
"项目配置表Dto"
,
description
=
"项目配置表Dto"
)
public
class
DmpProjectConfigInfoDto
extends
DmpProjectConfigInfo
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"公共配置"
)
private
DmpPublicConfigInfoDto
dmpPublicConfigInfoDto
;
public
DmpPublicConfigInfoDto
getDmpPublicConfigInfoDto
()
{
return
dmpPublicConfigInfoDto
;
}
public
void
setDmpPublicConfigInfoDto
(
DmpPublicConfigInfoDto
dmpPublicConfigInfoDto
)
{
this
.
dmpPublicConfigInfoDto
=
dmpPublicConfigInfoDto
;
}
}
src/main/java/com/jz/dmp/modules/controller/projconfig/bean/DmpPublicConfigInfoRequest.java
View file @
01893647
...
...
@@ -154,6 +154,30 @@ public class DmpPublicConfigInfoRequest extends BasePageBean {
*/
@ApiModelProperty
(
value
=
"元数据服务web地址"
)
private
String
atlasMonitorUrl
;
/**
* 远程连接默认SERVER地址
*/
@ApiModelProperty
(
value
=
"远程连接默认SERVER地址"
)
private
String
shellCmdServer
;
/**
* 远程连接默认用户
*/
@ApiModelProperty
(
value
=
"远程连接默认用户"
)
private
String
shellCmdUser
;
/**
* 远程连接默认用户密码
*/
@ApiModelProperty
(
value
=
"远程连接默认用户密码"
)
private
String
shellCmdPassword
;
/**
* 上传配置的SFTP端口
*/
@ApiModelProperty
(
value
=
"上传配置的SFTP端口"
)
private
Integer
shellSftpPort
;
/**
* 备注
...
...
@@ -394,6 +418,34 @@ public class DmpPublicConfigInfoRequest extends BasePageBean {
public
void
setAtlasMonitorUrl
(
String
atlasMonitorUrl
)
{
this
.
atlasMonitorUrl
=
atlasMonitorUrl
;
}
public
void
setShellCmdServer
(
String
shellCmdServer
)
{
this
.
shellCmdServer
=
shellCmdServer
;
}
public
String
getShellCmdUser
()
{
return
shellCmdUser
;
}
public
void
setShellCmdUser
(
String
shellCmdUser
)
{
this
.
shellCmdUser
=
shellCmdUser
;
}
public
String
getShellCmdPassword
()
{
return
shellCmdPassword
;
}
public
void
setShellCmdPassword
(
String
shellCmdPassword
)
{
this
.
shellCmdPassword
=
shellCmdPassword
;
}
public
Integer
getShellSftpPort
()
{
return
shellSftpPort
;
}
public
void
setShellSftpPort
(
Integer
shellSftpPort
)
{
this
.
shellSftpPort
=
shellSftpPort
;
}
public
String
getRemark
()
{
return
remark
;
...
...
src/main/java/com/jz/dmp/modules/model/DmpNavigationTree.java
View file @
01893647
...
...
@@ -88,7 +88,7 @@ public class DmpNavigationTree implements Serializable {
* 父节点ID
*/
@ApiModelProperty
(
value
=
"父节点ID"
)
p
rivate
Integer
parentId
;
p
ublic
Integer
parentId
;
public
Integer
getId
()
{
...
...
src/main/java/com/jz/dmp/modules/model/DmpPublicConfigInfo.java
View file @
01893647
...
...
@@ -163,6 +163,30 @@ public class DmpPublicConfigInfo implements Serializable{
*/
@ApiModelProperty
(
value
=
"元数据服务web地址"
)
private
String
atlasMonitorUrl
;
/**
* 远程连接默认SERVER地址
*/
@ApiModelProperty
(
value
=
"远程连接默认SERVER地址"
)
private
String
shellCmdServer
;
/**
* 远程连接默认用户
*/
@ApiModelProperty
(
value
=
"远程连接默认用户"
)
private
String
shellCmdUser
;
/**
* 远程连接默认用户密码
*/
@ApiModelProperty
(
value
=
"远程连接默认用户密码"
)
private
String
shellCmdPassword
;
/**
* 上传配置的SFTP端口
*/
@ApiModelProperty
(
value
=
"上传配置的SFTP端口"
)
private
Integer
shellSftpPort
;
/**
* 备注
...
...
@@ -396,6 +420,38 @@ public class DmpPublicConfigInfo implements Serializable{
public
void
setAtlasMonitorUrl
(
String
atlasMonitorUrl
)
{
this
.
atlasMonitorUrl
=
atlasMonitorUrl
;
}
public
String
getShellCmdServer
()
{
return
shellCmdServer
;
}
public
void
setShellCmdServer
(
String
shellCmdServer
)
{
this
.
shellCmdServer
=
shellCmdServer
;
}
public
String
getShellCmdUser
()
{
return
shellCmdUser
;
}
public
void
setShellCmdUser
(
String
shellCmdUser
)
{
this
.
shellCmdUser
=
shellCmdUser
;
}
public
String
getShellCmdPassword
()
{
return
shellCmdPassword
;
}
public
void
setShellCmdPassword
(
String
shellCmdPassword
)
{
this
.
shellCmdPassword
=
shellCmdPassword
;
}
public
Integer
getShellSftpPort
()
{
return
shellSftpPort
;
}
public
void
setShellSftpPort
(
Integer
shellSftpPort
)
{
this
.
shellSftpPort
=
shellSftpPort
;
}
public
String
getRemark
()
{
return
remark
;
...
...
src/main/java/com/jz/dmp/modules/model/SSOUserInfo.java
0 → 100644
View file @
01893647
package
com
.
jz
.
dmp
.
modules
.
model
;
import
java.io.Serializable
;
import
java.util.Map
;
public
class
SSOUserInfo
implements
Serializable
{
//用户名
private
String
userName
;
//用户角色对应的用户信息
private
Map
<
String
,
String
>
azkabanRoleRefPermissions
;
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
Map
<
String
,
String
>
getAzkabanRoleRefPermissions
()
{
return
azkabanRoleRefPermissions
;
}
public
void
setAzkabanRoleRefPermissions
(
Map
<
String
,
String
>
azkabanRoleRefPermissions
)
{
this
.
azkabanRoleRefPermissions
=
azkabanRoleRefPermissions
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/DmpNavigationTreeServiceImpl.java
View file @
01893647
...
...
@@ -17,6 +17,7 @@ import org.springframework.util.StringUtils;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.common.utils.CommonUtils
;
import
com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto
;
import
com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest
;
import
com.jz.dmp.modules.controller.bean.MyDmpNavigationTreeConverter
;
...
...
@@ -169,7 +170,7 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi
if
(
dmpNavigationTreeRequest
.
getParentId
()!=
null
){
dtos
=
dmpArrangeTree
(
dmpNavigationTreeRequest
.
getParentId
(),
dtos
);
}
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setDatas
(
dtos
);
...
...
src/main/java/com/jz/dmp/modules/service/impl/FlowServiceImpl.java
View file @
01893647
...
...
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.utils.FlowParseTool
;
...
...
@@ -16,6 +17,7 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto
;
import
com.jz.dmp.modules.dao.DmpProjectDao
;
import
com.jz.dmp.modules.dao.DmpWorkFlowSubmitDetailsDao
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectConfigInfoMapper
;
import
com.jz.dmp.modules.model.DmpProject
;
import
com.jz.dmp.modules.model.DmpProjectSystemInfo
;
import
com.jz.dmp.modules.model.DmpWorkFlowSubmitDetails
;
...
...
@@ -24,6 +26,7 @@ import com.jz.dmp.modules.service.DmpNavigationTreeService;
import
com.jz.dmp.modules.service.DmpProjectService
;
import
com.jz.dmp.modules.service.DmpWorkFlowSubmitDetailsService
;
import
com.jz.dmp.modules.service.FlowService
;
import
com.jz.dmp.modules.service.projconfig.DmpProjectConfigInfoService
;
/**
* @ClassName: FlowServiceImpl
...
...
@@ -51,6 +54,9 @@ public class FlowServiceImpl implements FlowService {
@Autowired
private
DmpWorkFlowSubmitDetailsDao
dmpWorkFlowSubmitDetailsDao
;
@Autowired
private
DmpProjectConfigInfoService
dmpProjectConfigInfoService
;
/**
*工作流发布
...
...
@@ -63,9 +69,12 @@ public class FlowServiceImpl implements FlowService {
flowPro
.
setCheckVerion
(
true
);
Long
publishedToProjectId
=
flowPro
.
getPublishedToProjectId
();
DmpProject
publishToProject
=
dmpProjectDao
.
get
(
publishedToProjectId
);
DmpProjectSystemInfo
publishToProjectSystemInfo
=
dmpProjectService
.
getProjectSystemInfo
(
publishedToProjectId
);
//DmpProjectConfigInfoDto dmpProjectConfigInfoDto =
//DmpProjectSystemInfo publishToProjectSystemInfo = dmpProjectService.getProjectSystemInfo(publishedToProjectId);
BaseBeanResponse
<
DmpProjectConfigInfoDto
>
baseBeanResponse
=
dmpProjectConfigInfoService
.
findByProjectId
(
publishedToProjectId
.
intValue
(),
null
);
DmpProjectConfigInfoDto
dmpProjectConfigInfoDto
=
baseBeanResponse
.
getData
();
try
{
/*
FlowParseTool flowParseTool = new FlowParseTool(flowPro,
publishToProject,
publishToProjectSystemInfo,
...
...
@@ -73,6 +82,15 @@ public class FlowServiceImpl implements FlowService {
dmpNavigationTreeService,
dmpWorkFlowSubmitDetailsService
);
*/
FlowParseTool
flowParseTool
=
new
FlowParseTool
(
flowPro
,
publishToProject
,
dmpProjectConfigInfoDto
,
dmpDevelopTaskService
,
dmpNavigationTreeService
,
dmpWorkFlowSubmitDetailsService
);
//保存发布信息
List
<
FlowNodeChangeInfo
>
flowNodeChangeList
=
flowParseTool
.
getChangedNodes
();
...
...
src/main/java/com/jz/dmp/modules/service/projconfig/impl/DmpProjectConfigInfoServiceImpl.java
View file @
01893647
...
...
@@ -29,6 +29,8 @@ import com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoBatch;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoRequest
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectEngineParamDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpPublicConfigInfoDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpPublicConfigInfoRequest
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectConfigEngineMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectConfigInfoMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectEngineParamMapper
;
...
...
@@ -36,6 +38,7 @@ import com.jz.dmp.modules.model.DmpProjectConfigEngine;
import
com.jz.dmp.modules.model.DmpProjectConfigInfo
;
import
com.jz.dmp.modules.model.DmpProjectEngineParam
;
import
com.jz.dmp.modules.service.projconfig.DmpProjectConfigInfoService
;
import
com.jz.dmp.modules.service.projconfig.DmpPublicConfigInfoService
;
/**
* 项目配置表服务的实现?
...
...
@@ -54,6 +57,9 @@ public class DmpProjectConfigInfoServiceImpl extends BaseService implements DmpP
private
DmpProjectConfigEngineMapper
dmpProjectConfigEngineMapper
;
@Autowired
private
DmpProjectEngineParamMapper
dmpProjectEngineParamMapper
;
@Autowired
private
DmpPublicConfigInfoService
dmpPublicConfigInfoService
;
/*
* (non-Javadoc)
...
...
@@ -668,6 +674,13 @@ public class DmpProjectConfigInfoServiceImpl extends BaseService implements DmpP
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
dto
=
list
.
get
(
0
);
//设置公共属性
DmpPublicConfigInfoRequest
request
=
new
DmpPublicConfigInfoRequest
();
BaseBeanResponse
<
DmpPublicConfigInfoDto
>
configInfoBeanResponse
=
dmpPublicConfigInfoService
.
findList
(
request
,
null
);
List
<
DmpPublicConfigInfoDto
>
configInfoDtos
=
configInfoBeanResponse
.
getDatas
();
if
(!
CollectionUtils
.
isEmpty
(
configInfoDtos
))
{
dto
.
setDmpPublicConfigInfoDto
(
configInfoDtos
.
get
(
0
));
}
}
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
...
...
src/main/resources/mapper/projconfig/DmpPublicConfigInfoMapper.xml
View file @
01893647
This diff is collapsed.
Click to expand it.
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