Skip to content

Commit

Permalink
v2.3.2 - Structure parsing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MickMake committed Oct 22, 2022
1 parent 371e2d6 commit 154951f
Show file tree
Hide file tree
Showing 21 changed files with 1,287 additions and 956 deletions.
122 changes: 60 additions & 62 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion iSolarCloud/AppService/findPsType/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (e *EndPoint) GetData() api.DataMap {
for range Only.Once {
pkg := apiReflect.GetName("", *e)
dt := valueTypes.NewDateTime(valueTypes.Now)
entries.StructToPoints(e.Response.ResultData, pkg, "", dt)
entries.StructToPoints(e.Response.ResultData, pkg, e.Request.PsId.String(), dt)

// for _, d := range e.Response.ResultData {
// name := fmt.Sprintf("%s.%s", pkg, e.Request.PsId.String())
Expand Down
3 changes: 2 additions & 1 deletion iSolarCloud/AppService/getAllDeviceByPsId/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ func (e *EndPoint) GetData() api.DataMap {
for range Only.Once {
pkg := apiReflect.GetName("", *e)
dt := valueTypes.NewDateTime(valueTypes.Now)
entries.StructToPoints(e.Response.ResultData, pkg, "", dt)
name := pkg + "." + e.Request.PsId.String()
entries.StructToPoints(e.Response.ResultData, name, e.Request.PsId.String(), dt)
}

return entries
Expand Down
9 changes: 2 additions & 7 deletions iSolarCloud/AppService/getDeviceList/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,8 @@ func (e *EndPoint) GetData() api.DataMap {
for range Only.Once {
pkg := apiReflect.GetName("", *e)
dt := valueTypes.NewDateTime(valueTypes.Now)
entries.StructToPoints(e.Response.ResultData, pkg, "", dt)

// pkg := apiReflect.GetName("", *e)
// for _, d := range e.Response.ResultData.PageList {
// name := api.JoinWithDots(0, valueTypes.DateTimeLayoutDay, pkg, d.PsKey)
// entries.StructToPoints(d, name, e.Request.PsId.String(), valueTypes.NewDateTime(""))
// }
name := pkg + "." + e.Request.PsId.String()
entries.StructToPoints(e.Response.ResultData, name, e.Request.PsId.String(), dt)
}

return entries
Expand Down

0 comments on commit 154951f

Please sign in to comment.