client_test.go 775 B

123456789101112131415161718192021222324252627282930313233
  1. package client
  2. import (
  3. "metawant.greentech.com.cn/gaoyagang/gt-common/datacenter_client"
  4. "testing"
  5. )
  6. func TestCreateDcApiClient(t *testing.T) {
  7. v1 := CreateDcApiClient("47.96.12.136:8788", "simulations", "e3fc084fda3d2a6628b9ce28abf21243")
  8. resp, err := v1.ObtainRangeMaxMin(&datacenter_client.RangeMaxMinReq{
  9. ProjectId: "92",
  10. ItemName: "C.M.CIP_QXB1_A@out",
  11. Stime: "2023-12-27 12:05:44",
  12. Etime: "2024-01-27 12:05:44",
  13. })
  14. t.Log(resp)
  15. t.Log(err)
  16. resp1, err1 := v1.FindWorkingUfByCycle(datacenter_client.FindWorkingUfByCycleReq{
  17. ProjectId: 92,
  18. DeviceCode: "UF-4001C",
  19. FilterCycle: 7,
  20. Step: 26,
  21. FilterTimeStart: 584.00,
  22. FilterTimeEnd: 3546.00,
  23. Limit: 5,
  24. })
  25. t.Logf("%#v", resp1)
  26. t.Log(err1)
  27. }