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
29036e3a
Commit
29036e3a
authored
Dec 04, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
合并分支到主分支(电站监控)
parents
bbcffb3c
c3a6c0b8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
233 additions
and
85 deletions
+233
-85
DataDto.java
...va/com/yeejoin/amos/boot/module/hygf/api/dto/DataDto.java
+18
-0
DayGenerateEX.java
.../yeejoin/amos/boot/module/hygf/api/dto/DayGenerateEX.java
+1
-1
JpInverterDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
+5
-0
JpInverterDtoNew.java
...ejoin/amos/boot/module/hygf/api/dto/JpInverterDtoNew.java
+6
-0
JpStationDto.java
...m/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
+1
-1
MonthGenerateEX.java
...eejoin/amos/boot/module/hygf/api/dto/MonthGenerateEX.java
+1
-1
YearGenerateEX.java
...yeejoin/amos/boot/module/hygf/api/dto/YearGenerateEX.java
+1
-1
DayGenerate.java
...yeejoin/amos/boot/module/hygf/api/entity/DayGenerate.java
+1
-1
MonthGenerate.java
...ejoin/amos/boot/module/hygf/api/entity/MonthGenerate.java
+1
-1
TdHYGFInverterDayGenerate.java
...oot/module/hygf/api/entity/TdHYGFInverterDayGenerate.java
+12
-12
YearGenerate.java
...eejoin/amos/boot/module/hygf/api/entity/YearGenerate.java
+1
-1
JpInverterMapper.xml
...-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
+35
-3
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+5
-5
TdHYGFInverterDayGenerateMapper.xml
...urces/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
+1
-1
TdHygfJpInverterWarnMapper.xml
.../resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
+4
-3
JpCollectorController.java
...oot/module/hygf/biz/controller/JpCollectorController.java
+4
-4
JpInverterController.java
...boot/module/hygf/biz/controller/JpInverterController.java
+0
-0
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+24
-18
TdHygfJpInverterWarnController.java
...e/hygf/biz/controller/TdHygfJpInverterWarnController.java
+25
-10
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+39
-16
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+0
-0
paramsTree.json
...t-module-hygf-biz/src/main/resources/json/paramsTree.json
+48
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/DataDto.java
0 → 100644
View file @
29036e3a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
lombok.Data
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
/**
* @description:
* @author: tw
* @createDate: 2023/11/30
*/
@Data
public
class
DataDto
{
String
time
;
List
<
String
>
snCodes
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/DayGenerateEX.java
View file @
29036e3a
...
...
@@ -50,7 +50,7 @@ public class DayGenerateEX {
/**
* 累计发电量
*/
@ExcelProperty
(
value
=
"累计发电量(
k
Wh)"
,
index
=
8
)
@ExcelProperty
(
value
=
"累计发电量(
M
Wh)"
,
index
=
8
)
private
Double
accumulatedPower
;
/**
* 状态
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
View file @
29036e3a
...
...
@@ -101,9 +101,14 @@ public class JpInverterDto extends BaseDto {
private
List
<
JpCollector
>
jpCollectors
;
private
List
<
JpInverterElectricity
>
JL
;
private
List
<
JpInverterElectricity
>
ZL
;
private
List
<
JpInverterElectricity
>
interflow
;
private
List
<
JpInverterElectricity
>
directCurrent
;
@ApiModelProperty
(
value
=
"所属电站名称"
)
private
String
name
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInverterDtoNew.java
View file @
29036e3a
...
...
@@ -98,4 +98,10 @@ public class JpInverterDtoNew extends BaseDto {
@ApiModelProperty
(
value
=
"筛选用 最大值"
)
private
Double
maxValue
;
@ApiModelProperty
(
value
=
"所属区域公司名称"
)
private
String
companyName
;
@ApiModelProperty
(
value
=
"电站类型"
)
private
String
stationType
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
View file @
29036e3a
...
...
@@ -96,7 +96,7 @@ public class JpStationDto extends BaseDto {
/**
* 累计发电量
*/
@ExcelProperty
(
value
=
"累计发电量(
m
Wh)"
,
index
=
6
)
@ExcelProperty
(
value
=
"累计发电量(
M
Wh)"
,
index
=
6
)
private
Double
accumulatedPower
;
@ExcelIgnore
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/MonthGenerateEX.java
View file @
29036e3a
...
...
@@ -52,6 +52,6 @@ public class MonthGenerateEX {
/**
* 累计发电量
*/
@ExcelProperty
(
value
=
"累计发电量(
k
Wh)"
,
index
=
8
)
@ExcelProperty
(
value
=
"累计发电量(
M
Wh)"
,
index
=
8
)
private
Double
accumulatedPower
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/YearGenerateEX.java
View file @
29036e3a
...
...
@@ -46,6 +46,6 @@ public class YearGenerateEX {
/**
* 累计发电量
*/
@ExcelProperty
(
value
=
"累计发电量(
k
Wh)"
,
index
=
8
)
@ExcelProperty
(
value
=
"累计发电量(
M
Wh)"
,
index
=
8
)
private
Double
accumulatedPower
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/DayGenerate.java
View file @
29036e3a
...
...
@@ -49,6 +49,6 @@ public class DayGenerate {
@TableField
(
"income"
)
// 日收益
private
Double
dayI
ncome
;
private
Double
i
ncome
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/MonthGenerate.java
View file @
29036e3a
...
...
@@ -52,5 +52,5 @@ public class MonthGenerate {
// 月收益
@TableField
(
"income"
)
private
Double
monthI
ncome
;
private
Double
i
ncome
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/TdHYGFInverterDayGenerate.java
View file @
29036e3a
...
...
@@ -80,42 +80,42 @@ public class TdHYGFInverterDayGenerate implements Serializable {
/**
* 交流电压1
*/
@ExcelProperty
(
"交流电压
1
(V)"
)
@ExcelProperty
(
"交流电压
U
(V)"
)
private
Double
dcv1
;
/**
* 交流电压2
*/
@ExcelProperty
(
"交流电压
2
(V)"
)
@ExcelProperty
(
"交流电压
V
(V)"
)
private
Double
dcv2
;
/**
* 交流电压3
*/
@ExcelProperty
(
"交流电压
3
(V)"
)
@ExcelProperty
(
"交流电压
W
(V)"
)
private
Double
dcv3
;
/**
* 交流电压4
*/
@Excel
Property
(
"交流电压4(V)"
)
@Excel
Ignore
private
Double
dcv4
;
/**
* 交流电流1
*/
@ExcelProperty
(
"交流电流
1
(A)"
)
@ExcelProperty
(
"交流电流
U
(A)"
)
private
Double
dcc1
;
/**
* 交流电流2
*/
@ExcelProperty
(
"交流电流
2
(A)"
)
@ExcelProperty
(
"交流电流
V
(A)"
)
private
Double
dcc2
;
/**
* 交流电流3
*/
@ExcelProperty
(
"交流电流
3
(A)"
)
@ExcelProperty
(
"交流电流
W
(A)"
)
private
Double
dcc3
;
/**
* 交流电流4
*/
@Excel
Property
(
"交流电流4(A)"
)
@Excel
Ignore
private
Double
dcc4
;
/**
...
...
@@ -160,22 +160,22 @@ public class TdHYGFInverterDayGenerate implements Serializable {
private
Double
igbtTemp
;
/**
* 直流
电流
1
* 直流
功率
1
*/
@ExcelIgnore
private
Double
pv1
;
/**
* 直流
电流
2
* 直流
功率
2
*/
@ExcelIgnore
private
Double
pv2
;
/**
* 直流
电流
3
* 直流
功率
3
*/
@ExcelIgnore
private
Double
pv3
;
/**
* 直流
电流
4
* 直流
功率
4
*/
@ExcelIgnore
private
Double
pv4
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/YearGenerate.java
View file @
29036e3a
...
...
@@ -50,5 +50,5 @@ public class YearGenerate {
// 年收益
@TableField
(
"income"
)
private
Double
yearI
ncome
;
private
Double
i
ncome
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
View file @
29036e3a
...
...
@@ -39,7 +39,39 @@
<select
id=
"selectPageData"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDtoNew"
>
select
hjc. *
hjc.sequence_nbr,
hjc.rec_date,
hjc.rec_user_id,
hjc.rec_user_name,
hjc.sn_code,
hjc.state,
hjc.rated_power,
hjc.collector_id,
hjc.collector_sn_code,
hjc.update_time,
hjc.current_power,
ROUND(hjc.day_power_generation,3) as dayPowerGeneration,
ROUND(hjc.month_power_generation,3) as monthPowerGeneration,
ROUND(hjc.year_power_generation,3) as yearPowerGeneration,
hjc.brand,
hjc.model,
hjc.national_standard,
hjc.version,
hjc.generation_hours,
hjc.warranty_period,
hjc.IGBT_temperature,
hjc.AFCI_programme,
hjc.AFCI_version,
hjc.ID,
hjc.capacity,
ROUND(hjc.total_power_generation/1000,3) as totalPowerGeneration,
hjc.third_station_id,
hjc.is_delete,
hjc.third_code,
hjc.station_name,
hjc.addr,
sta.type as stationType,
(select COMPANY_NAME from privilege_company where ORG_CODE = sta.regional_companies_code ) as companyName
from
hygf_jp_inverter hjc
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
...
...
@@ -48,7 +80,7 @@
AND hjc.sn_code like #{dto.snCode}
</if>
<if
test=
"dto.minValue != null and dto.minValue !=''"
>
AND hjc.capacity >= #{dto.
typ
e}
AND hjc.capacity >= #{dto.
minValu
e}
</if>
<if
test=
"dto.maxValue != null and dto.maxValue !=''"
>
AND hjc.capacity
<![CDATA[<=]]>
#{dto.maxValue}
...
...
@@ -68,7 +100,7 @@
AND hjc.sn_code like #{dto.snCode}
</if>
<if
test=
"dto.minValue != null and dto.minValue !=''"
>
AND hjc. capacity >= #{dto.
typ
e}
AND hjc. capacity >= #{dto.
minValu
e}
</if>
<if
test=
"dto.maxValue != null and dto.maxValue !=''"
>
AND hjc.capacity
<![CDATA[<=]]>
#{dto.maxValue}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
29036e3a
...
...
@@ -178,7 +178,7 @@
<if
test=
"dto.area!=null"
>
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
</if>
<if
test=
"dto.thirdStationIds!=null"
>
<if
test=
"dto.thirdStationIds!=null
and dto.thirdStationIds.size()> 0
"
>
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.thirdStationIds"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
...
...
@@ -472,7 +472,7 @@
`rec_user_id` recUserId,
`rec_user_name` recUserName,
`sn_code` snCode,
`capacity`
capacity,
ROUND(`capacity`,3)
capacity,
`name` ,
`code` ,
`system_code` systemCode,
...
...
@@ -501,8 +501,8 @@
`organizational_code` organizationalCode,
`is_delete` isDelete,
ROUND(`day_generate`,3) dayGenerate,
`month_generate`
monthGenerate,
`year_generate`
yearGenerate,
ROUND(`month_generate`,3)
monthGenerate,
ROUND(`year_generate`,3)
yearGenerate,
`day_income` dayIncome,
`month_income` monthIncome,
`year_income` yearIncome,
...
...
@@ -510,7 +510,7 @@
`cumulative_income` cumulativeIncome,
`email`,
rated_power ratedPower,
ROUND(`
real_time_power`/rated_power
,3) fullhour,
ROUND(`
day_generate`/capacity
,3) fullhour,
(select privilege_company.COMPANY_NAME from privilege_company where privilege_company.ORG_CODE=hygf_jp_station.regional_companies_code) regionalCompaniesName
from hygf_jp_station
<where>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
View file @
29036e3a
...
...
@@ -12,7 +12,7 @@
from
house_pv_data.td_hygf_inverter_day_generate
<where>
created_time >=
(#{time} - 8h )
created_time >=
#{time}
<if
test=
"snCode != null and snCode !=''"
>
and sn_code = #{snCode}
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
View file @
29036e3a
...
...
@@ -71,10 +71,10 @@
AND `level` = #{level}
</if>
<if
test=
"minvalue != null and minvalue != ''"
>
time_long >= #{minvalue}
AND time_long >= (#{minvalue}*1000)
</if>
<if
test=
"maxValue != null and maxValue != ''"
>
AND time_long
<![CDATA[<=]]>
#{maxValue}
AND time_long
<![CDATA[<=]]>
(#{maxValue}*1000)
</if>
<if
test=
"snCode != null and snCode != ''"
>
AND sn_code like #{snCode}
...
...
@@ -95,6 +95,7 @@
AND content like #{content}
</if>
</where>
ORDER BY start_time desc
limit #{current},#{size}
</select>
...
...
@@ -111,7 +112,7 @@
AND level = #{level}
</if>
<if
test=
"minvalue != null and minvalue != ''"
>
time_long >= #{minvalue}
AND
time_long >= #{minvalue}
</if>
<if
test=
"maxValue != null and maxValue != ''"
>
AND time_long
<![CDATA[<=]]>
#{maxValue}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpCollectorController.java
View file @
29036e3a
...
...
@@ -112,10 +112,10 @@ public class JpCollectorController extends BaseController {
List
<
JpInverter
>
list
=
jpInverterServiceImpl
.
list
(
queryWrapper
);
List
<
JpInverter
>
listData
=
new
ArrayList
<>();
for
(
JpInverter
jpInverter
:
list
)
{
jpInverter
.
setDayPowerGeneration
(
jpInverter
.
getDayPowerGeneration
()!=
null
?
jpInverter
.
getDayPowerGeneration
()/
1000
:
0
);
jpInverter
.
setMonthPowerGeneration
(
jpInverter
.
getMonthPowerGeneration
()!=
null
?
jpInverter
.
getMonthPowerGeneration
()/
1000
:
0
);
jpInverter
.
setYearPowerGeneration
(
jpInverter
.
getYearPowerGeneration
()!=
null
?
jpInverter
.
getYearPowerGeneration
()/
1000
:
0
);
jpInverter
.
setTotalPowerGeneration
(
jpInverter
.
getTotalPowerGeneration
()!=
null
?
jpInverter
.
getTotalPowerGeneration
()/
1000
:
0
);
jpInverter
.
setDayPowerGeneration
(
jpInverter
.
getDayPowerGeneration
()!=
null
?
Double
.
valueOf
(
String
.
format
(
"%.3f"
,
jpInverter
.
getDayPowerGeneration
()))
:
0
);
jpInverter
.
setMonthPowerGeneration
(
jpInverter
.
getMonthPowerGeneration
()!=
null
?
Double
.
valueOf
(
String
.
format
(
"%.3f"
,
jpInverter
.
getMonthPowerGeneration
()))
:
0
);
jpInverter
.
setYearPowerGeneration
(
jpInverter
.
getYearPowerGeneration
()!=
null
?
Double
.
valueOf
(
String
.
format
(
"%.3f"
,
jpInverter
.
getYearPowerGeneration
()))
:
0
);
jpInverter
.
setTotalPowerGeneration
(
jpInverter
.
getTotalPowerGeneration
()!=
null
?
Double
.
valueOf
(
String
.
format
(
"%.3f"
,
jpInverter
.
getTotalPowerGeneration
()/
1000
))
:
0
);
listData
.
add
(
jpInverter
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpInverterController.java
View file @
29036e3a
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
29036e3a
...
...
@@ -75,7 +75,7 @@ public class JpStationController extends BaseController {
private
static
String
ZX
=
"在线"
;
private
static
String
LX
=
"离线"
;
private
static
String
BJ
=
"报警"
;
private
static
int
FDXSS
=
1000
;
/**
* 新增第三方场站
*
...
...
@@ -177,6 +177,7 @@ public class JpStationController extends BaseController {
String
name
=
jpInverter
.
stream
().
map
(
JpInverter:
:
getSnCode
).
collect
(
Collectors
.
joining
(
","
));
jpStationDto
.
setNbsn
(
name
);
jpStationDto
.
setCjsn
(
names
);
jpStationDto
.
setCapacity
(
jpStationDto
.
getCapacity
());
jpStationDto
.
setRegionalCompaniesName
(
personnelBusiness
.
getRegionalCompaniesName
());
return
ResponseHelper
.
buildResponse
(
jpStationDto
);
}
...
...
@@ -457,7 +458,12 @@ public class JpStationController extends BaseController {
JpStationDto
jpStation
=
jpStationMapper
.
getCountJpStationdata
(
reviewDto
);
List
<
Map
<
String
,
Object
>>
powerRatio
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"value"
,
String
.
format
(
"%.2f"
,
jpStation
.
getRealTimePower
()/
jpStation
.
getRatedPower
()));
if
(
jpStation
!=
null
&&
jpStation
.
getRealTimePower
()!=
null
&&
jpStation
.
getRatedPower
()!=
null
&&
jpStation
.
getRatedPower
()>
0
){
map
.
put
(
"value"
,
String
.
format
(
"%.4f"
,
jpStation
.
getRealTimePower
()/(
jpStation
.
getCapacity
()*
FDXSS
)));
}
else
{
jpStation
=
new
JpStationDto
();
map
.
put
(
"value"
,
0
);
}
powerRatio
.
add
(
map
);
jpStation
.
setPowerRatio
(
powerRatio
);
List
<
JpStationDto
>
list
=
new
ArrayList
<>();
...
...
@@ -492,13 +498,13 @@ public class JpStationController extends BaseController {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
DecimalFormat
format2
=
new
DecimalFormat
(
"0.00"
);
//炭
map
.
put
(
"carbon"
,
format2
.
format
(
jpStation
.
getAccumulatedPower
()*
CARBON
));
map
.
put
(
"carbon"
,
format2
.
format
(
jpStation
.
getAccumulatedPower
()*
FDXSS
*
CARBON
));
//硫
map
.
put
(
"sulfur"
,
format2
.
format
(
jpStation
.
getAccumulatedPower
()*
SULFUR
));
map
.
put
(
"sulfur"
,
format2
.
format
(
jpStation
.
getAccumulatedPower
()*
FDXSS
*
SULFUR
));
//粉尘
map
.
put
(
"dust"
,
format2
.
format
(
jpStation
.
getAccumulatedPower
()*
DUST
));
map
.
put
(
"dust"
,
format2
.
format
(
jpStation
.
getAccumulatedPower
()*
FDXSS
*
DUST
));
//煤
map
.
put
(
"coal"
,
format2
.
format
(
jpStation
.
getAccumulatedPower
()*
COAL
));
map
.
put
(
"coal"
,
format2
.
format
(
jpStation
.
getAccumulatedPower
()*
FDXSS
*
COAL
));
itemList
.
add
(
map
);
result
.
setCurrent
(
1
);
result
.
setTotal
(
1
);
...
...
@@ -520,7 +526,7 @@ public class JpStationController extends BaseController {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
DecimalFormat
format2
=
new
DecimalFormat
(
"0.00"
);
DecimalFormat
format2
=
new
DecimalFormat
(
"0.00
0
"
);
//炭
map
.
put
(
"name1"
,
"实时功率(kW)"
);
map
.
put
(
"name2"
,
"组件总容量(MWp)"
);
...
...
@@ -531,7 +537,7 @@ public class JpStationController extends BaseController {
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
map2
.
put
(
"name1"
,
"当日电量(
k
Wh)"
);
map2
.
put
(
"name1"
,
"当日电量(
M
Wh)"
);
map2
.
put
(
"name2"
,
"当日收益(元)"
);
//炭
map2
.
put
(
"value1"
,
format2
.
format
(
jpStation
.
getDayGenerate
()));
...
...
@@ -548,9 +554,9 @@ public class JpStationController extends BaseController {
map4
.
put
(
"name1"
,
"累计电量(MWh)"
);
map4
.
put
(
"name2"
,
"累计收益(万元)"
);
//炭
map4
.
put
(
"value1"
,
format2
.
format
(
jpStation
.
get
YearGenerate
()));
map4
.
put
(
"value1"
,
format2
.
format
(
jpStation
.
get
AccumulatedPower
()));
//硫
map4
.
put
(
"value2"
,
format2
.
format
(
jpStation
.
get
Year
Income
()));
map4
.
put
(
"value2"
,
format2
.
format
(
jpStation
.
get
Cumulative
Income
()));
date
.
add
(
map
);
date
.
add
(
map2
);
...
...
@@ -674,10 +680,10 @@ public class JpStationController extends BaseController {
return
ResponseHelper
.
buildResponse
(
page
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@
GetMapping
(
value
=
"/queryReport"
)
@ApiOperation
(
httpMethod
=
"
GE
T"
,
value
=
"场站报表"
,
notes
=
"场站报表"
)
@
PostMapping
(
value
=
"/queryReport"
)
@ApiOperation
(
httpMethod
=
"
POS
T"
,
value
=
"场站报表"
,
notes
=
"场站报表"
)
public
ResponseModel
<
Page
<
JpStationDto
>>
queryReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpStationDto
reviewDto
,
String
type
)
{
(
value
=
"size"
)
int
size
,
@RequestBody
JpStationDto
reviewDto
,
@RequestParam
(
value
=
"type"
)
String
type
)
{
Page
<
JpStationDto
>
page
=
jpStationServiceImpl
.
queryReport
(
current
,
size
,
reviewDto
,
type
);
...
...
@@ -705,11 +711,11 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/jpstationReportExport"
,
method
=
RequestMethod
.
GE
T
)
@ApiOperation
(
httpMethod
=
"
GE
T"
,
value
=
"电站报表导出"
,
notes
=
"电站报表导出"
)
public
void
jpstationReportExport
(
HttpServletResponse
response
,
JpStationDto
reviewDto
,
String
type
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
@RequestMapping
(
value
=
"/jpstationReportExport"
,
method
=
RequestMethod
.
POS
T
)
@ApiOperation
(
httpMethod
=
"
POS
T"
,
value
=
"电站报表导出"
,
notes
=
"电站报表导出"
)
public
void
jpstationReportExport
(
HttpServletResponse
response
,
@RequestBody
JpStationDto
reviewDto
,
@RequestParam
(
value
=
"type"
)
String
type
)
{
//
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
//
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
List
<
JpStationDto
>
jpStationDtos
=
jpStationServiceImpl
.
selectReportDate
(
reviewDto
,
type
,
response
);
// try {
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInverterWarnController.java
View file @
29036e3a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpPersonStation
;
...
...
@@ -17,10 +19,9 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInverterWarnServiceImpl
;
...
...
@@ -244,18 +245,27 @@ public class TdHygfJpInverterWarnController extends BaseController {
@RequestParam
(
required
=
false
)
String
maxValue
,
@RequestParam
(
required
=
false
)
String
snCode
,
@RequestParam
(
required
=
false
)
List
<
String
>
stationId
,
@RequestParam
(
required
=
false
)
List
<
String
>
time
,
@RequestParam
(
required
=
false
)
String
[]
time
,
@RequestParam
(
required
=
false
)
Integer
current
,
@RequestParam
(
required
=
false
)
Integer
size
,
@RequestParam
(
required
=
false
)
String
content
)
{
Page
<
TdHygfJpInverterWarnDto
>
result
=
new
Page
<>();
result
.
setCurrent
(
current
);
result
.
setSize
(
size
);
JpStationDto
reviewDto
=
new
JpStationDto
();
Map
<
String
,
String
>
nameMaps
=
new
HashMap
<>();
if
(
null
!=
stationName
){
if
(
null
!=
stationName
&&
stationName
!=
""
){
reviewDto
.
setName
(
stationName
);
}
List
<
JpStation
>
jpStation
=
jpStationMapper
.
getJpStation
(
reviewDto
);
if
(
CollectionUtil
.
isEmpty
(
jpStation
)){
result
.
setTotal
(
0
);
List
<
TdHygfJpInverterWarnDto
>
list
=
new
ArrayList
<>();
result
.
setRecords
(
list
);
return
ResponseHelper
.
buildResponse
(
result
);
}
nameMaps
=
jpStation
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
JpStation:
:
getName
));
if
(
null
==
stationId
){
...
...
@@ -264,8 +274,14 @@ public class TdHygfJpInverterWarnController extends BaseController {
String
startTime
=
""
;
String
endTime
=
""
;
if
(
null
!=
time
){
startTime
=
time
.
get
(
0
);
endTime
=
time
.
get
(
1
);
try
{
startTime
=
String
.
valueOf
(
DateUtils
.
dateParse
(
time
[
0
].
replace
(
"["
,
""
),
null
).
getTime
());
Date
date
=
DateUtils
.
dateParse
(
time
[
1
].
replace
(
"]"
,
""
),
null
);
endTime
=
String
.
valueOf
(
DateUtils
.
dateAddDays
(
date
,
1
).
getTime
());
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
if
(
StringUtils
.
isNotEmpty
(
snCode
)){
snCode
=
'%'
+
snCode
+
'%'
;
...
...
@@ -281,8 +297,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
map
.
setTimeLongFormat
(
TimeUtil
.
longFormat
(
map
.
getTimeLong
()));
}
result
.
setCurrent
(
current
);
result
.
setSize
(
size
);
result
.
setTotal
(
tdHygfJpInverterWarnServiceImpl
.
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
));
result
.
setRecords
(
maps
);
return
ResponseHelper
.
buildResponse
(
result
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpInverterServiceImpl.java
View file @
29036e3a
...
...
@@ -104,7 +104,14 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
}
public
Map
<
String
,
Object
>
selectDayTrend
(
List
<
JSONObject
>
treeParams
,
String
time
,
String
snCode
,
String
thirdStationId
)
{
List
<
String
>
key
=
treeParams
.
stream
().
map
(
e
->
e
.
get
(
"key"
).
toString
().
replace
(
"_"
,
""
)).
collect
(
Collectors
.
toList
());
List
<
String
>
key
=
new
ArrayList
<>();
treeParams
.
forEach
(
a
->{
if
(
a
.
get
(
"key"
).
toString
().
startsWith
(
"acc"
)||
a
.
get
(
"key"
).
toString
().
startsWith
(
"acv"
)||
a
.
get
(
"key"
).
toString
().
startsWith
(
"pv"
)){
key
.
add
(
a
.
get
(
"key"
).
toString
().
replace
(
"_"
,
""
));
}
else
{
key
.
add
(
a
.
get
(
"key"
).
toString
());
}
});
List
<
Map
<
String
,
Object
>>
tdHYGFInverterDayGenerates
=
tdHYGFInverterDayGenerateMapper
.
selectDayTrend
(
key
,
time
,
snCode
,
thirdStationId
);
List
<
String
>
zData
=
new
ArrayList
<>();
tdHYGFInverterDayGenerates
.
forEach
(
e
->
zData
.
add
(
e
.
get
(
"workstatus"
).
toString
())
);
...
...
@@ -113,8 +120,10 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
List
<
String
>
value
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
obj
:
tdHYGFInverterDayGenerates
)
{
xData
.
add
(
obj
.
get
(
"time"
).
toString
().
substring
(
0
,
obj
.
get
(
"time"
).
toString
().
length
()-
4
));
String
key1
=
treeParam
.
get
(
"key"
).
toString
().
replace
(
"_"
,
""
);
value
.
add
(
obj
.
get
(
key1
).
toString
());
String
key1
=
treeParam
.
get
(
"key"
).
toString
();
if
(
treeParam
.
get
(
"key"
).
toString
().
startsWith
(
"acc"
)||
treeParam
.
get
(
"key"
).
toString
().
startsWith
(
"acv"
)||
treeParam
.
get
(
"key"
).
toString
().
startsWith
(
"pv"
)){
key1
=
treeParam
.
get
(
"key"
).
toString
().
replace
(
"_"
,
""
);
}
value
.
add
(
obj
.
get
(
key1
).
toString
());
}
treeParam
.
put
(
"data"
,
value
);
}
...
...
@@ -128,8 +137,12 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
public
Page
<
TdHYGFInverterDayGenerate
>
jpInverterDayReport
(
int
current
,
int
size
,
String
time
,
List
<
String
>
sncodes
,
List
<
String
>
stationIds
)
{
Page
<
TdHYGFInverterDayGenerate
>
tdHYGFInverterDayGeneratePage
=
new
Page
<>();
Date
date
=
DateUtil
.
parse
(
time
,
"yyyy-MM-dd"
);
String
startTime
=
DateUtil
.
format
(
date
,
"yyyy-MM-dd"
)
+
"00:00:00"
;
String
endTime
=
DateUtil
.
format
(
date
,
"yyyy-MM-dd"
)
+
"23:59:59"
;
Date
timeStart
=
DateUtils
.
dateAddHours
(
date
,
-
8
);
Date
tiemEnd
=
DateUtils
.
dateAddHours
(
date
,
16
);
String
startTime
=
DateUtil
.
format
(
timeStart
,
"yyyy-MM-dd HH:mm:ss"
);
String
endTime
=
DateUtil
.
format
(
tiemEnd
,
"yyyy-MM-dd HH:mm:ss"
);
//String startTime = DateUtil.format(date, "yyyy-MM-dd") + "00:00:00";
//String endTime = DateUtil.format(date, "yyyy-MM-dd") + "23:59:59";
QueryWrapper
queryWrapper
=
new
QueryWrapper
<
TdHYGFInverterDayGenerate
>()
.
ge
(
"created_time"
,
startTime
)
.
le
(
"created_time"
,
endTime
)
...
...
@@ -148,6 +161,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
tdHYGFInverterDayGenerates
.
forEach
(
tdHYGFInverterDayGenerate
->
{
Date
date1
=
new
Date
(
tdHYGFInverterDayGenerate
.
getCreatedTime
());
tdHYGFInverterDayGenerate
.
setCreatedTimeStr
(
DateUtil
.
format
(
date1
,
DatePattern
.
NORM_DATETIME_PATTERN
));
tdHYGFInverterDayGenerate
.
setTotalGen
(
tdHYGFInverterDayGenerate
.
getTotalGen
()
==
null
?
0
:
Double
.
valueOf
(
String
.
format
(
"%.3f"
,
tdHYGFInverterDayGenerate
.
getTotalGen
()/
1000
)));
});
tdHYGFInverterDayGeneratePage
.
setRecords
(
tdHYGFInverterDayGenerates
);
return
tdHYGFInverterDayGeneratePage
;
...
...
@@ -253,9 +267,10 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
if
(
StringUtils
.
isNotBlank
(
jpInverter
.
getSnCode
().
trim
()))
{
item
.
put
(
"name"
,
jpInverter
.
getSnCode
().
trim
());
item
.
put
(
"value"
,
jpInverter
.
getSnCode
().
trim
());
}
result
.
add
(
item
);
}
}
return
result
;
}
...
...
@@ -267,13 +282,13 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
value2
.
add
(
map
.
get
(
"fullhour"
)
.
toString
(
));
value2
.
add
(
map
.
get
(
"fullhour"
)
==
null
?
"0"
:
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())
));
}
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"name"
,
"发电量"
);
map1
.
put
(
"unit"
,
"k
w
"
);
map1
.
put
(
"unit"
,
"k
W
"
);
map1
.
put
(
"data"
,
value1
);
yData
.
add
(
map1
);
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
...
...
@@ -294,13 +309,13 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
value2
.
add
(
map
.
get
(
"fullhour"
)
.
toString
(
));
value2
.
add
(
map
.
get
(
"fullhour"
)
==
null
?
"0"
:
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())
));
}
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"name"
,
"发电量"
);
map1
.
put
(
"unit"
,
"k
w
"
);
map1
.
put
(
"unit"
,
"k
W
"
);
map1
.
put
(
"data"
,
value1
);
yData
.
add
(
map1
);
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
...
...
@@ -321,13 +336,13 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
value2
.
add
(
map
.
get
(
"fullhour"
)
.
toString
(
));
value2
.
add
(
map
.
get
(
"fullhour"
)
==
null
?
"0"
:
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())
));
}
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"name"
,
"发电量"
);
map1
.
put
(
"unit"
,
"k
w
"
);
map1
.
put
(
"unit"
,
"k
W
"
);
map1
.
put
(
"data"
,
value1
);
yData
.
add
(
map1
);
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
...
...
@@ -343,14 +358,22 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
public
Map
<
String
,
Object
>
jpInverterTotal
(
String
snCode
,
String
thirdStationId
,
String
time
,
String
date
)
{
if
(
date
.
equals
(
"day"
)){
return
tdHYGFInverterMonthGenerateMapper
.
selectMonthTotal
(
time
,
snCode
,
thirdStationId
);
Map
<
String
,
Object
>
map
=
tdHYGFInverterMonthGenerateMapper
.
selectMonthTotal
(
time
,
snCode
,
thirdStationId
);
map
.
put
(
"fullhour"
,
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())));
return
map
;
}
else
if
(
date
.
equals
(
"month"
)){
return
tdHYGFInverterYearGenerateMapper
.
selectYearTotal
(
time
,
snCode
,
thirdStationId
);
Map
<
String
,
Object
>
map
=
tdHYGFInverterYearGenerateMapper
.
selectYearTotal
(
time
,
snCode
,
thirdStationId
);
map
.
put
(
"fullhour"
,
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())));
return
map
;
}
else
if
(
date
.
equals
(
"year"
)){
List
<
TdHYGFInverterTotalGenerate
>
tdHYGFInverterTotalGenerates
=
tdHYGFInverterYearGenerateMapper
.
selectTotalSum
(
time
,
snCode
,
thirdStationId
);
if
(
CollectionUtil
.
isNotEmpty
(
tdHYGFInverterTotalGenerates
)){
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerates
.
get
(
0
);
return
Bean
.
BeantoMap
(
tdHYGFInverterTotalGenerate
)
;
Map
<
String
,
Object
>
map
=
Bean
.
BeantoMap
(
tdHYGFInverterTotalGenerate
);
map
.
put
(
"fullhour"
,
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())));
return
map
;
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"fullhour"
,
0
);
...
...
@@ -363,7 +386,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
double
income
=
maps
.
stream
().
filter
(
e
->
null
!=
e
.
getIncome
()
).
mapToDouble
(
TdHYGFInverterTotalGenerate:
:
getIncome
).
sum
();
double
generate
=
maps
.
stream
().
mapToDouble
(
TdHYGFInverterTotalGenerate:
:
getGenerate
).
sum
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"fullhour"
,
fullhour
);
map
.
put
(
"fullhour"
,
String
.
format
(
"%.2f"
,
fullhour
)
);
map
.
put
(
"income"
,
income
);
map
.
put
(
"generate"
,
generate
);
return
map
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpStationServiceImpl.java
View file @
29036e3a
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/json/paramsTree.json
View file @
29036e3a
...
...
@@ -42,44 +42,64 @@
"unit"
:
"A"
}
]
},
{
"name"
:
"直流功率"
,
"key"
:
"pv"
,
"children"
:
[
{
"name"
:
"直流功率PV1"
,
"key"
:
"pv_1"
,
"unit"
:
"kW"
},
{
"name"
:
"直流功率PV2"
,
"key"
:
"pv_2"
,
"unit"
:
"kW"
},
{
"name"
:
"直流功率PV3"
,
"key"
:
"pv_3"
,
"unit"
:
"kW"
},
{
"name"
:
"直流功率PV4"
,
"key"
:
"pv_4"
,
"unit"
:
"kW"
}
]},
{
"name"
:
"U_交流电压"
,
"key"
:
"
a
cv1"
,
"key"
:
"
d
cv1"
,
"unit"
:
"V"
,
"children"
:
[
]
},
{
"name"
:
"V_交流电压"
,
"key"
:
"
a
cv2"
,
"key"
:
"
d
cv2"
,
"unit"
:
"V"
,
"children"
:
[
]
},
{
"name"
:
"W_交流电压"
,
"key"
:
"
a
cv3"
,
"key"
:
"
d
cv3"
,
"unit"
:
"V"
,
"children"
:
[
]
},
{
"name"
:
"U_交流电流"
,
"key"
:
"
a
cc1"
,
"key"
:
"
d
cc1"
,
"unit"
:
"A"
,
"children"
:
[
]
},
{
"name"
:
"W_交流电流"
,
"key"
:
"
a
cc3"
,
"key"
:
"
d
cc3"
,
"unit"
:
"A"
,
"children"
:
[
]
},
{
"name"
:
"V_交流电流"
,
"key"
:
"
a
cc2"
,
"key"
:
"
d
cc2"
,
"unit"
:
"A"
,
"children"
:
[
]
...
...
@@ -94,24 +114,46 @@
{
"name"
:
"总功率"
,
"key"
:
"total_power"
,
"unit"
:
"kWh"
,
"children"
:
[
]
},
{
"name"
:
"当日电量"
,
"key"
:
"day_gen"
,
"unit"
:
"kWh"
,
"children"
:
[
]
},
{
"name"
:
"累计电量"
,
"key"
:
"total_gen"
,
"unit"
:
"kWh"
,
"children"
:
[
]
},
{
"name"
:
"IGBT温度"
,
"key"
:
"igbt_temp"
,
"unit"
:
"℃"
,
"children"
:
[
]
},
{
"name"
:
"直流母线电压"
,
"key"
:
"zlmxdy"
,
"children"
:
[
]
},
{
"name"
:
"直流母线半电压"
,
"key"
:
"zlmxbdy"
,
"children"
:
[
]
},
{
"name"
:
"绝缘阻抗实时值"
,
"key"
:
"jyzkssz"
,
"children"
:
[
]
}
...
...
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