FindWorkingUfByCycle.go 915 B

12345678910111213141516171819202122232425
  1. package v1
  2. import (
  3. "fmt"
  4. "metawant.greentech.com.cn/gaoyagang/gt-common/datacenter_client"
  5. "metawant.greentech.com.cn/gaoyagang/gt-common/httplib"
  6. "strconv"
  7. )
  8. func (d *DcApi) FindWorkingUfByCycle(params datacenter_client.FindWorkingUfByCycleReq) (*datacenter_client.FindWorkingUfByCycleResp, error) {
  9. serviceName := "/working-uf/cycle"
  10. h := httplib.Get(d.serviceUrl(serviceName))
  11. h.Param("project_id", strconv.FormatInt(params.ProjectId, 10))
  12. h.Param("device_code", params.DeviceCode)
  13. h.Param("filter_cycle", strconv.FormatInt(params.FilterCycle, 10))
  14. h.Param("step", strconv.FormatInt(params.Step, 10))
  15. h.Param("filter_time_start", fmt.Sprintf("%f", params.FilterTimeStart))
  16. h.Param("filter_time_end", fmt.Sprintf("%f", params.FilterTimeEnd))
  17. h.Param("limit", strconv.FormatInt(params.Limit, 10))
  18. resp := &datacenter_client.FindWorkingUfByCycleResp{}
  19. err := d.call(h, resp)
  20. return resp, err
  21. }