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
a3dbdb0c
Commit
a3dbdb0c
authored
Apr 15, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采集数据修改
parent
ea23a769
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
22 deletions
+44
-22
GoodWeRequestUtil.java
...eejoin/amos/api/householdapi/Utils/GoodWeRequestUtil.java
+3
-3
GoodWeConstant.java
...eejoin/amos/api/householdapi/constant/GoodWeConstant.java
+24
-3
HouseholdTestController.java
.../api/householdapi/controller/HouseholdTestController.java
+9
-9
GoodWeDataAcquisitionService.java
...useholdapi/face/service/GoodWeDataAcquisitionService.java
+1
-1
GoodWeDataAcquisitionServiceImpl.java
...i/face/service/impl/GoodWeDataAcquisitionServiceImpl.java
+7
-6
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/GoodWeRequestUtil.java
View file @
a3dbdb0c
...
@@ -99,9 +99,9 @@ public class GoodWeRequestUtil {
...
@@ -99,9 +99,9 @@ public class GoodWeRequestUtil {
}
}
}
}
}
}
if
(
jsonArray
.
size
()
==
0
)
{
//
if (jsonArray.size() == 0) {
jsonArray
.
add
(
jsonObject
);
//
jsonArray.add(jsonObject);
}
//
}
}
}
return
jsonArray
;
return
jsonArray
;
}
}
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/constant/GoodWeConstant.java
View file @
a3dbdb0c
...
@@ -13,10 +13,10 @@ public class GoodWeConstant {
...
@@ -13,10 +13,10 @@ public class GoodWeConstant {
public
static
final
HashMap
<
String
,
String
>
stationStaus
=
new
HashMap
<
String
,
String
>()
{
public
static
final
HashMap
<
String
,
String
>
stationStaus
=
new
HashMap
<
String
,
String
>()
{
{
{
put
(
"-1"
,
"离线"
);
put
(
"-1"
,
"离线"
);
put
(
"0"
,
"
离
线"
);
put
(
"0"
,
"
在
线"
);
put
(
"1"
,
"在线"
);
put
(
"1"
,
"在线"
);
put
(
"2"
,
"
离线
"
);
put
(
"2"
,
"
报警
"
);
put
(
"-2"
,
"
离线
"
);
put
(
"-2"
,
"
报警
"
);
}
}
};
};
public
static
final
HashMap
<
String
,
String
>
warningStaus
=
new
HashMap
<
String
,
String
>()
{
public
static
final
HashMap
<
String
,
String
>
warningStaus
=
new
HashMap
<
String
,
String
>()
{
...
@@ -32,6 +32,27 @@ public class GoodWeConstant {
...
@@ -32,6 +32,27 @@ public class GoodWeConstant {
}
}
};
};
public
static
final
HashMap
<
String
,
String
>
types
=
new
HashMap
<
String
,
String
>()
{
{
put
(
"0"
,
"家庭户用"
);
put
(
"1"
,
"工商业屋顶"
);
put
(
"2"
,
"地面电站"
);
put
(
"3"
,
"扶贫电站"
);
put
(
"4"
,
"储能电站"
);
}
};
public
static
final
HashMap
<
String
,
List
<
String
>>
errorCodeMap
=
new
HashMap
<
String
,
List
<
String
>>()
{
public
static
final
HashMap
<
String
,
List
<
String
>>
errorCodeMap
=
new
HashMap
<
String
,
List
<
String
>>()
{
{
{
put
(
"E0"
,
Arrays
.
asList
(
"漏电流自检异常"
,
put
(
"E0"
,
Arrays
.
asList
(
"漏电流自检异常"
,
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/controller/HouseholdTestController.java
View file @
a3dbdb0c
...
@@ -85,16 +85,16 @@ public class HouseholdTestController {
...
@@ -85,16 +85,16 @@ public class HouseholdTestController {
@PostMapping
(
value
=
"/goodweDemo"
)
@PostMapping
(
value
=
"/goodweDemo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"固德威示例"
,
notes
=
"固德威示例"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"固德威示例"
,
notes
=
"固德威示例"
)
public
void
goodweDemo
()
throws
IOException
{
public
void
goodweDemo
()
throws
IOException
{
//
goodWeDataAcquisitionService.stationList();
goodWeDataAcquisitionService
.
stationList
();
// goodWeDataAcquisitionService.stationDetail();
// goodWeDataAcquisitionService.stationDetail();
//
goodWeDataAcquisitionService.inverAlramInfo();
//
goodWeDataAcquisitionService.inverAlramInfo();
// goodWeDataAcquisitionService.inverterList();
// goodWeDataAcquisitionService.inverterList();
// goodWeDataAcquisitionService.inverterDetail();
// goodWeDataAcquisitionService.inverterDetail();
// goodWeDataAcquisitionService.stationMonthGen();
// goodWeDataAcquisitionService.stationMonthGen();
// goodWeDataAcquisitionService.stationYearGen();
// goodWeDataAcquisitionService.stationYearGen();
// goodWeDataAcquisitionService.inverterDetail();
// goodWeDataAcquisitionService.inverterDetail();
goodWeDataAcquisitionService
.
inverterMonthGen
();
//
goodWeDataAcquisitionService.inverterMonthGen();
goodWeDataAcquisitionService
.
inverterYearGen
();
//
goodWeDataAcquisitionService.inverterYearGen();
}
}
/**
/**
...
@@ -111,8 +111,8 @@ public class HouseholdTestController {
...
@@ -111,8 +111,8 @@ public class HouseholdTestController {
// goLangDataAcquisitionService.collectorList();
// goLangDataAcquisitionService.collectorList();
// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.collectorDetail();
// goLangDataAcquisitionService.collectorDetail();
goLangDataAcquisitionService
.
inverterDetail
();
//
goLangDataAcquisitionService.inverterDetail();
//
goLangDataAcquisitionService.inverAlramInfo();
//
goLangDataAcquisitionService.inverAlramInfo();
}
}
...
@@ -125,13 +125,13 @@ public class HouseholdTestController {
...
@@ -125,13 +125,13 @@ public class HouseholdTestController {
@PostMapping
(
value
=
"/sofarnew"
)
@PostMapping
(
value
=
"/sofarnew"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"首航"
,
notes
=
"首航"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"首航"
,
notes
=
"首航"
)
public
void
sofarnew
()
throws
IOException
{
public
void
sofarnew
()
throws
IOException
{
sofarDataAcquisitionService
.
stationList
();
//
sofarDataAcquisitionService.stationList();
// goLangDataAcquisitionService.stationDetail();
// goLangDataAcquisitionService.stationDetail();
// goLangDataAcquisitionService.collectorList();
// goLangDataAcquisitionService.collectorList();
// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.collectorDetail();
// goLangDataAcquisitionService.collectorDetail();
// goLangDataAcquisitionService.inverterDetail();
// goLangDataAcquisitionService.inverterDetail();
//
goLangDataAcquisitionService.inverAlramInfo();
goLangDataAcquisitionService
.
inverAlramInfo
();
}
}
/**
/**
...
@@ -149,7 +149,7 @@ public class HouseholdTestController {
...
@@ -149,7 +149,7 @@ public class HouseholdTestController {
//// goLangDataAcquisitionService.inverterList();
//// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.collectorDetail();
// goLangDataAcquisitionService.collectorDetail();
// goLangDataAcquisitionService.inverterDetail();
// goLangDataAcquisitionService.inverterDetail();
//
goLangDataAcquisitionService.inverAlramInfo();
// goLangDataAcquisitionService.inverAlramInfo();
}
}
/**
/**
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/GoodWeDataAcquisitionService.java
View file @
a3dbdb0c
...
@@ -35,5 +35,5 @@ public interface GoodWeDataAcquisitionService {
...
@@ -35,5 +35,5 @@ public interface GoodWeDataAcquisitionService {
/**
/**
* @descrption 采集器告警列表数据入库
* @descrption 采集器告警列表数据入库
*/
*/
void
inverAlramInfo
();
void
inverAlramInfo
(
String
stationid
);
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoodWeDataAcquisitionServiceImpl.java
View file @
a3dbdb0c
...
@@ -109,7 +109,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
...
@@ -109,7 +109,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpStation
.
setCapacity
(
goodWeStationList
.
getCapacity
());
jpStation
.
setCapacity
(
goodWeStationList
.
getCapacity
());
jpStation
.
setName
(
goodWeStationList
.
getStationname
());
jpStation
.
setName
(
goodWeStationList
.
getStationname
());
jpStation
.
setPrice
(
0.42
);
jpStation
.
setPrice
(
0.42
);
jpStation
.
setAddress
(
goodWeStationList
.
get
Address
());
jpStation
.
setAddress
(
goodWeStationList
.
get
Location
());
jpStation
.
setLatitude
(
goodWeStationList
.
getLatitude
());
jpStation
.
setLatitude
(
goodWeStationList
.
getLatitude
());
jpStation
.
setLongitude
(
goodWeStationList
.
getLongitude
());
jpStation
.
setLongitude
(
goodWeStationList
.
getLongitude
());
jpStation
.
setUserName
(
goodWeStationList
.
getOwner_name
()==
null
?
goodWeStationList
.
getStationname
():
goodWeStationList
.
getOwner_name
());
jpStation
.
setUserName
(
goodWeStationList
.
getOwner_name
()==
null
?
goodWeStationList
.
getStationname
():
goodWeStationList
.
getOwner_name
());
...
@@ -122,7 +122,8 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
...
@@ -122,7 +122,8 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpStation
.
setDayIncome
(
goodWeStationList
.
getEday_income
());
jpStation
.
setDayIncome
(
goodWeStationList
.
getEday_income
());
jpStation
.
setAccumulatedPower
(
goodWeStationList
.
getEtotal
());
jpStation
.
setAccumulatedPower
(
goodWeStationList
.
getEtotal
());
jpStation
.
setCumulativeIncome
(
goodWeStationList
.
getEtotal_income
());
jpStation
.
setCumulativeIncome
(
goodWeStationList
.
getEtotal_income
());
jpStation
.
setType
(
goodWeStationList
.
getPowerstation_type
());
jpStation
.
setRecDate
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
jpStation
.
getSequenceNbr
()))
{
if
(
ObjectUtils
.
isEmpty
(
jpStation
.
getSequenceNbr
()))
{
jpStation
.
setCreateTime
(
new
Date
(
goodWeStationList
.
getCreatedTime
()));
jpStation
.
setCreateTime
(
new
Date
(
goodWeStationList
.
getCreatedTime
()));
...
@@ -135,7 +136,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
...
@@ -135,7 +136,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpStationMapper
.
updateById
(
jpStation
);
jpStationMapper
.
updateById
(
jpStation
);
}
}
this
.
inverAlramInfo
(
goodWeStationList
.
getPowerstation_id
());
//增加td 电站区域公司,经销商绑定表
//增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.GDW.getCode()).
// eq("third_code",PVProducerInfoEnum.GDW.getCode()).
...
@@ -742,15 +743,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
...
@@ -742,15 +743,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
}
@Override
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.GoodWe}"
)
public
void
inverAlramInfo
(
String
stationid
)
{
public
void
inverAlramInfo
()
{
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
String
today
=
DateUtil
.
today
();
String
today
=
DateUtil
.
today
();
requestInfo
.
put
(
"page_index"
,
1
);
requestInfo
.
put
(
"page_index"
,
1
);
requestInfo
.
put
(
"page_size"
,
1000
);
requestInfo
.
put
(
"page_size"
,
1000
);
requestInfo
.
put
(
"starttime"
,
today
+
" 00:00:00"
);
requestInfo
.
put
(
"starttime"
,
today
+
" 00:00:00"
);
requestInfo
.
put
(
"endtime"
,
today
+
" 23:59:59"
);
requestInfo
.
put
(
"endtime"
,
today
+
" 23:59:59"
);
requestInfo
.
put
(
"status"
,
2
);
requestInfo
.
put
(
"stationid"
,
stationid
);
// requestInfo.put("status", 2);
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GoodWeAlarmDto
>
alarmList
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
alarmListUrl
,
GoodWeConstant
.
requestPost
,
requstParam
,
GoodWeConstant
.
resovleRule_data_list
,
GoodWeAlarmDto
.
class
);
List
<
GoodWeAlarmDto
>
alarmList
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
alarmListUrl
,
GoodWeConstant
.
requestPost
,
requstParam
,
GoodWeConstant
.
resovleRule_data_list
,
GoodWeAlarmDto
.
class
);
alarmList
.
forEach
(
goodWeAlarmDto
->
{
alarmList
.
forEach
(
goodWeAlarmDto
->
{
...
...
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