作者 陈志颖

feat:完成业绩分红预算领域服务

... ... @@ -12,6 +12,7 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/factory"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/dao"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/utils"
"strconv"
"time"
... ... @@ -355,7 +356,7 @@ func (dividendsEstimateService *DividendsEstimateService) CreateDividendsEstimat
}
}
// ConfirmDividendsIncentivesEstimate TODO 确定业绩激励分红预算
// ConfirmDividendsIncentivesEstimate 确定业绩激励分红预算
func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncentivesEstimate(confirmDividendsIncentivesEstimateCommand *command.ConfirmDividendsIncentivesEstimateCommand) (interface{}, error) {
if err := confirmDividendsIncentivesEstimateCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ... @@ -370,6 +371,47 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
defer func() {
_ = transactionContext.RollbackTransaction()
}()
// 用户REST服务初始化
//var userService service.UserService
//if value, err := factory.CreateUserService(map[string]interface{}{}); err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
//} else {
// userService = value
//}
// 公司REST服务初始化
var companyService service.CompanyService
if value, err := factory.CreateCompanyService(map[string]interface{}{}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
companyService = value
}
// 获取公司信息
var company *domain.Company
if data, err := companyService.CompanyFrom(confirmDividendsIncentivesEstimateCommand.CompanyId); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
company = data
}
// 组织机构REST服务初始化
var organizationService service.OrgService
if value, err := factory.CreateOrganizationService(map[string]interface{}{}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
organizationService = value
}
// 获取组织机构信息
var organization *domain.Org
if data, err := organizationService.OrgFrom(confirmDividendsIncentivesEstimateCommand.CompanyId, confirmDividendsIncentivesEstimateCommand.OrgId); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
organization = data
}
// 分红订单仓储初始化
var dividendsOrderRepository domain.DividendsOrderRepository
if value, err := factory.CreateDividendsOrderRepository(map[string]interface{}{
... ... @@ -410,6 +452,16 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
dividendsEstimateRepository = value
}
// 分红预算单DAO初始化
var dividendsEstimateDao *dao.DividendsEstimateDao
if value, err := factory.CreateDividendsEstimateDao(map[string]interface{}{
"transactionContext": transactionContext,
}); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
} else {
dividendsEstimateDao = value
}
// 初始化确认业绩激励分红预算领域服务
var confirmDividendsIncentivesEstimateService service.ConfirmDividendsIncentivesEstimateService
if value, err := factory.CreateConfirmDividendsIncentivesEstimateService(map[string]interface{}{
... ... @@ -439,29 +491,38 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", orderGood.DividendsOrderNumber))
}
// 分红订单产品预算
if dividendsAmount, err := confirmDividendsIncentivesEstimateService.Confirm(orderGoods); err != nil {
if dividendsEstimateDetails, err := confirmDividendsIncentivesEstimateService.Confirm(orderGoods); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
dividendsEstimate = &domain.DividendsEstimate{
DividendsEstimateId: 0,
DividendsAccountStatus: 1,
DividendsAmount: dividendsAmount,
DividendsEstimateOrderNumber: "",
DividendsEstimateTime: time.Time{},
DividendsParticipateType: 0,
DividendsType: 0,
OrderOrReturnedOrderNum: "",
CooperationContractNumber: "",
DividendsUser: nil,
DividendsStage: 0,
Org: nil,
Company: nil,
Operator: nil,
OperateTime: time.Time{},
IsCanceled: false,
CreatedAt: time.Time{},
DeletedAt: time.Time{},
UpdatedAt: time.Time{},
for _, dividendsEstimateDetail := range dividendsEstimateDetails {
// 生成分红预算单号
dividendsEstimateOrderNumber, err := dividendsEstimateDao.GenerateDividendsEstimateNumber()
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
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: nil,
OperateTime: time.Time{},
IsCanceled: false,
CreatedAt: time.Now(),
DeletedAt: time.Time{},
UpdatedAt: time.Time{},
}
dividendsEstimates = append(dividendsEstimates, dividendsEstimate)
}
}
} else if orderGood.DividendsReturnedOrderNumber != "" { // 查询分红退货单
... ... @@ -473,33 +534,41 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", orderGood.DividendsReturnedOrderNumber))
}
// 分红退货单产品预算
if dividendsAmount, err := confirmDividendsIncentivesEstimateService.Confirm(orderGoods); err != nil {
if dividendsReturnedEstimateDetails, err := confirmDividendsIncentivesEstimateService.Confirm(orderGoods); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
dividendsEstimate = &domain.DividendsEstimate{
DividendsEstimateId: 0,
DividendsAccountStatus: 0,
DividendsAmount: dividendsAmount,
DividendsEstimateOrderNumber: "",
DividendsEstimateTime: time.Time{},
DividendsParticipateType: 0,
DividendsType: 0,
OrderOrReturnedOrderNum: "",
CooperationContractNumber: "",
DividendsUser: nil,
DividendsStage: 0,
Org: nil,
Company: nil,
Operator: nil,
OperateTime: time.Now(),
IsCanceled: false,
CreatedAt: time.Now(),
DeletedAt: time.Time{},
UpdatedAt: time.Time{},
for _, dividendsReturnedEstimateDetail := range dividendsReturnedEstimateDetails {
// 生成分红预算单号
dividendsEstimateOrderNumber, err := dividendsEstimateDao.GenerateDividendsEstimateNumber()
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
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: nil,
OperateTime: time.Now(),
IsCanceled: false,
CreatedAt: time.Now(),
DeletedAt: time.Time{},
UpdatedAt: time.Time{},
}
dividendsEstimates = append(dividendsEstimates, dividendsEstimate)
}
}
}
dividendsEstimates = append(dividendsEstimates, dividendsEstimate)
}
var dividendsEstimatesSaved []*domain.DividendsEstimate
for _, dividendsEstimate := range dividendsEstimates {
... ...
... ... @@ -52,3 +52,11 @@ func CreateCreditAccountDao(options map[string]interface{}) (*dao.CreditAccountD
}
return dao.NewCreditAccountDao(transactionContext)
}
func CreateDividendsEstimateDao(options map[string]interface{}) (*dao.DividendsEstimateDao, error) {
var transactionContext *pg.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pg.TransactionContext)
}
return dao.NewDividendsEstimateDao(transactionContext)
}
... ...
... ... @@ -14,11 +14,16 @@ const (
MONEY_INCENTIVES // 金额激励
)
const (
TO_BE_ACCOUNT = iota + 1 // 待结算
ACCOUNTED // 已结算
)
// DividendsEstimate 分红预算实体
type DividendsEstimate struct {
// 承接人分红预算记录ID
DividendsEstimateId int64 `json:"dividendsEstimateId,string"`
// 分红结算状态
// 分红结算状态,1待结算,2已结算
DividendsAccountStatus int32 `json:"dividendsAccountStatus"`
// 分红金额
DividendsAmount float64 `json:"dividendsAmount"`
... ... @@ -30,6 +35,8 @@ type DividendsEstimate struct {
DividendsParticipateType int32 `json:"dividendsParticipateType"`
// 分红类型,1订单分红,2退货冲销,3金额激励
DividendsType int32 `json:"dividendsType"`
// 分红类型名称
DividendsTypeName string `json:"dividendsTypeName"`
// 分红订单号或退货单号
OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"`
// 共创项目合约编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001
... ...
... ... @@ -5,7 +5,14 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
)
type DividendsEstimateDetail struct {
DividendsUser *domain.User `json:"dividendsUser"` // 共创参与(分红用户)
DividendsParticipateType int32 `json:"dividendsParticipateType"` // 参与类型
DividendsStage int32 `json:"dividendsStage"` // 分红阶段
DividendsAmount float64 `json:"dividendsAmount"` // 分红金额
}
type ConfirmDividendsIncentivesEstimateService interface {
coreDomain.DomainEventPublisher
Confirm(orderGoods []*domain.OrderGood) (float64, error)
Confirm(orderGoods []*domain.OrderGood) ([]*DividendsEstimateDetail, error)
}
... ...
... ... @@ -2,9 +2,12 @@ package domain_service
import (
"fmt"
"github.com/linmadan/egglib-go/core/application"
coreDomain "github.com/linmadan/egglib-go/core/domain"
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/repository"
)
type ConfirmDividendsIncentivesEstimateService struct {
... ... @@ -12,9 +15,215 @@ type ConfirmDividendsIncentivesEstimateService struct {
transactionContext *pgTransaction.TransactionContext
}
// Confirm TODO 确认业绩分红预算
func (c ConfirmDividendsIncentivesEstimateService) Confirm(orderGoods []*domain.OrderGood) (float64, error) {
panic("implement me")
// Confirm 确认业绩分红预算
func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoods []*domain.OrderGood) ([]*service.DividendsEstimateDetail, error) {
var cooperationContractRepository domain.CooperationContractRepository // 共创合约仓储
var dividendsOrderRepository domain.DividendsOrderRepository // 分红订单仓储
var dividendsReturnedOrderRepository domain.DividendsReturnedOrderRepository // 分红退货单仓储
// 共创合约仓储初始化
if repo, err := repository.NewCooperationContractRepository(domainService.transactionContext); err != nil {
return nil, err
} else {
cooperationContractRepository = repo
}
// 分红订单仓储初始化
if repo, err := repository.NewDividendsOrderRepository(domainService.transactionContext); err != nil {
return nil, err
} else {
dividendsOrderRepository = repo
}
// 分红退后单仓储初始化
if repo, err := repository.NewDividendsReturnedOrderRepository(domainService.transactionContext); err != nil {
return nil, err
} else {
dividendsReturnedOrderRepository = repo
}
var dividendsEstimateDetails []*service.DividendsEstimateDetail
for _, orderGood := range orderGoods {
// 获取合约
cooperationContract, err := cooperationContractRepository.FindOne(map[string]interface{}{"cooperationContractNumber": orderGood.CooperationContractNumber})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if cooperationContract == nil {
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", orderGood.CooperationContractNumber))
}
if orderGood.DividendsOrderNumber != "" {
// 获取分红订单
dividendsOrder, err2 := dividendsOrderRepository.FindOne(map[string]interface{}{
"dividendsOrderNumber": orderGood.DividendsOrderNumber,
})
if err2 != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if dividendsOrder == nil {
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", orderGood.DividendsOrderNumber))
}
// 匹配分红规则
var dividendsIncentivesRuleMatched *domain.DividendsIncentivesRule
for _, dividendsIncentivesRule := range cooperationContract.DividendsIncentivesRules {
if dividendsOrder.OrderTime.After(dividendsIncentivesRule.DividendsIncentivesStageStart) && dividendsOrder.OrderTime.Before(dividendsIncentivesRule.DividendsIncentivesStageEnd) {
dividendsIncentivesRuleMatched = dividendsIncentivesRule
break
}
}
// 计算分红
for _, undertaker := range cooperationContract.Undertakers {
// 添加承接人分红预算信息详情
undertakerDividendsAmount := (orderGood.OrderGoodAmount - orderGood.OrderGoodExpense) * dividendsIncentivesRuleMatched.DividendsIncentivesPercentage
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
DividendsUser: &domain.User{
UserId: undertaker.UserId,
UserBaseId: undertaker.UserBaseId,
Org: undertaker.Org,
Orgs: undertaker.Orgs,
Department: undertaker.Department,
Roles: undertaker.Roles,
UserInfo: undertaker.UserInfo,
UserType: undertaker.UserType,
UserName: undertaker.UserName,
UserPhone: undertaker.UserPhone,
Status: undertaker.Status,
Company: undertaker.Company,
},
DividendsParticipateType: domain.UNDERTAKER,
DividendsStage: int32(dividendsIncentivesRuleMatched.DividendsIncentivesStage),
DividendsAmount: undertakerDividendsAmount,
})
// 添加推荐人分红预算信息详情
if undertaker.Referrer != nil {
referrerDividendsAmount := (orderGood.OrderGoodAmount - orderGood.OrderGoodExpense) * dividendsIncentivesRuleMatched.ReferrerPercentage
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
DividendsUser: &domain.User{
UserId: undertaker.Referrer.UserId,
UserBaseId: undertaker.Referrer.UserBaseId,
Org: undertaker.Referrer.Org,
Orgs: undertaker.Referrer.Orgs,
Department: undertaker.Referrer.Department,
Roles: undertaker.Referrer.Roles,
UserInfo: undertaker.Referrer.UserInfo,
UserType: undertaker.Referrer.UserType,
UserName: undertaker.Referrer.UserName,
UserPhone: undertaker.Referrer.UserPhone,
Company: undertaker.Referrer.Company,
},
DividendsParticipateType: domain.REFERRER,
DividendsStage: int32(dividendsIncentivesRuleMatched.DividendsIncentivesStage),
DividendsAmount: referrerDividendsAmount,
})
}
// 添加关联业务员分红预算信息详情
if undertaker.Salesman != nil {
salesmanDividendsAmount := (orderGood.OrderGoodAmount - orderGood.OrderGoodExpense) * dividendsIncentivesRuleMatched.SalesmanPercentage
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
DividendsUser: &domain.User{
UserId: undertaker.Salesman.UserId,
UserBaseId: undertaker.Salesman.UserBaseId,
Org: undertaker.Salesman.Org,
Orgs: undertaker.Salesman.Orgs,
Department: undertaker.Salesman.Department,
Roles: undertaker.Salesman.Roles,
UserInfo: undertaker.Salesman.UserInfo,
UserType: undertaker.Salesman.UserType,
UserName: undertaker.Salesman.UserName,
UserPhone: undertaker.Salesman.UserPhone,
Company: undertaker.Salesman.Company,
},
DividendsParticipateType: domain.SALESMAN,
DividendsStage: int32(dividendsIncentivesRuleMatched.DividendsIncentivesStage),
DividendsAmount: salesmanDividendsAmount,
})
}
}
} else if orderGood.DividendsReturnedOrderNumber != "" { // 获取分红退货单
dividendsReturnedOrder, err3 := dividendsReturnedOrderRepository.FindOne(map[string]interface{}{
"dividendsReturnedOrderNumber": orderGood.DividendsReturnedOrderNumber,
})
if err3 != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if dividendsReturnedOrder == nil {
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", orderGood.DividendsReturnedOrderNumber))
}
// 匹配分红规则
var dividendsIncentivesRuleMatched *domain.DividendsIncentivesRule
for _, dividendsIncentivesRule := range cooperationContract.DividendsIncentivesRules {
if dividendsReturnedOrder.OrderTime.After(dividendsIncentivesRule.DividendsIncentivesStageStart) && dividendsReturnedOrder.OrderTime.Before(dividendsIncentivesRule.DividendsIncentivesStageEnd) {
dividendsIncentivesRuleMatched = dividendsIncentivesRule
break
}
}
// 计算分红
for _, undertaker := range cooperationContract.Undertakers {
// 添加承接人分红退货预算信息详情
undertakerDividendsAmount := -orderGood.OrderGoodAmount * dividendsIncentivesRuleMatched.DividendsIncentivesPercentage
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
DividendsUser: &domain.User{
UserId: undertaker.UserId,
UserBaseId: undertaker.UserBaseId,
Org: undertaker.Org,
Orgs: undertaker.Orgs,
Department: undertaker.Department,
Roles: undertaker.Roles,
UserInfo: undertaker.UserInfo,
UserType: undertaker.UserType,
UserName: undertaker.UserName,
UserPhone: undertaker.UserPhone,
Status: undertaker.Status,
Company: undertaker.Company,
},
DividendsParticipateType: domain.UNDERTAKER,
DividendsStage: int32(dividendsIncentivesRuleMatched.DividendsIncentivesStage),
DividendsAmount: undertakerDividendsAmount,
})
// 添加推荐人分红退货预算信息详情
if undertaker.Referrer != nil {
referrerDividendsAmount := -orderGood.OrderGoodAmount * dividendsIncentivesRuleMatched.ReferrerPercentage
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
DividendsUser: &domain.User{
UserId: undertaker.Referrer.UserId,
UserBaseId: undertaker.Referrer.UserBaseId,
Org: undertaker.Referrer.Org,
Orgs: undertaker.Referrer.Orgs,
Department: undertaker.Referrer.Department,
Roles: undertaker.Referrer.Roles,
UserInfo: undertaker.Referrer.UserInfo,
UserType: undertaker.Referrer.UserType,
UserName: undertaker.Referrer.UserName,
UserPhone: undertaker.Referrer.UserPhone,
Company: undertaker.Referrer.Company,
},
DividendsParticipateType: domain.REFERRER,
DividendsStage: int32(dividendsIncentivesRuleMatched.DividendsIncentivesStage),
DividendsAmount: referrerDividendsAmount,
})
}
// 添加关联业务员分红退货预算信息详情
if undertaker.Salesman != nil {
salesmanDividendsAmount := -orderGood.OrderGoodAmount * dividendsIncentivesRuleMatched.SalesmanPercentage
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
DividendsUser: &domain.User{
UserId: undertaker.Salesman.UserId,
UserBaseId: undertaker.Salesman.UserBaseId,
Org: undertaker.Salesman.Org,
Orgs: undertaker.Salesman.Orgs,
Department: undertaker.Salesman.Department,
Roles: undertaker.Salesman.Roles,
UserInfo: undertaker.Salesman.UserInfo,
UserType: undertaker.Salesman.UserType,
UserName: undertaker.Salesman.UserName,
UserPhone: undertaker.Salesman.UserPhone,
Company: undertaker.Salesman.Company,
},
DividendsParticipateType: domain.SALESMAN,
DividendsStage: int32(dividendsIncentivesRuleMatched.DividendsIncentivesStage),
DividendsAmount: salesmanDividendsAmount,
})
}
}
}
}
return dividendsEstimateDetails, nil
}
func NewConfirmDividendsIncentivesEstimateService(transactionContext *pgTransaction.TransactionContext) (*ConfirmDividendsIncentivesEstimateService, error) {
... ...
... ... @@ -21,6 +21,8 @@ type DividendsEstimate struct {
DividendsParticipateType int32 `comment:"参与分红类型,1承接人,2推荐人,3关联业务员"`
// 分红类型,1订单分红,2退货冲销,3金额激励
DividendsType int32 `comment:"分红类型,1订单分红,2退货冲销,3金额激励"`
// 分红类型名称
DividendsTypeName string `comment:"分红类型名称"`
// 分红订单号或退货单号
OrderOrReturnedOrderNum string `comment:"分红订单号或退货单号"`
// 共创项目合约编号
... ...
... ... @@ -14,6 +14,7 @@ func TransformToDividendsEstimateDomainModelFromPgModels(dividendsEstimateModel
DividendsEstimateTime: dividendsEstimateModel.DividendsEstimateTime,
DividendsParticipateType: dividendsEstimateModel.DividendsParticipateType,
DividendsType: dividendsEstimateModel.DividendsType,
DividendsTypeName: dividendsEstimateModel.DividendsTypeName,
OrderOrReturnedOrderNum: dividendsEstimateModel.OrderOrReturnedOrderNum,
CooperationContractNumber: dividendsEstimateModel.CooperationContractNumber,
DividendsUser: dividendsEstimateModel.DividendsUser,
... ...
... ... @@ -35,6 +35,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
"dividends_estimate_time",
"dividends_participate_type",
"dividends_type",
"dividends_type_name",
"order_or_returned_order_num",
"cooperation_contract_number",
"dividends_user",
... ... @@ -70,6 +71,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
&dividendsEstimate.DividendsEstimateTime,
&dividendsEstimate.DividendsParticipateType,
&dividendsEstimate.DividendsType,
&dividendsEstimate.DividendsTypeName,
&dividendsEstimate.OrderOrReturnedOrderNum,
&dividendsEstimate.CooperationContractNumber,
&dividendsEstimate.DividendsUser,
... ... @@ -91,6 +93,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
dividendsEstimate.DividendsEstimateTime,
dividendsEstimate.DividendsParticipateType,
dividendsEstimate.DividendsType,
dividendsEstimate.DividendsTypeName,
dividendsEstimate.OrderOrReturnedOrderNum,
dividendsEstimate.CooperationContractNumber,
dividendsEstimate.DividendsUser,
... ... @@ -116,6 +119,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
&dividendsEstimate.DividendsEstimateTime,
&dividendsEstimate.DividendsParticipateType,
&dividendsEstimate.DividendsType,
&dividendsEstimate.DividendsTypeName,
&dividendsEstimate.OrderOrReturnedOrderNum,
&dividendsEstimate.CooperationContractNumber,
&dividendsEstimate.DividendsUser,
... ... @@ -137,6 +141,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
dividendsEstimate.DividendsEstimateTime,
dividendsEstimate.DividendsParticipateType,
dividendsEstimate.DividendsType,
dividendsEstimate.DividendsTypeName,
dividendsEstimate.OrderOrReturnedOrderNum,
dividendsEstimate.CooperationContractNumber,
dividendsEstimate.DividendsUser,
... ... @@ -169,6 +174,7 @@ func (repository *DividendsEstimateRepository) UpdateMany(dividendsEstimates []*
DividendsEstimateTime: dividendsEstimate.DividendsEstimateTime,
DividendsParticipateType: dividendsEstimate.DividendsParticipateType,
DividendsType: dividendsEstimate.DividendsType,
DividendsTypeName: dividendsEstimate.DividendsTypeName,
OrderOrReturnedOrderNum: dividendsEstimate.OrderOrReturnedOrderNum,
CooperationContractNumber: dividendsEstimate.CooperationContractNumber,
DividendsUser: dividendsEstimate.DividendsUser,
... ...