瀏覽代碼

fit:
1. 优化organization 数据入库的性能问题
2. 修复入库时,panic的问题
3. 增加test.yaml

gaoyagang 1 年之前
父節點
當前提交
dd5c402e81

+ 30 - 0
app/cmd/dtgateway/etc/dtgateway.test.yaml

@@ -0,0 +1,30 @@
+Name: dtgateway-api
+Host: 0.0.0.0
+Port: 1009
+Mode: dev
+Timeout: 0
+#100MB
+MaxBytes: 104857600
+
+#jwtAuth
+JwtAuth:
+  AccessSecret: ae0536f9-6450-4606-8e13-5a19ed505da0
+  AccessExpire: 31536000
+
+#日志配置
+Log:
+  ServiceName: dtgateway-api
+  Mode: console
+  Level: error
+
+#rpc service
+OrganizationRpcConf:
+  Endpoints:
+    - 127.0.0.1:1117
+  NonBlock: true
+  Timeout: 0
+
+#OrganizationRpcConf:
+#  Timeout: 50000
+#  Target: k8s://gt-datacenter/organization-rpc-svc:1117 #goctl kube 默认生成的k8s yaml的serviceName: {rpc中定义的name}-svc
+

+ 18 - 10
app/cmd/dtgateway/internal/logic/dtgateway/itemHistoryDataMultiAddLogic.go

@@ -1,12 +1,11 @@
 package dtgateway
 
 import (
-	"GtDataStore/app/cmd/organization/pb"
-	"context"
-	"github.com/jinzhu/copier"
-
 	"GtDataStore/app/cmd/dtgateway/internal/svc"
 	"GtDataStore/app/cmd/dtgateway/internal/types"
+	"GtDataStore/app/cmd/organization/pb"
+	"context"
+	"errors"
 
 	"github.com/zeromicro/go-zero/core/logx"
 )
@@ -26,14 +25,23 @@ func NewItemHistoryDataMultiAddLogic(ctx context.Context, svcCtx *svc.ServiceCon
 }
 
 func (l *ItemHistoryDataMultiAddLogic) ItemHistoryDataMultiAdd(req *types.MultiAddItemHistoryDataReq) (resp *types.MultiAddItemHistoryDataResq, err error) {
-	dataList := make([]*pb.ItemHistoryData, 0)
-	for _, line := range req.List {
-		tmp := &pb.ItemHistoryData{}
-		_ = copier.Copy(tmp, line)
-		dataList = append(dataList, tmp)
+	if len(req.List) == 0 {
+		return nil, errors.New("data list is empty")
+	}
+
+	dataList := make([]*pb.ItemHistoryData, len(req.List))
+	for i, line := range req.List {
+		dataList[i] = &pb.ItemHistoryData{
+			ProjectId: line.ProjectId,
+			ItemName:  line.ItemName,
+			Val:       line.Val,
+			HTime:     line.HTime,
+		}
 	}
+
 	_, err = l.svcCtx.OrganizationRpc.MultiAddItemHistoryData(l.ctx, &pb.MultiAddItemHistoryDataReq{
-		List: dataList,
+		ProjectId: req.List[0].ProjectId,
+		List:      dataList,
 	})
 	if err != nil {
 		return nil, err

+ 31 - 0
app/cmd/events/etc/events.test.yaml

@@ -0,0 +1,31 @@
+Name: events.rpc
+ListenOn: 0.0.0.0:1116
+
+Timeout: 0
+Mode: test
+
+Log:
+  ServiceName: events-rpc
+  Mode: console
+  Level: error
+
+#双胞胎服务
+GtServerIp: 47.96.12.136:8788
+
+RabbitMQ:
+  Url: amqp://admin:devmq*1120@47.96.12.136:5672/
+
+DtDataStoreDB:
+  DataSource: ws_data:c712f89fc4f8edaf30e41b828f4e3d26@tcp(172.16.0.194:4000)/ws_data?charset=utf8mb4&parseTime=True&loc=&loc=Asia%2FShanghai
+
+Redis:
+  Host: 47.96.12.136:6379
+  Key: dc:events
+  Type: node
+  Pass:
+
+Cache:
+  - Host: 47.96.12.136:6379
+    Key: dc:events:cache
+    Type: node
+    Pass:

+ 1 - 1
app/cmd/events/etc/events.yaml

@@ -2,7 +2,7 @@ Name: events.rpc
 ListenOn: 0.0.0.0:1116
 
 Timeout: 0
-Mode: test
+Mode: pro
 
 Log:
   ServiceName: events-rpc

+ 29 - 0
app/cmd/organization/etc/organization.test.yaml

@@ -0,0 +1,29 @@
+Name: organization.rpc
+ListenOn: 0.0.0.0:1117
+
+Timeout: 0
+Mode: test
+
+Log:
+  ServiceName: organization-rpc
+  Mode: console
+  Level: error
+
+#双胞胎服务
+GtServerIp: 47.96.12.136:8788
+
+DtDataStoreDB:
+  #  DataSource: ws_data:c712f89fc4f8edaf30e41b828f4e3d26@tcp(192.168.60.201:4000)/ws_data?charset=utf8mb4&parseTime=True&loc=&loc=Asia%2FShanghai
+  DataSource: ws_data:c712f89fc4f8edaf30e41b828f4e3d26@tcp(172.16.0.195:4000)/ws_data?charset=utf8mb4&parseTime=True&loc=&loc=Asia%2FShanghai
+
+Redis:
+  Host: 47.96.12.136:6379
+  Key: dc:organization
+  Type: node
+  Pass:
+
+Cache:
+  - Host: 47.96.12.136:6379
+    Key: dc:organization:cache
+    Type: node
+    Pass:

+ 1 - 17
app/cmd/organization/internal/logic/multiAddItemHistoryDataLogic.go

@@ -3,12 +3,9 @@ package logic
 import (
 	"GtDataStore/app/cmd/organization/internal/svc"
 	"GtDataStore/app/cmd/organization/pb"
-	"GtDataStore/app/model"
 	"GtDataStore/common/xerr"
 	"context"
 	"github.com/pkg/errors"
-	"time"
-
 	"github.com/zeromicro/go-zero/core/logx"
 )
 
@@ -27,20 +24,7 @@ func NewMultiAddItemHistoryDataLogic(ctx context.Context, svcCtx *svc.ServiceCon
 }
 
 func (l *MultiAddItemHistoryDataLogic) MultiAddItemHistoryData(in *pb.MultiAddItemHistoryDataReq) (*pb.MultiAddItemHistoryDataResp, error) {
-	ts := make([]model.DcItemHistoryData, len(in.List))
-	layout := "2006-01-02 15:04:05"
-	for i, data := range in.List {
-		t, _ := time.Parse(layout, data.HTime)
-		//fmt.Println("t:", t)
-		//fmt.Println("data.HTime:", data.HTime)
-		ts[i] = model.DcItemHistoryData{
-			ItemName: data.ItemName,
-			Val:      data.Val,
-			HTime:    t,
-		}
-	}
-
-	_, err := l.svcCtx.ItemHistoryData.MultiInsert(l.ctx, in.List[0].ProjectId, ts)
+	_, err := l.svcCtx.ItemHistoryData.MultiInsert(l.ctx, in.ProjectId, in.List)
 	if err != nil {
 		return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "item history data table multi Insert err:%v", err)
 	}

+ 2 - 1
app/cmd/organization/organization.proto

@@ -140,8 +140,9 @@ message ItemHistoryData {
 }
 
 message MultiAddItemHistoryDataReq {
+  int64     project_id = 1;
   // @gotags: valid:"list"
-  repeated ItemHistoryData list = 1;
+  repeated ItemHistoryData list = 2;
 }
 
 message MultiAddItemHistoryDataResp {}

+ 97 - 88
app/cmd/organization/pb/organization.pb.go

@@ -1142,7 +1142,7 @@ type ItemHistoryData struct {
 	ProjectId int64  `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
 	ItemName  string `protobuf:"bytes,2,opt,name=item_name,json=itemName,proto3" json:"item_name,omitempty"`
 	// @gotags: valid:"val"
-	Val   float64 `protobuf:"fixed64,3,opt,name=val,proto3" json:"val,omitempty" valid:"val"`
+	Val   float64 `protobuf:"fixed64,3,opt,name=val,proto3" json:"val,omitempty"`
 	HTime string  `protobuf:"bytes,4,opt,name=h_time,json=hTime,proto3" json:"h_time,omitempty"`
 }
 
@@ -1211,8 +1211,9 @@ type MultiAddItemHistoryDataReq struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
+	ProjectId int64 `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
 	// @gotags: valid:"list"
-	List []*ItemHistoryData `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty" valid:"list"`
+	List []*ItemHistoryData `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
 }
 
 func (x *MultiAddItemHistoryDataReq) Reset() {
@@ -1247,6 +1248,13 @@ func (*MultiAddItemHistoryDataReq) Descriptor() ([]byte, []int) {
 	return file_organization_proto_rawDescGZIP(), []int{7}
 }
 
+func (x *MultiAddItemHistoryDataReq) GetProjectId() int64 {
+	if x != nil {
+		return x.ProjectId
+	}
+	return 0
+}
+
 func (x *MultiAddItemHistoryDataReq) GetList() []*ItemHistoryData {
 	if x != nil {
 		return x.List
@@ -1585,7 +1593,7 @@ type ItemHistoryDataListResp struct {
 	unknownFields protoimpl.UnknownFields
 
 	// @gotags: valid:"list"
-	List []*ItemHistoryDataList `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty" valid:"list"`
+	List []*ItemHistoryDataList `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
 }
 
 func (x *ItemHistoryDataListResp) Reset() {
@@ -1870,92 +1878,93 @@ var file_organization_proto_rawDesc = []byte{
 	0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20,
 	0x01, 0x28, 0x01, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x12, 0x15, 0x0a, 0x06, 0x68, 0x5f, 0x74, 0x69,
 	0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22,
-	0x45, 0x0a, 0x1a, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x48,
-	0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x27, 0x0a,
-	0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62,
-	0x2e, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61,
-	0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41,
-	0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74,
-	0x61, 0x52, 0x65, 0x73, 0x70, 0x22, 0xd0, 0x01, 0x0a, 0x16, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69,
-	0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
-	0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12,
-	0x1b, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08,
-	0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
-	0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x67, 0x67, 0x72,
-	0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x67,
-	0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x69, 0x6d,
-	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14,
-	0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65,
-	0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x18, 0x49, 0x74, 0x65,
-	0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x54, 0x69,
-	0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
-	0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65,
-	0x63, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x6e, 0x61, 0x6d,
-	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d,
-	0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65,
-	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x4d, 0x0a,
-	0x19, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61,
-	0x4d, 0x61, 0x78, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61,
-	0x78, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x78,
-	0x56, 0x61, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x22, 0x5b, 0x0a, 0x13,
-	0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c,
-	0x69, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65,
-	0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x76,
-	0x61, 0x6c, 0x12, 0x15, 0x0a, 0x06, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x05, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x17, 0x49, 0x74, 0x65,
-	0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74,
-	0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03,
-	0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74,
-	0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73,
-	0x74, 0x32, 0x8d, 0x05, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
-	0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67,
-	0x55, 0x66, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x63,
-	0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x70, 0x62, 0x2e,
-	0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x55, 0x66, 0x12, 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74,
-	0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12,
-	0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65,
-	0x71, 0x1a, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x6f,
-	0x12, 0x3b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68,
-	0x65, 0x73, 0x74, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44,
-	0x63, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62,
-	0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a,
-	0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x6d, 0x70, 0x42,
-	0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x63, 0x57, 0x6f, 0x72,
-	0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x57, 0x6f, 0x72,
-	0x6b, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x6d, 0x70, 0x12, 0x3b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57,
-	0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x43, 0x6f, 0x64,
-	0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67,
-	0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67,
-	0x56, 0x61, 0x6c, 0x76, 0x65, 0x12, 0x5a, 0x0a, 0x17, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64,
+	0x64, 0x0a, 0x1a, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x48,
+	0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a,
+	0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x04,
+	0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e,
+	0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52,
+	0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64,
 	0x64, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61,
-	0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x49, 0x74,
-	0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71,
-	0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x49, 0x74,
-	0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x4e, 0x0a, 0x13, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79,
-	0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74,
-	0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73,
-	0x74, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69,
-	0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x52, 0x0a, 0x15, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79,
-	0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e,
-	0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x42,
-	0x79, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74,
-	0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73,
-	0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5a, 0x0a, 0x1b, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73,
-	0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x78, 0x4d, 0x69, 0x6e, 0x42, 0x79,
-	0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69,
-	0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x52,
-	0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74,
-	0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x78, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x73,
-	0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x33,
+	0x52, 0x65, 0x73, 0x70, 0x22, 0xd0, 0x01, 0x0a, 0x16, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73,
+	0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12,
+	0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1b,
+	0x0a, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69,
+	0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69,
+	0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x67, 0x67, 0x72, 0x65,
+	0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x67, 0x67,
+	0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x69, 0x6d, 0x65,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a,
+	0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x74,
+	0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x18, 0x49, 0x74, 0x65, 0x6d,
+	0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x54, 0x69, 0x6d,
+	0x65, 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f,
+	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+	0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65,
+	0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x4d, 0x0a, 0x19,
+	0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4d,
+	0x61, 0x78, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78,
+	0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x56,
+	0x61, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x01, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x22, 0x5b, 0x0a, 0x13, 0x49,
+	0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69,
+	0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+	0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x76, 0x61,
+	0x6c, 0x12, 0x15, 0x0a, 0x06, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x17, 0x49, 0x74, 0x65, 0x6d,
+	0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f,
+	0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74,
+	0x32, 0x8d, 0x05, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+	0x6e, 0x12, 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x55,
+	0x66, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x63, 0x57,
+	0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x57,
+	0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x55, 0x66, 0x12, 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57,
+	0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10,
+	0x2e, 0x70, 0x62, 0x2e, 0x44, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
+	0x1a, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x12,
+	0x3b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65,
+	0x73, 0x74, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x63,
+	0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e,
+	0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x14,
+	0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x6d, 0x70, 0x42, 0x79,
+	0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x63, 0x57, 0x6f, 0x72, 0x6b,
+	0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
+	0x69, 0x6e, 0x67, 0x50, 0x75, 0x6d, 0x70, 0x12, 0x3b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x6f,
+	0x72, 0x6b, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65,
+	0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52,
+	0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x56,
+	0x61, 0x6c, 0x76, 0x65, 0x12, 0x5a, 0x0a, 0x17, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64,
+	0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12,
+	0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65,
+	0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x1a,
+	0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65,
+	0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x4e, 0x0a, 0x13, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44,
+	0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65,
+	0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74,
+	0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73,
+	0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x52, 0x0a, 0x15, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44,
+	0x61, 0x74, 0x61, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x49,
+	0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79,
+	0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65,
+	0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x5a, 0x0a, 0x1b, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74,
+	0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x78, 0x4d, 0x69, 0x6e, 0x42, 0x79, 0x54,
+	0x69, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73,
+	0x74, 0x6f, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65,
+	0x71, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x69, 0x73, 0x74, 0x6f,
+	0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x78, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70,
+	0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 20 - 32
app/cmd/organization/pb/organization_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
-// - protoc-gen-go-grpc v1.3.0
-// - protoc             v3.21.12
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v4.23.4
 // source: organization.proto
 
 package pb
@@ -18,18 +18,6 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
-const (
-	Organization_GetWorkingUfByCode_FullMethodName          = "/pb.Organization/GetWorkingUfByCode"
-	Organization_GetWorkingRoByCode_FullMethodName          = "/pb.Organization/GetWorkingRoByCode"
-	Organization_GetWorkingChestByCode_FullMethodName       = "/pb.Organization/GetWorkingChestByCode"
-	Organization_GetWorkingPumpByCode_FullMethodName        = "/pb.Organization/GetWorkingPumpByCode"
-	Organization_GetWorkingValueByCode_FullMethodName       = "/pb.Organization/GetWorkingValueByCode"
-	Organization_MultiAddItemHistoryData_FullMethodName     = "/pb.Organization/MultiAddItemHistoryData"
-	Organization_ItemHistoryDataList_FullMethodName         = "/pb.Organization/ItemHistoryDataList"
-	Organization_ItemHistoryDataByTime_FullMethodName       = "/pb.Organization/ItemHistoryDataByTime"
-	Organization_ItemHistoryDataMaxMinByTime_FullMethodName = "/pb.Organization/ItemHistoryDataMaxMinByTime"
-)
-
 // OrganizationClient is the client API for Organization service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -55,7 +43,7 @@ func NewOrganizationClient(cc grpc.ClientConnInterface) OrganizationClient {
 
 func (c *organizationClient) GetWorkingUfByCode(ctx context.Context, in *DcWorkingReq, opts ...grpc.CallOption) (*WorkingUf, error) {
 	out := new(WorkingUf)
-	err := c.cc.Invoke(ctx, Organization_GetWorkingUfByCode_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/pb.Organization/GetWorkingUfByCode", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -64,7 +52,7 @@ func (c *organizationClient) GetWorkingUfByCode(ctx context.Context, in *DcWorki
 
 func (c *organizationClient) GetWorkingRoByCode(ctx context.Context, in *DcWorkingReq, opts ...grpc.CallOption) (*WorkingRo, error) {
 	out := new(WorkingRo)
-	err := c.cc.Invoke(ctx, Organization_GetWorkingRoByCode_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/pb.Organization/GetWorkingRoByCode", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -73,7 +61,7 @@ func (c *organizationClient) GetWorkingRoByCode(ctx context.Context, in *DcWorki
 
 func (c *organizationClient) GetWorkingChestByCode(ctx context.Context, in *DcWorkingReq, opts ...grpc.CallOption) (*WorkingChest, error) {
 	out := new(WorkingChest)
-	err := c.cc.Invoke(ctx, Organization_GetWorkingChestByCode_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/pb.Organization/GetWorkingChestByCode", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -82,7 +70,7 @@ func (c *organizationClient) GetWorkingChestByCode(ctx context.Context, in *DcWo
 
 func (c *organizationClient) GetWorkingPumpByCode(ctx context.Context, in *DcWorkingReq, opts ...grpc.CallOption) (*WorkingPump, error) {
 	out := new(WorkingPump)
-	err := c.cc.Invoke(ctx, Organization_GetWorkingPumpByCode_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/pb.Organization/GetWorkingPumpByCode", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -91,7 +79,7 @@ func (c *organizationClient) GetWorkingPumpByCode(ctx context.Context, in *DcWor
 
 func (c *organizationClient) GetWorkingValueByCode(ctx context.Context, in *DcWorkingReq, opts ...grpc.CallOption) (*WorkingValve, error) {
 	out := new(WorkingValve)
-	err := c.cc.Invoke(ctx, Organization_GetWorkingValueByCode_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/pb.Organization/GetWorkingValueByCode", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -100,7 +88,7 @@ func (c *organizationClient) GetWorkingValueByCode(ctx context.Context, in *DcWo
 
 func (c *organizationClient) MultiAddItemHistoryData(ctx context.Context, in *MultiAddItemHistoryDataReq, opts ...grpc.CallOption) (*MultiAddItemHistoryDataResp, error) {
 	out := new(MultiAddItemHistoryDataResp)
-	err := c.cc.Invoke(ctx, Organization_MultiAddItemHistoryData_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/pb.Organization/MultiAddItemHistoryData", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -109,7 +97,7 @@ func (c *organizationClient) MultiAddItemHistoryData(ctx context.Context, in *Mu
 
 func (c *organizationClient) ItemHistoryDataList(ctx context.Context, in *ItemHistoryDataListReq, opts ...grpc.CallOption) (*ItemHistoryDataListResp, error) {
 	out := new(ItemHistoryDataListResp)
-	err := c.cc.Invoke(ctx, Organization_ItemHistoryDataList_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/pb.Organization/ItemHistoryDataList", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -118,7 +106,7 @@ func (c *organizationClient) ItemHistoryDataList(ctx context.Context, in *ItemHi
 
 func (c *organizationClient) ItemHistoryDataByTime(ctx context.Context, in *ItemHistoryDataByTimeReq, opts ...grpc.CallOption) (*ItemHistoryDataListResp, error) {
 	out := new(ItemHistoryDataListResp)
-	err := c.cc.Invoke(ctx, Organization_ItemHistoryDataByTime_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/pb.Organization/ItemHistoryDataByTime", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -127,7 +115,7 @@ func (c *organizationClient) ItemHistoryDataByTime(ctx context.Context, in *Item
 
 func (c *organizationClient) ItemHistoryDataMaxMinByTime(ctx context.Context, in *ItemHistoryDataByTimeReq, opts ...grpc.CallOption) (*ItemHistoryDataMaxMinResp, error) {
 	out := new(ItemHistoryDataMaxMinResp)
-	err := c.cc.Invoke(ctx, Organization_ItemHistoryDataMaxMinByTime_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/pb.Organization/ItemHistoryDataMaxMinByTime", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -204,7 +192,7 @@ func _Organization_GetWorkingUfByCode_Handler(srv interface{}, ctx context.Conte
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Organization_GetWorkingUfByCode_FullMethodName,
+		FullMethod: "/pb.Organization/GetWorkingUfByCode",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(OrganizationServer).GetWorkingUfByCode(ctx, req.(*DcWorkingReq))
@@ -222,7 +210,7 @@ func _Organization_GetWorkingRoByCode_Handler(srv interface{}, ctx context.Conte
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Organization_GetWorkingRoByCode_FullMethodName,
+		FullMethod: "/pb.Organization/GetWorkingRoByCode",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(OrganizationServer).GetWorkingRoByCode(ctx, req.(*DcWorkingReq))
@@ -240,7 +228,7 @@ func _Organization_GetWorkingChestByCode_Handler(srv interface{}, ctx context.Co
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Organization_GetWorkingChestByCode_FullMethodName,
+		FullMethod: "/pb.Organization/GetWorkingChestByCode",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(OrganizationServer).GetWorkingChestByCode(ctx, req.(*DcWorkingReq))
@@ -258,7 +246,7 @@ func _Organization_GetWorkingPumpByCode_Handler(srv interface{}, ctx context.Con
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Organization_GetWorkingPumpByCode_FullMethodName,
+		FullMethod: "/pb.Organization/GetWorkingPumpByCode",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(OrganizationServer).GetWorkingPumpByCode(ctx, req.(*DcWorkingReq))
@@ -276,7 +264,7 @@ func _Organization_GetWorkingValueByCode_Handler(srv interface{}, ctx context.Co
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Organization_GetWorkingValueByCode_FullMethodName,
+		FullMethod: "/pb.Organization/GetWorkingValueByCode",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(OrganizationServer).GetWorkingValueByCode(ctx, req.(*DcWorkingReq))
@@ -294,7 +282,7 @@ func _Organization_MultiAddItemHistoryData_Handler(srv interface{}, ctx context.
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Organization_MultiAddItemHistoryData_FullMethodName,
+		FullMethod: "/pb.Organization/MultiAddItemHistoryData",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(OrganizationServer).MultiAddItemHistoryData(ctx, req.(*MultiAddItemHistoryDataReq))
@@ -312,7 +300,7 @@ func _Organization_ItemHistoryDataList_Handler(srv interface{}, ctx context.Cont
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Organization_ItemHistoryDataList_FullMethodName,
+		FullMethod: "/pb.Organization/ItemHistoryDataList",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(OrganizationServer).ItemHistoryDataList(ctx, req.(*ItemHistoryDataListReq))
@@ -330,7 +318,7 @@ func _Organization_ItemHistoryDataByTime_Handler(srv interface{}, ctx context.Co
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Organization_ItemHistoryDataByTime_FullMethodName,
+		FullMethod: "/pb.Organization/ItemHistoryDataByTime",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(OrganizationServer).ItemHistoryDataByTime(ctx, req.(*ItemHistoryDataByTimeReq))
@@ -348,7 +336,7 @@ func _Organization_ItemHistoryDataMaxMinByTime_Handler(srv interface{}, ctx cont
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Organization_ItemHistoryDataMaxMinByTime_FullMethodName,
+		FullMethod: "/pb.Organization/ItemHistoryDataMaxMinByTime",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(OrganizationServer).ItemHistoryDataMaxMinByTime(ctx, req.(*ItemHistoryDataByTimeReq))

+ 2 - 2
app/model/dcitemhistorydatamodel.go

@@ -18,7 +18,7 @@ type (
 	// and implement the added methods in customDcItemHistoryDataModel.
 	DcItemHistoryDataModel interface {
 		dcItemHistoryDataModel
-		MultiInsert(ctx context.Context, projectId int64, datas []DcItemHistoryData) (int64, error)
+		MultiInsert(ctx context.Context, projectId int64, datas []*pb.ItemHistoryData) (int64, error)
 		QueryHistoryDataByTime(ctx context.Context, in *pb.ItemHistoryDataByTimeReq) ([]ItemHistoryData, error)
 		QueryHistoryDataMaxMinByTime(ctx context.Context, in *pb.ItemHistoryDataByTimeReq) (*MaxMinData, error)
 	}
@@ -46,7 +46,7 @@ func NewDcItemHistoryDataModel(conn sqlx.SqlConn) DcItemHistoryDataModel {
 	}
 }
 
-func (m *defaultDcItemHistoryDataModel) MultiInsert(ctx context.Context, projectId int64, datas []DcItemHistoryData) (int64, error) {
+func (m *defaultDcItemHistoryDataModel) MultiInsert(ctx context.Context, projectId int64, datas []*pb.ItemHistoryData) (int64, error) {
 	query := fmt.Sprintf("insert ignore into %s (`item_name`,`val`,`h_time`) values (?, ?, ?)", m.getTableName(projectId))
 
 	if bulk, err := sqlx.NewBulkInserter(m.conn, query); err == nil {

+ 1 - 1
deploy/test.sh

@@ -28,7 +28,7 @@ upload () {
     fi
 
     echo "start upload ${1}.yaml"
-    rsync -av ./app/cmd/${1}/etc/${1}.yaml ${user}@${target}:/home/${user}/etc/${1}.yaml
+    rsync -av ./app/cmd/${1}/etc/${1}.test.yaml ${user}@${target}:/home/${user}/etc/${1}.yaml
     echo "remove ${1}"
     rm -f ./${1}
 }