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
b758e1f1
Commit
b758e1f1
authored
Mar 12, 2021
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
2d72b7b0
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
6 deletions
+78
-6
DmpProjectConfigEngineDto.java
...controller/projconfig/bean/DmpProjectConfigEngineDto.java
+14
-0
DmpProjectConfigInfoDto.java
...s/controller/projconfig/bean/DmpProjectConfigInfoDto.java
+15
-0
MyDmpComputEngineConverter.java
...ontroller/projconfig/bean/MyDmpComputEngineConverter.java
+1
-0
DmpProjectConfigEngine.java
...java/com/jz/dmp/modules/model/DmpProjectConfigEngine.java
+11
-0
DmpProjectConfigInfoServiceImpl.java
...vice/projconfig/impl/DmpProjectConfigInfoServiceImpl.java
+27
-4
DmpPublicConfigInfoServiceImpl.java
...rvice/projconfig/impl/DmpPublicConfigInfoServiceImpl.java
+8
-0
DmpComputEngineMapper.xml
...ain/resources/mapper/projconfig/DmpComputEngineMapper.xml
+1
-1
DmpProjectConfigEngineMapper.xml
...ources/mapper/projconfig/DmpProjectConfigEngineMapper.xml
+1
-1
No files found.
src/main/java/com/jz/dmp/modules/controller/projconfig/bean/DmpProjectConfigEngineDto.java
View file @
b758e1f1
package
com
.
jz
.
dmp
.
modules
.
controller
.
projconfig
.
bean
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.jz.dmp.modules.model.DmpProjectConfigEngine
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**项目配置计算引擎关系表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"项目配置计算引擎关系表Dto"
,
description
=
"项目配置计算引擎关系表Dto"
)
@JsonIgnoreProperties
(
value
=
{
"handler"
})
public
class
DmpProjectConfigEngineDto
extends
DmpProjectConfigEngine
{
@ApiModelProperty
(
value
=
"选择的引擎"
)
private
DmpComputEngineDto
dmpComputEngineDto
;
public
DmpComputEngineDto
getDmpComputEngineDto
()
{
return
dmpComputEngineDto
;
}
public
void
setDmpComputEngineDto
(
DmpComputEngineDto
dmpComputEngineDto
)
{
this
.
dmpComputEngineDto
=
dmpComputEngineDto
;
}
}
src/main/java/com/jz/dmp/modules/controller/projconfig/bean/DmpProjectConfigInfoDto.java
View file @
b758e1f1
package
com
.
jz
.
dmp
.
modules
.
controller
.
projconfig
.
bean
;
import
java.util.List
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.jz.dmp.modules.model.DmpProjectConfigEngine
;
import
com.jz.dmp.modules.model.DmpProjectConfigInfo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -25,6 +28,9 @@ public class DmpProjectConfigInfoDto extends DmpProjectConfigInfo {
*/
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"选择的计算引擎"
)
private
List
<
DmpProjectConfigEngineDto
>
dmpProjectConfigEngineDtos
;
@ApiModelProperty
(
value
=
"公共配置"
)
private
DmpPublicConfigInfoDto
dmpPublicConfigInfoDto
;
...
...
@@ -35,4 +41,13 @@ public class DmpProjectConfigInfoDto extends DmpProjectConfigInfo {
public
void
setDmpPublicConfigInfoDto
(
DmpPublicConfigInfoDto
dmpPublicConfigInfoDto
)
{
this
.
dmpPublicConfigInfoDto
=
dmpPublicConfigInfoDto
;
}
public
List
<
DmpProjectConfigEngineDto
>
getDmpProjectConfigEngineDtos
()
{
return
dmpProjectConfigEngineDtos
;
}
public
void
setDmpProjectConfigEngineDtos
(
List
<
DmpProjectConfigEngineDto
>
dmpProjectConfigEngineDtos
)
{
this
.
dmpProjectConfigEngineDtos
=
dmpProjectConfigEngineDtos
;
}
}
src/main/java/com/jz/dmp/modules/controller/projconfig/bean/MyDmpComputEngineConverter.java
View file @
b758e1f1
...
...
@@ -5,6 +5,7 @@ import java.util.List;
import
org.springframework.beans.BeanUtils
;
import
com.jz.dmp.modules.model.DmpComputEngine
;
import
com.jz.dmp.modules.model.DmpComputEngineParam
;
public
class
MyDmpComputEngineConverter
{
...
...
src/main/java/com/jz/dmp/modules/model/DmpProjectConfigEngine.java
View file @
b758e1f1
...
...
@@ -79,6 +79,9 @@ public class DmpProjectConfigEngine implements Serializable{
@ApiModelProperty
(
value
=
"选择引擎私有配置参数"
)
private
List
<
DmpProjectEngineParam
>
dmpProjectEngineParams
;
@ApiModelProperty
(
value
=
"选择的引擎"
)
private
DmpComputEngine
dmpComputEngine
;
public
Integer
getConfigEngineId
()
{
return
configEngineId
;
}
...
...
@@ -159,4 +162,12 @@ public class DmpProjectConfigEngine implements Serializable{
this
.
dmpProjectEngineParams
=
dmpProjectEngineParams
;
}
public
DmpComputEngine
getDmpComputEngine
()
{
return
dmpComputEngine
;
}
public
void
setDmpComputEngine
(
DmpComputEngine
dmpComputEngine
)
{
this
.
dmpComputEngine
=
dmpComputEngine
;
}
}
src/main/java/com/jz/dmp/modules/service/projconfig/impl/DmpProjectConfigInfoServiceImpl.java
View file @
b758e1f1
...
...
@@ -25,6 +25,7 @@ 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.MyDmpProjectConfigEngineConverter
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpComputEngineDto
;
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
;
...
...
@@ -34,9 +35,11 @@ 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.controller.projconfig.bean.MyDmpComputEngineConverter
;
import
com.jz.dmp.modules.dao.projconfig.DmpComputEngineMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectConfigEngineMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectConfigInfoMapper
;
import
com.jz.dmp.modules.dao.projconfig.DmpProjectEngineParamMapper
;
import
com.jz.dmp.modules.model.DmpComputEngine
;
import
com.jz.dmp.modules.model.DmpProjectConfigEngine
;
import
com.jz.dmp.modules.model.DmpProjectConfigInfo
;
import
com.jz.dmp.modules.model.DmpProjectEngineParam
;
...
...
@@ -64,6 +67,9 @@ public class DmpProjectConfigInfoServiceImpl extends BaseService implements DmpP
@Autowired
private
DmpPublicConfigInfoService
dmpPublicConfigInfoService
;
@Autowired
private
DmpComputEngineMapper
dmpComputEngineMapper
;
/*
* (non-Javadoc)
*
...
...
@@ -311,6 +317,12 @@ public class DmpProjectConfigInfoServiceImpl extends BaseService implements DmpP
List
<
DmpProjectConfigEngine
>
dmpProjConfigEngines
=
dmpProjectConfigInfo
.
getDmpProjectConfigEngines
();
//设置configId(项目配置信息主键)
dmpProjConfigEngines
=
dmpProjConfigEngines
.
stream
().
map
(
x
->{
x
.
setConfigId
(
dmpProjectConfigInfo
.
getProjectConfigId
());
return
x
;
}).
collect
(
Collectors
.
toList
());
//新增
List
<
DmpProjectConfigEngine
>
dmpProjConfigEnginesNew
=
dmpProjConfigEngines
.
stream
()
.
filter
(
x
->{
...
...
@@ -321,6 +333,7 @@ public class DmpProjectConfigInfoServiceImpl extends BaseService implements DmpP
}).
map
(
y
->{
y
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
y
.
setCreateTime
(
new
Date
());
y
.
setDataStatus
(
"1"
);
return
y
;
}).
collect
(
Collectors
.
toList
());
dmpProjectConfigEngineMapper
.
insertBatch
(
dmpProjConfigEnginesNew
);
...
...
@@ -360,9 +373,16 @@ public class DmpProjectConfigInfoServiceImpl extends BaseService implements DmpP
List
<
DmpProjectEngineParam
>
dmpProjectEngineParams
=
dmpProjConfigEngines
.
stream
()
.
flatMap
(
x
->{
return
x
.
getDmpProjectEngineParams
().
stream
();
return
x
.
getDmpProjectEngineParams
().
stream
().
map
(
z
->{
z
.
setConfigEngineId
(
x
.
getConfigEngineId
());
return
z
;
});
}).
map
(
y
->{
y
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
y
.
setCreateTime
(
new
Date
());
y
.
setDataStatus
(
"1"
);
return
y
;
}).
collect
(
Collectors
.
toList
());
dmpProjectEngineParamMapper
.
insertBatch
(
dmpProjectEngineParams
);
//新增
List
<
DmpProjectEngineParam
>
dmpProjectEngineParamsNew
=
dmpProjectEngineParams
.
stream
()
...
...
@@ -703,8 +723,11 @@ 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
);
for
(
DmpProjectConfigEngineDto
dmpProjectConfigEngineDto
:
dmpProjectConfigEngineDtos
)
{
DmpComputEngineDto
dmpComputEngineDto
=
dmpComputEngineMapper
.
findById
(
dmpProjectConfigEngineDto
.
getEngineId
());
dmpProjectConfigEngineDto
.
setDmpComputEngineDto
(
dmpComputEngineDto
);
}
dto
.
setDmpProjectConfigEngineDtos
(
dmpProjectConfigEngineDtos
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
...
...
src/main/java/com/jz/dmp/modules/service/projconfig/impl/DmpPublicConfigInfoServiceImpl.java
View file @
b758e1f1
...
...
@@ -351,6 +351,14 @@ public class DmpPublicConfigInfoServiceImpl extends BaseService implements DmpPu
}
List
<
DmpPublicConfigInfoDto
>
list
=
dmpPublicConfigInfoMapper
.
findList
(
param
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
param2
=
new
HashMap
<
String
,
Object
>();
List
<
DmpComputEngineDto
>
dmpComputEngineDtos
=
dmpComputEngineMapper
.
findList
(
param2
);
for
(
DmpPublicConfigInfoDto
dmpPublicConfigInfoDto
:
list
)
{
dmpPublicConfigInfoDto
.
setDmpComputEngineDtos
(
dmpComputEngineDtos
);
}
}
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
...
...
src/main/resources/mapper/projconfig/DmpComputEngineMapper.xml
View file @
b758e1f1
...
...
@@ -345,7 +345,7 @@
</select>
<!-- 主键查询计算引擎表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_comput_engine
...
...
src/main/resources/mapper/projconfig/DmpProjectConfigEngineMapper.xml
View file @
b758e1f1
...
...
@@ -177,7 +177,7 @@
</insert>
<!-- 批量新增项目配置计算引擎关系表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpProjectConfigEngine"
>
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpProjectConfigEngine"
useGeneratedKeys=
"true"
keyProperty=
"configEngineId"
>
insert into dmp_project_config_engine (
config_engine_id, config_id, engine_id, remark, data_status,
create_user_id, create_time, update_user_id, update_time
...
...
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