...
|
...
|
@@ -752,29 +752,30 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent |
|
|
countDividendsEstimate = countDividendsEstimate + 1
|
|
|
|
|
|
dividendsEstimate = &domain.DividendsEstimate{
|
|
|
DividendsEstimateId: 0,
|
|
|
DividendsAccountStatus: domain.TO_BE_ACCOUNT,
|
|
|
DividendsAmount: dividendsEstimateDetail.DividendsAmount,
|
|
|
DividendsEstimateOrderNumber: dividendsEstimateOrderNumber,
|
|
|
DividendsEstimateTime: time.Now(),
|
|
|
DividendsParticipateType: dividendsEstimateDetail.DividendsParticipateType,
|
|
|
DividendsType: domain.ORDER_DIVIDENDS,
|
|
|
DividendsTypeName: "订单分红",
|
|
|
OrderOrReturnedOrderNum: orderGood.DividendsOrderNumber,
|
|
|
CooperationContractNumber: orderGood.CooperationContractNumber,
|
|
|
DividendsUser: dividendsEstimateDetail.DividendsUser,
|
|
|
DividendsStage: dividendsEstimateDetail.DividendsStage,
|
|
|
Org: organization,
|
|
|
Company: company,
|
|
|
Operator: operator,
|
|
|
OperateTime: time.Time{},
|
|
|
IsCanceled: false,
|
|
|
CreatedAt: time.Now(),
|
|
|
DeletedAt: time.Time{},
|
|
|
UpdatedAt: time.Time{},
|
|
|
OrderGoodId: orderGood.OrderGoodId,
|
|
|
OrderGoodAmount: orderGood.OrderGoodAmount,
|
|
|
PaymentStatus: int32(1),
|
|
|
DividendsEstimateId: 0,
|
|
|
DividendsAccountStatus: domain.TO_BE_ACCOUNT,
|
|
|
DividendsAmount: dividendsEstimateDetail.DividendsAmount,
|
|
|
DividendsEstimateOrderNumber: dividendsEstimateOrderNumber,
|
|
|
DividendsEstimateTime: time.Now(),
|
|
|
DividendsParticipateType: dividendsEstimateDetail.DividendsParticipateType,
|
|
|
DividendsType: domain.ORDER_DIVIDENDS,
|
|
|
DividendsTypeName: "订单分红",
|
|
|
OrderOrReturnedOrderNum: orderGood.DividendsOrderNumber,
|
|
|
CooperationContractNumber: orderGood.CooperationContractNumber,
|
|
|
DividendsUser: dividendsEstimateDetail.DividendsUser,
|
|
|
DividendsStage: dividendsEstimateDetail.DividendsStage,
|
|
|
Org: organization,
|
|
|
Company: company,
|
|
|
Operator: operator,
|
|
|
OperateTime: time.Time{},
|
|
|
IsCanceled: false,
|
|
|
CreatedAt: time.Now(),
|
|
|
DeletedAt: time.Time{},
|
|
|
UpdatedAt: time.Time{},
|
|
|
OrderGoodId: orderGood.OrderGoodId,
|
|
|
OrderGoodAmount: orderGood.OrderGoodAmount,
|
|
|
PaymentStatus: int32(1),
|
|
|
CooperationContractUndertakerId: dividendsEstimateDetail.CooperationContractUndertakerId,
|
|
|
}
|
|
|
|
|
|
dividendsEstimates = append(dividendsEstimates, dividendsEstimate)
|
...
|
...
|
@@ -806,29 +807,30 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent |
|
|
countDividendsEstimate = countDividendsEstimate + 1
|
|
|
|
|
|
dividendsEstimate = &domain.DividendsEstimate{
|
|
|
DividendsEstimateId: 0,
|
|
|
DividendsAccountStatus: domain.TO_BE_ACCOUNT,
|
|
|
DividendsAmount: dividendsReturnedEstimateDetail.DividendsAmount,
|
|
|
DividendsEstimateOrderNumber: dividendsEstimateOrderNumber,
|
|
|
DividendsEstimateTime: time.Now(),
|
|
|
DividendsParticipateType: dividendsReturnedEstimateDetail.DividendsParticipateType,
|
|
|
DividendsType: domain.RETURN_WRITE_OFF,
|
|
|
DividendsTypeName: "退货冲销",
|
|
|
OrderOrReturnedOrderNum: orderGood.DividendsReturnedOrderNumber,
|
|
|
CooperationContractNumber: orderGood.CooperationContractNumber,
|
|
|
DividendsUser: dividendsReturnedEstimateDetail.DividendsUser,
|
|
|
DividendsStage: dividendsReturnedEstimateDetail.DividendsStage,
|
|
|
Org: organization,
|
|
|
Company: company,
|
|
|
Operator: operator,
|
|
|
OperateTime: time.Time{},
|
|
|
IsCanceled: false,
|
|
|
CreatedAt: time.Now(),
|
|
|
DeletedAt: time.Time{},
|
|
|
UpdatedAt: time.Time{},
|
|
|
OrderGoodId: orderGood.OrderGoodId,
|
|
|
OrderGoodAmount: orderGood.OrderGoodAmount,
|
|
|
PaymentStatus: int32(1),
|
|
|
DividendsEstimateId: 0,
|
|
|
DividendsAccountStatus: domain.TO_BE_ACCOUNT,
|
|
|
DividendsAmount: dividendsReturnedEstimateDetail.DividendsAmount,
|
|
|
DividendsEstimateOrderNumber: dividendsEstimateOrderNumber,
|
|
|
DividendsEstimateTime: time.Now(),
|
|
|
DividendsParticipateType: dividendsReturnedEstimateDetail.DividendsParticipateType,
|
|
|
DividendsType: domain.RETURN_WRITE_OFF,
|
|
|
DividendsTypeName: "退货冲销",
|
|
|
OrderOrReturnedOrderNum: orderGood.DividendsReturnedOrderNumber,
|
|
|
CooperationContractNumber: orderGood.CooperationContractNumber,
|
|
|
DividendsUser: dividendsReturnedEstimateDetail.DividendsUser,
|
|
|
DividendsStage: dividendsReturnedEstimateDetail.DividendsStage,
|
|
|
Org: organization,
|
|
|
Company: company,
|
|
|
Operator: operator,
|
|
|
OperateTime: time.Time{},
|
|
|
IsCanceled: false,
|
|
|
CreatedAt: time.Now(),
|
|
|
DeletedAt: time.Time{},
|
|
|
UpdatedAt: time.Time{},
|
|
|
OrderGoodId: orderGood.OrderGoodId,
|
|
|
OrderGoodAmount: orderGood.OrderGoodAmount,
|
|
|
PaymentStatus: int32(1),
|
|
|
CooperationContractUndertakerId: dividendsReturnedEstimateDetail.CooperationContractUndertakerId,
|
|
|
}
|
|
|
|
|
|
dividendsEstimates = append(dividendsEstimates, dividendsEstimate)
|
...
|
...
|
@@ -1148,27 +1150,28 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmMoneyIncentives |
|
|
dividendsAmount, _ := decimal.NewFromFloatWithExponent(dividendsEstimateDetail.DividendsAmount, -2).Float64()
|
|
|
|
|
|
dividendsEstimate := &domain.DividendsEstimate{
|
|
|
DividendsEstimateId: 0,
|
|
|
DividendsAccountStatus: domain.TO_BE_ACCOUNT,
|
|
|
DividendsAmount: dividendsAmount,
|
|
|
DividendsEstimateOrderNumber: dividendsEstimateOrderNumber,
|
|
|
DividendsEstimateTime: time.Now(),
|
|
|
DividendsParticipateType: dividendsEstimateDetail.DividendsParticipateType,
|
|
|
DividendsType: domain.MONEY_INCENTIVES,
|
|
|
DividendsTypeName: "金额激励",
|
|
|
OrderOrReturnedOrderNum: "",
|
|
|
CooperationContractNumber: cooperationContract.CooperationContractNumber,
|
|
|
DividendsUser: dividendsEstimateDetail.DividendsUser,
|
|
|
DividendsStage: dividendsEstimateDetail.DividendsStage,
|
|
|
Org: organization,
|
|
|
Company: company,
|
|
|
Operator: nil,
|
|
|
OperateTime: time.Time{},
|
|
|
IsCanceled: false,
|
|
|
CreatedAt: time.Now(),
|
|
|
DeletedAt: time.Time{},
|
|
|
UpdatedAt: time.Time{},
|
|
|
PaymentStatus: int32(1),
|
|
|
DividendsEstimateId: 0,
|
|
|
DividendsAccountStatus: domain.TO_BE_ACCOUNT,
|
|
|
DividendsAmount: dividendsAmount,
|
|
|
DividendsEstimateOrderNumber: dividendsEstimateOrderNumber,
|
|
|
DividendsEstimateTime: time.Now(),
|
|
|
DividendsParticipateType: dividendsEstimateDetail.DividendsParticipateType,
|
|
|
DividendsType: domain.MONEY_INCENTIVES,
|
|
|
DividendsTypeName: "金额激励",
|
|
|
OrderOrReturnedOrderNum: "",
|
|
|
CooperationContractNumber: cooperationContract.CooperationContractNumber,
|
|
|
DividendsUser: dividendsEstimateDetail.DividendsUser,
|
|
|
DividendsStage: dividendsEstimateDetail.DividendsStage,
|
|
|
Org: organization,
|
|
|
Company: company,
|
|
|
Operator: nil,
|
|
|
OperateTime: time.Time{},
|
|
|
IsCanceled: false,
|
|
|
CreatedAt: time.Now(),
|
|
|
DeletedAt: time.Time{},
|
|
|
UpdatedAt: time.Time{},
|
|
|
PaymentStatus: int32(1),
|
|
|
CooperationContractUndertakerId: dividendsEstimateDetail.CooperationContractUndertakerId,
|
|
|
}
|
|
|
|
|
|
dividendsEstimates = append(dividendsEstimates, dividendsEstimate)
|
...
|
...
|
|