Sfoglia il codice sorgente

增加合同性质

renjiaojiao 1 anno fa
parent
commit
e92534dd58

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

@@ -93,6 +93,7 @@ func (l *CreateOrderLogic) CreateOrder(req types.Request) (*types.Response, erro
 		EntId:             req.EntId,
 		SaleDep:           req.SaleDep,
 		SaleMoney:         req.SaleMoney,
+		ContractNature:    req.ContractNature,
 	})
 	if err != nil {
 		return nil, err

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

@@ -92,6 +92,7 @@ func (l *UpdateOrderLogic) UpdateOrder(req types.Request) (*types.Response, erro
 		EntId:             req.EntId,
 		SaleDep:           req.SaleDep,
 		SaleMoney:         req.SaleMoney,
+		ContractNature:    req.ContractNature,
 	})
 	if err != nil {
 		return nil, err

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

@@ -68,6 +68,7 @@ type Request struct {
 	BuyCount            int64  `form:"buyCount,optional"`
 	SaleDep             string `form:"saleDep,optional"`
 	SaleMoney           string `form:"saleMoney,optional"`
+	ContractNature      string `form:"contract_nature,optional"`
 }
 
 type Response struct {

+ 1 - 0
api/jyOrder.api

@@ -75,6 +75,7 @@ type request {
 	BuyCount            int64  `form:"buyCount,optional"`
 	SaleDep             string `form:"saleDep,optional"`
 	SaleMoney           string `form:"saleMoney,optional"`
+	ContractNature      string `form:"contract_nature,optional"`
 }
 
 type response {

+ 1 - 1
rpc/internal/server/jyorderserver.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT.
+// Code generated by goctl. DO NOT EDIT!
 // Source: jyOrder.proto
 
 package server

+ 1 - 0
rpc/jyOrder.proto

@@ -70,6 +70,7 @@ message Request {
   int64 buy_count = 65;
   string saleDep = 66;
   string saleMoney = 67;
+  string contract_nature = 68;
 }
 
 message Response {

+ 37 - 26
rpc/jyOrder/jyOrder.pb.go

@@ -1,6 +1,6 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.28.1
+// 	protoc-gen-go v1.28.0
 // 	protoc        v3.19.4
 // source: jyOrder.proto
 
@@ -91,6 +91,7 @@ type Request struct {
 	BuyCount          int64  `protobuf:"varint,65,opt,name=buy_count,json=buyCount,proto3" json:"buy_count,omitempty"`
 	SaleDep           string `protobuf:"bytes,66,opt,name=saleDep,proto3" json:"saleDep,omitempty"`
 	SaleMoney         string `protobuf:"bytes,67,opt,name=saleMoney,proto3" json:"saleMoney,omitempty"`
+	ContractNature    string `protobuf:"bytes,68,opt,name=contract_nature,json=contractNature,proto3" json:"contract_nature,omitempty"`
 }
 
 func (x *Request) Reset() {
@@ -587,6 +588,13 @@ func (x *Request) GetSaleMoney() string {
 	return ""
 }
 
+func (x *Request) GetContractNature() string {
+	if x != nil {
+		return x.ContractNature
+	}
+	return ""
+}
+
 type Response struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -725,7 +733,7 @@ var File_jyOrder_proto protoreflect.FileDescriptor
 
 var file_jyOrder_proto_rawDesc = []byte{
 	0x0a, 0x0d, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
-	0xf4, 0x11, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70,
+	0x9d, 0x12, 0x0a, 0x07, 0x52, 0x65, 0x71, 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, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65,
 	0x72, 0x5f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6f,
@@ -868,30 +876,33 @@ var file_jyOrder_proto_rawDesc = []byte{
 	0x0a, 0x07, 0x73, 0x61, 0x6c, 0x65, 0x44, 0x65, 0x70, 0x18, 0x42, 0x20, 0x01, 0x28, 0x09, 0x52,
 	0x07, 0x73, 0x61, 0x6c, 0x65, 0x44, 0x65, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x61, 0x6c, 0x65,
 	0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x43, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6c,
-	0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 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, 0x85, 0x01,
-	0x0a, 0x07, 0x4a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0b, 0x43, 0x72, 0x65,
-	0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x08, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x1a, 0x09, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a,
-	0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61,
-	0x69, 0x6c, 0x65, 0x64, 0x12, 0x10, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65,
-	0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a, 0x09, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 0x12, 0x22, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72,
-	0x12, 0x08, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x52, 0x65, 0x73,
-	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72,
-	0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61,
+	0x63, 0x74, 0x5f, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x44, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x74, 0x75, 0x72, 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, 0x85, 0x01, 0x0a, 0x07, 0x4a, 0x79, 0x4f, 0x72, 0x64,
+	0x65, 0x72, 0x12, 0x22, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65,
+	0x72, 0x12, 0x08, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x52, 0x65,
+	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x10, 0x2e,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a,
+	0x09, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x55, 0x70,
+	0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x08, 0x2e, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a,
+	0x5a, 0x08, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 
 var (

+ 13 - 19
rpc/jyOrder/jyOrder_grpc.pb.go

@@ -1,6 +1,6 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
-// - protoc-gen-go-grpc v1.3.0
+// - protoc-gen-go-grpc v1.2.0
 // - protoc             v3.19.4
 // source: jyOrder.proto
 
@@ -18,21 +18,15 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
-const (
-	JyOrder_CreateOrder_FullMethodName         = "/JyOrder/CreateOrder"
-	JyOrder_CreateOrderDetailed_FullMethodName = "/JyOrder/CreateOrderDetailed"
-	JyOrder_UpdateOrder_FullMethodName         = "/JyOrder/UpdateOrder"
-)
-
 // JyOrderClient is the client API for JyOrder 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.
 type JyOrderClient interface {
-	// 创建订单
+	//创建订单
 	CreateOrder(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
-	// 创建订单明细
+	//创建订单明细
 	CreateOrderDetailed(ctx context.Context, in *RequestDetailed, opts ...grpc.CallOption) (*Response, error)
-	// 修改订单
+	//修改订单
 	UpdateOrder(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
 }
 
@@ -46,7 +40,7 @@ func NewJyOrderClient(cc grpc.ClientConnInterface) JyOrderClient {
 
 func (c *jyOrderClient) CreateOrder(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
 	out := new(Response)
-	err := c.cc.Invoke(ctx, JyOrder_CreateOrder_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/JyOrder/CreateOrder", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -55,7 +49,7 @@ func (c *jyOrderClient) CreateOrder(ctx context.Context, in *Request, opts ...gr
 
 func (c *jyOrderClient) CreateOrderDetailed(ctx context.Context, in *RequestDetailed, opts ...grpc.CallOption) (*Response, error) {
 	out := new(Response)
-	err := c.cc.Invoke(ctx, JyOrder_CreateOrderDetailed_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/JyOrder/CreateOrderDetailed", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -64,7 +58,7 @@ func (c *jyOrderClient) CreateOrderDetailed(ctx context.Context, in *RequestDeta
 
 func (c *jyOrderClient) UpdateOrder(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
 	out := new(Response)
-	err := c.cc.Invoke(ctx, JyOrder_UpdateOrder_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/JyOrder/UpdateOrder", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -75,11 +69,11 @@ func (c *jyOrderClient) UpdateOrder(ctx context.Context, in *Request, opts ...gr
 // All implementations must embed UnimplementedJyOrderServer
 // for forward compatibility
 type JyOrderServer interface {
-	// 创建订单
+	//创建订单
 	CreateOrder(context.Context, *Request) (*Response, error)
-	// 创建订单明细
+	//创建订单明细
 	CreateOrderDetailed(context.Context, *RequestDetailed) (*Response, error)
-	// 修改订单
+	//修改订单
 	UpdateOrder(context.Context, *Request) (*Response, error)
 	mustEmbedUnimplementedJyOrderServer()
 }
@@ -120,7 +114,7 @@ func _JyOrder_CreateOrder_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: JyOrder_CreateOrder_FullMethodName,
+		FullMethod: "/JyOrder/CreateOrder",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(JyOrderServer).CreateOrder(ctx, req.(*Request))
@@ -138,7 +132,7 @@ func _JyOrder_CreateOrderDetailed_Handler(srv interface{}, ctx context.Context,
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: JyOrder_CreateOrderDetailed_FullMethodName,
+		FullMethod: "/JyOrder/CreateOrderDetailed",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(JyOrderServer).CreateOrderDetailed(ctx, req.(*RequestDetailed))
@@ -156,7 +150,7 @@ func _JyOrder_UpdateOrder_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: JyOrder_UpdateOrder_FullMethodName,
+		FullMethod: "/JyOrder/UpdateOrder",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(JyOrderServer).UpdateOrder(ctx, req.(*Request))

+ 1 - 1
rpc/jyorderclient/jyorder.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT.
+// Code generated by goctl. DO NOT EDIT!
 // Source: jyOrder.proto
 
 package jyorderclient

+ 4 - 0
service/orderService.go

@@ -1,6 +1,7 @@
 package service
 
 import (
+	"fmt"
 	"log"
 
 	"app.yhyue.com/moapp/jyOrder/entity"
@@ -85,6 +86,8 @@ func (s OrderService) CreateOrder(in *jyOrder.Request) (int64, string, int64) {
 	order["audit_status"] = in.AuditStatus
 	order["saleDep"] = in.SaleDep
 	order["saleMoney"] = in.SaleMoney
+	order["contract_nature"] = in.ContractNature
+	fmt.Println("---------", order["contract_nature"])
 	if in.OrderChannel == "d03" {
 		delete(order, "return_status")
 	}
@@ -178,6 +181,7 @@ func (s OrderService) UpdateOrder(in *jyOrder.Request) (int64, string) {
 	order["saleDep"] = in.SaleDep
 	order["saleMoney"] = in.SaleMoney
 	order["pay_way"] = in.PayWay
+	order["contract_nature"] = in.ContractNature
 	if in.OrderChannel == "d03" {
 		delete(order, "return_status")
 	}