作者 tangxuhui

更新

... ... @@ -203,7 +203,6 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
UndertakerTypesUncheckedAvailable: undertakerTypesUncheckedAvailable,
}
return &data
}
type CooperationContractUndertake struct {
... ...
... ... @@ -10,11 +10,8 @@ import (
//业绩分红 确定预算。。。
type EstimateDividendsIncentivesCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 分红订单号/退货单号
OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"`
// 合约编号
CooperationContractNumber string `json:"cooperationContractNumber" `
Operator domain.Operator `json:"-"`
OrderGoodIds []string `json:"orderGoodIds"`
}
func (estimateDividendsIncentivesCommand *EstimateDividendsIncentivesCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -11,9 +11,9 @@ type EstimateMoneyIncentivesCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 共创项目合约编号
CooperationContractNumber string `json:"cooperationContractNumber" valid:"Required"`
CooperationContractId string `json:"cooperationContractId" valid:"Required"`
// 承接人UID
UndertakerUid string `json:"undertakerUid,omitempty"`
UndertakerUids []string `json:"undertakerUids,omitempty"`
//分红阶段
DividendsIncentivesStage int `json:"dividendsIncentivesStage"`
}
... ...
... ... @@ -10,6 +10,7 @@ type MoneyIncentivesItem struct {
//业绩分红列表
type DividendsEstimateDividendItem struct {
OrderGoodId int `json:"orderGoodId,string"`
CooperationContractNumber string `json:"cooperationContractNumber"` //共创合约编号
CustomerName string `json:"customerName"` //客户名称
DividendsIncentivesAmount float64 `json:"dividendsIncentivesAmount"` //业绩激励分红金额
... ... @@ -23,6 +24,7 @@ func ToDividendsEstimateDividendItem(param *allied_creation_cooperation.DataDivi
var listdata []DividendsEstimateDividendItem
for _, v := range param.List {
item := DividendsEstimateDividendItem{
OrderGoodId: v.OrderGoodId,
CooperationContractNumber: v.CooperationContractNumber,
CustomerName: v.CustomerName,
DividendsIncentivesAmount: v.OrderAmount,
... ...
... ... @@ -29,8 +29,7 @@ func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncen
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
estimateDividendsIncentivesCommand.Operator)
_, err := creationCooperationGateway.DividendsEstimateDividendsIncentives(allied_creation_cooperation.ReqDividendsEstimateDividendsIncentives{
CooperationContractNumber: estimateDividendsIncentivesCommand.CooperationContractNumber,
OrderOrReturnedOrderNum: estimateDividendsIncentivesCommand.OrderOrReturnedOrderNum,
OrderGoodIds: estimateDividendsIncentivesCommand.OrderGoodIds,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ... @@ -42,15 +41,15 @@ func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncen
func (dividendsEstimateService *DividendsEstimateService) EstimateMoneyIncentives(estimateMoneyIncentivesCommand *command.EstimateMoneyIncentivesCommand) (interface{}, error) {
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
estimateMoneyIncentivesCommand.Operator)
result, err := creationCooperationGateway.DividendsEstimatesEstimateMoneys(allied_creation_cooperation.ReqDividendsEstimateMoneyIncentives{
CooperationContractNumber: estimateMoneyIncentivesCommand.CooperationContractNumber,
DividendsIncentivesStage: estimateMoneyIncentivesCommand.DividendsIncentivesStage,
UndertakerUid: estimateMoneyIncentivesCommand.UndertakerUid,
_, err := creationCooperationGateway.DividendsEstimatesEstimateMoneys(allied_creation_cooperation.ReqDividendsEstimateMoneyIncentives{
CooperationContractId: estimateMoneyIncentivesCommand.CooperationContractId,
DividendsIncentivesStage: estimateMoneyIncentivesCommand.DividendsIncentivesStage,
UndertakerUids: estimateMoneyIncentivesCommand.UndertakerUids,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
return result, nil
return estimateMoneyIncentivesCommand, nil
}
// 查询分红预算单列表
... ...
... ... @@ -15,7 +15,7 @@ type (
Total int `json:"total"`
List []struct {
// 分红订单产品ID
OrderGoodId int64 `json:"orderGoodId,string"`
OrderGoodId int `json:"orderGoodId,string"`
// 共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 分红订单号或退货单号、
... ... @@ -29,7 +29,7 @@ type (
// 订单金额
OrderAmount float64 `json:"orderAmount"`
// 订单/退货单日期
OrderDate time.Time `json:"-"` //TODO 等待数据调整
OrderDate time.Time `json:"orderData"`
} `json:"list"`
}
)
... ... @@ -125,13 +125,15 @@ type (
//确定预算金额激励分红
type (
ReqDividendsEstimateMoneyIncentives struct {
//合约编码
CooperationContractNumber string `json:"cooperationContractNumber"`
DividendsIncentivesStage int `json:"dividendsIncentivesStage"`
UndertakerUid string `json:"undertakerUid"`
// 共创合约ID
CooperationContractId string `json:"cooperationContractId"` //cname:"共创合约ID"
// 分红阶段
DividendsIncentivesStage int `json:"dividendsIncentivesStage"` //cname:"分红阶段"
// 承接人UID
UndertakerUids []string `json:"undertakerUids"` //cname:"承接人UID列表"
}
DataDividendsEstimateMoneyIncentives struct {
DataDividendsEstimateMoneyIncentives []struct {
}
)
... ... @@ -184,10 +186,9 @@ type (
//确定业绩分红激励
type (
ReqDividendsEstimateDividendsIncentives struct {
CooperationContractNumber string `json:"cooperationContractNumber"`
OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"`
OrderGoodIds []string `json:"orderGoodIds"`
}
DataDividendsEstimateDividendsIncentives struct {
DataDividendsEstimateDividendsIncentives []struct {
}
)
... ...