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
1e9b432d
Commit
1e9b432d
authored
Mar 11, 2021
by
sml
Browse files
Options
Browse Files
Download
Plain Diff
代码提交
parents
1e35d073
c68c2a12
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
345 additions
and
47 deletions
+345
-47
FlowParseTool.java
src/main/java/com/jz/common/utils/FlowParseTool.java
+0
-2
DataSourceController.java
...ules/controller/DataIntegration/DataSourceController.java
+6
-5
OfflineSynchController.java
...es/controller/DataIntegration/OfflineSynchController.java
+2
-2
DmpProjectController.java
...a/com/jz/dmp/modules/controller/DmpProjectController.java
+18
-0
MyDmpDevelopTaskConverter.java
...mp/modules/controller/bean/MyDmpDevelopTaskConverter.java
+5
-9
MyDmpProjectConfigEngineConverter.java
...es/controller/bean/MyDmpProjectConfigEngineConverter.java
+59
-0
DmpMemberRequest.java
.../jz/dmp/modules/controller/sys/bean/DmpMemberRequest.java
+58
-0
DmpProjectDao.java
src/main/java/com/jz/dmp/modules/dao/DmpProjectDao.java
+12
-0
DmpProjectService.java
...in/java/com/jz/dmp/modules/service/DmpProjectService.java
+11
-0
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+17
-2
DmpProjectServiceImpl.java
...om/jz/dmp/modules/service/impl/DmpProjectServiceImpl.java
+22
-0
OfflineSynchServiceImpl.java
.../jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
+22
-20
DmpProjectConfigInfoServiceImpl.java
...vice/projconfig/impl/DmpProjectConfigInfoServiceImpl.java
+10
-0
DmpPublicConfigInfoServiceImpl.java
...rvice/projconfig/impl/DmpPublicConfigInfoServiceImpl.java
+8
-4
DmpMemberServiceImpl.java
...jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
+13
-1
DmpDevelopTaskMapper.xml
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
+2
-2
DmpProjectMapper.xml
src/main/resources/mapper/dmp/DmpProjectMapper.xml
+52
-0
DmpProjectConfigEngineMapper.xml
...ources/mapper/projconfig/DmpProjectConfigEngineMapper.xml
+28
-0
No files found.
src/main/java/com/jz/common/utils/FlowParseTool.java
View file @
1e9b432d
...
@@ -13,7 +13,6 @@ import org.apache.commons.lang3.time.DateFormatUtils;
...
@@ -13,7 +13,6 @@ import org.apache.commons.lang3.time.DateFormatUtils;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.constant.StatuConstant
;
...
@@ -23,7 +22,6 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowNodeChangeInf
...
@@ -23,7 +22,6 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowNodeChangeInf
import
com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto
;
import
com.jz.dmp.modules.model.DmpDevelopTask
;
import
com.jz.dmp.modules.model.DmpNavigationTree
;
import
com.jz.dmp.modules.model.DmpNavigationTree
;
import
com.jz.dmp.modules.model.DmpProject
;
import
com.jz.dmp.modules.model.DmpProject
;
import
com.jz.dmp.modules.model.DmpProjectSystemInfo
;
import
com.jz.dmp.modules.model.DmpProjectSystemInfo
;
...
...
src/main/java/com/jz/dmp/modules/controller/DataIntegration/DataSourceController.java
View file @
1e9b432d
...
@@ -137,8 +137,8 @@ public class DataSourceController {
...
@@ -137,8 +137,8 @@ public class DataSourceController {
result
=
dmpSyncingDatasourceService
.
testConnection
(
saveBody
);
result
=
dmpSyncingDatasourceService
.
testConnection
(
saveBody
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"status"
,
"异常"
);
map
.
put
(
"status"
,
"异常"
);
map
.
put
(
"testConnectStatus"
,
"03"
);
map
.
put
(
"testConnectStatus"
,
"03"
);
map
.
put
(
"testTime"
,
DateUtils
.
currentDatetime
());
map
.
put
(
"testTime"
,
DateUtils
.
currentDatetime
());
result
.
setData
(
map
);
result
.
setData
(
map
);
result
.
setCode
(
ResultCode
.
SUCCESS
);
result
.
setCode
(
ResultCode
.
SUCCESS
);
...
@@ -155,7 +155,8 @@ public class DataSourceController {
...
@@ -155,7 +155,8 @@ public class DataSourceController {
*/
*/
@ApiOperation
(
value
=
"编辑数据源--根据id查询数据回显"
,
notes
=
"编辑数据源--根据id查询数据回显"
)
@ApiOperation
(
value
=
"编辑数据源--根据id查询数据回显"
,
notes
=
"编辑数据源--根据id查询数据回显"
)
@GetMapping
(
value
=
"/selectDataSourceInfoById"
)
@GetMapping
(
value
=
"/selectDataSourceInfoById"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"datasourceId"
,
value
=
"数据源id"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"projectId"
,
value
=
"项目id"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"datasourceId"
,
value
=
"数据源id"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"projectId"
,
value
=
"项目id"
)})
public
JsonResult
<
DataSourceListDto
>
getDataSourceInfoById
(
@RequestParam
String
datasourceId
,
@RequestParam
(
value
=
"projectId"
,
required
=
false
)
String
projectId
)
throws
Exception
{
public
JsonResult
<
DataSourceListDto
>
getDataSourceInfoById
(
@RequestParam
String
datasourceId
,
@RequestParam
(
value
=
"projectId"
,
required
=
false
)
String
projectId
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
datasourceId
))
{
if
(
StringUtils
.
isEmpty
(
datasourceId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
...
@@ -177,7 +178,7 @@ public class DataSourceController {
...
@@ -177,7 +178,7 @@ public class DataSourceController {
@PostMapping
(
value
=
"/updateDatasourceInfo"
)
@PostMapping
(
value
=
"/updateDatasourceInfo"
)
public
JsonResult
updateDatasourceInfo
(
@RequestBody
@Validated
DmpSyncingDatasourceReq
saveBody
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
JsonResult
updateDatasourceInfo
(
@RequestBody
@Validated
DmpSyncingDatasourceReq
saveBody
,
HttpServletRequest
httpRequest
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
saveBody
.
getId
()))
{
if
(
StringUtils
.
isEmpty
(
saveBody
.
getId
()))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"数据源ID不能为空"
);
}
}
JsonResult
result
=
dmpSyncingDatasourceService
.
updateDatasourceById
(
saveBody
);
JsonResult
result
=
dmpSyncingDatasourceService
.
updateDatasourceById
(
saveBody
);
return
result
;
return
result
;
...
@@ -194,7 +195,7 @@ public class DataSourceController {
...
@@ -194,7 +195,7 @@ public class DataSourceController {
@GetMapping
(
value
=
"/getDatasourceTypeAttr"
)
@GetMapping
(
value
=
"/getDatasourceTypeAttr"
)
public
JsonResult
getDatasourceTypeAttr
(
@RequestParam
String
datasourceTypeId
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
JsonResult
getDatasourceTypeAttr
(
@RequestParam
String
datasourceTypeId
,
HttpServletRequest
httpRequest
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
datasourceTypeId
))
{
if
(
StringUtils
.
isEmpty
(
datasourceTypeId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"数据源类型id不能为空"
);
}
}
JsonResult
result
=
dmpSyncingDatasourceService
.
selectDatasourceTypeAttrById
(
datasourceTypeId
);
JsonResult
result
=
dmpSyncingDatasourceService
.
selectDatasourceTypeAttrById
(
datasourceTypeId
);
return
result
;
return
result
;
...
...
src/main/java/com/jz/dmp/modules/controller/DataIntegration/OfflineSynchController.java
View file @
1e9b432d
...
@@ -266,12 +266,12 @@ public class OfflineSynchController {
...
@@ -266,12 +266,12 @@ public class OfflineSynchController {
}
}
/**
/**
* 保存离线任务数据
* 保存
/编辑
离线任务数据
*
*
* @return
* @return
* @author Bellamy
* @author Bellamy
*/
*/
@ApiOperation
(
value
=
"保存
离线任务数据"
,
notes
=
"保存
离线任务数据"
)
@ApiOperation
(
value
=
"保存
/编辑离线任务数据"
,
notes
=
"保存/编辑
离线任务数据"
)
@PostMapping
(
value
=
"/addSyncTask"
)
@PostMapping
(
value
=
"/addSyncTask"
)
public
JsonResult
addSyncTask
(
@RequestBody
@Validated
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
public
JsonResult
addSyncTask
(
@RequestBody
@Validated
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
JsonResult
list
=
new
JsonResult
();
JsonResult
list
=
new
JsonResult
();
...
...
src/main/java/com/jz/dmp/modules/controller/DmpProjectController.java
View file @
1e9b432d
...
@@ -132,4 +132,22 @@ public class DmpProjectController {
...
@@ -132,4 +132,22 @@ public class DmpProjectController {
return
baseBeanResponse
;
return
baseBeanResponse
;
}
}
/**获取登录用户项目信息
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/findListByUserId"
)
@ApiOperation
(
value
=
"获取登录用户项目信息"
,
notes
=
"获取登录用户项目信息"
)
public
BaseBeanResponse
<
DmpProjectDto
>
findList
(
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpProjectDto
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpProjectDto
>();
try
{
baseBeanResponse
=
dmpProjectService
.
findListByUserId
(
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"查询失败"
);
baseBeanResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
}
}
src/main/java/com/jz/dmp/modules/controller/bean/MyDmpDevelopTaskConverter.java
View file @
1e9b432d
...
@@ -8,6 +8,7 @@ import java.util.Map;
...
@@ -8,6 +8,7 @@ import java.util.Map;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro
;
import
com.jz.dmp.modules.model.DmpDevelopTask
;
import
com.jz.dmp.modules.model.DmpDevelopTask
;
...
@@ -61,16 +62,13 @@ public class MyDmpDevelopTaskConverter {
...
@@ -61,16 +62,13 @@ public class MyDmpDevelopTaskConverter {
//dmp生成树ID
//dmp生成树ID
flowPro
.
setTreeId
(
dmpDevelopTask
.
getTreeId
().
longValue
());
flowPro
.
setTreeId
(
dmpDevelopTask
.
getTreeId
().
longValue
());
//是否带版本号进行节点变更查询?
//检查节点名称要用到的参数?
String
script
=
dmpDevelopTask
.
getScript
();
String
script
=
dmpDevelopTask
.
getScript
();
//整个流程图数据
//
整个流程图数据
flowPro
.
setFlowJson
(
script
);
flowPro
.
setFlowJson
(
script
);
JSONObject
scriptJson
=
JSONObject
.
parseObject
(
script
);
JSONObject
scriptJson
=
JSONObject
.
parseObject
(
script
);
//调度周期设置
//
调度周期设置
flowPro
.
setScheduleSetting
(
scriptJson
.
getString
(
"scheduleSetting"
));
flowPro
.
setScheduleSetting
(
scriptJson
.
getString
(
"scheduleSetting"
));
//失败选项
//
失败选项
flowPro
.
setAfterFailSelect
(
scriptJson
.
getString
(
"afterFailSelect"
));
flowPro
.
setAfterFailSelect
(
scriptJson
.
getString
(
"afterFailSelect"
));
return
flowPro
;
return
flowPro
;
...
@@ -86,9 +84,7 @@ public class MyDmpDevelopTaskConverter {
...
@@ -86,9 +84,7 @@ public class MyDmpDevelopTaskConverter {
*/
*/
private
String
scriptToFlowProJson
(
String
script
)
{
private
String
scriptToFlowProJson
(
String
script
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
script
);
map
.
put
(
"flowPro"
,
script
);
map
.
put
(
"flowPro"
,
jsonObject
);
return
JSONObject
.
toJSONString
(
map
);
return
JSONObject
.
toJSONString
(
map
);
}
}
...
...
src/main/java/com/jz/dmp/modules/controller/bean/MyDmpProjectConfigEngineConverter.java
0 → 100644
View file @
1e9b432d
package
com
.
jz
.
dmp
.
modules
.
controller
.
bean
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.beans.BeanUtils
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigEngineDto
;
import
com.jz.dmp.modules.model.DmpProjectConfigEngine
;
import
com.jz.dmp.modules.model.DmpProjectEngineParam
;
public
class
MyDmpProjectConfigEngineConverter
{
private
static
MyDmpProjectConfigEngineConverter
instance
;
private
MyDmpProjectConfigEngineConverter
()
{};
public
synchronized
static
MyDmpProjectConfigEngineConverter
INSTANCE
()
{
if
(
instance
==
null
)
{
instance
=
new
MyDmpProjectConfigEngineConverter
();
}
return
instance
;
}
public
DmpProjectConfigEngineDto
domain2dto
(
DmpProjectConfigEngine
dmpProjectConfigEngine
)
{
DmpProjectConfigEngineDto
dmpProjectConfigEngineDto
=
new
DmpProjectConfigEngineDto
();
BeanUtils
.
copyProperties
(
dmpProjectConfigEngine
,
dmpProjectConfigEngineDto
);
return
dmpProjectConfigEngineDto
;
}
public
List
<
DmpProjectConfigEngineDto
>
domain2dto
(
List
<
DmpProjectConfigEngine
>
dmpProjectConfigEngines
)
{
List
<
DmpProjectConfigEngineDto
>
dmpProjectConfigEngineDtos
=
new
ArrayList
<
DmpProjectConfigEngineDto
>();
dmpProjectConfigEngines
.
stream
().
forEach
(
x
->
{
dmpProjectConfigEngineDtos
.
add
(
domain2dto
(
x
));
});
return
dmpProjectConfigEngineDtos
;
}
public
DmpProjectConfigEngine
dto2domain
(
DmpProjectConfigEngineDto
dmpProjectConfigEngineDto
)
{
DmpProjectConfigEngine
dmpProjectConfigEngine
=
new
DmpProjectConfigEngine
();
List
<
DmpProjectEngineParam
>
dmpProjectEngineParams
=
dmpProjectConfigEngineDto
.
getDmpProjectEngineParams
();
BeanUtils
.
copyProperties
(
dmpProjectConfigEngineDto
,
dmpProjectConfigEngine
);
dmpProjectConfigEngine
.
setDmpProjectEngineParams
(
dmpProjectEngineParams
);
return
dmpProjectConfigEngine
;
}
public
List
<
DmpProjectConfigEngine
>
dto2domain
(
List
<
DmpProjectConfigEngineDto
>
dmpProjectConfigEngineDtos
)
{
List
<
DmpProjectConfigEngine
>
dmpProjectConfigEngines
=
new
ArrayList
<
DmpProjectConfigEngine
>();
dmpProjectConfigEngineDtos
.
stream
().
forEach
(
x
->
{
dmpProjectConfigEngines
.
add
(
dto2domain
(
x
));
});
return
dmpProjectConfigEngines
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberRequest.java
View file @
1e9b432d
...
@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.sys.bean;
...
@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.sys.bean;
import
java.util.Date
;
import
java.util.Date
;
import
com.jz.common.annotation.FieldAssist
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -17,38 +18,51 @@ public class DmpMemberRequest extends BasePageBean {
...
@@ -17,38 +18,51 @@ public class DmpMemberRequest extends BasePageBean {
* 用户ID
* 用户ID
*/
*/
@ApiModelProperty
(
value
=
"用户ID"
)
@ApiModelProperty
(
value
=
"用户ID"
)
@FieldAssist
(
orderBy
=
"m.user_id"
)
private
Integer
userId
;
private
Integer
userId
;
/**
/**
* 用户名称
* 用户名称
*/
*/
@ApiModelProperty
(
value
=
"用户名称"
)
@ApiModelProperty
(
value
=
"用户名称"
)
@FieldAssist
(
orderBy
=
"m.user_name"
)
private
String
userName
;
private
String
userName
;
/**
/**
* 登录密码
* 登录密码
*/
*/
@ApiModelProperty
(
value
=
"登录密码"
)
@ApiModelProperty
(
value
=
"登录密码"
)
@FieldAssist
(
orderBy
=
"m.user_password"
)
private
String
userPassword
;
private
String
userPassword
;
/**
/**
* 真实姓名
* 真实姓名
*/
*/
@ApiModelProperty
(
value
=
"真实姓名"
)
@ApiModelProperty
(
value
=
"真实姓名"
)
@FieldAssist
(
orderBy
=
"m.real_name"
)
private
String
realName
;
private
String
realName
;
/**
/**
* 联系电话
* 联系电话
*/
*/
@ApiModelProperty
(
value
=
"联系电话"
)
@ApiModelProperty
(
value
=
"联系电话"
)
@FieldAssist
(
orderBy
=
"m.user_phone"
)
private
String
userPhone
;
private
String
userPhone
;
/**
/**
* 登录IP
* 登录IP
*/
*/
@ApiModelProperty
(
value
=
"登录IP"
)
@ApiModelProperty
(
value
=
"登录IP"
)
@FieldAssist
(
orderBy
=
"m.login_ip"
)
private
String
loginIp
;
private
String
loginIp
;
/**
* 最近登录时间
*/
@ApiModelProperty
(
value
=
"最近登录时间"
)
@FieldAssist
(
orderBy
=
"m.login_time"
)
private
Date
loginTime
;
/**
/**
* 最近登录时间起
* 最近登录时间起
*/
*/
...
@@ -65,32 +79,44 @@ public class DmpMemberRequest extends BasePageBean {
...
@@ -65,32 +79,44 @@ public class DmpMemberRequest extends BasePageBean {
* 是否登录锁定(0:否,1:是)
* 是否登录锁定(0:否,1:是)
*/
*/
@ApiModelProperty
(
value
=
"是否登录锁定(0:否,1:是)"
)
@ApiModelProperty
(
value
=
"是否登录锁定(0:否,1:是)"
)
@FieldAssist
(
orderBy
=
"m.login_locked"
)
private
String
loginLocked
;
private
String
loginLocked
;
/**
/**
* 连续登录错误次数
* 连续登录错误次数
*/
*/
@ApiModelProperty
(
value
=
"连续登录错误次数"
)
@ApiModelProperty
(
value
=
"连续登录错误次数"
)
@FieldAssist
(
orderBy
=
"m.login_errtimes"
)
private
Integer
loginErrtimes
;
private
Integer
loginErrtimes
;
/**
/**
* 备注
* 备注
*/
*/
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
@FieldAssist
(
orderBy
=
"m.remark"
)
private
String
remark
;
private
String
remark
;
/**
/**
* 数据状态(0:删除,1,未删除)
* 数据状态(0:删除,1,未删除)
*/
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
@FieldAssist
(
orderBy
=
"m.data_status"
)
private
String
dataStatus
;
private
String
dataStatus
;
/**
/**
* 创建用户ID
* 创建用户ID
*/
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
@ApiModelProperty
(
value
=
"创建用户ID"
)
@FieldAssist
(
orderBy
=
"m.create_user_id"
)
private
Integer
createUserId
;
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@FieldAssist
(
orderBy
=
"m.create_time"
)
private
Date
createTime
;
/**
/**
* 创建时间起
* 创建时间起
*/
*/
...
@@ -107,8 +133,16 @@ public class DmpMemberRequest extends BasePageBean {
...
@@ -107,8 +133,16 @@ public class DmpMemberRequest extends BasePageBean {
* 修改用户ID
* 修改用户ID
*/
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
@ApiModelProperty
(
value
=
"修改用户ID"
)
@FieldAssist
(
orderBy
=
"m.update_user_id"
)
private
Integer
updateUserId
;
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@FieldAssist
(
orderBy
=
"m.update_time"
)
private
Date
updateTime
;
/**
/**
* 修改时间起
* 修改时间起
*/
*/
...
@@ -178,6 +212,14 @@ public class DmpMemberRequest extends BasePageBean {
...
@@ -178,6 +212,14 @@ public class DmpMemberRequest extends BasePageBean {
this
.
loginIp
=
loginIp
;
this
.
loginIp
=
loginIp
;
}
}
public
Date
getLoginTime
()
{
return
loginTime
;
}
public
void
setLoginTime
(
Date
loginTime
)
{
this
.
loginTime
=
loginTime
;
}
public
Date
getLoginTimeStart
()
{
public
Date
getLoginTimeStart
()
{
return
loginTimeStart
;
return
loginTimeStart
;
}
}
...
@@ -234,6 +276,14 @@ public class DmpMemberRequest extends BasePageBean {
...
@@ -234,6 +276,14 @@ public class DmpMemberRequest extends BasePageBean {
this
.
createUserId
=
createUserId
;
this
.
createUserId
=
createUserId
;
}
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getCreateTimeStart
()
{
public
Date
getCreateTimeStart
()
{
return
createTimeStart
;
return
createTimeStart
;
}
}
...
@@ -258,6 +308,14 @@ public class DmpMemberRequest extends BasePageBean {
...
@@ -258,6 +308,14 @@ public class DmpMemberRequest extends BasePageBean {
this
.
updateUserId
=
updateUserId
;
this
.
updateUserId
=
updateUserId
;
}
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Date
getUpdateTimeStart
()
{
public
Date
getUpdateTimeStart
()
{
return
updateTimeStart
;
return
updateTimeStart
;
}
}
...
...
src/main/java/com/jz/dmp/modules/dao/DmpProjectDao.java
View file @
1e9b432d
package
com
.
jz
.
dmp
.
modules
.
dao
;
package
com
.
jz
.
dmp
.
modules
.
dao
;
import
com.jz.common.persistence.CrudDao
;
import
com.jz.common.persistence.CrudDao
;
import
com.jz.dmp.modules.controller.bean.DmpProjectDto
;
import
com.jz.dmp.modules.model.DmpProject
;
import
com.jz.dmp.modules.model.DmpProject
;
import
com.jz.dmp.modules.model.DmpProjectSystemInfo
;
import
com.jz.dmp.modules.model.DmpProjectSystemInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
@@ -46,4 +47,15 @@ public interface DmpProjectDao extends CrudDao<DmpProject> {
...
@@ -46,4 +47,15 @@ public interface DmpProjectDao extends CrudDao<DmpProject> {
* @throws Exception
* @throws Exception
*/
*/
public
List
<
DmpProject
>
findListByMap
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
public
List
<
DmpProject
>
findListByMap
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**
* @Title: findListByUserId
* @Description: TODO(获取用户所有的项目)
* @param @param userId
* @param @return
* @param @throws Exception 参数
* @return List<DmpProjectDto> 返回类型
* @throws
*/
public
List
<
DmpProjectDto
>
findListByUserId
(
@Param
(
"userId"
)
String
userId
)
throws
Exception
;
}
}
src/main/java/com/jz/dmp/modules/service/DmpProjectService.java
View file @
1e9b432d
...
@@ -72,5 +72,16 @@ public interface DmpProjectService {
...
@@ -72,5 +72,16 @@ public interface DmpProjectService {
*/
*/
public
DmpProjectSystemInfo
getProjectSystemInfo
(
Long
projectId
)
throws
Exception
;
public
DmpProjectSystemInfo
getProjectSystemInfo
(
Long
projectId
)
throws
Exception
;
/**
* @Title: findListByUserId
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseBeanResponse<DmpProjectDto> 返回类型
* @throws
*/
public
BaseBeanResponse
<
DmpProjectDto
>
findListByUserId
(
HttpServletRequest
httpRequest
)
throws
Exception
;
}
}
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
1e9b432d
...
@@ -1274,7 +1274,7 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1274,7 +1274,7 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
}
catch
(
UnsupportedEncodingException
e
)
{
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
dmpDevelopTask
.
setData
(
data
);
//
dmpDevelopTask.setData(data);
// 创建人
// 创建人
dmpDevelopTask
.
setCreateUserId
(
Optional
.
ofNullable
(
getHttpRequestUserId
(
httpRequest
)).
orElse
(
0
).
toString
());
dmpDevelopTask
.
setCreateUserId
(
Optional
.
ofNullable
(
getHttpRequestUserId
(
httpRequest
)).
orElse
(
0
).
toString
());
...
@@ -1336,6 +1336,14 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1336,6 +1336,14 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
// 版本设置
// 版本设置
// 获取已存在版本
// 获取已存在版本
DmpDevelopTask
dmpDevelopTaskDb
=
dmpDevelopTaskDao
.
selectTaskById
(
dmpDevelopTask
.
getId
().
toString
());
DmpDevelopTask
dmpDevelopTaskDb
=
dmpDevelopTaskDao
.
selectTaskById
(
dmpDevelopTask
.
getId
().
toString
());
//校验脚本内容是否有变动,变动则允许修改,否则不允许修改
if
(!
StringUtils
.
isEmpty
(
dmpDevelopTaskDb
.
getScript
())
&&
dmpDevelopTaskDb
.
getScript
().
equals
(
dmpDevelopTask
.
getScript
()))
{
baseBeanResponse
.
setCode
(
StatuConstant
.
CODE_ERROR_PARAMETER
);
baseBeanResponse
.
setMessage
(
"脚本内容没有任何变化,无效的操作!"
);
return
baseBeanResponse
;
}
String
version
=
CodeGeneratorUtils
.
generatorNextTaskVesion
(
dmpDevelopTaskDb
.
getVersion
());
String
version
=
CodeGeneratorUtils
.
generatorNextTaskVesion
(
dmpDevelopTaskDb
.
getVersion
());
dmpDevelopTask
.
setVersion
(
version
);
dmpDevelopTask
.
setVersion
(
version
);
...
@@ -1372,6 +1380,12 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1372,6 +1380,12 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
}
}
DmpDevelopTask
dmpDevelopTask
=
dmpDevelopTaskDao
.
get
(
treeId
);
DmpDevelopTask
dmpDevelopTask
=
dmpDevelopTaskDao
.
get
(
treeId
);
if
(!
CommConstant
.
TASK_TYPE_DEVELOP
.
equals
(
dmpDevelopTask
.
getTaskType
()))
{
baseResponse
.
setCode
(
StatuConstant
.
CODE_ERROR_PARAMETER
);
baseResponse
.
setMessage
(
"该任务不是工作流开发任务!"
);
return
baseResponse
;
}
FlowPro
flowPro
=
MyDmpDevelopTaskConverter
.
INSTANCE
().
task2flowpro
(
dmpDevelopTask
);
FlowPro
flowPro
=
MyDmpDevelopTaskConverter
.
INSTANCE
().
task2flowpro
(
dmpDevelopTask
);
...
@@ -1536,7 +1550,8 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1536,7 +1550,8 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
//上次zip包到azkaban
//上次zip包到azkaban
String
localTaskZipAbsolutePath
=
localTaskZipPath
+
"/"
+
localZipTargetFileName
;
String
localTaskZipAbsolutePath
=
localTaskZipPath
+
"/"
+
localZipTargetFileName
;
AzkabanApiUtils2
azkabanApiUtils
=
new
AzkabanApiUtils2
(
azkabanMonitorUrl
,
redisTemplate
);
AzkabanApiUtils2
azkabanApiUtils
=
new
AzkabanApiUtils2
(
azkabanMonitorUrl
,
redisTemplate
);
return
azkabanApiUtils
.
loginCreateProjectuploadZipAndExecute
(
"jz_localflow_"
+
taskAlias
+
"_"
+
projectId
,
"local_"
+
taskAlias
+
"_project"
,
localTaskZipAbsolutePath
,
treeName
);
//return azkabanApiUtils.loginCreateProjectuploadZipAndExecute("jz_localflow_" + taskAlias + "_" + projectId, "local_" + taskAlias + "_project", localTaskZipAbsolutePath, treeName);
return
azkabanApiUtils
.
loginCreateProjectuploadZipAndExecute
(
"jz_workflow_new_"
+
projectId
,
"local_"
+
taskAlias
+
"_project"
,
localTaskZipAbsolutePath
,
treeName
);
}
}
/**
/**
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpProjectServiceImpl.java
View file @
1e9b432d
...
@@ -386,5 +386,27 @@ public class DmpProjectServiceImpl extends BaseService implements DmpProjectServ
...
@@ -386,5 +386,27 @@ public class DmpProjectServiceImpl extends BaseService implements DmpProjectServ
}
}
return
info
;
return
info
;
}
}
/**
*获取登录用户的项目
*/
@Override
public
BaseBeanResponse
<
DmpProjectDto
>
findListByUserId
(
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpProjectDto
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpProjectDto
>();
String
userId
=
SessionUtils
.
getCurrentUserId
();
if
(
StringUtils
.
isEmpty
(
userId
))
{
baseBeanResponse
.
setCode
(
StatuConstant
.
CODE_ERROR_REQUESTMETHOD
);
baseBeanResponse
.
setMessage
(
"用户未登录!"
);
return
baseBeanResponse
;
}
List
<
DmpProjectDto
>
list
=
dmpProjectDao
.
findListByUserId
(
userId
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setDatas
(
list
);
return
baseBeanResponse
;
}
}
}
src/main/java/com/jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
View file @
1e9b432d
...
@@ -478,11 +478,11 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -478,11 +478,11 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRES_NEW
)
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRES_NEW
)
public
JsonResult
addSyncTask
(
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
public
JsonResult
addSyncTask
(
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
JsonResult
jsonResult
=
new
JsonResult
();
Map
<
String
,
Object
>
reqParam
=
syncDmpTaskAddReq
.
getParams
();
Map
<
String
,
Object
>
reqParam
=
syncDmpTaskAddReq
.
getParams
();
if
(
reqParam
.
size
()
>
0
&&
reqParam
!
=
null
)
{
if
(
reqParam
.
size
()
==
0
||
reqParam
=
=
null
)
{
jsonResult
=
addSyncing
(
reqParam
);
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"请求参数不能为空"
);
}
}
JsonResult
jsonResult
=
addSyncing
(
reqParam
);
return
jsonResult
;
return
jsonResult
;
}
}
...
@@ -579,7 +579,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -579,7 +579,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
* @return
* @return
*/
*/
public
JsonResult
addSyncing
(
Map
<
String
,
Object
>
body
)
throws
Exception
{
public
JsonResult
addSyncing
(
Map
<
String
,
Object
>
body
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
body
.
get
(
"treeId"
).
toString
(
)))
{
if
(
StringUtils
.
isEmpty
(
String
.
valueOf
(
body
.
get
(
"treeId"
)
)))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"treeId不能为空!"
);
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"treeId不能为空!"
);
}
}
if
(
StringUtils
.
isEmpty
(
body
.
get
(
"projectId"
).
toString
()))
{
if
(
StringUtils
.
isEmpty
(
body
.
get
(
"projectId"
).
toString
()))
{
...
@@ -592,8 +592,6 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -592,8 +592,6 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
Integer
projectId
=
Integer
.
valueOf
(
body
.
get
(
"projectId"
).
toString
());
Integer
projectId
=
Integer
.
valueOf
(
body
.
get
(
"projectId"
).
toString
());
String
taskId
=
body
.
get
(
"taskId"
).
toString
();
//任务ID
String
taskId
=
body
.
get
(
"taskId"
).
toString
();
//任务ID
Integer
treeId
=
Integer
.
valueOf
(
body
.
get
(
"treeId"
).
toString
());
//树节点ID
Integer
treeId
=
Integer
.
valueOf
(
body
.
get
(
"treeId"
).
toString
());
//树节点ID
String
taskName
=
body
.
get
(
"taskName"
).
toString
();
//任务名称 业务节点名称 一对一
//Integer parentId = Integer.valueOf(body.get("parentId").toString()); //父节点ID
Map
<
String
,
Object
>
scriptMap
=
(
Map
<
String
,
Object
>)
body
.
get
(
"scripts"
);
//任务json数据
Map
<
String
,
Object
>
scriptMap
=
(
Map
<
String
,
Object
>)
body
.
get
(
"scripts"
);
//任务json数据
Object
content
=
scriptMap
.
get
(
"content"
);
Object
content
=
scriptMap
.
get
(
"content"
);
...
@@ -604,23 +602,24 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -604,23 +602,24 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
//保存目标库类型
//保存目标库类型
Map
<
String
,
Object
>
writer
=
(
Map
<
String
,
Object
>)
scriptMap
.
get
(
"writer"
);
// 目标数据
Map
<
String
,
Object
>
writer
=
(
Map
<
String
,
Object
>)
scriptMap
.
get
(
"writer"
);
// 目标数据
String
targetDb
=
(
String
)
writer
.
get
(
"targetDbConnection"
);
// 目标库名称
String
targetDb
=
String
.
valueOf
(
writer
.
get
(
"targetDbConnection"
));
// 目标库名称
String
targetDbId
=
String
.
valueOf
(
writer
.
get
(
"targetDbId"
));
// 目标库id
String
targetTable
=
(
String
)
writer
.
get
(
"targetTable"
);
// 目标库表名称
String
targetTable
=
(
String
)
writer
.
get
(
"targetTable"
);
// 目标库表名称
if
(
StringUtils
.
isEmpty
(
targetDbId
))
{
Map
<
String
,
Object
>
reader
=
(
Map
<
String
,
Object
>)
scriptMap
.
get
(
"reader"
);
//源数据
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"targetDbId不能为空!"
);
}
//源数据
Map
<
String
,
Object
>
reader
=
(
Map
<
String
,
Object
>)
scriptMap
.
get
(
"reader"
);
String
sourceDbName
=
(
String
)
reader
.
get
(
"dbConnection"
);
// 源库名称
String
sourceDbName
=
(
String
)
reader
.
get
(
"dbConnection"
);
// 源库名称
String
sourceDbId
=
(
String
)
reader
.
get
(
"sourceDbId"
);
// 来源库id
String
sourceTableName
=
(
String
)
reader
.
get
(
"registerTableName"
);
// 源库表名称
String
sourceTableName
=
(
String
)
reader
.
get
(
"registerTableName"
);
// 源库表名称
if
(
StringUtils
.
isEmpty
(
sourceDbId
))
{
Integer
dataSourceId
=
null
;
//数据源ID
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"sourceDbId不能为空!"
);
if
(
StringUtils
.
isNotBlank
(
targetDb
))
{
//根据 目标库和项目id 查询
dataSourceId
=
dmpDevelopTaskDao
.
getDbInfoByParam
(
targetDb
,
projectId
);
}
}
DmpDevelopTask
task
=
new
DmpDevelopTask
();
DmpDevelopTask
task
=
new
DmpDevelopTask
();
task
.
setProjectId
(
projectId
);
task
.
setProjectId
(
projectId
);
task
.
setTaskType
(
"2"
);
//任务类型
task
.
setTaskType
(
"2"
);
//任务类型
task
.
setDatasourceId
(
dataSourceId
);
//数据源ID
task
.
setType
(
"3"
);
task
.
setType
(
"3"
);
task
.
setTaskDesc
(
"Syncing Task"
);
//任务描述
task
.
setTaskDesc
(
"Syncing Task"
);
//任务描述
task
.
setIsSubmit
(
"0"
);
//是否已提交
task
.
setIsSubmit
(
"0"
);
//是否已提交
...
@@ -634,11 +633,12 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -634,11 +633,12 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
task
.
setData
(
data
);
//json 数据
task
.
setData
(
data
);
//json 数据
task
.
setScript
(
body
.
toString
());
//
task.setScript(body.toString());
task
.
setTargetDbName
(
targetDb
);
task
.
setTargetDbName
(
targetDb
);
task
.
setTargetTableName
(
targetTable
);
task
.
setTargetTableName
(
targetTable
);
task
.
setSourceTableName
(
sourceTableName
);
task
.
setSourceTableName
(
sourceTableName
);
task
.
setSourceDbName
(
sourceDbName
);
task
.
setSourceDbName
(
sourceDbName
);
task
.
setSourceDbId
(
sourceDbId
);
List
<
DvTaskRuleT
>
list
=
new
ArrayList
<>();
List
<
DvTaskRuleT
>
list
=
new
ArrayList
<>();
//更新规则信息
//更新规则信息
List
<
Map
>
taskRules
=
(
List
<
Map
>)
body
.
get
(
"taskRules"
);
List
<
Map
>
taskRules
=
(
List
<
Map
>)
body
.
get
(
"taskRules"
);
...
@@ -648,8 +648,8 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -648,8 +648,8 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
task
.
setCreateUserId
(
SessionUtils
.
getCurrentUserId
());
task
.
setCreateUserId
(
SessionUtils
.
getCurrentUserId
());
task
.
setCreateTime
(
new
Date
());
task
.
setCreateTime
(
new
Date
());
dmpDevelopTaskDao
.
insert
(
task
);
//新增任务数据
dmpDevelopTaskDao
.
insert
(
task
);
//新增任务数据
this
.
saveTaskHistory
(
task
);
//保存任务历史版本
logger
.
info
(
"======== save sync task end ========"
);
logger
.
info
(
"======== save sync task end ========"
);
this
.
saveTaskHistory
(
task
);
//保存任务历史版本
//保存dmp数据校验规则信息
//保存dmp数据校验规则信息
settRuleInfo
(
taskId
,
taskRules
,
list
);
settRuleInfo
(
taskId
,
taskRules
,
list
);
}
else
{
}
else
{
...
@@ -988,7 +988,9 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -988,7 +988,9 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
}
}
List
<
SynchTableColumnsReq
>
list
=
req
.
get
(
"params"
);
List
<
SynchTableColumnsReq
>
list
=
req
.
get
(
"params"
);
Long
id
=
list
.
get
(
0
).
getSourceDbId
();
Long
id
=
list
.
get
(
0
).
getSourceDbId
();
int
num
=
0
;
for
(
SynchTableColumnsReq
str
:
list
)
{
for
(
SynchTableColumnsReq
str
:
list
)
{
num
++;
//通过源数据库id ,查询数据源配置
//通过源数据库id ,查询数据源配置
DmpAgentDatasourceInfo
dsInfos
=
offlineSynchDao
.
querySourceDbInfoBySourceId
(
str
.
getSourceDbId
());
DmpAgentDatasourceInfo
dsInfos
=
offlineSynchDao
.
querySourceDbInfoBySourceId
(
str
.
getSourceDbId
());
DmpAgentDatasourceInfo
dsInfo
=
new
DmpAgentDatasourceInfo
();
DmpAgentDatasourceInfo
dsInfo
=
new
DmpAgentDatasourceInfo
();
...
@@ -1017,7 +1019,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -1017,7 +1019,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
map
.
put
(
"isPk"
,
0
);
//主键
map
.
put
(
"isPk"
,
0
);
//主键
map
.
put
(
"isPt"
,
0
);
//分区
map
.
put
(
"isPt"
,
0
);
//分区
returnData
.
add
(
map
);
returnData
.
add
(
map
);
if
(
id
==
str
.
getSourceDbId
())
{
if
(
num
==
1
)
{
syncData
.
add
(
map
);
syncData
.
add
(
map
);
}
}
}
}
...
@@ -1025,8 +1027,8 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -1025,8 +1027,8 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
}
}
}
}
Map
data
=
new
HashMap
();
Map
data
=
new
HashMap
();
data
.
put
(
"allTable"
,
returnData
);
data
.
put
(
"allTable"
,
returnData
);
data
.
put
(
"firstTable"
,
return
Data
);
data
.
put
(
"firstTable"
,
sync
Data
);
return
JsonResult
.
ok
(
data
);
return
JsonResult
.
ok
(
data
);
}
}
...
...
src/main/java/com/jz/dmp/modules/service/projconfig/impl/DmpProjectConfigInfoServiceImpl.java
View file @
1e9b432d
...
@@ -24,13 +24,16 @@ import com.jz.common.bean.BaseResponse;
...
@@ -24,13 +24,16 @@ import com.jz.common.bean.BaseResponse;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.bean.MyDmpProjectConfigEngineConverter
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigEngineDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigEngineDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigEngineRequest
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoBatch
;
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.DmpProjectConfigInfoDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoRequest
;
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.DmpProjectEngineParamDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpPublicConfigInfoDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpPublicConfigInfoDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpPublicConfigInfoRequest
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpPublicConfigInfoRequest
;
import
com.jz.dmp.modules.controller.projconfig.bean.MyDmpComputEngineConverter
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectConfigEngineMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectConfigEngineMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectConfigInfoMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectConfigInfoMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectEngineParamMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectEngineParamMapper
;
...
@@ -696,6 +699,13 @@ public class DmpProjectConfigInfoServiceImpl extends BaseService implements DmpP
...
@@ -696,6 +699,13 @@ public class DmpProjectConfigInfoServiceImpl extends BaseService implements DmpP
}
}
}
}
//封装私有引擎及参数
Map
<
String
,
Object
>
param2
=
new
HashMap
<
String
,
Object
>();
param2
.
put
(
"configId"
,
dto
.
getProjectConfigId
());
List
<
DmpProjectConfigEngineDto
>
dmpProjectConfigEngineDtos
=
dmpProjectConfigEngineMapper
.
findList
(
param2
);
List
<
DmpProjectConfigEngine
>
dmpProjectConfigEngines
=
MyDmpProjectConfigEngineConverter
.
INSTANCE
().
dto2domain
(
dmpProjectConfigEngineDtos
);
dto
.
setDmpProjectConfigEngines
(
dmpProjectConfigEngines
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dto
);
baseBeanResponse
.
setData
(
dto
);
...
...
src/main/java/com/jz/dmp/modules/service/projconfig/impl/DmpPublicConfigInfoServiceImpl.java
View file @
1e9b432d
package
com
.
jz
.
dmp
.
modules
.
service
.
projconfig
.
impl
;
package
com
.
jz
.
dmp
.
modules
.
service
.
projconfig
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -426,10 +427,13 @@ public class DmpPublicConfigInfoServiceImpl extends BaseService implements DmpPu
...
@@ -426,10 +427,13 @@ public class DmpPublicConfigInfoServiceImpl extends BaseService implements DmpPu
Integer
publicConfigId
=
dmpPublicConfigInfo
.
getPublicConfigId
();
Integer
publicConfigId
=
dmpPublicConfigInfo
.
getPublicConfigId
();
//计算引擎公共参数配置
//计算引擎公共参数配置
List
<
DmpComputEngineParam
>
params
=
dmpPublicConfigInfo
.
getComputEngines
()
List
<
DmpComputEngineParam
>
params
=
new
ArrayList
<
DmpComputEngineParam
>();
.
stream
().
flatMap
(
x
->{
if
(!
CollectionUtils
.
isEmpty
(
dmpPublicConfigInfo
.
getComputEngines
()))
{
return
x
.
getParams
().
stream
();
params
=
dmpPublicConfigInfo
.
getComputEngines
()
}).
collect
(
Collectors
.
toList
());
.
stream
().
flatMap
(
x
->{
return
x
.
getParams
().
stream
();
}).
collect
(
Collectors
.
toList
());
}
if
(
null
==
publicConfigId
)
{
//新增
if
(
null
==
publicConfigId
)
{
//新增
...
...
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
View file @
1e9b432d
...
@@ -21,6 +21,7 @@ import org.springframework.util.CollectionUtils;
...
@@ -21,6 +21,7 @@ import org.springframework.util.CollectionUtils;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseBeanResponse
;
...
@@ -159,8 +160,19 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic
...
@@ -159,8 +160,19 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic
param
.
put
(
"projectId"
,
dmpMemberRequest
.
getProjectId
());
param
.
put
(
"projectId"
,
dmpMemberRequest
.
getProjectId
());
}
}
//如果没有设置排序,默认时间降序
if
(
StringUtils
.
isEmpty
(
dmpMemberRequest
.
getOrderColumn
()))
{
dmpMemberRequest
.
setOrderColumn
(
"createTime"
);
dmpMemberRequest
.
setOrderType
(
"DESC"
);
}
PageHelper
.
startPage
(
dmpMemberRequest
.
getPageNum
(),
dmpMemberRequest
.
getPageSize
());
String
obderByStr
=
dmpMemberRequest
.
takeOrderByStr
(
DmpMemberRequest
.
class
);
Page
page
=
null
;
if
(
obderByStr
==
null
)
{
page
=
PageHelper
.
startPage
(
dmpMemberRequest
.
getPageNum
(),
dmpMemberRequest
.
getPageSize
());
}
else
{
page
=
PageHelper
.
startPage
(
dmpMemberRequest
.
getPageNum
(),
dmpMemberRequest
.
getPageSize
(),
obderByStr
);
}
List
<
DmpMemberDto
>
list
=
dmpMemberMapper
.
findList
(
param
);
List
<
DmpMemberDto
>
list
=
dmpMemberMapper
.
findList
(
param
);
PageInfo
<
DmpMemberDto
>
pageInfo
=
new
PageInfo
<>(
list
);
PageInfo
<
DmpMemberDto
>
pageInfo
=
new
PageInfo
<>(
list
);
...
...
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
View file @
1e9b432d
...
@@ -100,8 +100,8 @@
...
@@ -100,8 +100,8 @@
<if
test=
"taskDesc != null and taskDesc != ''"
>
<if
test=
"taskDesc != null and taskDesc != ''"
>
TASK_DESC = #{taskDesc},
TASK_DESC = #{taskDesc},
</if>
</if>
<if
test=
"
script
!= null"
>
<if
test=
"
data
!= null"
>
SCRIPT = #{
script
, jdbcType=BLOB},
SCRIPT = #{
data
, jdbcType=BLOB},
</if>
</if>
<if
test=
"dataStatus != null and dataStatus != ''"
>
<if
test=
"dataStatus != null and dataStatus != ''"
>
DATA_STATUS = #{dataStatus},
DATA_STATUS = #{dataStatus},
...
...
src/main/resources/mapper/dmp/DmpProjectMapper.xml
View file @
1e9b432d
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.DmpProjectDao"
>
<mapper
namespace=
"com.jz.dmp.modules.dao.DmpProjectDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpProject"
>
<result
column=
"ID"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"OWNER_ID"
property=
"ownerId"
jdbcType=
"CHAR"
/>
<result
column=
"PRODUCTION_ID"
property=
"productionId"
jdbcType=
"CHAR"
/>
<result
column=
"DATA_WAREHOUSE_ID"
property=
"dataWarehouseId"
jdbcType=
"CHAR"
/>
<result
column=
"NAME"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"DISPLAY_NAME"
property=
"displayName"
jdbcType=
"VARCHAR"
/>
<result
column=
"PROJECT_DESC"
property=
"projectDesc"
jdbcType=
"VARCHAR"
/>
<result
column=
"PUBLISH_TARGET_ID"
property=
"publishTargetId"
jdbcType=
"INTEGER"
/>
<result
column=
"IS_ENABLE_SCHEDULER"
property=
"isEnableScheduler"
jdbcType=
"CHAR"
/>
<result
column=
"IS_EDIT_TASK_CODE"
property=
"isEditTaskCode"
jdbcType=
"CHAR"
/>
<result
column=
"IS_ENABLE_SELECT"
property=
"isEnableSelect"
jdbcType=
"CHAR"
/>
<result
column=
"DW_NAME"
property=
"dwName"
jdbcType=
"VARCHAR"
/>
<result
column=
"DW_ACCESS_TYPE"
property=
"dwAccessType"
jdbcType=
"CHAR"
/>
<result
column=
"DW_IS_ENABLE_ACL"
property=
"dwIsEnableAcl"
jdbcType=
"CHAR"
/>
<result
column=
"DW_IS_ENABLE_ACCESS_OBJ"
property=
"dwIsEnableAccessObj"
jdbcType=
"CHAR"
/>
<result
column=
"DW_IS_ENABLE_AUTH_OBJ"
property=
"dwIsEnableAuthObj"
jdbcType=
"CHAR"
/>
<result
column=
"DW_IS_PROTECT_DATA"
property=
"dwIsProtectData"
jdbcType=
"CHAR"
/>
<result
column=
"DATA_STATUS"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"CREATE_USER_ID"
property=
"createUserId"
jdbcType=
"CHAR"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"UPDATE_USER_ID"
property=
"updateUserId"
jdbcType=
"CHAR"
/>
<result
column=
"IMPALA_JDBC_URL"
property=
"impalaJdbcUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"IMPALA_MASTER_FQDN"
property=
"impalaMasterFqdn"
jdbcType=
"VARCHAR"
/>
<result
column=
"UPDATE_TIME"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.bean.DmpProjectDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
_project.ID, _project.OWNER_ID, _project.PRODUCTION_ID, _project.DATA_WAREHOUSE_ID, _project.NAME,
_project.DISPLAY_NAME, _project.PROJECT_DESC, _project.PUBLISH_TARGET_ID, _project.IS_ENABLE_SCHEDULER, _project.IS_EDIT_TASK_CODE,
_project.IS_ENABLE_SELECT, _project.DW_NAME, _project.DW_ACCESS_TYPE, _project.DW_IS_ENABLE_ACL, _project.DW_IS_ENABLE_ACCESS_OBJ,
_project.DW_IS_ENABLE_AUTH_OBJ, _project.DW_IS_PROTECT_DATA, _project.DATA_STATUS, _project.CREATE_USER_ID, _project.CREATE_TIME,
_project.UPDATE_USER_ID, _project.IMPALA_JDBC_URL, _project.IMPALA_MASTER_FQDN, _project.UPDATE_TIME
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<sql
id=
"FIND_ALL_COLUMN"
>
<sql
id=
"FIND_ALL_COLUMN"
>
id,owner_id,production_id,data_warehouse_id,name,display_name,project_desc,publish_target_id,is_enable_scheduler,is_edit_task_code,is_enable_select,dw_name,dw_access_type,dw_is_enable_acl,dw_is_enable_access_obj,dw_is_enable_auth_obj,dw_is_protect_data,data_status,create_user_id,create_time,update_user_id,update_time,impala_jdbc_url,impala_master_fqdn
id,owner_id,production_id,data_warehouse_id,name,display_name,project_desc,publish_target_id,is_enable_scheduler,is_edit_task_code,is_enable_select,dw_name,dw_access_type,dw_is_enable_acl,dw_is_enable_access_obj,dw_is_enable_auth_obj,dw_is_protect_data,data_status,create_user_id,create_time,update_user_id,update_time,impala_jdbc_url,impala_master_fqdn
...
@@ -556,5 +599,14 @@
...
@@ -556,5 +599,14 @@
<if
test=
"dwIsProtectData != null"
>
AND dw_is_protect_data = #{dwIsProtectData}
</if>
<if
test=
"dwIsProtectData != null"
>
AND dw_is_protect_data = #{dwIsProtectData}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus}
</if>
</select>
</select>
<!-- 用户获取所有项目信息 -->
<select
id=
"findListByUserId"
resultMap=
"BaseDtoResultMap"
>
SELECT DISTINCT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_project _project
LEFT JOIN dmp_member_project_role _dmpr on _project.ID=_dmpr.project_id
WHERE _dmpr.user_id=#{userId};
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper/projconfig/DmpProjectConfigEngineMapper.xml
View file @
1e9b432d
...
@@ -13,8 +13,25 @@
...
@@ -13,8 +13,25 @@
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<resultMap
id=
"projenParamResultMap"
type=
"com.jz.dmp.modules.model.DmpProjectEngineParam"
>
<result
column=
"project_param_id"
property=
"projectParamId"
jdbcType=
"INTEGER"
/>
<result
column=
"config_engine_id"
property=
"configEngineId"
jdbcType=
"INTEGER"
/>
<result
column=
"param_id"
property=
"paramId"
jdbcType=
"INTEGER"
/>
<result
column=
"param_name"
property=
"paramName"
jdbcType=
"VARCHAR"
/>
<result
column=
"param_value"
property=
"paramValue"
jdbcType=
"VARCHAR"
/>
<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.projconfig.bean.DmpProjectConfigEngineDto"
extends=
"BaseResultMap"
>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigEngineDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
<!-- /*$BaseDtoResultMapContent$*/ -->
<collection
property=
"dmpProjectEngineParams"
ofType=
"com.jz.dmp.modules.model.DmpProjectEngineParam"
javaType=
"java.util.List"
column=
"config_engine_id"
select=
"selectProjEnParamByPceId"
>
</collection>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -26,6 +43,17 @@
...
@@ -26,6 +43,17 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
</sql>
<!-- 根据引擎获取引擎私有参数 -->
<select
id=
"selectProjEnParamByPceId"
resultMap=
"projenParamResultMap"
parameterType=
"java.lang.String"
>
select
project_param_id, config_engine_id, param_id, param_name, param_value,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
from dmp_project_engine_param
where config_engine_id = #{configEngineId,jdbcType=VARCHAR}
AND data_status='1'
</select>
<!-- 根据主键查询项目配置计算引擎关系表 -->
<!-- 根据主键查询项目配置计算引擎关系表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
...
...
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