Quellcode durchsuchen

增加订单录入时间

fuwencai vor 3 Jahren
Ursprung
Commit
3a985fc9a1

+ 1 - 0
api/internal/logic/createorderlogic.go

@@ -78,6 +78,7 @@ func (l *CreateOrderLogic) CreateOrder(req types.Request) (*types.Response, erro
 		CompanyName:       req.Company_name,
 		CompanyName:       req.Company_name,
 		BillingMode:       req.BillingMode,
 		BillingMode:       req.BillingMode,
 		SaleTime:          req.Sale_time,
 		SaleTime:          req.Sale_time,
+		EntryTime:         req.Entry_time,
 		/*PaymentType:req.Payment_type,
 		/*PaymentType:req.Payment_type,
 		SourceOrderId: req.Source_order_id,*/
 		SourceOrderId: req.Source_order_id,*/
 	})
 	})

+ 1 - 0
api/internal/types/types.go

@@ -53,6 +53,7 @@ type Request struct {
 	Company_name        string `form:"company_name,optional"`
 	Company_name        string `form:"company_name,optional"`
 	BillingMode         int64  `form:"billingMode,optional"`
 	BillingMode         int64  `form:"billingMode,optional"`
 	Sale_time           string `form:"sale_time,optional"`
 	Sale_time           string `form:"sale_time,optional"`
+	Entry_time          string `form:"entry_time,optional"`
 }
 }
 
 
 type Response struct {
 type Response struct {

+ 1 - 0
api/jyOrder.api

@@ -60,6 +60,7 @@ type request {
 	Company_name        string `form:"company_name,optional"`
 	Company_name        string `form:"company_name,optional"`
 	BillingMode         int64  `form:"billingMode,optional"`
 	BillingMode         int64  `form:"billingMode,optional"`
 	Sale_time           string `form:"sale_time,optional"`
 	Sale_time           string `form:"sale_time,optional"`
+	Entry_time          string `form:"entry_time,optional"`
 }
 }
 
 
 type response {
 type response {

+ 2 - 1
entity/order.go

@@ -58,7 +58,8 @@ type Order struct {
 	Salesperson        string    `xorm:"salesperson" form:"salesperson" json:"salesperson"`
 	Salesperson        string    `xorm:"salesperson" form:"salesperson" json:"salesperson"`
 	Company_name       string    `xorm:"company_name" form:"company_name" json:"company_name"`
 	Company_name       string    `xorm:"company_name" form:"company_name" json:"company_name"`
 	BillingMode        int64     `xorm:"billingMode" form:"billingMode" json:"billingMode"`
 	BillingMode        int64     `xorm:"billingMode" form:"billingMode" json:"billingMode"`
-	Sale_time          time.Time `xorm:"sale_time" form:"sale_time" json:"sale_time"` //销售时间
+	Sale_time          time.Time `xorm:"sale_time" form:"sale_time" json:"sale_time"`  //销售时间
+	Entry_time         time.Time `xorm:"entry_time" form:"sale_time" json:"sale_time"` //录入时间
 	/*Payment_type       int64  `xorm:"payment_type" form:"payment_type" json:"payment_type"`
 	/*Payment_type       int64  `xorm:"payment_type" form:"payment_type" json:"payment_type"`
 	Source_order_id    int64  `xorm:"source_order_id" form:"source_order_id" json:"source_order_id"`*/
 	Source_order_id    int64  `xorm:"source_order_id" form:"source_order_id" json:"source_order_id"`*/
 }
 }

+ 1 - 0
rpc/jyOrder.proto

@@ -54,6 +54,7 @@ message Request {
   string company_name = 49;
   string company_name = 49;
   int64  billingMode = 50;
   int64  billingMode = 50;
   string sale_time = 51;
   string sale_time = 51;
+  string entry_time = 52;
 }
 }
 
 
 message Response {
 message Response {

+ 34 - 24
rpc/jyOrder/jyOrder.pb.go

@@ -85,6 +85,7 @@ type Request struct {
 	CompanyName       string `protobuf:"bytes,49,opt,name=company_name,json=companyName,proto3" json:"company_name,omitempty"`
 	CompanyName       string `protobuf:"bytes,49,opt,name=company_name,json=companyName,proto3" json:"company_name,omitempty"`
 	BillingMode       int64  `protobuf:"varint,50,opt,name=billingMode,proto3" json:"billingMode,omitempty"`
 	BillingMode       int64  `protobuf:"varint,50,opt,name=billingMode,proto3" json:"billingMode,omitempty"`
 	SaleTime          string `protobuf:"bytes,51,opt,name=sale_time,json=saleTime,proto3" json:"sale_time,omitempty"`
 	SaleTime          string `protobuf:"bytes,51,opt,name=sale_time,json=saleTime,proto3" json:"sale_time,omitempty"`
+	EntryTime         string `protobuf:"bytes,52,opt,name=entry_time,json=entryTime,proto3" json:"entry_time,omitempty"`
 }
 }
 
 
 func (x *Request) Reset() {
 func (x *Request) Reset() {
@@ -476,6 +477,13 @@ func (x *Request) GetSaleTime() string {
 	return ""
 	return ""
 }
 }
 
 
+func (x *Request) GetEntryTime() string {
+	if x != nil {
+		return x.EntryTime
+	}
+	return ""
+}
+
 type Response struct {
 type Response struct {
 	state         protoimpl.MessageState
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	sizeCache     protoimpl.SizeCache
@@ -614,7 +622,7 @@ var File_jyOrder_proto protoreflect.FileDescriptor
 
 
 var file_jyOrder_proto_rawDesc = []byte{
 var file_jyOrder_proto_rawDesc = []byte{
 	0x0a, 0x0d, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
 	0x0a, 0x0d, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
-	0x07, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xe5, 0x0d, 0x0a, 0x07, 0x52, 0x65, 0x71,
+	0x07, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x84, 0x0e, 0x0a, 0x07, 0x52, 0x65, 0x71,
 	0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x65,
 	0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x65,
 	0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x79, 0x4d, 0x6f, 0x6e, 0x65,
 	0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x79, 0x4d, 0x6f, 0x6e, 0x65,
 	0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x6e, 0x65, 0x79,
 	0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x6e, 0x65, 0x79,
@@ -725,29 +733,31 @@ var file_jyOrder_proto_rawDesc = []byte{
 	0x18, 0x32, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d,
 	0x18, 0x32, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d,
 	0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x61, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
 	0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x61, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
 	0x18, 0x33, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65,
 	0x18, 0x33, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65,
-	0x22, 0x4c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04,
-	0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
-	0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61,
-	0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x86,
-	0x01, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
-	0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a,
-	0x0b, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a,
-	0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x61,
-	0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73,
-	0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x81, 0x01, 0x0a, 0x07, 0x4a, 0x79, 0x4f, 0x72,
-	0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64,
-	0x65, 0x72, 0x12, 0x10, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71,
-	0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74,
-	0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18,
-	0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a, 0x11, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64,
-	0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x33,
+	0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x34,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x22,
+	0x4c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63,
+	0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
+	0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74,
+	0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x86, 0x01,
+	0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65,
+	0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b,
+	0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0a, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a,
+	0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x61, 0x6c,
+	0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x61,
+	0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x81, 0x01, 0x0a, 0x07, 0x4a, 0x79, 0x4f, 0x72, 0x64,
+	0x65, 0x72, 0x12, 0x32, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65,
+	0x72, 0x12, 0x10, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65,
+	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x2e,
+	0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44,
+	0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a, 0x11, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65,
+	0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 }
 
 
 var (
 var (

+ 3 - 0
service/orderService.go

@@ -59,6 +59,9 @@ func (s OrderService) CreateOrder(in *jyOrder.Request) (int64, string, int64) {
 	order.Company_name = in.CompanyName
 	order.Company_name = in.CompanyName
 	order.BillingMode = in.BillingMode
 	order.BillingMode = in.BillingMode
 	order.Sale_time = util.ConversionDateTime(in.SaleTime)
 	order.Sale_time = util.ConversionDateTime(in.SaleTime)
+	if in.EntryTime !=""{
+		order.Entry_time = util.ConversionDateTime(in.EntryTime)
+	}
 	/*order.Payment_type = in.PaymentType
 	/*order.Payment_type = in.PaymentType
 	order.Source_order_id = in.SourceOrderId*/
 	order.Source_order_id = in.SourceOrderId*/