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
724c3ae7
Commit
724c3ae7
authored
Mar 07, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
告警dto及errorCode映射问题处理。
parent
7239cae4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
4 deletions
+44
-4
GoodWeConstant.java
...eejoin/amos/api/householdapi/constant/GoodWeConstant.java
+1
-1
HouseholdTestController.java
.../api/householdapi/controller/HouseholdTestController.java
+2
-1
GoodWeDataAcquisitionServiceImpl.java
...i/face/service/impl/GoodWeDataAcquisitionServiceImpl.java
+41
-2
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/constant/GoodWeConstant.java
View file @
724c3ae7
...
...
@@ -176,7 +176,7 @@ public class GoodWeConstant {
public
static
String
collectorDetailUrl
=
"/v1/api/collectorDetail"
;
public
static
String
inverterListUrl
=
"/v1/api/inverterList"
;
public
static
String
inverterDetailUrl
=
"/v1/api/inverterDetail"
;
public
static
String
alarmListUrl
=
"/
v1/api/alarmList
"
;
public
static
String
alarmListUrl
=
"/
api/OpenApi/GetPowerStationWariningInfoByMultiCondition
"
;
public
static
String
stationDayGenUrl
=
"/v1/api/stationDayEnergyList"
;
public
static
String
stationMonthEnergyList
=
"/v1/api/stationDayEnergyList"
;
public
static
String
stationYearEnergyList
=
"/v1/api/stationDayEnergyList"
;
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/controller/HouseholdTestController.java
View file @
724c3ae7
...
...
@@ -52,7 +52,8 @@ public class HouseholdTestController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"固德威示例"
,
notes
=
"固德威示例"
)
public
void
goodweDemo
()
throws
IOException
{
// goodWeDataAcquisitionService.stationList();
goodWeDataAcquisitionService
.
stationDetail
();
// goodWeDataAcquisitionService.stationDetail();
goodWeDataAcquisitionService
.
inverAlramInfo
();
}
/**
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoodWeDataAcquisitionServiceImpl.java
View file @
724c3ae7
...
...
@@ -7,7 +7,10 @@ import com.alibaba.fastjson.JSON;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.yeejoin.amos.api.householdapi.Utils.GoodWeRequestUtil
;
import
com.yeejoin.amos.api.householdapi.constant.GoLangConstant
;
import
com.yeejoin.amos.api.householdapi.constant.GoodWeConstant
;
import
com.yeejoin.amos.api.householdapi.face.dto.AlarmDto
;
import
com.yeejoin.amos.api.householdapi.face.dto.GoodWeAlarmDto
;
import
com.yeejoin.amos.api.householdapi.face.dto.GoodWeStationMonitorDto
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpStation
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.*
;
...
...
@@ -261,9 +264,45 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
String
today
=
DateUtil
.
today
();
requestInfo
.
put
(
"page_index"
,
1
);
requestInfo
.
put
(
"page_size"
,
1000
);
requestInfo
.
put
(
"starttime"
,
today
+
"00:00:00"
);
requestInfo
.
put
(
"endtime"
,
today
+
"23:59:59"
);
requestInfo
.
put
(
"starttime"
,
today
+
"
00:00:00"
);
requestInfo
.
put
(
"endtime"
,
today
+
"
23:59:59"
);
requestInfo
.
put
(
"status"
,
2
);
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GoodWeAlarmDto
>
alarmList
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
alarmListUrl
,
GoodWeConstant
.
requestPost
,
requstParam
,
GoodWeConstant
.
resovleRule_data_list
,
GoodWeAlarmDto
.
class
);
alarmList
.
forEach
(
goodWeAlarmDto
->
{
if
(!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getDevicesn
()))
{
HYGFJPInverterWarn
hygfjpInverterWarn
=
hygfjpInverterWarnMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterWarn
>()
.
eq
(
"sn_code"
,
goodWeAlarmDto
.
getDevicesn
())
.
eq
(
"start_time"
,
goodWeAlarmDto
.
getHappentime
().
getMillis
())
.
eq
(
"third_station_id"
,
String
.
valueOf
(
goodWeAlarmDto
.
getStationId
()))
);
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterWarn
))
{
hygfjpInverterWarn
=
new
HYGFJPInverterWarn
();
}
hygfjpInverterWarn
.
setTime
(
System
.
currentTimeMillis
());
hygfjpInverterWarn
.
setSnCode
(
goodWeAlarmDto
.
getDevicesn
());
hygfjpInverterWarn
.
setThirdStationId
(
goodWeAlarmDto
.
getStationId
());
// hygfjpInverterWarn.setLevel(GoLangConstant.alarmLevel.get(alarmDto.getAlarmLevel()));
hygfjpInverterWarn
.
setContent
(
goodWeAlarmDto
.
getWarningname
());
hygfjpInverterWarn
.
setThirdCode
(
PVProducerInfoEnum
.
GDW
.
getCode
());
hygfjpInverterWarn
.
setTreatment
(
GoodWeConstant
.
errorCodeMap
.
get
(
goodWeAlarmDto
.
getError_code
()).
get
(
2
));
hygfjpInverterWarn
.
setStartTime
(
goodWeAlarmDto
.
getHappentime
().
getMillis
());
hygfjpInverterWarn
.
setRecoverTime
(
null
);
if
(!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getRecoverytime
()))
{
hygfjpInverterWarn
.
setRecoverTime
(
goodWeAlarmDto
.
getRecoverytime
().
getMillis
());
}
hygfjpInverterWarn
.
setTimeLong
(
null
);
if
((!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getHappentime
()))
&&
(!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getRecoverytime
())))
{
hygfjpInverterWarn
.
setTimeLong
(
goodWeAlarmDto
.
getRecoverytime
().
getMillis
()
-
goodWeAlarmDto
.
getHappentime
().
getMillis
());
}
hygfjpInverterWarn
.
setState
(
GoodWeConstant
.
warningStaus
.
get
(
goodWeAlarmDto
.
getStatus
().
toString
()));
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
hygfjpInverterWarn
.
getCreatedTime
()))
{
hygfjpInverterWarn
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterWarnMapper
.
insert
(
hygfjpInverterWarn
);
}
else
{
hygfjpInverterWarnMapper
.
insert
(
hygfjpInverterWarn
);
}
}
});
}
}
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