作者 陈志颖

feat:调整分红预算相关业务

正在显示 23 个修改的文件 包含 77 行增加50 行删除
... ... @@ -8,6 +8,7 @@ import (
"github.com/beego/beego/v2/core/validation"
)
// CancelDividendsEstimateCommand 取消分红预算
type CancelDividendsEstimateCommand struct {
// 承接人分红预算记录ID
DividendsEstimateId string `cname:"承接人分红预算记录ID" json:"dividendsEstimateId" valid:"Required"`
... ...
... ... @@ -8,7 +8,8 @@ import (
"github.com/beego/beego/v2/core/validation"
)
type EstimateDividendsIncentivesCommand struct {
// ConfirmDividendsIncentivesEstimateCommand 确定业绩分红预算
type ConfirmDividendsIncentivesEstimateCommand struct {
// 分红订单号/退货单号
OrderOrReturnedOrderNum string `cname:"分红订单号/退货单号" json:"orderOrReturnedOrderNum" valid:"Required"`
// 合约编号
... ... @@ -23,11 +24,11 @@ type EstimateDividendsIncentivesCommand struct {
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (estimateDividendsIncentivesCommand *EstimateDividendsIncentivesCommand) Valid(validation *validation.Validation) {
func (estimateDividendsIncentivesCommand *ConfirmDividendsIncentivesEstimateCommand) Valid(validation *validation.Validation) {
//validation.SetError("CustomValid", "未实现的自定义认证")
}
func (estimateDividendsIncentivesCommand *EstimateDividendsIncentivesCommand) ValidateCommand() error {
func (estimateDividendsIncentivesCommand *ConfirmDividendsIncentivesEstimateCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(estimateDividendsIncentivesCommand)
if err != nil {
... ...
... ... @@ -8,7 +8,8 @@ import (
"github.com/beego/beego/v2/core/validation"
)
type EstimateMoneyIncentivesCommand struct {
// ConfirmMoneyIncentivesEstimateCommand 确定金额激励分红预算
type ConfirmMoneyIncentivesEstimateCommand struct {
// 共创项目合约编号
CooperationContractNumber string `cname:"共创项目合约编号" json:"cooperationContractNumber" valid:"Required"`
// 分红阶段
... ... @@ -25,11 +26,11 @@ type EstimateMoneyIncentivesCommand struct {
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (estimateMoneyIncentivesCommand *EstimateMoneyIncentivesCommand) Valid(validation *validation.Validation) {
func (estimateMoneyIncentivesCommand *ConfirmMoneyIncentivesEstimateCommand) Valid(validation *validation.Validation) {
//validation.SetError("CustomValid", "未实现的自定义认证")
}
func (estimateMoneyIncentivesCommand *EstimateMoneyIncentivesCommand) ValidateCommand() error {
func (estimateMoneyIncentivesCommand *ConfirmMoneyIncentivesEstimateCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(estimateMoneyIncentivesCommand)
if err != nil {
... ...
... ... @@ -8,6 +8,7 @@ import (
"github.com/beego/beego/v2/core/validation"
)
// CreateDividendsEstimateCommand 创建分红预算(预留)
type CreateDividendsEstimateCommand struct {
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
... ...
... ... @@ -8,6 +8,7 @@ import (
"github.com/beego/beego/v2/core/validation"
)
// RemoveDividendsEstimateCommand 移除分红预算单 (预留)
type RemoveDividendsEstimateCommand struct {
// 承接人分红预算记录ID
DividendsEstimateId int64 `cname:"承接人分红预算记录ID" json:"dividendsEstimateId,string" valid:"Required"`
... ...
... ... @@ -8,6 +8,7 @@ import (
"github.com/beego/beego/v2/core/validation"
)
// UpdateDividendsEstimateCommand 编辑分红预算单(预留)
type UpdateDividendsEstimateCommand struct {
// 承接人分红预算记录ID
DividendsEstimateId int64 `cname:"承接人分红预算记录ID" json:"dividendsEstimateId,string" valid:"Required"`
... ...
package dto
type DividendsIncentivesEstimateDto struct {
}
... ...
package dto
type MoneyIncentivesEstimateDto struct {
}
... ...
... ... @@ -8,6 +8,7 @@ import (
"github.com/beego/beego/v2/core/validation"
)
// GetDividendsEstimateQuery 获取分红预算单详情
type GetDividendsEstimateQuery struct {
// 承接人分红预算记录ID
DividendsEstimateId string `cname:"承接人分红预算记录ID" json:"dividendsEstimateId" valid:"Required"`
... ...
... ... @@ -8,6 +8,7 @@ import (
"github.com/beego/beego/v2/core/validation"
)
// ListDividendsEstimateQuery 返回分红预算列表
type ListDividendsEstimateQuery struct {
// 页面大小
PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
... ...
... ... @@ -8,7 +8,8 @@ import (
"github.com/beego/beego/v2/core/validation"
)
type ListDividendsIncentivesQuery struct {
// ListDividendsIncentivesEstimateQuery 返回业绩分红预算列表
type ListDividendsIncentivesEstimateQuery struct {
// 页面大小
PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
// 页面大小
... ... @@ -23,18 +24,18 @@ type ListDividendsIncentivesQuery struct {
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (listDividendsIncentivesQuery *ListDividendsIncentivesQuery) Valid(validation *validation.Validation) {
func (listDividendsIncentivesEstimateQuery *ListDividendsIncentivesEstimateQuery) Valid(validation *validation.Validation) {
//validation.SetError("CustomValid", "未实现的自定义认证")
}
func (listDividendsIncentivesQuery *ListDividendsIncentivesQuery) ValidateQuery() error {
func (listDividendsIncentivesEstimateQuery *ListDividendsIncentivesEstimateQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(listDividendsIncentivesQuery)
b, err := valid.Valid(listDividendsIncentivesEstimateQuery)
if err != nil {
return err
}
if !b {
elem := reflect.TypeOf(listDividendsIncentivesQuery).Elem()
elem := reflect.TypeOf(listDividendsIncentivesEstimateQuery).Elem()
for _, validErr := range valid.Errors {
field, isExist := elem.FieldByName(validErr.Field)
if isExist {
... ...
... ... @@ -8,7 +8,8 @@ import (
"github.com/beego/beego/v2/core/validation"
)
type ListMoneyIncentivesQuery struct {
// ListMoneyIncentivesEstimateQuery 返回金额分红预算列表
type ListMoneyIncentivesEstimateQuery struct {
// 页面大小
PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
// 页面大小
... ... @@ -23,18 +24,18 @@ type ListMoneyIncentivesQuery struct {
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (listMoneyIncentivesQuery *ListMoneyIncentivesQuery) Valid(validation *validation.Validation) {
func (listMoneyIncentivesEstimateQuery *ListMoneyIncentivesEstimateQuery) Valid(validation *validation.Validation) {
//validation.SetError("CustomValid", "未实现的自定义认证")
}
func (listMoneyIncentivesQuery *ListMoneyIncentivesQuery) ValidateQuery() error {
func (listMoneyIncentivesEstimateQuery *ListMoneyIncentivesEstimateQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(listMoneyIncentivesQuery)
b, err := valid.Valid(listMoneyIncentivesEstimateQuery)
if err != nil {
return err
}
if !b {
elem := reflect.TypeOf(listMoneyIncentivesQuery).Elem()
elem := reflect.TypeOf(listMoneyIncentivesEstimateQuery).Elem()
for _, validErr := range valid.Errors {
field, isExist := elem.FieldByName(validErr.Field)
if isExist {
... ...
... ... @@ -8,6 +8,7 @@ import (
"github.com/beego/beego/v2/core/validation"
)
// SearchDividendsEstimateQuery 查询分红预算单
type SearchDividendsEstimateQuery struct {
// 承接人分红预算单号
DividendsEstimateOrderNumber string `cname:"承接人分红预算单号" json:"dividendsEstimateOrderNumber" valid:"Required"`
... ...
... ... @@ -8,7 +8,8 @@ import (
"github.com/beego/beego/v2/core/validation"
)
type SearchDividendsIncentivesQuery struct {
// SearchDividendsIncentivesEstimateQuery 查找业绩分红预算
type SearchDividendsIncentivesEstimateQuery struct {
// 合约编号
CooperationContractNumber string `cname:"合约编号" json:"cooperationContractNumber,omitempty"`
// 分红订单号/退货单号
... ... @@ -27,18 +28,18 @@ type SearchDividendsIncentivesQuery struct {
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
}
func (searchDividendsIncentivesQuery *SearchDividendsIncentivesQuery) Valid(validation *validation.Validation) {
func (searchDividendsIncentivesEstimateQuery *SearchDividendsIncentivesEstimateQuery) Valid(validation *validation.Validation) {
//validation.SetError("CustomValid", "未实现的自定义认证")
}
func (searchDividendsIncentivesQuery *SearchDividendsIncentivesQuery) ValidateQuery() error {
func (searchDividendsIncentivesEstimateQuery *SearchDividendsIncentivesEstimateQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(searchDividendsIncentivesQuery)
b, err := valid.Valid(searchDividendsIncentivesEstimateQuery)
if err != nil {
return err
}
if !b {
elem := reflect.TypeOf(searchDividendsIncentivesQuery).Elem()
elem := reflect.TypeOf(searchDividendsIncentivesEstimateQuery).Elem()
for _, validErr := range valid.Errors {
field, isExist := elem.FieldByName(validErr.Field)
if isExist {
... ...
... ... @@ -8,7 +8,8 @@ import (
"github.com/beego/beego/v2/core/validation"
)
type SearchMoneyIncentivesQuery struct {
// SearchMoneyIncentivesEstimateQuery 查找金额激励预算
type SearchMoneyIncentivesEstimateQuery struct {
// 共创合约名称
CooperationContractName string `cname:"共创合约名称" json:"cooperationContractName,omitempty"`
// 发起部门名称
... ... @@ -27,18 +28,18 @@ type SearchMoneyIncentivesQuery struct {
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
}
func (searchMoneyIncentivesQuery *SearchMoneyIncentivesQuery) Valid(validation *validation.Validation) {
func (searchMoneyIncentivesEstimateQuery *SearchMoneyIncentivesEstimateQuery) Valid(validation *validation.Validation) {
//validation.SetError("CustomValid", "未实现的自定义认证")
}
func (searchMoneyIncentivesQuery *SearchMoneyIncentivesQuery) ValidateQuery() error {
func (searchMoneyIncentivesEstimateQuery *SearchMoneyIncentivesEstimateQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(searchMoneyIncentivesQuery)
b, err := valid.Valid(searchMoneyIncentivesEstimateQuery)
if err != nil {
return err
}
if !b {
elem := reflect.TypeOf(searchMoneyIncentivesQuery).Elem()
elem := reflect.TypeOf(searchMoneyIncentivesEstimateQuery).Elem()
for _, validErr := range valid.Errors {
field, isExist := elem.FieldByName(validErr.Field)
if isExist {
... ...
... ... @@ -111,7 +111,7 @@ func (dividendsEstimateService *DividendsEstimateService) CreateDividendsEstimat
DividendsParticipateType: 0,
DividendsType: 0,
OrderOrReturnedOrderNum: "",
CooperationProjectNumber: "",
CooperationContractNumber: "",
DividendsUser: nil,
Org: organization,
Company: company,
... ... @@ -141,7 +141,7 @@ func (dividendsEstimateService *DividendsEstimateService) CreateDividendsEstimat
}
// EstimateDividendsIncentives 确定预算分红激励
func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncentives(estimateDividendsIncentivesCommand *command.EstimateDividendsIncentivesCommand) (interface{}, error) {
func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncentives(estimateDividendsIncentivesCommand *command.ConfirmDividendsIncentivesEstimateCommand) (interface{}, error) {
if err := estimateDividendsIncentivesCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
... ... @@ -162,7 +162,7 @@ func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncen
}
// EstimateMoneyIncentives 确定预算金额激励分红
func (dividendsEstimateService *DividendsEstimateService) EstimateMoneyIncentives(estimateMoneyIncentivesCommand *command.EstimateMoneyIncentivesCommand) (interface{}, error) {
func (dividendsEstimateService *DividendsEstimateService) EstimateMoneyIncentives(estimateMoneyIncentivesCommand *command.ConfirmMoneyIncentivesEstimateCommand) (interface{}, error) {
if err := estimateMoneyIncentivesCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
... ... @@ -258,7 +258,7 @@ func (dividendsEstimateService *DividendsEstimateService) ListDividendsEstimate(
}
// ListDividendsIncentives 返回业绩激励分红
func (dividendsEstimateService *DividendsEstimateService) ListDividendsIncentives(listDividendsIncentivesQuery *query.ListDividendsIncentivesQuery) (interface{}, error) {
func (dividendsEstimateService *DividendsEstimateService) ListDividendsIncentives(listDividendsIncentivesQuery *query.ListDividendsIncentivesEstimateQuery) (interface{}, error) {
if err := listDividendsIncentivesQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
... ... @@ -279,7 +279,7 @@ func (dividendsEstimateService *DividendsEstimateService) ListDividendsIncentive
}
// ListMoneyIncentives 返回金额激励分红
func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentives(listMoneyIncentivesQuery *query.ListMoneyIncentivesQuery) (interface{}, error) {
func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentives(listMoneyIncentivesQuery *query.ListMoneyIncentivesEstimateQuery) (interface{}, error) {
if err := listMoneyIncentivesQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
... ... @@ -361,7 +361,7 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsEstimat
}
// SearchDividendsIncentives 查询业绩分红
func (dividendsEstimateService *DividendsEstimateService) SearchDividendsIncentives(searchDividendsIncentivesQuery *query.SearchDividendsIncentivesQuery) (interface{}, error) {
func (dividendsEstimateService *DividendsEstimateService) SearchDividendsIncentives(searchDividendsIncentivesQuery *query.SearchDividendsIncentivesEstimateQuery) (interface{}, error) {
if err := searchDividendsIncentivesQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
... ... @@ -382,7 +382,7 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsIncenti
}
// SearchMoneyIncentives 查询金额激励分红
func (dividendsEstimateService *DividendsEstimateService) SearchMoneyIncentives(searchMoneyIncentivesQuery *query.SearchMoneyIncentivesQuery) (interface{}, error) {
func (dividendsEstimateService *DividendsEstimateService) SearchMoneyIncentives(searchMoneyIncentivesQuery *query.SearchMoneyIncentivesEstimateQuery) (interface{}, error) {
if err := searchMoneyIncentivesQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
... ...
... ... @@ -20,8 +20,8 @@ type DividendsEstimate struct {
DividendsType int32 `json:"dividendsType"`
// 分红订单号或退货单号
OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"`
// 共创项目编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001
CooperationProjectNumber string `json:"cooperationProjectNumber"`
// 共创项目合约编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001
CooperationContractNumber string `json:"cooperationContractNumber"`
// 分红用户
DividendsUser *User `json:"dividendsUser"`
// 数据所属组织机构
... ... @@ -80,7 +80,7 @@ func (dividendsEstimate *DividendsEstimate) Update(data map[string]interface{})
dividendsEstimate.OrderOrReturnedOrderNum = orderOrReturnedOrderNum.(string)
}
if cooperationProjectNumber, ok := data["cooperationProjectNumber"]; ok {
dividendsEstimate.CooperationProjectNumber = cooperationProjectNumber.(string)
dividendsEstimate.CooperationContractNumber = cooperationProjectNumber.(string)
}
if userId, ok := data["userId"]; ok {
dividendsEstimate.DividendsUser.UserId = userId.(int64)
... ...
... ... @@ -23,8 +23,8 @@ type DividendsEstimate struct {
DividendsType int32 `comment:"分红类型,1订单分红,2退货冲销,3金额激励"`
// 分红订单号或退货单号
OrderOrReturnedOrderNum string `comment:"分红订单号或退货单号"`
// 共创项目编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001
CooperationProjectNumber string `comment:"共创项目编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001"`
// 共创项目合约编号
CooperationContractNumber string `comment:"共创项目合约编号"`
// 分红用户
DividendsUser *domain.User `comment:"分红用户"`
// 数据所属组织机构
... ...
... ... @@ -15,7 +15,7 @@ func TransformToDividendsEstimateDomainModelFromPgModels(dividendsEstimateModel
DividendsParticipateType: dividendsEstimateModel.DividendsParticipateType,
DividendsType: dividendsEstimateModel.DividendsType,
OrderOrReturnedOrderNum: dividendsEstimateModel.OrderOrReturnedOrderNum,
CooperationProjectNumber: dividendsEstimateModel.CooperationProjectNumber,
CooperationContractNumber: dividendsEstimateModel.CooperationContractNumber,
DividendsUser: dividendsEstimateModel.DividendsUser,
Org: dividendsEstimateModel.Org,
Company: dividendsEstimateModel.Company,
... ...
... ... @@ -24,6 +24,7 @@ func (repository *CreditAccountRepository) nextIdentify() (int64, error) {
id, err := IdWorker.NextId()
return id, err
}
func (repository *CreditAccountRepository) Save(creditAccount *domain.CreditAccount) (*domain.CreditAccount, error) {
sqlBuildFields := []string{
"credit_account_id",
... ... @@ -154,6 +155,7 @@ func (repository *CreditAccountRepository) Save(creditAccount *domain.CreditAcco
}
return creditAccount, nil
}
func (repository *CreditAccountRepository) Remove(creditAccount *domain.CreditAccount) (*domain.CreditAccount, error) {
tx := repository.transactionContext.PgTx
creditAccountModel := new(models.CreditAccount)
... ... @@ -163,6 +165,7 @@ func (repository *CreditAccountRepository) Remove(creditAccount *domain.CreditAc
}
return creditAccount, nil
}
func (repository *CreditAccountRepository) FindOne(queryOptions map[string]interface{}) (*domain.CreditAccount, error) {
tx := repository.transactionContext.PgTx
creditAccountModel := new(models.CreditAccount)
... ... @@ -181,6 +184,7 @@ func (repository *CreditAccountRepository) FindOne(queryOptions map[string]inter
return transform.TransformToCreditAccountDomainModelFromPgModels(creditAccountModel)
}
}
func (repository *CreditAccountRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.CreditAccount, error) {
tx := repository.transactionContext.PgTx
var creditAccountModels []*models.CreditAccount
... ... @@ -207,6 +211,7 @@ func (repository *CreditAccountRepository) Find(queryOptions map[string]interfac
return int64(count), creditAccounts, nil
}
}
func NewCreditAccountRepository(transactionContext *pgTransaction.TransactionContext) (*CreditAccountRepository, error) {
if transactionContext == nil {
return nil, fmt.Errorf("transactionContext参数不能为nil")
... ...
... ... @@ -34,7 +34,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
"dividends_participate_type",
"dividends_type",
"order_or_returned_order_num",
"cooperation_project_number",
"cooperation_contract_number",
"dividends_user",
"org",
"company",
... ... @@ -67,7 +67,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
&dividendsEstimate.DividendsParticipateType,
&dividendsEstimate.DividendsType,
&dividendsEstimate.OrderOrReturnedOrderNum,
&dividendsEstimate.CooperationProjectNumber,
&dividendsEstimate.CooperationContractNumber,
&dividendsEstimate.DividendsUser,
&dividendsEstimate.Org,
&dividendsEstimate.Company,
... ... @@ -86,7 +86,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
dividendsEstimate.DividendsParticipateType,
dividendsEstimate.DividendsType,
dividendsEstimate.OrderOrReturnedOrderNum,
dividendsEstimate.CooperationProjectNumber,
dividendsEstimate.CooperationContractNumber,
dividendsEstimate.DividendsUser,
dividendsEstimate.Org,
dividendsEstimate.Company,
... ... @@ -109,7 +109,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
&dividendsEstimate.DividendsParticipateType,
&dividendsEstimate.DividendsType,
&dividendsEstimate.OrderOrReturnedOrderNum,
&dividendsEstimate.CooperationProjectNumber,
&dividendsEstimate.CooperationContractNumber,
&dividendsEstimate.DividendsUser,
&dividendsEstimate.Org,
&dividendsEstimate.Company,
... ... @@ -128,7 +128,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
dividendsEstimate.DividendsParticipateType,
dividendsEstimate.DividendsType,
dividendsEstimate.OrderOrReturnedOrderNum,
dividendsEstimate.CooperationProjectNumber,
dividendsEstimate.CooperationContractNumber,
dividendsEstimate.DividendsUser,
dividendsEstimate.Org,
dividendsEstimate.Company,
... ...
... ... @@ -26,6 +26,7 @@ func (repository *DividendsReturnedOrderRepository) nextIdentify() (int64, error
id, err := IdWorker.NextId()
return id, err
}
func (repository *DividendsReturnedOrderRepository) Save(dividendsReturnedOrder *domain.DividendsReturnedOrder) (*domain.DividendsReturnedOrder, error) {
sqlBuildFields := []string{
"dividends_returned_order_id",
... ...
... ... @@ -97,7 +97,7 @@ func (controller *DividendsEstimateController) SearchDividendsEstimate() {
func (controller *DividendsEstimateController) EstimateDividendsIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
estimateDividendsIncentivesCommand := &command.EstimateDividendsIncentivesCommand{}
estimateDividendsIncentivesCommand := &command.ConfirmDividendsIncentivesEstimateCommand{}
_ = controller.Unmarshal(estimateDividendsIncentivesCommand)
header := controller.GetRequestHeader(controller.Ctx)
estimateDividendsIncentivesCommand.CompanyId = header.CompanyId
... ... @@ -110,7 +110,7 @@ func (controller *DividendsEstimateController) EstimateDividendsIncentives() {
func (controller *DividendsEstimateController) EstimateMoneyIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
estimateMoneyIncentivesCommand := &command.EstimateMoneyIncentivesCommand{}
estimateMoneyIncentivesCommand := &command.ConfirmMoneyIncentivesEstimateCommand{}
_ = controller.Unmarshal(estimateMoneyIncentivesCommand)
header := controller.GetRequestHeader(controller.Ctx)
estimateMoneyIncentivesCommand.CompanyId = header.CompanyId
... ... @@ -123,7 +123,7 @@ func (controller *DividendsEstimateController) EstimateMoneyIncentives() {
func (controller *DividendsEstimateController) ListMoneyIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
listMoneyIncentivesQuery := &query.ListMoneyIncentivesQuery{}
listMoneyIncentivesQuery := &query.ListMoneyIncentivesEstimateQuery{}
header := controller.GetRequestHeader(controller.Ctx)
listMoneyIncentivesQuery.CompanyId = header.CompanyId
listMoneyIncentivesQuery.OrgId = header.OrgId
... ... @@ -135,7 +135,7 @@ func (controller *DividendsEstimateController) ListMoneyIncentives() {
func (controller *DividendsEstimateController) SearchMoneyIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchMoneyIncentivesQuery := &query.SearchMoneyIncentivesQuery{}
searchMoneyIncentivesQuery := &query.SearchMoneyIncentivesEstimateQuery{}
header := controller.GetRequestHeader(controller.Ctx)
searchMoneyIncentivesQuery.CompanyId = header.CompanyId
searchMoneyIncentivesQuery.OrgId = header.OrgId
... ... @@ -147,7 +147,7 @@ func (controller *DividendsEstimateController) SearchMoneyIncentives() {
func (controller *DividendsEstimateController) ListDividendsIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
listDividendsIncentivesQuery := &query.ListDividendsIncentivesQuery{}
listDividendsIncentivesQuery := &query.ListDividendsIncentivesEstimateQuery{}
header := controller.GetRequestHeader(controller.Ctx)
listDividendsIncentivesQuery.CompanyId = header.CompanyId
listDividendsIncentivesQuery.OrgId = header.OrgId
... ... @@ -159,7 +159,7 @@ func (controller *DividendsEstimateController) ListDividendsIncentives() {
func (controller *DividendsEstimateController) SearchDividendsIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchDividendsIncentivesQuery := &query.SearchDividendsIncentivesQuery{}
searchDividendsIncentivesQuery := &query.SearchDividendsIncentivesEstimateQuery{}
header := controller.GetRequestHeader(controller.Ctx)
searchDividendsIncentivesQuery.CompanyId = header.CompanyId
searchDividendsIncentivesQuery.OrgId = header.OrgId
... ...