dividends_estimate.go 5.3 KB
package service

import (
	"github.com/linmadan/egglib-go/core/application"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/command"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/query"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
)

// 分红预算管理
type DividendsEstimateService struct {
}

//piliao  取消分红预算
func (dividendsEstimateService *DividendsEstimateService) CancelDividendsEstimate(cancelDividendsEstimateCommand *command.CancelDividendsEstimateCommand) (interface{}, error) {
	creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(cancelDividendsEstimateCommand.Operator)
	_, err := creationCooperationGateway.DividendsEstimatesBatchCancel(allied_creation_cooperation.ReqDividendsEstimateBatchCancel{
		DividendsEstimateIds: cancelDividendsEstimateCommand.DividendsEstimateId,
	})
	if err != nil {
		return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
	}
	return cancelDividendsEstimateCommand, nil
}

// 确定预算分红激励
func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncentives(estimateDividendsIncentivesCommand *command.EstimateDividendsIncentivesCommand) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	estimateDividendsIncentivesCommand.Operator)

	return nil, nil
}

// 确定预算金额激励分红
func (dividendsEstimateService *DividendsEstimateService) EstimateMoneyIncentives(estimateMoneyIncentivesCommand *command.EstimateMoneyIncentivesCommand) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	estimateMoneyIncentivesCommand.Operator)
	return nil, nil
}

// 返回分红预算服务
func (dividendsEstimateService *DividendsEstimateService) GetDividendsEstimate(getDividendsEstimateQuery *query.GetDividendsEstimateQuery) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	getDividendsEstimateQuery.Operator)
	return nil, nil

}

// 返回分红预算服务列表
func (dividendsEstimateService *DividendsEstimateService) ListDividendsEstimate(listDividendsEstimateQuery *query.ListDividendsEstimateQuery) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	listDividendsEstimateQuery.Operator)
	return nil, nil
}

// 返回业绩激励分红
func (dividendsEstimateService *DividendsEstimateService) ListDividendsIncentives(listDividendsIncentivesQuery *query.ListDividendsIncentivesQuery) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	listDividendsIncentivesQuery.Operator)
	return nil, nil
}

// 返回金额激励分红
func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentives(listMoneyIncentivesQue *query.ListMoneyIncentivesQuery) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	listMoneyIncentivesQue.Operator)
	return nil, nil
}

// 移除分红预算服务
func (dividendsEstimateService *DividendsEstimateService) RemoveDividendsEstimate(removeDividendsEstimateCommand *command.RemoveDividendsEstimateCommand) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	removeDividendsEstimateCommand.Operator)
	return nil, nil
}

// 查询分红预算单
func (dividendsEstimateService *DividendsEstimateService) SearchDividendsEstimate(searchDividendsEstimateQuery *query.SearchDividendsEstimateQuery) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	searchDividendsEstimateQuery.Operator)
	return nil, nil
}

// 查询业绩分红
func (dividendsEstimateService *DividendsEstimateService) SearchDividendsIncentives(searchDividendsIncentivesQuery *query.SearchDividendsIncentivesQuery) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	searchDividendsIncentivesQuery.Operator)
	return nil, nil
}

// 查询金额激励分红
func (dividendsEmmateService *DividendsEstimateService) SearchMoneyIncentives(searchMoneyIncentivesQuery *query.SearchMoneyIncentivesQuery) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	searchMoneyIncentivesQuery.Operator)
	return nil, nil
}

// 更新分红预算服务
func (dividendsEstimateService *DividendsEstimateService) UpdateDividendsEstimate(updateDividendsEstimateCommand *command.UpdateDividendsEstimateCommand) (interface{}, error) {
	// creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
	// 	updateDividendsEstimateCommand.Operator)
	return nil, nil
}

func NewDividendsEstimateService(options map[string]interface{}) *DividendsEstimateService {
	newDividendsEstimateService := &DividendsEstimateService{}
	return newDividendsEstimateService
}