作者 tangxuhui

数据格式调整

... ... @@ -2,13 +2,14 @@ package service
import (
"fmt"
"math/rand"
"time"
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
"math/rand"
"time"
)
// 企业端统计 【25%】
... ... @@ -48,6 +49,10 @@ func (srv CompanyStatisticsService) IndexStatistics(cmd *command.IndexStatistics
models, err := gateway.CooperationModeList(allied_creation_cooperation.ReqCooperationModeList{
PageSize: 20,
PageNumber: 1,
CompanyId: cmd.Operator.CompanyId,
OrgId: cmd.Operator.OrgId,
UserId: cmd.Operator.UserId,
UserBaseId: cmd.Operator.UserBaseId,
})
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
... ... @@ -219,6 +219,7 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC
SponsorName: queryParam.ContractSponsor,
PageNumber: queryParam.PageNumber,
PageIndex: queryParam.PageSize,
CompanyId: queryParam.Operator.CompanyId,
})
data := []dto.CooperationContractUndertake{{}}
return 10, data, err
... ...
... ... @@ -71,6 +71,10 @@ func (cooperationModeService *CooperationModeService) ListCooperationMode(listCo
PageSize: listCooperationModeQuery.PageSize,
CooperationModeName: listCooperationModeQuery.CooperationModeName,
OrganizationName: listCooperationModeQuery.OrganizationName,
CompanyId: listCooperationModeQuery.Operator.CompanyId,
UserId: 0,
OrgId: 0,
UserBaseId: 0,
})
if err != nil {
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -19,9 +19,9 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
if err := createDividendsOrderCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
orderGoods := []allied_creation_cooperation.DividendsOrderGoods{}
orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{}
for _, v := range createDividendsOrderCommand.OrderGoods {
good := allied_creation_cooperation.DividendsOrderGoods{
good := allied_creation_cooperation.DividendsOrderGoodAdd{
CooperationContractNumber: v.CooperationContractNumber,
DividendsOrderNumber: v.DividendsOrderNumber,
OrderGoodAmount: v.OrderGoodAmount,
... ...
... ... @@ -12,7 +12,7 @@ type CooperationContract struct {
CooperationContractName string `json:"cooperationContractName"` // 共创合约名称
CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号
CooperationProjectNumber string `json:"cooperationProjectNumber"`
CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开
CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerTypes"` // 共创合约承接对象,1员工,2共创用户,3公开
Department struct {
DepartmentId int `json:"departmentId,string"`
DepartmentName string `json:"departmentName"`
... ... @@ -235,6 +235,9 @@ type (
SponsorName string `json:"sponsorName"` //项目发起人姓名
PageNumber int `json:"pageNumber"`
PageIndex int `json:"pageIndex"`
CompanyId int64 ` json:"companyId"`
OrgId int64 ` json:"orgId"`
UserBaseId int64 `json:"userBaseId"`
}
DataCooperationContractSearchByUndertaker struct {
... ...
... ... @@ -42,6 +42,10 @@ type (
ReqCooperationModeList struct {
PageSize int `json:"pageSize"`
PageNumber int `json:"pageNumber"`
CompanyId int64 `json:"companyId"`
OrgId int64 `json:"orgId"`
UserId int64 `json:"userId"`
UserBaseId int64 `json:"userBaseId"`
}
DataCooperationModeList struct {
... ... @@ -155,6 +159,10 @@ type (
CooperationModeName string `json:"cooperationModeName"`
//组织名称
OrganizationName string `json:"organizationName"`
CompanyId int64 `json:"companyId"`
OrgId int64 `json:"orgId"`
UserId int64 `json:"userId"`
UserBaseId int64 `json:"userBaseId"`
}
DataCooperationModesSearch struct {
... ...
... ... @@ -53,9 +53,7 @@ type DividendsOrder struct {
Returned bool `json:"returned"` //是否有退货记录,true:有退货记录,false:无退货记录
}
type (
//订单产品
DividendsOrderGoods struct {
type DividendsOrderGoods struct {
// 订单产品
OrderGoodId int64 `json:"orderGoodId,string"`
CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
... ... @@ -66,13 +64,28 @@ type (
OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价
OrderGoodQuantity int `json:"orderGoodQuantity,string"` //订单产品数量
OrderGoodDividendsStatus int32 `json:"orderGoodDividendsStatus"` // 订单产品分红状态, 1待分红,2已分红
}
type (
DividendsOrderGoodAdd struct {
// 订单产品
OrderGoodId int64 `json:"orderGoodId,string"`
CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
DividendsOrderNumber string `json:"dividendsOrderNumber"` //关联分红订单号
OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
OrderGoodExpense float64 `json:"orderGoodExpense"` //订单产品费用
OrderGoodName string `json:"orderGoodName"` //订单产品名称
OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价
OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
OrderGoodDividendsStatus int32 `json:"orderGoodDividendsStatus"` // 订单产品分红状态, 1待分红,2已分红
}
//订单产品
ReqDividendsOrderAdd struct {
CompanyId int `json:"companyId,string"`
CustomerName string `json:"customerName"` //客户名称
DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号
OperatorUid int `json:"operatorUid,string"` //订单操作人id
OrderGoods []DividendsOrderGoods `json:"orderGoods"` //订单产品列表
OrderGoods []DividendsOrderGoodAdd `json:"orderGoods"` //订单产品列表
OrderTime string `json:"orderTime"` //订单日期,13位长度字符串类型时间戳
Remarks string `json:"remarks"` //备注
UserId int `json:"userId,string"` //
... ...