Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
bc49cc1f
Commit
bc49cc1f
authored
Nov 18, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改资料下载 发货单
parent
39b72109
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
45 deletions
+64
-45
CommonServiceImpl.java
.../boot/module/hygf/biz/service/impl/CommonServiceImpl.java
+64
-45
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/CommonServiceImpl.java
View file @
bc49cc1f
...
...
@@ -691,8 +691,8 @@ public class CommonServiceImpl {
fillSheet
(
secondSheet6
,
returnDto
.
getPowerStationEngineeringInfo
());
Sheet
secondSheet7
=
workbook
.
getSheetAt
(
7
);
fillSheet
(
secondSheet7
,
preparationMoneyDto
);
fillSheetFH
(
secondSheet7
,
preparationMoneyDto
);
//
fillSheet(secondSheet7, preparationMoneyDto);
fillSheetFH
(
secondSheet7
,
preparationMoneyDto
==
null
?
new
PreparationMoney
():
preparationMoneyDto
);
Sheet
secondSheet8
=
workbook
.
getSheetAt
(
8
);
fillSheet
(
secondSheet8
,
returnDto
.
getPowerStationConstructionData
());
...
...
@@ -998,60 +998,79 @@ public class CommonServiceImpl {
private
void
fillSheetFH
(
Sheet
sheet
,
PreparationMoney
preparationMoney
){
if
(
Objects
.
isNull
(
preparationMoney
)){
return
;
if
(
Objects
.
isNull
(
preparationMoney
)){
return
;
}
int
startRow
=
1
;
for
(
int
i
=
0
;
i
<
sheet
.
getLastRowNum
()
+
1
;
i
++)
{
Row
row
=
sheet
.
getRow
(
i
);
if
(
row
!=
null
&&
i
>=
startRow
)
{
for
(
Cell
cell
:
row
)
{
if
(
cell
.
getCellType
()
==
CellType
.
STRING
)
{
String
cellValue
=
cell
.
getStringCellValue
();
String
fieldName
=
removePlaceholders
(
cellValue
);
setCellValue
(
cell
,
fieldName
,
preparationMoney
);
}
}
}
}
LambdaQueryWrapper
<
DocumentStation
>
q
=
new
LambdaQueryWrapper
<>();
q
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
preparationMoney
.
getSequenceNbr
());
List
<
DocumentStation
>
lih
=
documentStationMapper
.
selectList
(
q
);
DesignInformation
designInformation
=
new
DesignInformation
();
if
(
CollectionUtil
.
isNotEmpty
(
lih
)){
if
(
lih
!=
null
&&
lih
.
size
()
>
0
)
{
lih
.
forEach
(
e
->
{
if
(
e
.
getPeasantHouseholdNo
()
!=
null
)
{
e
.
setScale
(
householdContractMapper
.
getHygfCommercialScale
(
e
.
getPeasantHouseholdNo
()));
e
.
setRealScale
(
powerStationEngineeringInfoMapper
.
getRealScaleByPeasantHouseholdNo
(
e
.
getPeasantHouseholdNo
()));
}
});
if
(
lih
!=
null
&&
lih
.
size
()
>
0
)
{
lih
.
forEach
(
e
->
{
if
(
e
.
getPeasantHouseholdNo
()
!=
null
)
{
e
.
setScale
(
householdContractMapper
.
getHygfCommercialScale
(
e
.
getPeasantHouseholdNo
()));
e
.
setRealScale
(
powerStationEngineeringInfoMapper
.
getRealScaleByPeasantHouseholdNo
(
e
.
getPeasantHouseholdNo
()));
}
});
}
}
List
<
Long
>
ids
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
lih
)
{
ids
.
add
(
documentStation
.
getStationId
());
}
//获取所有电站Bom,分组合并,暂时不相加
List
<
Long
>
ids
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
lih
)
{
ids
.
add
(
documentStation
.
getStationId
());
}
//获取所有电站Bom,分组合并,暂时不相加
QueryWrapper
<
DesignInformation
>
designInformationQueryWrapper
=
new
QueryWrapper
<>();
designInformationQueryWrapper
.
in
(
"peasant_household_id"
,
ids
);
List
<
DesignInformation
>
li
=
designInformationMapper
.
selectList
(
designInformationQueryWrapper
);
QueryWrapper
<
DesignInformation
>
designInformationQueryWrapper
=
new
QueryWrapper
<>();
designInformationQueryWrapper
.
in
(
"peasant_household_id"
,
ids
);
List
<
DesignInformation
>
li
=
designInformationMapper
.
selectList
(
designInformationQueryWrapper
);
DesignInformation
designInformation
=
new
DesignInformation
();
//组件
List
<
Object
>
assembly
=
new
ArrayList
<>();
//逆变器
List
<
Object
>
inverter
=
new
ArrayList
<>();
//电表箱
List
<
Object
>
electricityMeter
=
new
ArrayList
<>();
//电缆
List
<
Object
>
cable
=
new
ArrayList
<>();
for
(
DesignInformation
des
:
li
)
{
if
(
des
.
getAssembly
()
!=
null
&&
!
des
.
getAssembly
().
isEmpty
())
{
assembly
.
addAll
(
des
.
getAssembly
());
}
if
(
des
.
getInverter
()
!=
null
&&
!
des
.
getInverter
().
isEmpty
())
{
inverter
.
addAll
(
des
.
getInverter
());
}
if
(
des
.
getElectricityMeter
()
!=
null
&&
!
des
.
getElectricityMeter
().
isEmpty
())
{
electricityMeter
.
addAll
(
des
.
getElectricityMeter
());
}
if
(
des
.
getCable
()
!=
null
&&
!
des
.
getCable
().
isEmpty
())
{
cable
.
addAll
(
des
.
getCable
());
//组件
List
<
Object
>
assembly
=
new
ArrayList
<>();
//逆变器
List
<
Object
>
inverter
=
new
ArrayList
<>();
//电表箱
List
<
Object
>
electricityMeter
=
new
ArrayList
<>();
//电缆
List
<
Object
>
cable
=
new
ArrayList
<>();
for
(
DesignInformation
des
:
li
)
{
if
(
des
.
getAssembly
()
!=
null
&&
!
des
.
getAssembly
().
isEmpty
())
{
assembly
.
addAll
(
des
.
getAssembly
());
}
if
(
des
.
getInverter
()
!=
null
&&
!
des
.
getInverter
().
isEmpty
())
{
inverter
.
addAll
(
des
.
getInverter
());
}
if
(
des
.
getElectricityMeter
()
!=
null
&&
!
des
.
getElectricityMeter
().
isEmpty
())
{
electricityMeter
.
addAll
(
des
.
getElectricityMeter
());
}
if
(
des
.
getCable
()
!=
null
&&
!
des
.
getCable
().
isEmpty
())
{
cable
.
addAll
(
des
.
getCable
());
}
}
designInformation
.
setAssembly
(
assembly
);
designInformation
.
setInverter
(
inverter
);
designInformation
.
setElectricityMeter
(
electricityMeter
);
designInformation
.
setCable
(
cable
);
}
designInformation
.
setAssembly
(
assembly
);
designInformation
.
setInverter
(
inverter
);
designInformation
.
setElectricityMeter
(
electricityMeter
);
designInformation
.
setCable
(
cable
);
;
...
...
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