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
0050bdb8
Commit
0050bdb8
authored
Jul 17, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加方法
parent
b77ef8a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
11 deletions
+33
-11
PowerStationServiceImpl.java
...module/hygf/biz/service/impl/PowerStationServiceImpl.java
+33
-11
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 @
0050bdb8
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
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
;
...
...
@@ -18,6 +19,7 @@ import com.yeejoin.amos.boot.module.hygf.api.service.IPowerStationService;
import
com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.cglib.beans.BeanMap
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
...
...
@@ -89,16 +91,11 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// 1. 业务相关数据落表
PowerStation
powerStation
=
this
.
baseMapper
.
selectById
(
stationId
);
PowerStationNodeEnum
nodeByCode
=
PowerStationNodeEnum
.
getNodeByCode
(
nodeCode
);
if
(
PowerStationNodeEnum
.
设计上传图纸
.
getCode
().
equals
(
nodeCode
))
{
if
(
PowerStationNodeEnum
.
设计上传图纸
.
getCode
().
equals
(
nodeCode
)
||
PowerStationNodeEnum
.
经销商上传图纸
.
getCode
().
equals
(
nodeCode
)
)
{
this
.
updateSeve
(
powerStation
.
getPeasantHouseholdId
(),
kv
);
}
else
if
(
PowerStationNodeEnum
.
经销商上传图纸
.
getCode
().
equals
(
nodeCode
))
{
}
else
{
}
else
{
String
result
=
String
.
valueOf
(
kv
.
get
(
"VERIFY_RESULT"
));
if
(
VERIFY_RESULT_NO
.
equals
(
result
))
{
powerStation
.
setProcessStatus
(
PowerStationProcessStateEnum
.
不通过
.
getName
());
...
...
@@ -193,14 +190,39 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// 设计信息填充
public
void
updateSeve
(
String
peasantHouseholdId
){
public
void
updateSeve
(
String
peasantHouseholdId
,
Map
<
String
,
Object
>
kv
){
LambdaQueryWrapper
<
DesignInformation
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
ne
(
DesignInformation:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
designInformationMapper
.
selectOne
(
peasantHouseholdId
);
wrapper
.
eq
(
DesignInformation:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
DesignInformation
designInformation
=
designInformationMapper
.
selectOne
(
wrapper
);
if
(
designInformation
!=
null
){
DesignInformation
designInformationnew
=
this
.
mapToBean
(
kv
,
DesignInformation
.
class
);
LambdaUpdateWrapper
<
DesignInformation
>
updateWrapperwrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapperwrapper
.
eq
(
DesignInformation:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
designInformationMapper
.
update
(
designInformationnew
,
updateWrapperwrapper
);
}
else
{
DesignInformation
designInformationnew
=
this
.
mapToBean
(
kv
,
DesignInformation
.
class
);
designInformationnew
.
setPeasantHouseholdId
(
peasantHouseholdId
);
designInformationMapper
.
insert
(
designInformationnew
);
}
}
public
<
T
>
T
mapToBean
(
Map
<
String
,
Object
>
map
,
Class
<
T
>
clazz
)
{
T
bean
=
null
;
try
{
bean
=
clazz
.
newInstance
();
BeanMap
beanMap
=
BeanMap
.
create
(
bean
);
beanMap
.
putAll
(
map
);
}
catch
(
Exception
e
){
throw
new
BaseException
(
" 数据转化异常!"
,
"400"
,
"数据转化异常!"
);
}
return
bean
;
}
...
...
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