作者 tangxuhui

更新

  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type CreateDividendsOrderCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + //客户名称
  14 + CustomerName string `json:"customerName" valid:"Required"`
  15 + //分红订单金额
  16 + DividendsOrderAmount float64 `json:"dividendsOrderAmount" valid:"Required"`
  17 + //分红订单号
  18 + DividendsOrderNumber string `json:"dividendsOrderNumber" valid:"Required"`
  19 + //分红订单原单号
  20 + DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum" valid:"Required"`
  21 + //订单产生时间 时间戳 秒
  22 + OrderTime int64 `json:"orderTime" valid:"Required"`
  23 + //备注
  24 + Remarks string `json:"remarks" valid:"Required"`
  25 + //订单业务员uid
  26 + SalesmanUid string `json:"salesmanUid"`
  27 + //订单操作人uid
  28 + OperatorUid string `json:"operatorUid"`
  29 + //区域名称
  30 + RegionName string `json:"regionName"`
  31 + //订单产品列表
  32 + OrderGoods []struct {
  33 + CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
  34 + DividendsOrderNumber string `json:"dividendsOrderNumber"` //关联分红订单号
  35 + OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
  36 + OrderGoodExpense float64 `json:"orderGoodExpense"` //订单产品费用
  37 + OrderGoodName string `json:"orderGoodName"` //订单产品名称
  38 + OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价
  39 + OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
  40 + } `json:"orderGoods"`
  41 +}
  42 +
  43 +func (createDividendsOrderCommand *CreateDividendsOrderCommand) Valid(validation *validation.Validation) {
  44 +
  45 +}
  46 +
  47 +func (createDividendsOrderCommand *CreateDividendsOrderCommand) ValidateCommand() error {
  48 + valid := validation.Validation{}
  49 + b, err := valid.Valid(createDividendsOrderCommand)
  50 + if err != nil {
  51 + return err
  52 + }
  53 + if !b {
  54 + for _, validErr := range valid.Errors {
  55 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  56 + }
  57 + }
  58 + return nil
  59 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type RemoveDividendsOrderCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 分红订单ID
  14 + DividendsOrderId []string `json:"dividendsOrderId" valid:"Required"`
  15 +}
  16 +
  17 +func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) Valid(validation *validation.Validation) {
  18 + validation.SetError("CustomValid", "未实现的自定义认证")
  19 +}
  20 +
  21 +func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) ValidateCommand() error {
  22 + valid := validation.Validation{}
  23 + b, err := valid.Valid(removeDividendsOrderCommand)
  24 + if err != nil {
  25 + return err
  26 + }
  27 + if !b {
  28 + for _, validErr := range valid.Errors {
  29 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  30 + }
  31 + }
  32 + return nil
  33 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type UpdateDividendsOrderCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + //分红订单
  14 + DividendsOrderID int `json:"dividendsOrderId"`
  15 + //客户名称
  16 + CustomerName string `json:"customerName" valid:"Required"`
  17 + //分红订单金额
  18 + DividendsOrderAmount float64 `json:"dividendsOrderAmount" valid:"Required"`
  19 + //分红订单号
  20 + DividendsOrderNumber string `json:"dividendsOrderNumber" valid:"Required"`
  21 + //分红订单原单号
  22 + DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum" valid:"Required"`
  23 + //订单产生时间
  24 + OrderTime int64 `json:"orderTime" valid:"Required"`
  25 + //备注
  26 + Remarks string `json:"remarks" valid:"Required"`
  27 + //订单业务员uid
  28 + SalesmanUid string `json:"salesmanUid"`
  29 + //订单操作人uid
  30 + OperatorUid string `json:"operatorUid"`
  31 + //区域名称
  32 + RegionName string `json:"regionName"`
  33 + //订单产品列表
  34 + OrderGoods []struct {
  35 + CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
  36 + DividendsOrderNumber string `json:"dividendsOrderNumber"` //关联分红订单号
  37 + OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
  38 + OrderGoodExpense float64 `json:"orderGoodExpense"` //订单产品费用
  39 + OrderGoodName string `json:"orderGoodName"` //订单产品名称
  40 + OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价
  41 + OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
  42 + } `json:"orderGoods"`
  43 +}
  44 +
  45 +func (updateDividendsOrderCommand *UpdateDividendsOrderCommand) Valid(validation *validation.Validation) {
  46 +
  47 +}
  48 +
  49 +func (updateDividendsOrderCommand *UpdateDividendsOrderCommand) ValidateCommand() error {
  50 + valid := validation.Validation{}
  51 + b, err := valid.Valid(updateDividendsOrderCommand)
  52 + if err != nil {
  53 + return err
  54 + }
  55 + if !b {
  56 + for _, validErr := range valid.Errors {
  57 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  58 + }
  59 + }
  60 + return nil
  61 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type GetDividendsOrderQuery struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 分红订单ID
  14 + DividendsOrderId int `json:"dividendsOrderId,string" valid:"Required"`
  15 +}
  16 +
  17 +func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) {
  18 + validation.SetError("CustomValid", "未实现的自定义认证")
  19 +}
  20 +
  21 +func (getDividendsOrderQuery *GetDividendsOrderQuery) ValidateQuery() error {
  22 + valid := validation.Validation{}
  23 + b, err := valid.Valid(getDividendsOrderQuery)
  24 + if err != nil {
  25 + return err
  26 + }
  27 + if !b {
  28 + for _, validErr := range valid.Errors {
  29 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  30 + }
  31 + }
  32 + return nil
  33 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 +)
  8 +
  9 +type ListDividendsOrdersQuery struct {
  10 + // 页码
  11 + PageNumber int `json:"pageNumber"`
  12 + // 每页限制
  13 + PageSize int `json:"pageSize"`
  14 +}
  15 +
  16 +func (listDividendsOrdersQuery *ListDividendsOrdersQuery) Valid(validation *validation.Validation) {
  17 + validation.SetError("CustomValid", "未实现的自定义认证")
  18 +}
  19 +
  20 +func (listDividendsOrdersQuery *ListDividendsOrdersQuery) ValidateQuery() error {
  21 + valid := validation.Validation{}
  22 + b, err := valid.Valid(listDividendsOrdersQuery)
  23 + if err != nil {
  24 + return err
  25 + }
  26 + if !b {
  27 + for _, validErr := range valid.Errors {
  28 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  29 + }
  30 + }
  31 + return nil
  32 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type SearchDividendsOrderQuery struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 分红订单号
  14 + DividendsOrderNumber string `json:"dividendsOrderNumber,omitempty"`
  15 + // 客户名称
  16 + CustomerName string `json:"customerName,omitempty"`
  17 + // 页码
  18 + PageNumber int `json:"pageNumber"`
  19 + // 每页限制
  20 + PageSize int `json:"pageSize"`
  21 +}
  22 +
  23 +func (searchDividendsOrderQuery *SearchDividendsOrderQuery) Valid(validation *validation.Validation) {
  24 + validation.SetError("CustomValid", "未实现的自定义认证")
  25 +}
  26 +
  27 +func (searchDividendsOrderQuery *SearchDividendsOrderQuery) ValidateQuery() error {
  28 + valid := validation.Validation{}
  29 + b, err := valid.Valid(searchDividendsOrderQuery)
  30 + if err != nil {
  31 + return err
  32 + }
  33 + if !b {
  34 + for _, validErr := range valid.Errors {
  35 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  36 + }
  37 + }
  38 + return nil
  39 +}
  1 +package service
  2 +
  3 +import (
  4 + "strconv"
  5 + "time"
  6 +
  7 + "github.com/linmadan/egglib-go/core/application"
  8 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsOrder/command"
  9 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsOrder/query"
  10 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
  11 +)
  12 +
  13 +// 分红订单实体对象
  14 +type DividendsOrderService struct {
  15 +}
  16 +
  17 +// 创建分红订单实体对象
  18 +func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createDividendsOrderCommand *command.CreateDividendsOrderCommand) (interface{}, error) {
  19 + if err := createDividendsOrderCommand.ValidateCommand(); err != nil {
  20 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  21 + }
  22 + orderGoods := []allied_creation_cooperation.DividendsOrderGoods{}
  23 + for _, v := range createDividendsOrderCommand.OrderGoods {
  24 + good := allied_creation_cooperation.DividendsOrderGoods{
  25 + CooperationContractNumber: v.CooperationContractNumber,
  26 + DividendsOrderNumber: v.DividendsOrderNumber,
  27 + OrderGoodAmount: v.OrderGoodAmount,
  28 + OrderGoodExpense: v.OrderGoodExpense,
  29 + OrderGoodName: v.OrderGoodName,
  30 + OrderGoodPrice: v.OrderGoodPrice,
  31 + OrderGoodQuantity: v.OrderGoodQuantity,
  32 + }
  33 + orderGoods = append(orderGoods, good)
  34 + }
  35 + t := time.Unix(createDividendsOrderCommand.OrderTime, 0)
  36 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsOrderCommand.Operator)
  37 + result, err := creationCooperationGateway.DividendsOrderAdd(allied_creation_cooperation.ReqDividendsOrderAdd{
  38 + CompanyId: int(createDividendsOrderCommand.Operator.CompanyId),
  39 + CustomerName: createDividendsOrderCommand.CustomerName,
  40 + DividendsOrderAmount: createDividendsOrderCommand.DividendsOrderAmount,
  41 + DividendsOrderNumber: createDividendsOrderCommand.DividendsOrderNumber,
  42 + DividendsOriginalOrderNum: createDividendsOrderCommand.DividendsOriginalOrderNum,
  43 + OperatorUid: int(createDividendsOrderCommand.Operator.UserId),
  44 + OrderTime: t,
  45 + Remarks: createDividendsOrderCommand.Remarks,
  46 + SalesmanUid: createDividendsOrderCommand.SalesmanUid,
  47 + RegionName: createDividendsOrderCommand.RegionName,
  48 + OrderGoods: orderGoods,
  49 + })
  50 + if err != nil {
  51 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  52 + }
  53 + data := struct {
  54 + DividendsOrderId int
  55 + command.CreateDividendsOrderCommand
  56 + }{
  57 + DividendsOrderId: result.DividendsOrderID,
  58 + CreateDividendsOrderCommand: *createDividendsOrderCommand,
  59 + }
  60 + return data, nil
  61 +}
  62 +
  63 +// 返回分红订单实体对象
  64 +func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividendsOrderQuery *query.GetDividendsOrderQuery) (interface{}, error) {
  65 + if err := getDividendsOrderQuery.ValidateQuery(); err != nil {
  66 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  67 + }
  68 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getDividendsOrderQuery.Operator)
  69 + result, err := creationCooperationGateway.DividendsOrderGet(allied_creation_cooperation.ReqDividendsOrderGet{
  70 + DividendsOrderId: getDividendsOrderQuery.DividendsOrderId,
  71 + })
  72 + if err != nil {
  73 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  74 + }
  75 + return result, nil
  76 +}
  77 +
  78 +// 返回分红订单实体对象列表
  79 +// func (dividendsOrderService *DividendsOrderService) ListDividendsOrders(listDividendsOrdersQuery *query.ListDividendsOrdersQuery) (int, interface{}, error) {
  80 +// if err := listDividendsOrdersQuery.ValidateQuery(); err != nil {
  81 +// return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())
  82 +// }
  83 +
  84 +// return 0, nil, nil
  85 +// }
  86 +
  87 +// 移除分红订单实体对象
  88 +func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeDividendsOrderCommand *command.RemoveDividendsOrderCommand) (interface{}, error) {
  89 + if err := removeDividendsOrderCommand.ValidateCommand(); err != nil {
  90 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  91 + }
  92 + dividendsOrderId := []int{}
  93 + for _, v := range removeDividendsOrderCommand.DividendsOrderId {
  94 + id, _ := strconv.Atoi(v)
  95 + dividendsOrderId = append(dividendsOrderId, id)
  96 + }
  97 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeDividendsOrderCommand.Operator)
  98 + creationCooperationGateway.DividendsOrderRemove(allied_creation_cooperation.ReqDividendsOrderRemove{
  99 + DividendsOrderId: 0, ///TODO 改换为批量删除
  100 + })
  101 + return nil, nil
  102 +}
  103 +
  104 +// 查询分红订单方法
  105 +func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchDividendsOrderQuery *query.SearchDividendsOrderQuery) (int, interface{}, error) {
  106 + if err := searchDividendsOrderQuery.ValidateQuery(); err != nil {
  107 + return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())
  108 + }
  109 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(searchDividendsOrderQuery.Operator)
  110 + result, err := creationCooperationGateway.DividendsOrderSearch(allied_creation_cooperation.ReqDividendsOrderSearch{
  111 + PageNumber: searchDividendsOrderQuery.PageNumber,
  112 + PageSize: searchDividendsOrderQuery.PageSize,
  113 + CustomerName: searchDividendsOrderQuery.CustomerName,
  114 + DividendsOrderNumber: searchDividendsOrderQuery.DividendsOrderNumber,
  115 + })
  116 + if err != nil {
  117 + return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  118 + }
  119 +
  120 + return result.Gride.Total, result.Gride.List, nil
  121 +}
  122 +
  123 +// 更新分红订单实体对象
  124 +func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateDividendsOrderCommand *command.UpdateDividendsOrderCommand) (interface{}, error) {
  125 + if err := updateDividendsOrderCommand.ValidateCommand(); err != nil {
  126 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  127 + }
  128 + orderGoods := []allied_creation_cooperation.DividendsOrderGoods{}
  129 + for _, v := range updateDividendsOrderCommand.OrderGoods {
  130 + good := allied_creation_cooperation.DividendsOrderGoods{
  131 + CooperationContractNumber: v.CooperationContractNumber,
  132 + DividendsOrderNumber: v.DividendsOrderNumber,
  133 + OrderGoodAmount: v.OrderGoodAmount,
  134 + OrderGoodExpense: v.OrderGoodExpense,
  135 + OrderGoodName: v.OrderGoodName,
  136 + OrderGoodPrice: v.OrderGoodPrice,
  137 + OrderGoodQuantity: v.OrderGoodQuantity,
  138 + }
  139 + orderGoods = append(orderGoods, good)
  140 + }
  141 + t := time.Unix(updateDividendsOrderCommand.OrderTime, 0)
  142 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsOrderCommand.Operator)
  143 + _, err := creationCooperationGateway.DividendsOrderUpdate(allied_creation_cooperation.ReqDividendsOrderUpdate{
  144 + DividendsOrderId: updateDividendsOrderCommand.DividendsOrderID,
  145 + CompanyId: int(updateDividendsOrderCommand.Operator.CompanyId),
  146 + CustomerName: updateDividendsOrderCommand.CustomerName,
  147 + DividendsOrderAmount: updateDividendsOrderCommand.DividendsOrderAmount,
  148 + DividendsOrderNumber: updateDividendsOrderCommand.DividendsOrderNumber,
  149 + DividendsOriginalOrderNum: updateDividendsOrderCommand.DividendsOriginalOrderNum,
  150 + OperatorUid: int(updateDividendsOrderCommand.Operator.UserId),
  151 + OrderTime: t,
  152 + Remarks: updateDividendsOrderCommand.Remarks,
  153 + SalesmanUid: updateDividendsOrderCommand.SalesmanUid,
  154 + RegionName: updateDividendsOrderCommand.RegionName,
  155 + OrderGoods: orderGoods,
  156 + })
  157 + if err != nil {
  158 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  159 + }
  160 + return updateDividendsOrderCommand, nil
  161 +}
  162 +
  163 +func NewDividendsOrderService(options map[string]interface{}) *DividendsOrderService {
  164 + newDividendsOrderService := &DividendsOrderService{}
  165 + return newDividendsOrderService
  166 +}
@@ -72,14 +72,6 @@ type ( @@ -72,14 +72,6 @@ type (
72 OrgName string `json:"orgName"` 72 OrgName string `json:"orgName"`
73 } 73 }
74 } `json:"undertakers"` 74 } `json:"undertakers"`
75 - // 相关人列表  
76 - // RelevantPeople []*domain.Relevant `cname:"相关人列表" json:"relevantPeople,omitempty"`  
77 - // 公司ID,通过集成REST上下文获取  
78 - // CompanyId int64 ` json:"companyId,string" `  
79 - // 组织机构ID  
80 - // OrgId int64 `json:"orgId,string" `  
81 - // 用户ID,  
82 - // UserId int64 `json:"userId,string" `  
83 } 75 }
84 76
85 DataCooperationContractAdd struct { 77 DataCooperationContractAdd struct {
@@ -178,8 +178,8 @@ type ( @@ -178,8 +178,8 @@ type (
178 //判断当前勾选的承接对象是否存在用户 178 //判断当前勾选的承接对象是否存在用户
179 type ( 179 type (
180 ReqCooperationProjectsCheck struct { 180 ReqCooperationProjectsCheck struct {
181 - CooperationProjectId int  
182 - CooperationProjectUndertakerTypes []int 181 + CooperationProjectId int `json:"cooperationProjectId"`
  182 + CooperationProjectUndertakerTypes []int `json:"cooperationProjectUndertakerTypes"`
183 } 183 }
184 184
185 DataCooperationProjectsCheck struct { 185 DataCooperationProjectsCheck struct {
1 package allied_creation_cooperation 1 package allied_creation_cooperation
2 2
  3 +import "time"
  4 +
3 //创建分红订单 5 //创建分红订单
  6 +
  7 +type DividendsOrder struct {
  8 + Company struct {
  9 + CompanyID int `json:"companyId"`
  10 + CompanyLogo string `json:"companyLogo"`
  11 + CompanyName string `json:"companyName"`
  12 + } `json:"company"`
  13 + CustomerName string `json:"customerName"` //客户名字
  14 + DividendStatus int `json:"dividendStatus"` //分红订单分红状态,1待分红,2已分红,3部分分红
  15 + DividendTime string `json:"dividendTime"` //分红订单分红时间
  16 + DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额
  17 + DividendsOrderID int `json:"dividendsOrderId"` //分红订单
  18 + DividendsOrderNumber int `json:"dividendsOrderNumber"` //分红订单号
  19 + DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号
  20 + OrderSalesman struct { //订单业务员
  21 + Department struct {
  22 + DepartmentID int `json:"departmentId"`
  23 + DepartmentName string `json:"departmentName"`
  24 + DepartmentNumber string `json:"departmentNumber"`
  25 + IsOrganization bool `json:"isOrganization"`
  26 + } `json:"department"`
  27 + Org struct {
  28 + OrgID int `json:"orgId"`
  29 + OrgName string `json:"orgName"`
  30 + } `json:"org"`
  31 + UserBaseID int `json:"userBaseId"`
  32 + UserID int `json:"userId"`
  33 + UserInfo struct {
  34 + UserAccount string `json:"userAccount"`
  35 + UserAvatar string `json:"userAvatar"`
  36 + UserEmail string `json:"userEmail"`
  37 + UserName string `json:"userName"`
  38 + UserPhone string `json:"userPhone"`
  39 + } `json:"userInfo"`
  40 + UserType int `json:"userType"`
  41 + } `json:"orderSalesman"`
  42 + OrderTime string `json:"orderTime"`
  43 + Org struct {
  44 + OrgID int `json:"orgId"`
  45 + OrgName string `json:"orgName"`
  46 + } `json:"org"`
  47 + Region struct {
  48 + RegionName string `json:"regionName"`
  49 + RegionNumber string `json:"regionNumber"`
  50 + }
  51 +}
  52 +
4 type ( 53 type (
  54 + //订单产品
  55 + DividendsOrderGoods struct {
  56 + CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
  57 + DividendsOrderNumber string `json:"dividendsOrderNumber"` //关联分红订单号
  58 + OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
  59 + OrderGoodExpense float64 `json:"orderGoodExpense"` //订单产品费用
  60 + OrderGoodName string `json:"orderGoodName"` //订单产品名称
  61 + OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价
  62 + OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
  63 + }
5 ReqDividendsOrderAdd struct { 64 ReqDividendsOrderAdd struct {
  65 + CompanyId int `json:"companyId"`
  66 + CustomerName string `json:"customerName"` //客户名称
  67 + DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额
  68 + DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号
  69 + DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号
  70 + OperatorUid int `json:"operatorUid"` //订单操作人id
  71 + OrderGoods []DividendsOrderGoods `json:"orderGoods"` //订单产品列表
  72 + OrderTime time.Time `json:"orderTime"` //订单产生时间
  73 + Remarks string `json:"remarks"` //备注
  74 + SalesmanUid string `json:"salesmanUid"` //订单业务员uid
  75 + UserId int `json:"userId"` //
  76 + RegionName string `json:"regionName"` //区域名称
6 } 77 }
7 78
8 DataDividendsOrderAdd struct { 79 DataDividendsOrderAdd struct {
9 - DividendsOrderId int 80 + DividendsOrder
10 } 81 }
11 ) 82 )
12 83
13 //更新分红订单 84 //更新分红订单
14 type ( 85 type (
15 ReqDividendsOrderUpdate struct { 86 ReqDividendsOrderUpdate struct {
16 - DividendsOrderId int 87 + DividendsOrderId int `json:"dividendsOrderId"`
  88 + CompanyId int `json:"companyId"`
  89 + CustomerName string `json:"customerName"` //客户名称
  90 + DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额
  91 + DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号
  92 + DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号
  93 + OperatorUid int `json:"operatorUid"` //订单操作人id
  94 + OrderGoods []DividendsOrderGoods `json:"orderGoods"` //订单产品列表
  95 + OrderTime time.Time `json:"orderTime"` //订单产生时间
  96 + Remarks string `json:"remarks"` //备注
  97 + SalesmanUid string `json:"salesmanUid"` //订单业务员uid
  98 + UserId int `json:"userId"` //
  99 + RegionName string `json:"regionName"` //区域名称
17 } 100 }
18 101
19 DataDividendsOrderUpdate struct { 102 DataDividendsOrderUpdate struct {
  103 + DividendsOrder
20 } 104 }
21 ) 105 )
22 106
23 //查询分红订单 107 //查询分红订单
24 type ( 108 type (
25 ReqDividendsOrderSearch struct { 109 ReqDividendsOrderSearch struct {
  110 + CompanyId int `json:"companyId"`
  111 + CustomerName string `json:"customerName"`
  112 + DividendsOrderNumber string `json:"dividendsOrderNumber"`
  113 + OrgIds []int `json:"orgIds"`
  114 + PageNumber int `json:"pageNumber"`
  115 + PageSize int `json:"pageSize"`
  116 + UserId int `json:"userId"`
26 } 117 }
27 118
28 DataDividendsOrderSearch struct { 119 DataDividendsOrderSearch struct {
  120 + Gride struct {
  121 + Total int `json:"total"`
  122 + List []DividendsOrder `json:"list"`
  123 + } `json:"gride"`
29 } 124 }
30 ) 125 )
31 126
@@ -60,9 +155,10 @@ type ( @@ -60,9 +155,10 @@ type (
60 //返回分红订单详情 155 //返回分红订单详情
61 type ( 156 type (
62 ReqDividendsOrderGet struct { 157 ReqDividendsOrderGet struct {
63 - DividendsOrderId int 158 + DividendsOrderId int `json:"dividendsOrderId"`
64 } 159 }
65 160
66 DataDividendsOrderGet struct { 161 DataDividendsOrderGet struct {
  162 + DividendsOrder
67 } 163 }
68 ) 164 )