297 lines
10 KiB
Go
297 lines
10 KiB
Go
|
package equipment
|
||
|
|
||
|
import (
|
||
|
"github.com/gogf/gf/v2/frame/g"
|
||
|
"github.com/tiger1103/gfast/v3/api/v1/common"
|
||
|
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
|
||
|
)
|
||
|
|
||
|
// 逆变器列表响应
|
||
|
type EquipmentListRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Obj struct{} `json:"obj"`
|
||
|
Result struct {
|
||
|
Page struct {
|
||
|
PageIndex int `json:"pageIndex"`
|
||
|
PageSize int `json:"pageSize"`
|
||
|
Total int `json:"total"`
|
||
|
} `json:"page"`
|
||
|
Records []struct {
|
||
|
DivertorId string `json:"divertorId"`
|
||
|
DivertorName string `json:"divertorName"`
|
||
|
EquipmentName string `json:"equipmentName"`
|
||
|
EquipmentPn string `json:"equipmentPn"`
|
||
|
EquipmentSn string `json:"equipmentSn"`
|
||
|
Id string `json:"id"`
|
||
|
Kwp float64 `json:"kwp"`
|
||
|
MonKwh float64 `json:"monKwh"`
|
||
|
NowKw float64 `json:"nowKw"`
|
||
|
ParamDcacCode string `json:"paramDcacCode"`
|
||
|
ParamDcdcCode string `json:"paramDcdcCode"`
|
||
|
PowerPlantId string `json:"powerPlantId"`
|
||
|
PowerPlantName string `json:"powerPlantName"`
|
||
|
RatedPower float64 `json:"ratedPower"`
|
||
|
SoftDcacCode string `json:"softDcacCode"`
|
||
|
SoftDcdcCode string `json:"softDcdcCode"`
|
||
|
Status int `json:"status"`
|
||
|
SumKwh float64 `json:"sumKwh"`
|
||
|
TodayKwh float64 `json:"todayKwh"`
|
||
|
UpdateTime string `json:"updateTime"`
|
||
|
UserId string `json:"userId"`
|
||
|
UserName string `json:"userName"`
|
||
|
YearKwh float64 `json:"yearKwh"`
|
||
|
} `json:"records"`
|
||
|
Statistics struct {
|
||
|
AlarmNumber int `json:"alarmNumber"`
|
||
|
OfflineNumber int `json:"offlineNumber"`
|
||
|
OnlineNumber int `json:"onlineNumber"`
|
||
|
SumNumber int `json:"sumNumber"`
|
||
|
} `json:"statistics"`
|
||
|
} `json:"result"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp int `json:"timestamp"`
|
||
|
}
|
||
|
|
||
|
// 逆变器详情响应
|
||
|
type EquipmentDetailRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Obj struct{} `json:"obj"`
|
||
|
PlantAddress string `json:"plantAddress"`
|
||
|
Result struct {
|
||
|
DivertorId string `json:"divertorId"`
|
||
|
DivertorName string `json:"divertorName"`
|
||
|
EquipmentName string `json:"equipmentName"`
|
||
|
EquipmentPn string `json:"equipmentPn"`
|
||
|
EquipmentSn string `json:"equipmentSn"`
|
||
|
Id string `json:"id"`
|
||
|
Kwp float64 `json:"kwp"`
|
||
|
MonKwh float64 `json:"monKwh"`
|
||
|
NowKw float64 `json:"nowKw"`
|
||
|
ParamDcacCode string `json:"paramDcacCode"`
|
||
|
ParamDcdcCode string `json:"paramDcdcCode"`
|
||
|
PowerPlantId string `json:"powerPlantId"`
|
||
|
PowerPlantName string `json:"powerPlantName"`
|
||
|
RatedPower float64 `json:"ratedPower"`
|
||
|
SoftDcacCode string `json:"softDcacCode"`
|
||
|
SoftDcdcCode string `json:"softDcdcCode"`
|
||
|
Status int `json:"status"`
|
||
|
SumKwh float64 `json:"sumKwh"`
|
||
|
TodayKwh float64 `json:"todayKwh"`
|
||
|
UpdateTime string `json:"updateTime"`
|
||
|
UserId string `json:"userId"`
|
||
|
UserName string `json:"userName"`
|
||
|
YearKwh float64 `json:"yearKwh"`
|
||
|
} `json:"result"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp int `json:"timestamp"`
|
||
|
}
|
||
|
|
||
|
// 逆变器实时数据
|
||
|
type EquipmentRealDataRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Obj struct{} `json:"obj"`
|
||
|
Result struct {
|
||
|
EquipmentModel string `json:"equipmentModel"`
|
||
|
FullHours float64 `json:"fullHours"`
|
||
|
InternalTemperature float64 `json:"internalTemperature"`
|
||
|
MonKwh float64 `json:"monKwh"`
|
||
|
NowKw float64 `json:"nowKw"`
|
||
|
ParamData struct {
|
||
|
ParamList []struct {
|
||
|
Key string `json:"key"`
|
||
|
Name string `json:"name"`
|
||
|
Unit string `json:"unit"`
|
||
|
Value interface{} `json:"value"`
|
||
|
} `json:"paramList"`
|
||
|
Time string `json:"time"`
|
||
|
} `json:"paramData"`
|
||
|
PowerFactor float64 `json:"powerFactor"`
|
||
|
PowerPercentage float64 `json:"powerPercentage"`
|
||
|
PowerUnit string `json:"powerUnit"`
|
||
|
RatedPower float64 `json:"ratedPower"`
|
||
|
RatedVoltage float64 `json:"ratedVoltage"`
|
||
|
SumKwh float64 `json:"sumKwh"`
|
||
|
TodayKwh float64 `json:"todayKwh"`
|
||
|
YearKwh float64 `json:"yearKwh"`
|
||
|
} `json:"result"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp int `json:"timestamp"`
|
||
|
}
|
||
|
|
||
|
// 逆变器历史数据
|
||
|
type EquipmentHistoryRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Obj struct{} `json:"obj"`
|
||
|
Result []struct {
|
||
|
ParamList []struct {
|
||
|
Key string `json:"key"`
|
||
|
Name string `json:"name"`
|
||
|
Unit string `json:"unit"`
|
||
|
Value interface{} `json:"value"`
|
||
|
} `json:"paramList"`
|
||
|
Time string `json:"time"`
|
||
|
} `json:"result"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp int `json:"timestamp"`
|
||
|
}
|
||
|
|
||
|
// 逆变器日统计数据
|
||
|
type EquipmentStaticDayRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Obj struct{} `json:"obj"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp int64 `json:"timestamp"`
|
||
|
Result []struct {
|
||
|
Time string `json:"time"`
|
||
|
Kwh float64 `json:"kwh"`
|
||
|
KwhUnit string `json:"kwhUnit"`
|
||
|
Earnings float64 `json:"earnings"`
|
||
|
EarningsUnit string `json:"earningsUnit"`
|
||
|
} `json:"result"`
|
||
|
}
|
||
|
|
||
|
// 逆变器月统计数据
|
||
|
type EquipmentStaticMonthRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Obj struct{} `json:"obj"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp int64 `json:"timestamp"`
|
||
|
Result []struct {
|
||
|
Time string `json:"time"`
|
||
|
Kwh float64 `json:"kwh"`
|
||
|
KwhUnit string `json:"kwhUnit"`
|
||
|
Earnings float64 `json:"earnings"`
|
||
|
EarningsUnit string `json:"earningsUnit"`
|
||
|
} `json:"result"`
|
||
|
}
|
||
|
|
||
|
// 逆变器年统计数据
|
||
|
type EquipmentStaticYearRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Obj struct{} `json:"obj"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp int64 `json:"timestamp"`
|
||
|
Result []struct {
|
||
|
Time string `json:"time"`
|
||
|
Kwh float64 `json:"kwh"`
|
||
|
KwhUnit string `json:"kwhUnit"`
|
||
|
Earnings float64 `json:"earnings"`
|
||
|
EarningsUnit string `json:"earningsUnit"`
|
||
|
} `json:"result"`
|
||
|
}
|
||
|
|
||
|
// 逆变器报警列表数据
|
||
|
type EquipmentAlarmListRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Obj struct{} `json:"obj"`
|
||
|
Result []struct {
|
||
|
AlarmCode string `json:"alarmCode"`
|
||
|
AlarmContent string `json:"alarmContent"`
|
||
|
AlarmGrade string `json:"alarmGrade"`
|
||
|
AlarmType string `json:"alarmType"`
|
||
|
CausesAnalysis string `json:"causesAnalysis"`
|
||
|
DiagnosticAdvice string `json:"diagnosticAdvice"`
|
||
|
EquipmentPn string `json:"equipmentPn"`
|
||
|
EquipmentSn string `json:"equipmentSn"`
|
||
|
Id string `json:"id"`
|
||
|
PlantContactPhone string `json:"plantContactPhone"`
|
||
|
PowerPlantId string `json:"powerPlantId"`
|
||
|
PowerPlantName string `json:"powerPlantName"`
|
||
|
ReportedTime string `json:"reportedTime"`
|
||
|
UserId string `json:"userId"`
|
||
|
UserName string `json:"userName"`
|
||
|
} `json:"result"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp int `json:"timestamp"`
|
||
|
}
|
||
|
|
||
|
// 逆变器报警数据
|
||
|
type EquipmentAlarmDetailRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Obj struct{} `json:"obj"`
|
||
|
Result struct {
|
||
|
Page struct {
|
||
|
PageIndex int `json:"pageIndex"`
|
||
|
PageSize int `json:"pageSize"`
|
||
|
Total int `json:"total"`
|
||
|
} `json:"page"`
|
||
|
Records []struct {
|
||
|
AlarmCode string `json:"alarmCode"`
|
||
|
AlarmContent string `json:"alarmContent"`
|
||
|
AlarmGrade string `json:"alarmGrade"`
|
||
|
AlarmType string `json:"alarmType"`
|
||
|
CausesAnalysis string `json:"causesAnalysis"`
|
||
|
DiagnosticAdvice string `json:"diagnosticAdvice"`
|
||
|
EquipmentPn string `json:"equipmentPn"`
|
||
|
EquipmentSn string `json:"equipmentSn"`
|
||
|
Id string `json:"id"`
|
||
|
Phone string `json:"phone"`
|
||
|
PowerPlantAddress string `json:"powerPlantAddress"`
|
||
|
PowerPlantId string `json:"powerPlantId"`
|
||
|
PowerPlantName string `json:"powerPlantName"`
|
||
|
ReportedTime string `json:"reportedTime"`
|
||
|
RestoreTime string `json:"restoreTime"`
|
||
|
Status string `json:"status"`
|
||
|
UserId string `json:"userId"`
|
||
|
UserName string `json:"userName"`
|
||
|
} `json:"records"`
|
||
|
} `json:"result"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp int `json:"timestamp"`
|
||
|
}
|
||
|
|
||
|
// 逆变器报警详情
|
||
|
type EquipmentAlarmDetailDataRes struct {
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
Result struct {
|
||
|
Address string `json:"address"`
|
||
|
AlarmCode string `json:"alarmCode"`
|
||
|
AlarmContent string `json:"alarmContent"`
|
||
|
AlarmGrade int `json:"alarmGrade"`
|
||
|
AlarmGradeName string `json:"alarmGradeName"`
|
||
|
AlarmSource int `json:"alarmSource"`
|
||
|
AlarmSourceName string `json:"alarmSourceName"`
|
||
|
CausesAnalysis string `json:"causesAnalysis"`
|
||
|
ContactName string `json:"contactName"`
|
||
|
DeviceModel string `json:"deviceModel"`
|
||
|
DiagnosticAdvice string `json:"diagnosticAdvice"`
|
||
|
Email string `json:"email"`
|
||
|
Id string `json:"id"`
|
||
|
IgnoreStatus int `json:"ignoreStatus"`
|
||
|
IgnoreStatusName string `json:"ignoreStatusName"`
|
||
|
OrganizationId string `json:"organizationId"`
|
||
|
OrganizationName string `json:"organizationName"`
|
||
|
Phone string `json:"phone"`
|
||
|
Pn string `json:"pn"`
|
||
|
PowerPlantId string `json:"powerPlantId"`
|
||
|
PowerPlantName string `json:"powerPlantName"`
|
||
|
ProductTypeName string `json:"productTypeName"`
|
||
|
ReportedTime string `json:"reportedTime"`
|
||
|
RestoreTime string `json:"restoreTime"`
|
||
|
Sn string `json:"sn"`
|
||
|
Status int `json:"status"`
|
||
|
StatusName string `json:"statusName"`
|
||
|
UserId string `json:"userId"`
|
||
|
UserName string `json:"userName"`
|
||
|
} `json:"result"`
|
||
|
Success bool `json:"success"`
|
||
|
Timestamp string `json:"timestamp"`
|
||
|
}
|
||
|
|
||
|
// EquipmentListQueryRes 数据库查询返回
|
||
|
type EquipmentListQueryRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
common.ListRes
|
||
|
List []entity.Equipment `json:"list"`
|
||
|
}
|