Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
7d49b426
Commit
7d49b426
authored
Jul 18, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改转换类
parent
5c599972
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
PowerStationServiceImpl.java
...module/hygf/biz/service/impl/PowerStationServiceImpl.java
+4
-10
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PowerStationServiceImpl.java
View file @
7d49b426
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationNodeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto
;
...
...
@@ -237,14 +238,6 @@ public void updateSeve(String peasantHouseholdId, Map<String, Object> kv ){
designInformationnew
.
setRecUserId
(
designInformation
.
getRecUserId
());
designInformationnew
.
setRecUserName
(
designInformation
.
getRecUserName
());
designInformationnew
.
setIsDelete
(
designInformation
.
getIsDelete
());
designInformationnew
.
setComponentLayout
(
kv
.
containsKey
(
"componentLayout"
)?(
List
<
Object
>)
kv
.
get
(
"componentLayout"
):
null
);
designInformationnew
.
setComponentBracket
(
kv
.
containsKey
(
"componentBracket"
)?(
List
<
Object
>)
kv
.
get
(
"componentLayout"
):
null
);
designInformationnew
.
setConnectionLine
(
kv
.
containsKey
(
"connectionLine"
)?(
List
<
Object
>)
kv
.
get
(
"componentLayout"
):
null
);
designInformationnew
.
setOnceLine
(
kv
.
containsKey
(
"onceLine"
)?(
List
<
Object
>)
kv
.
get
(
"componentLayout"
):
null
);
designInformationnew
.
setAssembly
(
kv
.
containsKey
(
"assembly"
)?(
List
<
Object
>)
kv
.
get
(
"componentLayout"
):
null
);
designInformationnew
.
setInverter
(
kv
.
containsKey
(
"inverter"
)?(
List
<
Object
>)
kv
.
get
(
"componentLayout"
):
null
);
designInformationnew
.
setElectricityMeter
(
kv
.
containsKey
(
"electricityMeter"
)?(
List
<
Object
>)
kv
.
get
(
"componentLayout"
):
null
);
designInformationnew
.
setSupport
(
kv
.
containsKey
(
"support"
)?(
List
<
Object
>)
kv
.
get
(
"componentLayout"
):
null
);
designInformationMapper
.
updateById
(
designInformationnew
);
}
else
{
...
...
@@ -259,11 +252,12 @@ public void updateSeve(String peasantHouseholdId, Map<String, Object> kv ){
public
<
T
>
T
mapToBean
(
Map
<
String
,
Object
>
map
,
Class
<
T
>
clazz
)
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
T
bean
=
null
;
try
{
bean
=
clazz
.
newInstance
();
BeanMap
beanMap
=
BeanMap
.
create
(
bean
);
beanMap
.
putAll
(
map
);
bean
=
objectMapper
.
convertValue
(
map
,
clazz
);
}
catch
(
Exception
e
){
throw
new
BaseException
(
" 数据转化异常!"
,
"400"
,
"数据转化异常!"
);
...
...
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