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
adf96853
Commit
adf96853
authored
Sep 20, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
d994b4a5
1aebbe6d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
446 additions
and
47 deletions
+446
-47
GoLangConstant.java
...eejoin/amos/api/householdapi/constant/GoLangConstant.java
+4
-0
HouseholdTestController.java
.../api/householdapi/controller/HouseholdTestController.java
+2
-1
GolangCollectorDetail.java
.../orm/houseapi/entity/tdeingine/GolangCollectorDetail.java
+43
-0
GolangCollectorList.java
...ce/orm/houseapi/entity/tdeingine/GolangCollectorList.java
+21
-0
GolangInverterDetail.java
...e/orm/houseapi/entity/tdeingine/GolangInverterDetail.java
+0
-0
GolangInverterList.java
...ace/orm/houseapi/entity/tdeingine/GolangInverterList.java
+43
-0
Test.java
...householdapi/face/orm/houseapi/entity/tdeingine/Test.java
+17
-0
GolangCollectorDetailMapper.java
...face/orm/mapper/tdengine/GolangCollectorDetailMapper.java
+7
-0
GolangCollectorListMapper.java
...i/face/orm/mapper/tdengine/GolangCollectorListMapper.java
+12
-0
GolangInverterDetailMapper.java
.../face/orm/mapper/tdengine/GolangInverterDetailMapper.java
+7
-0
GolangInverterListMapper.java
...pi/face/orm/mapper/tdengine/GolangInverterListMapper.java
+12
-0
GoLangDataAcquisitionService.java
...useholdapi/face/service/GoLangDataAcquisitionService.java
+4
-0
GoLangDataAcquisitionServiceImpl.java
...i/face/service/impl/GoLangDataAcquisitionServiceImpl.java
+94
-4
ClusterDbConfig.java
...rc/main/java/com/yeejoin/amos/config/ClusterDbConfig.java
+3
-3
application-dev.properties
...-housepvapi/src/main/resources/application-dev.properties
+6
-6
JpInvertorElecHistoryAllDto.java
...boot/module/hygf/api/dto/JpInvertorElecHistoryAllDto.java
+0
-1
JpInvertorElecHistoryMonthDto.java
...ot/module/hygf/api/dto/JpInvertorElecHistoryMonthDto.java
+14
-1
TdHygfJpInvertorElecHistoryDto.java
...t/module/hygf/api/dto/TdHygfJpInvertorElecHistoryDto.java
+0
-3
TdHygfJpInvertorElecHistory.java
...t/module/hygf/api/entity/TdHygfJpInvertorElecHistory.java
+0
-6
TdHygfJpCollectorHistoryMapper.java
...gf/api/tdenginemapper/TdHygfJpCollectorHistoryMapper.java
+6
-3
TdHygfJpInvertorElecHistoryMapper.java
...api/tdenginemapper/TdHygfJpInvertorElecHistoryMapper.java
+13
-1
TdHygfJpCollectorHistoryMapper.xml
...ources/mapper/tdengine/TdHygfJpCollectorHistoryMapper.xml
+5
-5
TdHygfJpInvertorElecHistoryMapper.xml
...ces/mapper/tdengine/TdHygfJpInvertorElecHistoryMapper.xml
+39
-0
TdHygfJpCollectorHistoryController.java
...gf/biz/controller/TdHygfJpCollectorHistoryController.java
+6
-4
TdHygfJpInvertorElecHistoryController.java
...biz/controller/TdHygfJpInvertorElecHistoryController.java
+41
-1
TdHygfJpCollectorHistoryServiceImpl.java
...biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
+6
-6
TdHygfJpInvertorElecHistoryServiceImpl.java
.../service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
+41
-2
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/constant/GoLangConstant.java
View file @
adf96853
...
...
@@ -28,6 +28,10 @@ public class GoLangConstant {
public
static
String
prodcerappsecret
=
"9659623b4ebe432fae5d26bdc8a10217"
;
public
static
String
stationListUrl
=
"/v1/api/userStationList"
;
public
static
String
stationDetailUrl
=
"/v1/api/stationDetail"
;
public
static
String
collectorListUrl
=
"/v1/api/collectorList"
;
public
static
String
collectorDetailUrl
=
"/v1/api/collectorDetail"
;
public
static
String
inverterListUrl
=
"/v1/api/inverterList"
;
public
static
String
inverterDetailUrl
=
"/v1/api/inverterDetail"
;
public
static
String
resovleRule_data_page_records
=
"data,page,records"
;
public
static
String
resovleRule_data
=
"data"
;
public
static
String
requestPost
=
"POST"
;
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/controller/HouseholdTestController.java
View file @
adf96853
...
...
@@ -56,6 +56,7 @@ public class HouseholdTestController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"锦浪云"
,
notes
=
"锦浪云"
)
public
void
golangnew
()
throws
IOException
{
// goLangDataAcquisitionService.stationList();
goLangDataAcquisitionService
.
stationDetail
();
// goLangDataAcquisitionService.collectorList();
goLangDataAcquisitionService
.
inverterList
();
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/GolangCollectorDetail.java
0 → 100644
View file @
adf96853
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
houseapi
.
entity
.
tdeingine
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@TableName
(
value
=
"golang_collector_detail"
,
autoResultMap
=
true
)
public
class
GolangCollectorDetail
{
private
Date
createdTime
;
private
Long
id
;
private
String
sn
;
private
Long
stationid
;
private
String
stationname
;
private
Long
userid
;
private
String
power
;
private
String
powerstr
;
private
Double
etoday
;
private
String
etodaystr
;
private
Double
etotal
;
private
String
etotalstr
;
private
Double
fullhour
;
private
Double
pac
;
private
String
pacstr
;
private
Integer
state
;
private
Long
datatimestamp
;
private
String
collectorsn
;
private
String
productmodel
;
private
Integer
dcinputtype
;
private
Integer
acoutputtype
;
private
String
series
;
private
String
name
;
private
String
addr
;
private
Integer
collectorstate
;
private
Integer
stateexceptionflag
;
private
Double
etoday1
;
private
Double
etotal1
;
private
String
etotal1str
;
private
Double
totalfullhour
;
private
Integer
invertermetermodel
;
private
Long
cratedate
;
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/GolangCollectorList.java
0 → 100644
View file @
adf96853
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
houseapi
.
entity
.
tdeingine
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@TableName
(
value
=
"golang_collector_list"
,
autoResultMap
=
true
)
public
class
GolangCollectorList
{
private
Date
createdTime
;
private
Long
id
;
private
String
stationname
;
private
Long
stationid
;
private
Long
userid
;
private
String
sn
;
private
String
model
;
private
String
name
;
private
Integer
state
;
private
Long
datatimestamp
;
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/GolangInverterDetail.java
0 → 100644
View file @
adf96853
This diff is collapsed.
Click to expand it.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/GolangInverterList.java
0 → 100644
View file @
adf96853
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
houseapi
.
entity
.
tdeingine
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@TableName
(
value
=
"golang_inveter_list"
,
autoResultMap
=
true
)
public
class
GolangInverterList
{
private
Date
createdTime
;
private
Long
id
;
private
String
sn
;
private
Long
stationid
;
private
String
stationname
;
private
Long
userid
;
private
String
power
;
private
String
powerstr
;
private
Double
etoday
;
private
String
etodaystr
;
private
Double
etotal
;
private
String
etotalstr
;
private
Double
fullhour
;
private
Double
pac
;
private
String
pacstr
;
private
Integer
state
;
private
Long
datatimestamp
;
private
String
collectorsn
;
private
String
productmodel
;
private
Integer
dcinputtype
;
private
Integer
acoutputtype
;
private
String
series
;
private
String
name
;
private
String
addr
;
private
Integer
collectorstate
;
private
Integer
stateexceptionflag
;
private
Double
etoday1
;
private
Double
etotal1
;
private
String
etotal1str
;
private
Double
totalfullhour
;
private
Integer
invertermetermodel
;
private
Long
cratedate
;
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/Test.java
0 → 100644
View file @
adf96853
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
houseapi
.
entity
.
tdeingine
;
import
fastjson.JSON
;
import
fastjson.JSONObject
;
import
java.util.HashMap
;
import
java.util.Locale
;
import
java.util.Map
;
import
java.util.Objects
;
public
class
Test
{
public
static
void
main
(
String
[]
args
)
{
String
JsonString
=
"{\"id\":\"1299184088035566532\",\"userId\":\"1300386381676732593\",\"sn\":\"2805435232050486\",\"inverterMeterModel\":1,\"collectorsn\":\"404231046E215B4B\",\"collectorId\":\"1301093458381870472\",\"contractTime\":1838563200000,\"state\":1,\"stateExceptionFlag\":0,\"simFlowState\":-1,\"fullHour\":2.27,\"fullHourStr\":\"h\",\"currentState\":\"3\",\"warningInfoData\":0,\"timeZone\":8,\"timeZoneStr\":\"UTC+08:00\",\"daylight\":0,\"daylightSwitch\":0,\"model\":\"543\",\"productModel\":\"543\",\"ctrlCommand\":1,\"nationalStandardstr\":\"GN-380L\",\"inverterTemperature\":63.1,\"inverterTemperatureUnit\":\"℃\",\"temp\":150,\"tempName\":\"IGBT温度\",\"stationName\":\"陈益庆\",\"sno\":\"1A4C24\",\"stationId\":\"1299184320438728736\",\"version\":\"81003A\",\"acOutputType\":1,\"dcInputtype\":3,\"rs485ComAddr\":\"101\",\"dataTimestamp\":\"1684996442378\",\"timeStr\":\"2023-05-25 14:34:02\",\"reactivePower\":10,\"apparentPower\":8.3,\"dcPac\":9.128,\"uInitGnd\":0,\"uInitGndStr\":\"V\",\"dcBus\":706.6,\"dcBusStr\":\"V\",\"dcBusHalf\":351.9,\"dcBusHalfStr\":\"V\",\"power\":25,\"powerStr\":\"kWp\",\"powerPec\":\"1\",\"porwerPercent\":0.332,\"pac\":8.31,\"pacStr\":\"kW\",\"pacPec\":\"1\",\"oneSelf\":0,\"eToday\":56.8,\"eTodayStr\":\"kWh\",\"eMonth\":2.266,\"eMonthStr\":\"MWh\",\"eYear\":3.635,\"eYearStr\":\"MWh\",\"eTotal\":3.635,\"eTotalStr\":\"MWh\",\"uPv1\":674.3,\"uPv1Str\":\"V\",\"iPv1\":6.9,\"iPv1Str\":\"A\",\"uPv2\":668,\"uPv2Str\":\"V\",\"iPv2\":6.6,\"iPv2Str\":\"A\",\"uPv3\":0,\"uPv3Str\":\"V\",\"iPv3\":0,\"iPv3Str\":\"A\",\"uPv4\":0,\"uPv4Str\":\"V\",\"iPv4\":0,\"iPv4Str\":\"A\",\"uPv5\":0,\"uPv5Str\":\"V\",\"iPv5\":0,\"iPv5Str\":\"A\",\"uPv6\":0,\"uPv6Str\":\"V\",\"iPv6\":0,\"iPv6Str\":\"A\",\"uPv7\":0,\"uPv7Str\":\"V\",\"iPv7\":0,\"iPv7Str\":\"A\",\"uPv8\":0,\"uPv8Str\":\"V\",\"iPv8\":0,\"iPv8Str\":\"A\",\"uPv9\":0,\"uPv9Str\":\"V\",\"iPv9\":0,\"iPv9Str\":\"A\",\"uPv10\":0,\"uPv10Str\":\"V\",\"iPv10\":0,\"iPv10Str\":\"A\",\"uPv11\":0,\"uPv11Str\":\"V\",\"iPv11\":0,\"iPv11Str\":\"A\",\"uPv12\":0,\"uPv12Str\":\"V\",\"iPv12\":0,\"iPv12Str\":\"A\",\"uPv13\":0,\"uPv13Str\":\"V\",\"iPv13\":0,\"iPv13Str\":\"A\",\"uPv14\":0,\"uPv14Str\":\"V\",\"iPv14\":0,\"iPv14Str\":\"A\",\"uPv15\":0,\"uPv15Str\":\"V\",\"iPv15\":0,\"iPv15Str\":\"A\",\"uPv16\":0,\"uPv16Str\":\"V\",\"iPv16\":0,\"iPv16Str\":\"A\",\"uPv17\":0,\"uPv17Str\":\"V\",\"iPv17\":0,\"iPv17Str\":\"A\",\"uPv18\":0,\"uPv18Str\":\"V\",\"iPv18\":0,\"iPv18Str\":\"A\",\"uPv19\":0,\"uPv19Str\":\"V\",\"iPv19\":0,\"iPv19Str\":\"A\",\"uPv20\":0,\"uPv20Str\":\"V\",\"iPv20\":0,\"iPv20Str\":\"A\",\"uPv21\":0,\"uPv21Str\":\"V\",\"iPv21\":0,\"iPv21Str\":\"A\",\"uPv22\":0,\"uPv22Str\":\"V\",\"iPv22\":0,\"iPv22Str\":\"A\",\"uPv23\":0,\"uPv23Str\":\"V\",\"iPv23\":0,\"iPv23Str\":\"A\",\"uPv24\":0,\"uPv24Str\":\"V\",\"iPv24\":0,\"iPv24Str\":\"A\",\"uPv25\":0,\"uPv25Str\":\"V\",\"iPv25\":0,\"iPv25Str\":\"A\",\"uPv26\":0,\"uPv26Str\":\"V\",\"iPv26\":0,\"iPv26Str\":\"A\",\"uPv27\":0,\"uPv27Str\":\"V\",\"iPv27\":0,\"iPv27Str\":\"A\",\"uPv28\":0,\"uPv28Str\":\"V\",\"iPv28\":0,\"iPv28Str\":\"A\",\"uPv29\":0,\"uPv29Str\":\"V\",\"iPv29\":0,\"iPv29Str\":\"A\",\"uPv30\":0,\"uPv30Str\":\"V\",\"iPv30\":0,\"iPv30Str\":\"A\",\"uPv31\":0,\"uPv31Str\":\"V\",\"iPv31\":0,\"iPv31Str\":\"A\",\"uPv32\":0,\"uPv32Str\":\"V\",\"iPv32\":0,\"iPv32Str\":\"A\",\"pow1\":4653,\"pow1Str\":\"W\",\"pow2\":4409,\"pow2Str\":\"W\",\"pow3\":0,\"pow3Str\":\"W\",\"pow4\":0,\"pow4Str\":\"W\",\"pow5\":0,\"pow5Str\":\"W\",\"pow6\":0,\"pow6Str\":\"W\",\"pow7\":0,\"pow7Str\":\"W\",\"pow8\":0,\"pow8Str\":\"W\",\"pow9\":0,\"pow9Str\":\"W\",\"pow10\":0,\"pow10Str\":\"W\",\"pow11\":0,\"pow11Str\":\"W\",\"pow12\":0,\"pow12Str\":\"W\",\"pow13\":0,\"pow13Str\":\"W\",\"pow14\":0,\"pow14Str\":\"W\",\"pow15\":0,\"pow15Str\":\"W\",\"pow16\":0,\"pow16Str\":\"W\",\"pow17\":0,\"pow17Str\":\"W\",\"pow18\":0,\"pow18Str\":\"W\",\"pow19\":0,\"pow19Str\":\"W\",\"pow20\":0,\"pow20Str\":\"W\",\"pow21\":0,\"pow21Str\":\"W\",\"pow22\":0,\"pow22Str\":\"W\",\"pow23\":0,\"pow23Str\":\"W\",\"pow24\":0,\"pow24Str\":\"W\",\"pow25\":0,\"pow25Str\":\"W\",\"pow26\":0,\"pow26Str\":\"W\",\"pow27\":0,\"pow27Str\":\"W\",\"pow28\":0,\"pow28Str\":\"W\",\"pow29\":0,\"pow29Str\":\"W\",\"pow30\":0,\"pow30Str\":\"W\",\"pow31\":0,\"pow31Str\":\"W\",\"pow32\":0,\"pow32Str\":\"W\",\"uAc1\":229.9,\"uAc1Str\":\"V\",\"iAc1\":12,\"iAc1Str\":\"A\",\"uAc2\":229.8,\"uAc2Str\":\"V\",\"iAc2\":11.8,\"iAc2Str\":\"A\",\"uAc3\":229,\"uAc3Str\":\"V\",\"iAc3\":11.9,\"iAc3Str\":\"A\",\"powerFactor\":1,\"batteryDischargeEnergy\":0,\"batteryDischargeEnergyStr\":\"kWh\",\"batteryChargeEnergy\":0,\"batteryChargeEnergyStr\":\"kWh\",\"homeLoadEnergy\":0,\"homeLoadEnergyStr\":\"kWh\",\"gridPurchasedEnergy\":0,\"gridPurchasedEnergyStr\":\"kWh\",\"gridSellEnergy\":0,\"gridSellEnergyStr\":\"kWh\",\"fac\":49.96,\"facStr\":\"Hz\",\"batteryPower\":0,\"batteryPowerStr\":\"kW\",\"batteryPowerPec\":\"1\",\"batteryPowerZheng\":0,\"batteryPowerFu\":0,\"storageBatteryVoltage\":0,\"storageBatteryVoltageStr\":\"V\",\"storageBatteryCurrent\":0,\"storageBatteryCurrentStr\":\"A\",\"batteryCapacitySoc\":0,\"batteryHealthSoh\":0,\"batteryVoltage\":0,\"batteryVoltageStr\":\"V\",\"bstteryCurrent\":0,\"bstteryCurrentStr\":\"A\",\"batteryPowerBms\":0,\"batteryPowerBmsStr\":\"kW\",\"internalBatteryI\":0,\"batteryChargingCurrent\":0,\"batteryChargingCurrentStr\":\"A\",\"batteryDischargeLimiting\":0,\"batteryDischargeLimitingStr\":\"A\",\"batteryFailureInformation01\":\"0\",\"batteryFailureInformation02\":\"0\",\"batteryTotalChargeEnergy\":0,\"batteryTotalChargeEnergyStr\":\"kWh\",\"batteryTodayChargeEnergy\":0,\"batteryTodayChargeEnergyStr\":\"kWh\",\"batteryMonthChargeEnergy\":0,\"batteryMonthChargeEnergyStr\":\"kWh\",\"batteryYearChargeEnergy\":0,\"batteryYearChargeEnergyStr\":\"kWh\",\"batteryYesterdayChargeEnergy\":0,\"batteryYesterdayChargeEnergyStr\":\"kWh\",\"batteryTotalDischargeEnergy\":0,\"batteryTotalDischargeEnergyStr\":\"kWh\",\"batteryTodayDischargeEnergy\":0,\"batteryTodayDischargeEnergyStr\":\"kWh\",\"batteryMonthDischargeEnergy\":0,\"batteryMonthDischargeEnergyStr\":\"kWh\",\"batteryYearDischargeEnergy\":0,\"batteryYearDischargeEnergyStr\":\"kWh\",\"batteryYesterdayDischargeEnergy\":0,\"batteryYesterdayDischargeEnergyStr\":\"kWh\",\"gridPurchasedTotalEnergy\":0,\"gridPurchasedTotalEnergyStr\":\"kWh\",\"gridPurchasedYearEnergy\":0,\"gridPurchasedYearEnergyStr\":\"kWh\",\"gridPurchasedMonthEnergy\":0,\"gridPurchasedMonthEnergyStr\":\"kWh\",\"gridPurchasedTodayEnergy\":0,\"gridPurchasedTodayEnergyStr\":\"kWh\",\"gridPurchasedYesterdayEnergy\":0,\"gridPurchasedYesterdayEnergyStr\":\"kWh\",\"gridSellTotalEnergy\":0,\"gridSellTotalEnergyStr\":\"kWh\",\"gridSellYearEnergy\":0,\"gridSellYearEnergyStr\":\"kWh\",\"gridSellMonthEnergy\":0,\"gridSellMonthEnergyStr\":\"kWh\",\"gridSellTodayEnergy\":0,\"gridSellTodayEnergyStr\":\"kWh\",\"gridSellYesterdayEnergy\":0,\"gridSellYesterdayEnergyStr\":\"kWh\",\"homeLoadTotalEnergy\":0,\"homeLoadTotalEnergyStr\":\"kWh\",\"homeLoadTodayEnergy\":0,\"homeLoadTodayEnergyStr\":\"kWh\",\"totalLoadPower\":0,\"totalLoadPowerStr\":\"kW\",\"homeLoadYesterdayEnergy\":0,\"homeLoadYesterdayEnergyStr\":\"kWh\",\"familyLoadPower\":0,\"familyLoadPowerStr\":\"kW\",\"familyLoadPercent\":0,\"homeGridYesterdayEnergy\":0,\"homeGridYesterdayEnergyStr\":\"kWh\",\"homeGridTodayEnergy\":0,\"homeGridTodayEnergyStr\":\"kWh\",\"homeGridMonthEnergy\":0,\"homeGridMonthEnergyStr\":\"kWh\",\"homeGridYearEnergy\":0,\"homeGridYearEnergyStr\":\"kWh\",\"homeGridTotalEnergy\":0,\"homeGridTotalEnergyStr\":\"kWh\",\"bypassLoadPower\":0,\"bypassLoadPowerStr\":\"kW\",\"backupYesterdayEnergy\":0,\"backupYesterdayEnergyStr\":\"kWh\",\"backupTodayEnergy\":0,\"backupTodayEnergyStr\":\"kWh\",\"backupMonthEnergy\":0,\"backupMonthEnergyStr\":\"kWh\",\"backupYearEnergy\":0,\"backupYearEnergyStr\":\"kWh\",\"backupTotalEnergy\":0,\"backupTotalEnergyStr\":\"kWh\",\"bypassAcVoltage\":0,\"bypassAcVoltageB\":0,\"bypassAcVoltageC\":0,\"bypassAcCurrent\":0,\"bypassAcCurrentB\":0,\"bypassAcCurrentC\":0,\"pLimitSet\":110,\"pFactorLimitSet\":10,\"pReactiveLimitSet\":0,\"batteryType\":\"0.0\",\"socDischargeSet\":0,\"socChargingSet\":0,\"pEpmSet\":0,\"pEpmSetStr\":\"kW\",\"epmFailSafe\":0,\"epmSafe\":0,\"pEpm\":0,\"pEpmStr\":\"kW\",\"psumCalPec\":\"1\",\"insulationResistance\":0,\"dispersionRate\":0,\"sirRealtime\":1176,\"iLeakLimt\":0,\"upvTotal\":0,\"upvTotalStr\":\"V\",\"ipvTotal\":0,\"ipvTotalStr\":\"A\",\"powTotal\":0,\"powTotalStr\":\"W\",\"parallelStatus\":0,\"parallelAddr\":0,\"parallelPhase\":0,\"parallelBattery\":0,\"batteryAlarm\":\"0\",\"bypassAcOnoffSet\":0,\"bypassAcVoltageSet\":0,\"bypassAcCurrentSet\":0,\"batteryCDEnableSet\":0,\"batteryCDSet\":0,\"batteryCDISet\":0,\"batteryCMaxiSet\":0,\"batteryDMaxiSet\":0,\"batteryUvpSet\":0,\"batteryFcvSet\":0,\"batteryAcvSet\":0,\"batteryOvpSet\":0,\"batteryOlvEnableSet\":0,\"batteryLaTemp\":0,\"offGridDDepth\":0,\"epsDDepth\":0,\"epsSwitchTime\":\"0\",\"acInType\":0,\"energyStorageControl\":\"0\",\"meter1Type\":0,\"meter2Type\":0,\"meter1SiteHigh\":0,\"meter2SiteHigh\":0,\"meter1TypeLow\":0,\"meter2TypeLow\":0,\"psum\":0,\"dcPacStr\":\"kVA\",\"reactivePowerStr\":\"Var\",\"apparentPowerStr\":\"kVA\",\"psumCal\":8.31,\"familyLoadPowerPec\":\"1\",\"psumStr\":\"kW\",\"psumCalStr\":\"kW\"}"
;
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
JsonString
,
Map
.
class
);
map
.
keySet
().
forEach
(
s
->
System
.
out
.
println
(
s
.
toLowerCase
(
Locale
.
ROOT
)+
" varchar(100),"
));
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/mapper/tdengine/GolangCollectorDetailMapper.java
0 → 100644
View file @
adf96853
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
mapper
.
tdengine
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.GolangCollectorDetail
;
public
interface
GolangCollectorDetailMapper
extends
BaseMapper
<
GolangCollectorDetail
>
{
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/mapper/tdengine/GolangCollectorListMapper.java
0 → 100644
View file @
adf96853
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
mapper
.
tdengine
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.GolangCollectorList
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
public
interface
GolangCollectorListMapper
extends
BaseMapper
<
GolangCollectorList
>
{
@Select
(
"select id from golang_collector_list group by id"
)
List
<
Long
>
getCollectIds
();
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/mapper/tdengine/GolangInverterDetailMapper.java
0 → 100644
View file @
adf96853
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
mapper
.
tdengine
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.GolangInverterDetail
;
public
interface
GolangInverterDetailMapper
extends
BaseMapper
<
GolangInverterDetail
>
{
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/mapper/tdengine/GolangInverterListMapper.java
0 → 100644
View file @
adf96853
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
mapper
.
tdengine
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.GolangInverterList
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
public
interface
GolangInverterListMapper
extends
BaseMapper
<
GolangInverterList
>
{
@Select
(
"select id from golang_inveter_list group by id"
)
List
<
Long
>
getInverterIds
();
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/GoLangDataAcquisitionService.java
View file @
adf96853
...
...
@@ -3,4 +3,8 @@ package com.yeejoin.amos.api.householdapi.face.service;
public
interface
GoLangDataAcquisitionService
{
void
stationList
();
void
stationDetail
();
void
collectorList
();
void
collectorDetail
();
void
inverterList
();
void
inverterDetail
();
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoLangDataAcquisitionServiceImpl.java
View file @
adf96853
...
...
@@ -4,10 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.yeejoin.amos.api.householdapi.Utils.GolangRequestUtil
;
import
com.yeejoin.amos.api.householdapi.constant.GoLangConstant
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpStation
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.GolangStationDetail
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.GolangStationList
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.GolangStationDetailMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.GolangStationMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.*
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.*
;
import
com.yeejoin.amos.api.householdapi.face.service.GoLangDataAcquisitionService
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper
;
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
...
...
@@ -32,6 +30,24 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
private
JpStationMapper
jpStationMapper
;
@Autowired
private
GolangStationDetailMapper
golangStationDetailMapper
;
@Autowired
private
GolangCollectorListMapper
golangCollectorListMapper
;
@Autowired
private
GolangInverterListMapper
golangInverterListMapper
;
//户用光伏 场站历史
@Autowired
private
HYGFJPStationPowerHistoryMapper
hygfjpStationPowerHistoryMapper
;
//
@Autowired
private
HYGFJPInverterHistoryMapper
hygfjpInverterHistoryMapper
;
@Autowired
private
HYGFJPCollectorHistoryMapper
hygfjpCollectorHistoryMapper
;
@Autowired
private
HYGFJPInverterWarnMapper
hygfjpInverterWarnMapper
;
@Autowired
private
HYGFJPInverterElecHistoryMapper
hygfjpInverterElecHistoryMapper
;
@Override
public
void
stationList
()
{
...
...
@@ -103,13 +119,87 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpStation
.
setYearIncome
(
golangStationDetail
.
getYearincome
());
jpStation
.
setCumulativeIncome
(
golangStationDetail
.
getAllincome
());
jpStation
.
setArea
(
golangStationDetail
.
getRegionstr
());
if
(!
ObjectUtils
.
isEmpty
(
jpStation
.
getSequenceNbr
()))
{
jpStationMapper
.
updateById
(
jpStation
);
}
else
{
jpStationMapper
.
insert
(
jpStation
);
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
new
Date
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
hygfjpStationPowerHistory
.
setPower
(
jpStation
.
getRealTimePower
());
hygfjpStationPowerHistory
.
setThirdCode
(
jpStation
.
getThirdCode
());
hygfjpStationPowerHistory
.
setTime
(
System
.
currentTimeMillis
());
golangStationDetailMapper
.
insert
(
golangStationDetail
);
}
}
}
@Override
public
void
collectorList
()
{
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
for
(
int
i
=
0
;
i
<
stationIds
.
size
();
i
++)
{
try
{
TimeUnit
.
SECONDS
.
sleep
(
1
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"stationId"
,
Long
.
valueOf
(
stationIds
.
get
(
i
)));
requestInfo
.
put
(
"pageNo"
,
1
);
requestInfo
.
put
(
"pageSize"
,
100
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GolangCollectorList
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
collectorListUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_page_records
,
GolangCollectorList
.
class
);
for
(
int
j
=
0
;
j
<
result
.
size
();
j
++)
{
GolangCollectorList
golangCollectorList
=
result
.
get
(
j
);
golangCollectorList
.
setCreatedTime
(
new
Date
());
golangCollectorListMapper
.
insert
(
golangCollectorList
);
}
}
}
@Override
public
void
collectorDetail
()
{
List
<
Long
>
collectorIds
=
golangCollectorListMapper
.
getCollectIds
();
}
@Override
public
void
inverterList
()
{
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
for
(
int
i
=
0
;
i
<
stationIds
.
size
();
i
++)
{
try
{
TimeUnit
.
SECONDS
.
sleep
(
1
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"stationId"
,
Long
.
valueOf
(
stationIds
.
get
(
i
)));
requestInfo
.
put
(
"pageNo"
,
1
);
requestInfo
.
put
(
"pageSize"
,
100
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GolangInverterList
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
inverterListUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_page_records
,
GolangInverterList
.
class
);
for
(
int
j
=
0
;
j
<
result
.
size
();
j
++)
{
GolangInverterList
golangInverterList
=
result
.
get
(
j
);
golangInverterList
.
setCreatedTime
(
new
Date
());
golangInverterListMapper
.
insert
(
golangInverterList
);
}
}
}
@Override
public
void
inverterDetail
()
{
List
<
Long
>
inverterIds
=
golangInverterListMapper
.
getInverterIds
();
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/config/ClusterDbConfig.java
View file @
adf96853
...
...
@@ -21,11 +21,11 @@ import javax.sql.DataSource;
* 若需要配置更多数据源 , 直接在yml中添加数据源配置再增加相应的新的数据源配置类即可
*/
@Configuration
@MapperScan
(
basePackages
=
"com.yeejoin.amos.
boot.module.hygf.api.mapper
"
,
sqlSessionFactoryRef
=
"clusterSqlSessionFactory"
)
@MapperScan
(
basePackages
=
"com.yeejoin.amos.
api.householdapi.face.orm.mapper.hygf
"
,
sqlSessionFactoryRef
=
"clusterSqlSessionFactory"
)
public
class
ClusterDbConfig
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
ClusterDbConfig
.
class
);
// 精确到 cluster 目录,以便跟其他数据源隔离
private
static
final
String
MAPPER_LOCATION
=
"classpath*:mapper/
mysql
/*.xml"
;
private
static
final
String
MAPPER_LOCATION
=
"classpath*:mapper/
hygf
/*.xml"
;
@Value
(
"${spring.db2.datasource.url}"
)
...
...
@@ -64,7 +64,7 @@ public class ClusterDbConfig {
sessionFactory
.
setDataSource
(
culsterDataSource
);
sessionFactory
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
()
.
getResources
(
ClusterDbConfig
.
MAPPER_LOCATION
));
sessionFactory
.
setTypeAliasesPackage
(
"com.yeejoin.amos.
boot.module.hygf.api.entity
"
);
sessionFactory
.
setTypeAliasesPackage
(
"com.yeejoin.amos.
api.householdapi.face.orm.houseapi.entity.hygf
"
);
//mybatis 数据库字段与实体类属性驼峰映射配置
sessionFactory
.
getObject
().
getConfiguration
().
setMapUnderscoreToCamelCase
(
true
);
return
sessionFactory
.
getObject
();
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/resources/application-dev.properties
View file @
adf96853
...
...
@@ -5,22 +5,22 @@ server.port=11006
## DB properties hygf
## db1-production database
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url
=
jdbc:mysql://172.16.10.220:3306/amos_?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.url
=
jdbc:mysql://172.16.10.220:3306/amos_
openapi
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.username
=
root
spring.db1.datasource.password
=
Yeejoin@2020
spring.db1.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
spring.db1.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
## db2-sync_data
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url
=
jdbc:mysql://172.16.10.220:3306/amos_
openapi
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.url
=
jdbc:mysql://172.16.10.220:3306/amos_
project
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.username
=
root
spring.db2.datasource.password
=
Yeejoin@2020
spring.db2.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
spring.db2.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
## db3-taosiData
spring.db3.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url
=
jdbc:TAOS://139.9.170.47:6041/house_pv_data?user=root&password=taosdata&timezone=GMT%2B8&characterEncoding=utf8
spring.db3.datasource.url
=
jdbc:TAOS
-RS
://139.9.170.47:6041/house_pv_data?user=root&password=taosdata&timezone=GMT%2B8&characterEncoding=utf8
spring.db3.datasource.username
=
root
spring.db3.datasource.password
=
taosdata
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.TSDB
Driver
spring.db3.datasource.driver-class-name
=
com.taosdata.jdbc.rs.Restful
Driver
# REDIS (RedisProperties)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInvertorElecHistoryAllDto.java
View file @
adf96853
...
...
@@ -36,7 +36,6 @@ public class JpInvertorElecHistoryAllDto extends BaseDto {
private
Double
wAcVoltage
;
@ApiModelProperty
(
value
=
"U交流电流"
)
@TableField
(
"U_AC_current"
)
private
Double
uAcCurrent
;
@ApiModelProperty
(
value
=
"V交流电流"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInvertorElecHistoryMonthDto.java
View file @
adf96853
...
...
@@ -26,7 +26,6 @@ public class JpInvertorElecHistoryMonthDto extends BaseDto {
private
String
snCode
;
@ApiModelProperty
(
value
=
"U交流电压"
)
private
Double
uAcVoltage
;
@ApiModelProperty
(
value
=
"V交流电压"
)
...
...
@@ -46,7 +45,21 @@ public class JpInvertorElecHistoryMonthDto extends BaseDto {
private
Double
vAcCurrent
;
@ApiModelProperty
(
value
=
"W交流电流"
)
private
Double
uAcVoltage
;
@ApiModelProperty
(
value
=
"V交流电压"
)
private
Double
vAcVoltage
;
@ApiModelProperty
(
value
=
"W交流电压"
)
private
Double
wAcVoltage
;
@ApiModelProperty
(
value
=
"U交流电流"
)
private
Double
uAcCurrent
;
@ApiModelProperty
(
value
=
"V交流电流"
)
private
Double
vAcCurrent
;
@ApiModelProperty
(
value
=
"W交流电流"
)
private
Double
wAcCurrent
;
@ApiModelProperty
(
value
=
"第三方电站id"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/TdHygfJpInvertorElecHistoryDto.java
View file @
adf96853
...
...
@@ -42,9 +42,6 @@ public class TdHygfJpInvertorElecHistoryDto {
@ApiModelProperty
(
value
=
"W交流电流"
)
private
Double
wAcCurrent
;
@ApiModelProperty
(
value
=
"品牌"
)
private
String
brand
;
@ApiModelProperty
(
value
=
"时间"
)
private
Long
time
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/TdHygfJpInvertorElecHistory.java
View file @
adf96853
...
...
@@ -64,12 +64,6 @@ public class TdHygfJpInvertorElecHistory {
private
Double
wAcCurrent
;
/**
* 品牌
*/
@TableField
(
"brand"
)
private
String
brand
;
/**
* 时间
*/
@TableField
(
"time"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHygfJpCollectorHistoryMapper.java
View file @
adf96853
...
...
@@ -5,6 +5,9 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpCollectorHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory
;
...
...
@@ -20,12 +23,12 @@ public interface TdHygfJpCollectorHistoryMapper extends BaseMapper<TdHygfJpColle
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"startTime"
)
long
startTime
,
@Param
(
"endTime"
)
long
endTime
);
List
<
TdHygfJpCollectorHistory
Dto
>
monthList
(
@Param
(
"snCode"
)
String
snCode
,
List
<
JpCollectorHistoryMonth
Dto
>
monthList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"month"
)
String
month
);
List
<
TdHygfJpCollectorHistory
Dto
>
yearList
(
@Param
(
"snCode"
)
String
snCode
,
List
<
JpCollectorHistoryYear
Dto
>
yearList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"year"
)
String
year
);
List
<
TdHygfJpCollectorHistory
Dto
>
allList
(
@Param
(
"snCode"
)
String
snCode
,
List
<
JpCollectorHistoryAll
Dto
>
allList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHygfJpInvertorElecHistoryMapper.java
View file @
adf96853
...
...
@@ -5,6 +5,9 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInvertorElecHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory
;
...
...
@@ -15,8 +18,17 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory;
* @date 2023-09-19
*/
public
interface
TdHygfJpInvertorElecHistoryMapper
extends
BaseMapper
<
TdHygfJpInvertorElecHistory
>
{
List
<
TdHygfJpInvertorElecHistoryDto
>
dayList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"startTime"
)
long
startTime
,
@Param
(
"endTime"
)
long
endTime
);
List
<
JpInvertorElecHistoryMonthDto
>
monthList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"month"
)
String
month
);
List
<
JpInvertorElecHistoryYearDto
>
yearList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"year"
)
String
year
);
List
<
JpInvertorElecHistoryAllDto
>
allList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpCollectorHistoryMapper.xml
View file @
adf96853
...
...
@@ -15,7 +15,7 @@
</if>
</where>
</select>
<select
id=
"monthList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.
TdHygf
JpCollectorHistoryMonthDto"
>
<select
id=
"monthList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryMonthDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_collector_history_month
<where>
<if
test=
"snCode!=null"
>
...
...
@@ -29,8 +29,8 @@
</if>
</where>
</select>
<select
id=
"yearList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.
TdHygf
JpCollectorHistoryYearDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_collector_history_
month
<select
id=
"yearList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryYearDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_collector_history_
year
<where>
<if
test=
"snCode!=null"
>
AND `sn_code` = #{snCode}
...
...
@@ -43,8 +43,8 @@
</if>
</where>
</select>
<select
id=
"
yearList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.TdHygf
JpCollectorHistoryAllDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_collector_history_
month
<select
id=
"
allList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.
JpCollectorHistoryAllDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_collector_history_
all
<where>
<if
test=
"snCode!=null"
>
AND `sn_code` = #{snCode}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpInvertorElecHistoryMapper.xml
View file @
adf96853
...
...
@@ -15,4 +15,43 @@
</if>
</where>
</select>
<select
id=
"monthList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryMonthDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_invertor_elec_history_month
<where>
<if
test=
"snCode!=null"
>
AND `sn_code` = #{snCode}
</if>
<if
test=
"thirdStationId!=null"
>
AND `third_station_id` = #{thirdStationId}
</if>
<if
test=
"month!=null"
>
AND year_month = #{month}
</if>
</where>
</select>
<select
id=
"yearList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryYearDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_invertor_elec_history_year
<where>
<if
test=
"snCode!=null"
>
AND `sn_code` = #{snCode}
</if>
<if
test=
"thirdStationId!=null"
>
AND `third_station_id` = #{thirdStationId}
</if>
<if
test=
"year!=null"
>
AND year = #{year}
</if>
</where>
</select>
<select
id=
"allList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryAllDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_invertor_elec_history_all
<where>
<if
test=
"snCode!=null"
>
AND `sn_code` = #{snCode}
</if>
<if
test=
"thirdStationId!=null"
>
AND `third_station_id` = #{thirdStationId}
</if>
</where>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpCollectorHistoryController.java
View file @
adf96853
...
...
@@ -23,8 +23,10 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpCollectorHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpCollectorHistoryServiceImpl
;
import
io.swagger.annotations.Api
;
...
...
@@ -140,7 +142,7 @@ public class TdHygfJpCollectorHistoryController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/month"
)
public
ResponseModel
<
List
<
TdHygfJpCollectorHistory
Dto
>>
monthList
(
@RequestParam
(
value
=
"id"
)
long
id
,
public
ResponseModel
<
List
<
JpCollectorHistoryMonth
Dto
>>
monthList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"month"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
Date
month
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
monthList
(
id
,
month
));
}
...
...
@@ -153,7 +155,7 @@ public class TdHygfJpCollectorHistoryController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/year"
)
public
ResponseModel
<
List
<
TdHygfJpCollectorHistory
Dto
>>
yearList
(
@RequestParam
(
value
=
"id"
)
long
id
,
public
ResponseModel
<
List
<
JpCollectorHistoryYear
Dto
>>
yearList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"year"
)
@DateTimeFormat
(
pattern
=
"yyyy"
)
Date
year
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
yearList
(
id
,
year
));
}
...
...
@@ -166,7 +168,7 @@ public class TdHygfJpCollectorHistoryController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/all"
)
public
ResponseModel
<
List
<
TdHygfJpCollectorHistory
Dto
>>
allList
(
@RequestParam
(
value
=
"id"
)
long
id
)
{
public
ResponseModel
<
List
<
JpCollectorHistoryAll
Dto
>>
allList
(
@RequestParam
(
value
=
"id"
)
long
id
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
allList
(
id
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInvertorElecHistoryController.java
View file @
adf96853
...
...
@@ -23,8 +23,10 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInvertorElecHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInvertorElecHistoryServiceImpl
;
import
io.swagger.annotations.Api
;
...
...
@@ -131,4 +133,42 @@ public class TdHygfJpInvertorElecHistoryController extends BaseController {
@RequestParam
(
value
=
"day"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
day
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
dayList
(
id
,
day
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/month"
)
public
ResponseModel
<
List
<
JpInvertorElecHistoryMonthDto
>>
monthList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"month"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
Date
month
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
monthList
(
id
,
month
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/year"
)
public
ResponseModel
<
List
<
JpInvertorElecHistoryYearDto
>>
yearList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"year"
)
@DateTimeFormat
(
pattern
=
"yyyy"
)
Date
year
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
yearList
(
id
,
year
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/all"
)
public
ResponseModel
<
List
<
JpInvertorElecHistoryAllDto
>>
allList
(
@RequestParam
(
value
=
"id"
)
long
id
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
allList
(
id
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
View file @
adf96853
...
...
@@ -9,13 +9,13 @@ import org.springframework.stereotype.Service;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpCollectorHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpCollectorHistoryService
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.JpCollectorHistoryAllMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.JpCollectorHistoryMonthMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.JpCollectorHistoryYearMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpCollectorHistoryMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.util.TimeUtil
;
...
...
@@ -57,7 +57,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
/**
* 列表查询 示例
*/
public
List
<
TdHygfJpCollectorHistory
Dto
>
monthList
(
long
id
,
Date
month
)
{
public
List
<
JpCollectorHistoryMonth
Dto
>
monthList
(
long
id
,
Date
month
)
{
JpCollector
collector
=
jpCollectorServiceImpl
.
getById
(
id
);
if
(
collector
!=
null
)
{
...
...
@@ -70,7 +70,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
/**
* 列表查询 示例
*/
public
List
<
TdHygfJpCollectorHistory
Dto
>
yearList
(
long
id
,
Date
year
)
{
public
List
<
JpCollectorHistoryYear
Dto
>
yearList
(
long
id
,
Date
year
)
{
JpCollector
collector
=
jpCollectorServiceImpl
.
getById
(
id
);
if
(
collector
!=
null
)
{
...
...
@@ -83,7 +83,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
/**
* 列表查询 示例
*/
public
List
<
TdHygfJpCollectorHistory
Dto
>
allList
(
long
id
)
{
public
List
<
JpCollectorHistoryAll
Dto
>
allList
(
long
id
)
{
JpCollector
collector
=
jpCollectorServiceImpl
.
getById
(
id
);
if
(
collector
!=
null
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
View file @
adf96853
...
...
@@ -9,10 +9,12 @@ import org.springframework.stereotype.Service;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInvertorElecHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpInvertorElecHistoryService
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInvertorElecHistoryMapper
;
...
...
@@ -51,4 +53,40 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
}
return
new
ArrayList
<>();
}
/**
* 列表查询 示例
*/
public
List
<
JpInvertorElecHistoryMonthDto
>
monthList
(
long
id
,
Date
month
)
{
JpInverter
invertor
=
jpInvertorServiceImpl
.
getById
(
id
);
if
(
invertor
!=
null
)
{
return
this
.
baseMapper
.
monthList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
(),
month
.
toString
());
}
return
new
ArrayList
<>();
}
/**
* 列表查询 示例
*/
public
List
<
JpInvertorElecHistoryYearDto
>
yearList
(
long
id
,
Date
year
)
{
JpInverter
invertor
=
jpInvertorServiceImpl
.
getById
(
id
);
if
(
invertor
!=
null
)
{
return
this
.
baseMapper
.
yearList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
(),
year
.
toString
());
}
return
new
ArrayList
<>();
}
/**
* 列表查询 示例
*/
public
List
<
JpInvertorElecHistoryAllDto
>
allList
(
long
id
)
{
JpInverter
invertor
=
jpInvertorServiceImpl
.
getById
(
id
);
if
(
invertor
!=
null
)
{
return
this
.
baseMapper
.
allList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
());
}
return
new
ArrayList
<>();
}
}
\ No newline at end of file
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