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
2432116a
Commit
2432116a
authored
Nov 01, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer_bw' into developer_bw
parents
a1bcf0f5
9aa4e564
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
222 additions
and
139 deletions
+222
-139
StatisticsHomepageMapper.xml
.../main/resources/mapper/mysql/StatisticsHomepageMapper.xml
+86
-75
StatisticsHomepageServiceImpl.java
.../hygf/biz/service/impl/StatisticsHomepageServiceImpl.java
+136
-64
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/StatisticsHomepageMapper.xml
View file @
2432116a
...
...
@@ -85,21 +85,24 @@
hygf_design_information
LEFT JOIN
hygf_peasant_household ON hygf_design_information.peasant_household_id = hygf_peasant_household.sequence_nbr
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
<where>
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
</where>
</select>
<select
id=
"preparationMoneyTotal"
resultType=
"map"
>
...
...
@@ -145,21 +148,23 @@
hygf_power_station_engineering_info ei on ei.work_order_power_station_id =hygf_work_order_power_station.sequence_nbr
LEFT JOIN
hygf_peasant_household ON hygf_work_order_power_station.peasant_household_id = hygf_peasant_household.sequence_nbr
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
<where>
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
</where>
GROUP BY
power_station_construction_status,work_order_power_station_node
</select>
...
...
@@ -183,21 +188,23 @@
LEFT JOIN hygf_work_order_power_station ps ON ps.sequence_nbr = hygf_basic_grid_record.work_order_power_station_id
LEFT JOIN hygf_power_station_engineering_info ei ON ei.work_order_power_station_id = ps.sequence_nbr
LEFT JOIN hygf_peasant_household ON hygf_basic_grid_record.peasant_household_id = hygf_peasant_household.sequence_nbr
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
<where>
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
</where>
GROUP BY
grid_status
</select>
...
...
@@ -227,21 +234,23 @@
hygf_power_station_engineering_info ei ON ei.work_order_power_station_id = ps.sequence_nbr
LEFT JOIN
hygf_peasant_household ON hygf_acceptance_check.peasant_household_id = hygf_peasant_household.sequence_nbr
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
<where>
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
</where>
GROUP BY
acceptance_check_status
</select>
...
...
@@ -257,21 +266,23 @@
LEFT JOIN hygf_work_order_power_station ps ON ps.peasant_household_id = hygf_financing_info.peasant_household_id
LEFT JOIN hygf_power_station_engineering_info ei ON ei.work_order_power_station_id = ps.sequence_nbr
LEFT JOIN hygf_peasant_household ON hygf_financing_info.peasant_household_id = hygf_peasant_household.sequence_nbr
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
<where>
<if
test=
"developerCode != null and developerCode != ''"
>
AND hygf_peasant_household.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND hygf_peasant_household.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND hygf_peasant_household.project_address LIKE CONCAT ('%',#{district},'%')
</if>
</where>
GROUP BY
status
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/StatisticsHomepageServiceImpl.java
View file @
2432116a
...
...
@@ -11,10 +11,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@Service
public
class
StatisticsHomepageServiceImpl
{
...
...
@@ -58,7 +55,6 @@ public class StatisticsHomepageServiceImpl {
Map
<
String
,
Object
>
resuleMapBuild
(
Map
<
String
,
Object
>
li
,
Map
<
String
,
Object
>
resultMap
,
List
<
Map
<
String
,
Object
>>
maps
,
String
type
){
long
total
=
0
;
double
realScale
=
0.00
;
long
sureyNum
=
0
;
long
workNum
=
0
;
long
preparationNum
=
0
;
...
...
@@ -68,100 +64,153 @@ public class StatisticsHomepageServiceImpl {
long
stationNum
=
0
;
double
stationRealScale
=
0.00
;
double
disbursementMoney
=
0.00
;
List
<
String
>
surveKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"未通过"
,
"未勘察"
,
"已完成(法务审核)"
,
"进行中(审核)"
));
List
<
String
>
contractKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"双方已签署"
,
"农户已签署"
,
"未发起"
));
List
<
String
>
workOrder
=
new
ArrayList
<>(
Arrays
.
asList
(
"派工发料"
,
"未通过"
,
"施工资料已上传"
,
"完工登记"
,
"完工自审"
,
"审核中"
,
"已完成"
));
List
<
String
>
preparationMoneyKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"待发货"
,
"已收货"
,
"已发货"
));
List
<
String
>
desionKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"施工图已上传"
,
"典设图已上传"
));
List
<
String
>
gridKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"待登记"
,
"审核中"
,
"已完成"
,
"未通过"
,
"整改待审核"
,
"待整改"
));
List
<
String
>
acceptanceKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"待提交"
,
"已完成"
,
"审核中"
,
"整改待审核"
,
"待整改"
,
"未通过"
));
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
switch
(
type
){
case
"surey"
:
Map
<
String
,
Object
>
surey
=
maps
.
get
(
0
);
for
(
String
e
:
surey
.
keySet
())
{
if
(!
e
.
equals
(
"completeTotal"
)){
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
e
).
put
(
"total"
,
surey
.
get
(
e
)).
build
());
}
if
(!
e
.
equals
(
"未勘察"
)){
sureyNum
+=
(
long
)
surey
.
get
(
e
);
}
else
{
stationNum
+=
(
long
)
surey
.
get
(
e
);
resultMap
.
put
(
"sureyComplete"
,
0
);
if
(
Objects
.
isNull
(
maps
)||
Objects
.
isNull
(
maps
.
get
(
0
))){
list
=
this
.
nullDataBuildResult
(
list
,
surveKeys
);
}
else
{
Map
<
String
,
Object
>
surey
=
maps
.
get
(
0
);
surveKeys
.
removeAll
(
surey
.
keySet
());
for
(
String
e
:
surey
.
keySet
())
{
if
(!
e
.
equals
(
"completeTotal"
)){
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
e
).
put
(
"total"
,
surey
.
get
(
e
)).
build
());
}
if
(!
e
.
equals
(
"未勘察"
)){
sureyNum
+=
(
long
)
surey
.
get
(
e
);
}
else
{
stationNum
+=
(
long
)
surey
.
get
(
e
);
}
}
list
=
this
.
nullDataBuildResult
(
list
,
surveKeys
);
resultMap
.
put
(
"sureyComplete"
,
surey
.
containsKey
(
"completeTotal"
)?
surey
.
get
(
"completeTotal"
):
0
);
}
li
.
put
(
"surveNum"
,
sureyNum
);
li
.
put
(
"stationNum"
,
sureyNum
+
stationNum
);
resultMap
.
put
(
"surey"
,
list
);
resultMap
.
put
(
"sureyComplete"
,
surey
.
get
(
"completeTotal"
));
break
;
case
"desion"
:
Map
<
String
,
Object
>
desion
=
maps
.
get
(
0
);
desion
.
keySet
().
forEach
(
e
->{
if
(
Objects
.
isNull
(
maps
)||
Objects
.
isNull
(
maps
.
get
(
0
))){
list
=
this
.
nullDataBuildResult
(
list
,
desionKeys
);
}
else
{
Map
<
String
,
Object
>
desion
=
maps
.
get
(
0
);
desionKeys
.
remove
(
desion
.
keySet
());
for
(
String
e
:
desion
.
keySet
())
{
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
e
).
put
(
"total"
,
desion
.
get
(
e
)).
build
());
});
if
(
resultMap
.
containsKey
(
"sureyComplete"
)){
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核完成"
).
put
(
"total"
,
resultMap
.
get
(
"sureyComplete"
)).
build
());
resultMap
.
remove
(
"sureyComplete"
);
}
else
{
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核完成"
).
put
(
"total"
,
0
).
build
());
}
}
list
=
this
.
nullDataBuildResult
(
list
,
desionKeys
);
if
(
resultMap
.
containsKey
(
"sureyComplete"
)){
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核完成"
).
put
(
"total"
,
resultMap
.
get
(
"sureyComplete"
)).
build
());
resultMap
.
remove
(
"sureyComplete"
);
}
else
{
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核完成"
).
put
(
"total"
,
0
).
build
());
}
}
resultMap
.
put
(
"desion"
,
list
);
break
;
case
"contract"
:
Map
<
String
,
Object
>
contract
=
maps
.
get
(
0
);
contract
.
keySet
().
forEach
(
e
->{
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
e
).
put
(
"total"
,
contract
.
get
(
e
)).
build
());
});
if
(
Objects
.
isNull
(
maps
)
||
Objects
.
isNull
(
maps
.
get
(
0
))
){
list
=
this
.
nullDataBuildResult
(
list
,
contractKeys
);
}
else
{
Map
<
String
,
Object
>
contract
=
maps
.
get
(
0
);
for
(
String
e
:
contract
.
keySet
())
{
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
e
).
put
(
"total"
,
contract
.
get
(
e
)).
build
());
}
list
=
this
.
nullDataBuildResult
(
list
,
contractKeys
);
}
resultMap
.
put
(
"contract"
,
list
);
break
;
case
"preparationMoney"
:
Map
<
String
,
Object
>
preparationMoney
=
maps
.
get
(
0
);
for
(
String
e
:
preparationMoney
.
keySet
())
{
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
e
).
put
(
"total"
,
preparationMoney
.
get
(
e
)).
build
());
preparationNum
+=
(
long
)
preparationMoney
.
get
(
e
);
if
(
Objects
.
isNull
(
maps
)||
Objects
.
isNull
(
maps
.
get
(
0
))){
list
=
this
.
nullDataBuildResult
(
list
,
preparationMoneyKeys
);
}
else
{
Map
<
String
,
Object
>
preparationMoney
=
maps
.
get
(
0
);
for
(
String
e
:
preparationMoney
.
keySet
())
{
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
e
).
put
(
"total"
,
preparationMoney
.
get
(
e
)).
build
());
preparationNum
+=
(
long
)
preparationMoney
.
get
(
e
);
}
list
=
this
.
nullDataBuildResult
(
list
,
preparationMoneyKeys
);
}
resultMap
.
put
(
"preparationMoney"
,
list
);
li
.
put
(
"preparationNum"
,
preparationNum
);
break
;
case
"workOrder"
:
Iterator
<
Map
<
String
,
Object
>>
iterator
=
maps
.
iterator
();
while
(
iterator
.
hasNext
())
{
Map
<
String
,
Object
>
map
=
iterator
.
next
();
workNum
+=
(
long
)
map
.
get
(
"total"
);
stationRealScale
+=
(
double
)
map
.
get
(
"realScale"
);
if
(
"审核中"
.
equals
(
map
.
get
(
"statusText"
)))
{
total
+=
(
long
)
map
.
get
(
"total"
);
realScale
+=
(
double
)
map
.
get
(
"realScale"
);
iterator
.
remove
();
if
(
CollectionUtil
.
isEmpty
(
maps
)||
Objects
.
isNull
(
maps
.
get
(
0
))){
list
=
this
.
nullDataBuildResult
(
list
,
workOrder
);
resultMap
.
put
(
"workOrder"
,
list
);
}
else
{
Iterator
<
Map
<
String
,
Object
>>
iterator
=
maps
.
iterator
();
while
(
iterator
.
hasNext
())
{
Map
<
String
,
Object
>
map
=
iterator
.
next
();
workNum
+=
(
long
)
map
.
get
(
"total"
);
stationRealScale
+=
(
double
)
map
.
get
(
"realScale"
);
if
(
"审核中"
.
equals
(
map
.
get
(
"statusText"
)))
{
total
+=
(
long
)
map
.
get
(
"total"
);
realScale
+=
(
double
)
map
.
get
(
"realScale"
);
iterator
.
remove
();
}
}
maps
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核中"
).
put
(
"total"
,
total
).
put
(
"realScale"
,
realScale
).
build
());
differenceValue
(
maps
,
workOrder
);
resultMap
.
put
(
"workOrder"
,
maps
);
}
li
.
put
(
"workNum"
,
workNum
);
li
.
put
(
"stationRealScale"
,
stationRealScale
);
maps
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核中"
).
put
(
"total"
,
total
).
put
(
"realScale"
,
realScale
).
build
());
resultMap
.
put
(
"workOrder"
,
maps
);
break
;
case
"grid"
:
Iterator
<
Map
<
String
,
Object
>>
iterator1
=
maps
.
iterator
();
while
(
iterator1
.
hasNext
())
{
Map
<
String
,
Object
>
map
=
iterator1
.
next
();
gridNum
+=
(
long
)
map
.
get
(
"total"
);
if
(
"审核中"
.
equals
(
map
.
get
(
"statusText"
)))
{
total
+=(
long
)
map
.
get
(
"total"
);
realScale
+=
(
double
)
map
.
get
(
"realScale"
);
iterator1
.
remove
();
if
(
CollectionUtil
.
isEmpty
(
maps
)||
Objects
.
isNull
(
maps
.
get
(
0
))){
list
=
this
.
nullDataBuildResult
(
list
,
gridKeys
);
resultMap
.
put
(
"grid"
,
list
);
}
else
{
Iterator
<
Map
<
String
,
Object
>>
iterator1
=
maps
.
iterator
();
while
(
iterator1
.
hasNext
())
{
Map
<
String
,
Object
>
map
=
iterator1
.
next
();
gridNum
+=
(
long
)
map
.
get
(
"total"
);
if
(
"审核中"
.
equals
(
map
.
get
(
"statusText"
)))
{
total
+=
(
long
)
map
.
get
(
"total"
);
realScale
+=
(
double
)
map
.
get
(
"realScale"
);
iterator1
.
remove
();
}
}
maps
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核中"
).
put
(
"total"
,
total
).
put
(
"realScale"
,
realScale
).
build
());
differenceValue
(
maps
,
gridKeys
);
resultMap
.
put
(
"grid"
,
maps
);
}
maps
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核中"
).
put
(
"total"
,
total
).
put
(
"realScale"
,
realScale
).
build
());
resultMap
.
put
(
"grid"
,
maps
);
li
.
put
(
"gridNum"
,
gridNum
);
break
;
case
"acceptance"
:
Iterator
<
Map
<
String
,
Object
>>
iterator2
=
maps
.
iterator
();
while
(
iterator2
.
hasNext
())
{
Map
<
String
,
Object
>
map
=
iterator2
.
next
();
acceptanceNum
+=
(
long
)
map
.
get
(
"total"
);
if
(
"审核中"
.
equals
(
map
.
get
(
"statusText"
)))
{
total
+=
(
long
)
map
.
get
(
"total"
);
realScale
+=
(
double
)
map
.
get
(
"realScale"
);
iterator2
.
remove
();
if
(
CollectionUtil
.
isEmpty
(
maps
)||
Objects
.
isNull
(
maps
.
get
(
0
))){
list
=
this
.
nullDataBuildResult
(
list
,
acceptanceKeys
);
resultMap
.
put
(
"acceptance"
,
list
);
}
else
{
Iterator
<
Map
<
String
,
Object
>>
iterator2
=
maps
.
iterator
();
while
(
iterator2
.
hasNext
())
{
Map
<
String
,
Object
>
map
=
iterator2
.
next
();
acceptanceNum
+=
(
long
)
map
.
get
(
"total"
);
if
(
"审核中"
.
equals
(
map
.
get
(
"statusText"
)))
{
total
+=
(
long
)
map
.
get
(
"total"
);
realScale
+=
(
double
)
map
.
get
(
"realScale"
);
iterator2
.
remove
();
}
}
maps
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核中"
).
put
(
"total"
,
total
).
put
(
"realScale"
,
realScale
).
build
());
differenceValue
(
maps
,
acceptanceKeys
);
resultMap
.
put
(
"acceptance"
,
maps
);
}
maps
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
"审核中"
).
put
(
"total"
,
total
).
put
(
"realScale"
,
realScale
).
build
());
resultMap
.
put
(
"acceptance"
,
maps
);
li
.
put
(
"acceptanceNum"
,
acceptanceNum
);
break
;
case
"financing"
:
...
...
@@ -182,5 +231,28 @@ public class StatisticsHomepageServiceImpl {
return
resultMap
;
}
List
<
Map
<
String
,
Object
>>
nullDataBuildResult
(
List
<
Map
<
String
,
Object
>>
list
,
List
<
String
>
Keys
){
if
(
Keys
.
size
()<
1
){
return
list
;
}
for
(
String
key
:
Keys
)
{
if
(
key
.
equals
(
"workOrder"
)
||
key
.
equals
(
"grid"
)||
key
.
equals
(
"acceptance"
)||
key
.
equals
(
"financing"
)||
key
.
equals
(
"inverter"
)){
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
key
).
put
(
"total"
,
0
).
put
(
"realScale"
,
0
).
build
());
}
else
{
list
.
add
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"statusText"
,
key
).
put
(
"total"
,
0
).
build
());
}
}
return
list
;
}
List
<
Map
<
String
,
Object
>>
differenceValue
(
List
<
Map
<
String
,
Object
>>
list
,
List
<
String
>
Keys
)
{
List
<
String
>
objects
=
new
ArrayList
<>();
list
.
forEach
(
e
->{
objects
.
add
(
e
.
get
(
"statusText"
).
toString
());
});
Keys
.
removeAll
(
objects
);
this
.
nullDataBuildResult
(
list
,
Keys
);
return
list
;
}
}
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