فهرست منبع

fit: ro工况数据更新url 并增加两个字段

gaoyagang 1 سال پیش
والد
کامیت
c7be2961f8

+ 2 - 0
datacenter_client/types.go

@@ -112,6 +112,8 @@ type (
 		FeedWqP             float64 `json:"feed_wq_p"`
 		ProductWqP          float64 `json:"product_wq_p"`
 		Step                int64   `json:"step"`
+		FilterTime          float64 `json:"filter_time"`
+		FilterCycle         int64   `json:"filter_cycle"`
 		CTime               string  `json:"c_time"`
 	}
 

+ 2 - 2
datacenter_client/v1/CreateAppInfo_test.go

@@ -9,8 +9,8 @@ import (
 var d = NewDcApi(ClientOptions{
 	HTTPSettings: httplib.HTTPSettings{},
 	ServerIp:     "47.96.12.136:8788",
-	AppName:      "add-test1",
-	AppSecret:    "7395fb0cfasyvasd705a2db44a19851a3dbd77f",
+	AppName:      "simulations",
+	AppSecret:    "e3fc084fda3d2a6628b9ce28abf21243",
 })
 
 func TestDcApi_CreateAppInfo(t *testing.T) {

+ 1 - 1
datacenter_client/v1/GetWorkingChestByCode.go

@@ -7,7 +7,7 @@ import (
 )
 
 func (d *DcApi) GetWorkingChestByCode(params datacenter_client.DcWorkingReq) (*datacenter_client.GetWorkingChestByCodeResp, error) {
-	serviceName := "/working-uf/cycle"
+	serviceName := "/working-chest/info"
 	h := httplib.Get(d.serviceUrl(serviceName))
 	h.Param("project_id", strconv.FormatInt(params.ProjectId, 10))
 	h.Param("device_code", params.DeviceCode)

+ 1 - 1
datacenter_client/v1/GetWorkingPumpByCode.go

@@ -7,7 +7,7 @@ import (
 )
 
 func (d *DcApi) GetWorkingPumpByCode(params datacenter_client.DcWorkingReq) (*datacenter_client.GetWorkingPumpByCodeResp, error) {
-	serviceName := "/working-uf/cycle"
+	serviceName := "/working-pump/info"
 	h := httplib.Get(d.serviceUrl(serviceName))
 	h.Param("project_id", strconv.FormatInt(params.ProjectId, 10))
 	h.Param("device_code", params.DeviceCode)

+ 1 - 1
datacenter_client/v1/GetWorkingRoByCode.go

@@ -7,7 +7,7 @@ import (
 )
 
 func (d *DcApi) GetWorkingRoByCode(params datacenter_client.DcWorkingReq) (*datacenter_client.GetWorkingRoByCodeResp, error) {
-	serviceName := "/working-uf/cycle"
+	serviceName := "/working-ro/info"
 	h := httplib.Get(d.serviceUrl(serviceName))
 	h.Param("project_id", strconv.FormatInt(params.ProjectId, 10))
 	h.Param("device_code", params.DeviceCode)

+ 28 - 0
datacenter_client/v1/GetWorkingRoByCode_test.go

@@ -0,0 +1,28 @@
+package v1
+
+import (
+	"metawant.greentech.com.cn/gaoyagang/gt-common/datacenter_client"
+	"testing"
+)
+
+//var d = NewDcApi(ClientOptions{
+//	HTTPSettings: httplib.HTTPSettings{},
+//	ServerIp:     "47.96.12.136:8788",
+//	AppName:      "add-test1",
+//	AppSecret:    "7395fb0cfasyvasd705a2db44a19851a3dbd77f",
+//})
+
+func TestDcApi_GetWorkingRoByCode(t *testing.T) {
+	res, err := d.GetWorkingRoByCode(datacenter_client.DcWorkingReq{
+		ProjectId:  92,
+		DeviceCode: "RO-5001A",
+		Stime:      "2024-05-21 12:00:00",
+		Etime:      "2024-05-21 14:00:00",
+		Page:       1,
+		PageSize:   60,
+		Order:      "id desc",
+	})
+
+	t.Log(res.Data.List)
+	t.Log(err)
+}