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
36b7e2b5
Commit
36b7e2b5
authored
Oct 11, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改运行指标
parent
c0159622
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
16 deletions
+64
-16
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+47
-0
overview.json
...jxiop-bigscreen-biz/src/main/resources/json/overview.json
+15
-14
overviewGF.json
...iop-bigscreen-biz/src/main/resources/json/overviewGF.json
+2
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
36b7e2b5
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
...
...
@@ -12,8 +13,10 @@ import com.yeejoin.amos.boot.module.jxiop.api.Enum.StationType;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationPlan
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationPlanMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.*
;
...
...
@@ -55,6 +58,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
...
...
@@ -90,6 +94,9 @@ public class MonitorFanIdxController extends BaseController {
@Value
(
"${fan.statuts.stattuspath}"
)
private
String
fanStatusImagePathPrefix
;
@Autowired
StationPlanMapper
StationPlanMapper
;
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "根据设备编号、场站id、前段展示模块、系统类型查询表数据")
// @GetMapping("/getFanIdxInfoByPage")
...
...
@@ -267,6 +274,16 @@ public class MonitorFanIdxController extends BaseController {
Double
capacityl
=
commonServiceImpl
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
());
columnMap
.
put
(
"装机容量"
,
String
.
format
(
"%.2f"
,
capacityl
));
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
String
monthy
=
myFmt2
.
format
(
new
Date
());
QueryWrapper
<
StationPlan
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
select
(
" monthly ,sum(value) value "
);
wrapper
.
eq
(
"year"
,
monthy
);
wrapper
.
eq
(
"station_basic_id"
,
stationBasic
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
list1
=
StationPlanMapper
.
selectMaps
(
wrapper
);
Double
sumValue
=
list1
!=
null
&&
!
list1
.
isEmpty
()
?
(
Double
)
list1
.
get
(
0
).
get
(
"value"
)
:
0
;
columnMap
.
put
(
"年发电量完成率(%)"
,
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
columnMap
.
get
(
"年发电量"
).
toString
())/
sumValue
*
100
));
// StationBasic stationBasic = stationBasicMapper.selectById(stationId);
// String gatewayId = stationBasic.getFanGatewayId();
...
...
@@ -685,6 +702,36 @@ public class MonitorFanIdxController extends BaseController {
columnMap
.
put
(
"装机容量"
,
String
.
format
(
"%.2f"
,
capacityl
));
columnMap
.
put
(
"辐照强度"
,
String
.
format
(
"%.2f"
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
)));
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy"
);
String
monthy
=
myFmt2
.
format
(
new
Date
());
QueryWrapper
<
StationPlan
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
select
(
" monthly ,sum(value) value "
);
wrapper
.
eq
(
"year"
,
monthy
);
wrapper
.
eq
(
"station_basic_id"
,
stationBasic
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
list1
=
StationPlanMapper
.
selectMaps
(
wrapper
);
Double
sumValue
=
list1
!=
null
&&
!
list1
.
isEmpty
()
?
(
Double
)
list1
.
get
(
0
).
get
(
"value"
)
:
0
;
columnMap
.
put
(
"年发电量完成率(%)"
,
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
columnMap
.
get
(
"年发电量"
).
toString
())/
sumValue
*
100
));
columnMap
.
put
(
"总辐射累计"
,
String
.
format
(
"%.2f"
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射累计"
)));
//综合效率 = 发电量/理论发电量
//理论发电量 = 峰值日照数 * 总装机容量
//峰值日照数 = 累计辐照度/3.6
Double
todayPower
=
Double
.
valueOf
(
columnMap
.
get
(
"日发电量"
).
toString
());
Double
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射累计"
);
if
(
todayPower
>
0
&&
total
>
0
)
{
Double
overallEfficiency
=
todayPower
*
CommonConstans
.
wkwhToMv
/
((
total
/
3.6
)
*
capacityl
);
columnMap
.
put
(
"综合效率"
,
String
.
format
(
"%.2f"
,
overallEfficiency
*
100
)
+
"%"
);
//综合效率
}
String
json
=
null
;
try
{
json
=
IOUtils
.
toString
(
overviewGF
.
getInputStream
(),
java
.
lang
.
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/json/overview.json
View file @
36b7e2b5
...
...
@@ -3,27 +3,27 @@
"title"
:
"装机容量"
,
"title1"
:
"装机容量(MW)"
,
"url"
:
"upload/jxiop/amos_studio/2F378EF430F788CA71E876359B46C4E.png"
},
{
"title"
:
"日发电量
"
,
"title1"
:
"日发电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/E07C6C41715033585F69934AF08A3431.png"
},
},
{
"title"
:
"30秒平均风速"
,
"title1"
:
"平均风速(m/s)
"
,
"url"
:
"upload/jxiop/amos_studio/3B66742AAB2FEB0F5CEC10DA50156F.png"
},
{
"title"
:
"风机台数"
,
"title1"
:
"风机台数(台)"
,
"url"
:
"upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png"
},
},{
"title"
:
"日发电量"
,
"title1"
:
"日发电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/E07C6C41715033585F69934AF08A3431.png"
},
{
"title"
:
"月发电量"
,
"title1"
:
"月发电量(万kWh)"
,
"url"
:
"upload/jxiop/amos_studio/6CE2792ABEEAE816CB798649A6796.png"
},
{
"title"
:
"30秒平均风速"
,
"title1"
:
"平均风速(m/s)"
,
"url"
:
"upload/jxiop/amos_studio/3B66742AAB2FEB0F5CEC10DA50156F.png"
},
{
"title"
:
"年发电量"
,
"title1"
:
"年发电量(万kWh)"
,
...
...
@@ -41,8 +41,8 @@
"url"
:
"upload/jxiop/amos_studio/C46B483E51ACAC137CBEB5156F6F377.png"
},
{
"title"
:
"
上网电量
"
,
"title1"
:
"
上网电量(万kWh
)"
,
"title"
:
"
年发电量完成率(%)
"
,
"title1"
:
"
年发电量完成率(%
)"
,
"url"
:
"upload/jxiop/amos_studio/1660C5DDA22ACFADC89A60DEDB82FA39.png"
}
]
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/json/overviewGF.json
View file @
36b7e2b5
...
...
@@ -46,8 +46,8 @@
"url"
:
"upload/jxiop/amos_studio/12D321E29727689B334E3E625383EB7C.png"
},
{
"title"
:
"
上网电量
"
,
"title1"
:
"
上网电量(万kWh
)"
,
"title"
:
"
年发电量完成率(%)
"
,
"title1"
:
"
年发电量完成率(%
)"
,
"url"
:
"upload/jxiop/amos_studio/1660C5DDA22ACFADC89A60DEDB82FA39.png"
},
{
...
...
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