作者 陈志颖

Merge branch 'dev-chenzhiying' into dev

package command
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"reflect"
"strings"
)
// BatchCancelDividendsEstimateCommand 批量取消分红预算
type BatchCancelDividendsEstimateCommand struct {
// 承接人分红预算记录ID
DividendsEstimateIds []string `cname:"承接人分红预算记录ID列表" json:"dividendsEstimateIds,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (batchCancelDividendsEstimateCommand *BatchCancelDividendsEstimateCommand) Valid(validation *validation.Validation) {
//validation.SetError("CustomValid", "未实现的自定义认证")
}
func (batchCancelDividendsEstimateCommand *BatchCancelDividendsEstimateCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(batchCancelDividendsEstimateCommand)
if err != nil {
return err
}
if !b {
elem := reflect.TypeOf(batchCancelDividendsEstimateCommand).Elem()
for _, validErr := range valid.Errors {
field, isExist := elem.FieldByName(validErr.Field)
if isExist {
return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1))
} else {
return fmt.Errorf(validErr.Message)
}
}
}
return nil
}
... ...
... ... @@ -17,7 +17,7 @@ import (
type DividendsEstimateService struct {
}
// CancelDividendsEstimate 取消分红预算
// CancelDividendsEstimate 取消分红预算
func (dividendsEstimateService *DividendsEstimateService) CancelDividendsEstimate(cancelDividendsEstimateCommand *command.CancelDividendsEstimateCommand) (interface{}, error) {
if err := cancelDividendsEstimateCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ... @@ -38,7 +38,28 @@ func (dividendsEstimateService *DividendsEstimateService) CancelDividendsEstimat
return nil, nil
}
// CreateDividendsEstimate 创建分红预算服务
// BatchCancelDividendsEstimate 批量取消分红预算单
func (dividendsEstimateService *DividendsEstimateService) BatchCancelDividendsEstimate(batchCancelEstimateCommand *command.BatchCancelDividendsEstimateCommand) (interface{}, error) {
if err := batchCancelEstimateCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
if err := transactionContext.StartTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
defer func() {
_ = transactionContext.RollbackTransaction()
}()
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
return nil, nil
}
// CreateDividendsEstimate 创建分红预算单 (预留)
func (dividendsEstimateService *DividendsEstimateService) CreateDividendsEstimate(createDividendsEstimateCommand *command.CreateDividendsEstimateCommand) (interface{}, error) {
if err := createDividendsEstimateCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ... @@ -140,9 +161,9 @@ func (dividendsEstimateService *DividendsEstimateService) CreateDividendsEstimat
}
}
// EstimateDividendsIncentives 确定预算分红激励
func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncentives(estimateDividendsIncentivesCommand *command.ConfirmDividendsIncentivesEstimateCommand) (interface{}, error) {
if err := estimateDividendsIncentivesCommand.ValidateCommand(); err != nil {
// 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())
}
transactionContext, err := factory.CreateTransactionContext(nil)
... ... @@ -161,9 +182,9 @@ func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncen
return nil, nil
}
// EstimateMoneyIncentives 确定预算金额激励分红
func (dividendsEstimateService *DividendsEstimateService) EstimateMoneyIncentives(estimateMoneyIncentivesCommand *command.ConfirmMoneyIncentivesEstimateCommand) (interface{}, error) {
if err := estimateMoneyIncentivesCommand.ValidateCommand(); err != nil {
// ConfirmMoneyIncentivesEstimate 确定金额激励分红预算
func (dividendsEstimateService *DividendsEstimateService) ConfirmMoneyIncentivesEstimate(confirmMoneyIncentivesEstimateCommand *command.ConfirmMoneyIncentivesEstimateCommand) (interface{}, error) {
if err := confirmMoneyIncentivesEstimateCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
transactionContext, err := factory.CreateTransactionContext(nil)
... ... @@ -182,7 +203,7 @@ func (dividendsEstimateService *DividendsEstimateService) EstimateMoneyIncentive
return nil, nil
}
// GetDividendsEstimate 返回分红预算服务
// GetDividendsEstimate 返回分红预算单详情
func (dividendsEstimateService *DividendsEstimateService) GetDividendsEstimate(getDividendsEstimateQuery *query.GetDividendsEstimateQuery) (interface{}, error) {
if err := getDividendsEstimateQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ... @@ -219,7 +240,7 @@ func (dividendsEstimateService *DividendsEstimateService) GetDividendsEstimate(g
}
}
// ListDividendsEstimate 返回分红预算服务列表
// ListDividendsEstimate 返回分红预算列表
func (dividendsEstimateService *DividendsEstimateService) ListDividendsEstimate(listDividendsEstimateQuery *query.ListDividendsEstimateQuery) (interface{}, error) {
if err := listDividendsEstimateQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ... @@ -257,9 +278,9 @@ func (dividendsEstimateService *DividendsEstimateService) ListDividendsEstimate(
}
}
// ListDividendsIncentives 返回业绩激励分红
func (dividendsEstimateService *DividendsEstimateService) ListDividendsIncentives(listDividendsIncentivesQuery *query.ListDividendsIncentivesEstimateQuery) (interface{}, error) {
if err := listDividendsIncentivesQuery.ValidateQuery(); err != nil {
// ListDividendsIncentivesEstimate 返回业绩激励分红预算列表
func (dividendsEstimateService *DividendsEstimateService) ListDividendsIncentivesEstimate(listDividendsIncentivesEstimateQuery *query.ListDividendsIncentivesEstimateQuery) (interface{}, error) {
if err := listDividendsIncentivesEstimateQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
transactionContext, err := factory.CreateTransactionContext(nil)
... ... @@ -278,9 +299,9 @@ func (dividendsEstimateService *DividendsEstimateService) ListDividendsIncentive
return nil, nil
}
// ListMoneyIncentives 返回金额激励分红
func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentives(listMoneyIncentivesQuery *query.ListMoneyIncentivesEstimateQuery) (interface{}, error) {
if err := listMoneyIncentivesQuery.ValidateQuery(); err != nil {
// ListMoneyIncentivesEstimate 返回金额激励分红预算列表
func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentivesEstimate(listMoneyIncentivesEstimateQuery *query.ListMoneyIncentivesEstimateQuery) (interface{}, error) {
if err := listMoneyIncentivesEstimateQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
transactionContext, err := factory.CreateTransactionContext(nil)
... ... @@ -299,7 +320,7 @@ func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentives(li
return nil, nil
}
// RemoveDividendsEstimate 移除分红预算服务
// RemoveDividendsEstimate 移除分红预算单(预留)
func (dividendsEstimateService *DividendsEstimateService) RemoveDividendsEstimate(removeDividendsEstimateCommand *command.RemoveDividendsEstimateCommand) (interface{}, error) {
if err := removeDividendsEstimateCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ... @@ -360,9 +381,9 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsEstimat
return nil, nil
}
// SearchDividendsIncentives 查询业绩分红
func (dividendsEstimateService *DividendsEstimateService) SearchDividendsIncentives(searchDividendsIncentivesQuery *query.SearchDividendsIncentivesEstimateQuery) (interface{}, error) {
if err := searchDividendsIncentivesQuery.ValidateQuery(); err != nil {
// SearchDividendsIncentivesEstimate 查询业绩激励分红预算
func (dividendsEstimateService *DividendsEstimateService) SearchDividendsIncentivesEstimate(searchDividendsIncentivesEstimateQuery *query.SearchDividendsIncentivesEstimateQuery) (interface{}, error) {
if err := searchDividendsIncentivesEstimateQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
transactionContext, err := factory.CreateTransactionContext(nil)
... ... @@ -381,9 +402,9 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsIncenti
return nil, nil
}
// SearchMoneyIncentives 查询金额激励分红
func (dividendsEstimateService *DividendsEstimateService) SearchMoneyIncentives(searchMoneyIncentivesQuery *query.SearchMoneyIncentivesEstimateQuery) (interface{}, error) {
if err := searchMoneyIncentivesQuery.ValidateQuery(); err != nil {
// SearchMoneyIncentivesEstimate 查询金额激励分红预算
func (dividendsEstimateService *DividendsEstimateService) SearchMoneyIncentivesEstimate(searchMoneyIncentivesEstimateQuery *query.SearchMoneyIncentivesEstimateQuery) (interface{}, error) {
if err := searchMoneyIncentivesEstimateQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
transactionContext, err := factory.CreateTransactionContext(nil)
... ... @@ -402,7 +423,7 @@ func (dividendsEstimateService *DividendsEstimateService) SearchMoneyIncentives(
return nil, nil
}
// UpdateDividendsEstimate 更新分红预算服务
// UpdateDividendsEstimate 更新分红预算单(预留)
func (dividendsEstimateService *DividendsEstimateService) UpdateDividendsEstimate(updateDividendsEstimateCommand *command.UpdateDividendsEstimateCommand) (interface{}, error) {
if err := updateDividendsEstimateCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ...
package factory
import (
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/domain_service"
)
... ... @@ -20,3 +21,11 @@ func CreateDepartmentService(options map[string]interface{}) (service.Department
func CreateOrganizationService(options map[string]interface{}) (service.OrgService, error) {
return domain_service.NewOrganizationService()
}
func CreateCancelDividendsEstimateService(options map[string]interface{}) (service.CancelDividendsEstimate, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domain_service.NewCancelDividendsEstimateService(transactionContext)
}
... ...
... ... @@ -2,6 +2,18 @@ package domain
import "time"
const (
UNDERTAKER = iota + 1 // 承接人
REFERRER // 推荐人
SALESMAN // 业务员
)
const (
ORDER_DIVIDENDS = iota + 1 // 订单分红
RETURN_WRITE_OFF // 退货冲销
MONEY_INCENTIVES // 金额激励
)
// DividendsEstimate 分红预算实体
type DividendsEstimate struct {
// 承接人分红预算记录ID
... ... @@ -22,8 +34,10 @@ type DividendsEstimate struct {
OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"`
// 共创项目合约编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001
CooperationContractNumber string `json:"cooperationContractNumber"`
// 分红用户
// 分红用户(共创参与)
DividendsUser *User `json:"dividendsUser"`
// 分红阶段
DividendsStage int32 `json:"dividendsStage"`
// 数据所属组织机构
Org *Org `json:"org"`
// 公司
... ... @@ -42,6 +56,7 @@ type DividendsEstimate struct {
type DividendsEstimateRepository interface {
Save(dividendsEstimate *DividendsEstimate) (*DividendsEstimate, error)
UpdateMany(dividendsEstimates []*DividendsEstimate) ([]*DividendsEstimate, error)
Remove(dividendsEstimate *DividendsEstimate) (*DividendsEstimate, error)
FindOne(queryOptions map[string]interface{}) (*DividendsEstimate, error)
Find(queryOptions map[string]interface{}) (int64, []*DividendsEstimate, error)
... ... @@ -55,9 +70,6 @@ func (dividendsEstimate *DividendsEstimate) Identify() interface{} {
}
func (dividendsEstimate *DividendsEstimate) Update(data map[string]interface{}) error {
if dividendsEstimateId, ok := data["dividendsEstimateId"]; ok {
dividendsEstimate.DividendsEstimateId = dividendsEstimateId.(int64)
}
if dividendsAccountStatus, ok := data["dividendsAccountStatus"]; ok {
dividendsEstimate.DividendsAccountStatus = dividendsAccountStatus.(int32)
}
... ... @@ -82,62 +94,5 @@ func (dividendsEstimate *DividendsEstimate) Update(data map[string]interface{})
if cooperationProjectNumber, ok := data["cooperationProjectNumber"]; ok {
dividendsEstimate.CooperationContractNumber = cooperationProjectNumber.(string)
}
if userId, ok := data["userId"]; ok {
dividendsEstimate.DividendsUser.UserId = userId.(int64)
}
if userBaseId, ok := data["userBaseId"]; ok {
dividendsEstimate.DividendsUser.UserBaseId = userBaseId.(int64)
}
if orgId, ok := data["orgId"]; ok {
dividendsEstimate.DividendsUser.Org.OrgId = orgId.(int64)
}
if orgName, ok := data["orgName"]; ok {
dividendsEstimate.DividendsUser.Org.OrgName = orgName.(string)
}
if companyId, ok := data["companyId"]; ok {
dividendsEstimate.DividendsUser.Org.Company.CompanyId = companyId.(int64)
}
if companyLogo, ok := data["companyLogo"]; ok {
dividendsEstimate.DividendsUser.Org.Company.CompanyLogo = companyLogo.(string)
}
if companyName, ok := data["companyName"]; ok {
dividendsEstimate.DividendsUser.Org.Company.CompanyName = companyName.(string)
}
if orgs, ok := data["orgs"]; ok {
dividendsEstimate.DividendsUser.Orgs = orgs.([]*Org)
}
if departmentId, ok := data["departmentId"]; ok {
dividendsEstimate.DividendsUser.Department.DepartmentId = departmentId.(int64)
}
if departmentName, ok := data["departmentName"]; ok {
dividendsEstimate.DividendsUser.Department.DepartmentName = departmentName.(string)
}
if departmentNumber, ok := data["departmentNumber"]; ok {
dividendsEstimate.DividendsUser.Department.DepartmentNumber = departmentNumber.(string)
}
if isOrganization, ok := data["isOrganization"]; ok {
dividendsEstimate.DividendsUser.Department.IsOrganization = isOrganization.(bool)
}
if userAvatar, ok := data["userAvatar"]; ok {
dividendsEstimate.DividendsUser.UserInfo.UserAvatar = userAvatar.(string)
}
if userEmail, ok := data["userEmail"]; ok {
dividendsEstimate.DividendsUser.UserInfo.UserEmail = userEmail.(string)
}
if userName, ok := data["userName"]; ok {
dividendsEstimate.DividendsUser.UserInfo.UserName = userName.(string)
}
if userPhone, ok := data["userPhone"]; ok {
dividendsEstimate.DividendsUser.UserInfo.UserPhone = userPhone.(string)
}
if userAccount, ok := data["userAccount"]; ok {
dividendsEstimate.DividendsUser.UserInfo.UserAccount = userAccount.(string)
}
if userType, ok := data["userType"]; ok {
dividendsEstimate.DividendsUser.UserType = userType.(int32)
}
if status, ok := data["status"]; ok {
dividendsEstimate.DividendsUser.Status = status.(int32)
}
return nil
}
... ...
... ... @@ -2,6 +2,11 @@ package domain
import "time"
const (
TO_BE_DIVIDENDED = iota + 1 // 待分红
DIVIDENDED // 已分红
)
// OrderGood 订单产品领域实体(包括分红订单、分红退货单)
type OrderGood struct {
// 订单产品
... ... @@ -20,8 +25,10 @@ type OrderGood struct {
DividendsReturnedOrderNumber string `json:"dividendsReturnedOrderNumber"`
// 关联的共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 订单产品费用
// 订单产品支出费用
OrderGoodExpense float64 `json:"orderGoodExpense"`
// 订单产品分红状态, 1待分红,2已分红
OrderGoodDividendsStatus int32 `json:"OrderGoodDividendsStatus"`
// 组织机构ID
OrgId int64 `json:"orgId"`
// 公司ID
... ... @@ -67,8 +74,5 @@ func (orderGood *OrderGood) Update(data map[string]interface{}) error {
if orderGoodExpense, ok := data["orderGoodExpense"]; ok {
orderGood.OrderGoodExpense = orderGoodExpense.(float64)
}
if updatedAt, ok := data["updatedAt"]; ok {
orderGood.UpdatedAt = updatedAt.(time.Time)
}
return nil
}
... ...
package service
type CancelDividendsEstimate interface {
CancelEstimate()
}
... ...
package domain_service
import (
"fmt"
coreDomain "github.com/linmadan/egglib-go/core/domain"
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
)
type CancelDividendsEstimateService struct {
coreDomain.BaseEventPublisher
transactionContext *pgTransaction.TransactionContext
}
func (c *CancelDividendsEstimateService) CancelEstimate() {
panic("implement me")
}
func NewCancelDividendsEstimateService(transactionContext *pgTransaction.TransactionContext) (*CancelDividendsEstimateService, error) {
if transactionContext == nil {
return nil, fmt.Errorf("transactionContext参数不能为nil")
} else {
return &CancelDividendsEstimateService{
transactionContext: transactionContext,
}, nil
}
}
... ...
... ... @@ -27,6 +27,8 @@ type DividendsEstimate struct {
CooperationContractNumber string `comment:"共创项目合约编号"`
// 分红用户
DividendsUser *domain.User `comment:"分红用户"`
// 分红阶段
DividendsStage int32 `comment:"分红阶段"`
// 数据所属组织机构
Org *domain.Org `comment:"数据所属组织机构"`
// 公司
... ...
... ... @@ -24,8 +24,10 @@ type OrderGood struct {
OrgId int64 `comment:"组织机构ID"`
// 公司ID
CompanyId int64 `comment:"公司ID"`
// 订单产品费用
OrderGoodExpense float64 `comment:"订单产品费用"`
// 订单产品支出费用
OrderGoodExpense float64 `comment:"订单产品支出费用"`
// 订单产品分红状态, 1待分红,2已分红
OrderGoodDividendsStatus int32 `comment:"订单产品分红状态"`
// 创建时间
CreatedAt time.Time `comment:"创建时间"`
// 删除时间
... ...
... ... @@ -17,6 +17,7 @@ func TransformToDividendsEstimateDomainModelFromPgModels(dividendsEstimateModel
OrderOrReturnedOrderNum: dividendsEstimateModel.OrderOrReturnedOrderNum,
CooperationContractNumber: dividendsEstimateModel.CooperationContractNumber,
DividendsUser: dividendsEstimateModel.DividendsUser,
DividendsStage: dividendsEstimateModel.DividendsStage,
Org: dividendsEstimateModel.Org,
Company: dividendsEstimateModel.Company,
Operator: dividendsEstimateModel.Operator,
... ...
... ... @@ -15,6 +15,7 @@ func TransformToOrderGoodDomainModelFromPgModels(orderGoodModel *models.OrderGoo
DividendsOrderNumber: orderGoodModel.DividendsOrderNumber,
CooperationContractNumber: orderGoodModel.CooperationContractNumber,
OrderGoodExpense: orderGoodModel.OrderGoodExpense,
OrderGoodDividendsStatus: orderGoodModel.OrderGoodDividendsStatus,
OrgId: orderGoodModel.OrgId,
CompanyId: orderGoodModel.CompanyId,
CreatedAt: orderGoodModel.CreatedAt,
... ...
... ... @@ -117,9 +117,11 @@ func (repository *CooperationContractRepository) Save(cooperationContract *domai
CreatedAt: time.Time{},
})
}
if len(relevantPeopleModel) > 0 {
if _, err := tx.Model(&relevantPeopleModel).Insert(); err != nil {
return nil, err
}
}
// 新增承接人
var undertakersModel []*models.CooperationContractUndertaker
... ... @@ -144,9 +146,11 @@ func (repository *CooperationContractRepository) Save(cooperationContract *domai
DeletedAt: time.Now(),
})
}
if len(undertakersModel) > 0 {
if _, err := tx.Model(&undertakersModel).Insert(); err != nil {
return nil, err
}
}
// 新增分红激励规则
var dividendsIncentivesRulesModel []*models.DividendsIncentivesRule
... ... @@ -166,9 +170,11 @@ func (repository *CooperationContractRepository) Save(cooperationContract *domai
CreatedAt: time.Now(),
})
}
if len(dividendsIncentivesRulesModel) > 0 {
if _, err := tx.Model(&dividendsIncentivesRulesModel).Insert(); err != nil {
return nil, err
}
}
// 新增金额激励规则
var moneyIncentivesRulesModel []*models.MoneyIncentivesRule
... ... @@ -189,9 +195,11 @@ func (repository *CooperationContractRepository) Save(cooperationContract *domai
CreatedAt: time.Now(),
})
}
if len(moneyIncentivesRulesModel) > 0 {
if _, err := tx.Model(&moneyIncentivesRulesModel).Insert(); err != nil {
return nil, err
}
}
} else {
if _, err := tx.QueryOne(
pg.Scan(
... ...
... ... @@ -24,6 +24,7 @@ func (repository *DividendsEstimateRepository) nextIdentify() (int64, error) {
id, err := IdWorker.NextId()
return id, err
}
func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.DividendsEstimate) (*domain.DividendsEstimate, error) {
sqlBuildFields := []string{
"dividends_estimate_id",
... ... @@ -36,6 +37,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
"order_or_returned_order_num",
"cooperation_contract_number",
"dividends_user",
"dividends_stage",
"org",
"company",
"operator",
... ... @@ -69,6 +71,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
&dividendsEstimate.OrderOrReturnedOrderNum,
&dividendsEstimate.CooperationContractNumber,
&dividendsEstimate.DividendsUser,
&dividendsEstimate.DividendsStage,
&dividendsEstimate.Org,
&dividendsEstimate.Company,
&dividendsEstimate.Operator,
... ... @@ -88,6 +91,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
dividendsEstimate.OrderOrReturnedOrderNum,
dividendsEstimate.CooperationContractNumber,
dividendsEstimate.DividendsUser,
dividendsEstimate.DividendsStage,
dividendsEstimate.Org,
dividendsEstimate.Company,
dividendsEstimate.Operator,
... ... @@ -111,6 +115,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
&dividendsEstimate.OrderOrReturnedOrderNum,
&dividendsEstimate.CooperationContractNumber,
&dividendsEstimate.DividendsUser,
&dividendsEstimate.DividendsStage,
&dividendsEstimate.Org,
&dividendsEstimate.Company,
&dividendsEstimate.Operator,
... ... @@ -130,6 +135,7 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
dividendsEstimate.OrderOrReturnedOrderNum,
dividendsEstimate.CooperationContractNumber,
dividendsEstimate.DividendsUser,
dividendsEstimate.DividendsStage,
dividendsEstimate.Org,
dividendsEstimate.Company,
dividendsEstimate.Operator,
... ... @@ -144,6 +150,11 @@ func (repository *DividendsEstimateRepository) Save(dividendsEstimate *domain.Di
}
return dividendsEstimate, nil
}
func (repository *DividendsEstimateRepository) UpdateMany(dividendsEstimates []*domain.DividendsEstimate) ([]*domain.DividendsEstimate, error) {
panic("implement me")
}
func (repository *DividendsEstimateRepository) Remove(dividendsEstimate *domain.DividendsEstimate) (*domain.DividendsEstimate, error) {
tx := repository.transactionContext.PgTx
dividendsEstimateModel := new(models.DividendsEstimate)
... ... @@ -153,6 +164,7 @@ func (repository *DividendsEstimateRepository) Remove(dividendsEstimate *domain.
}
return dividendsEstimate, nil
}
func (repository *DividendsEstimateRepository) FindOne(queryOptions map[string]interface{}) (*domain.DividendsEstimate, error) {
tx := repository.transactionContext.PgTx
dividendsEstimateModel := new(models.DividendsEstimate)
... ... @@ -171,6 +183,7 @@ func (repository *DividendsEstimateRepository) FindOne(queryOptions map[string]i
return transform.TransformToDividendsEstimateDomainModelFromPgModels(dividendsEstimateModel)
}
}
func (repository *DividendsEstimateRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.DividendsEstimate, error) {
tx := repository.transactionContext.PgTx
var dividendsEstimateModels []*models.DividendsEstimate
... ... @@ -197,6 +210,7 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte
return int64(count), dividendsEstimates, nil
}
}
func NewDividendsEstimateRepository(transactionContext *pgTransaction.TransactionContext) (*DividendsEstimateRepository, error) {
if transactionContext == nil {
return nil, fmt.Errorf("transactionContext参数不能为nil")
... ...
... ... @@ -24,6 +24,7 @@ func (repository *DividendsIncentivesRuleRepository) nextIdentify() (int64, erro
id, err := IdWorker.NextId()
return id, err
}
func (repository *DividendsIncentivesRuleRepository) Save(dividendsIncentivesRule *domain.DividendsIncentivesRule) (*domain.DividendsIncentivesRule, error) {
sqlBuildFields := []string{
"dividends_incentives_rule_id",
... ... @@ -129,6 +130,7 @@ func (repository *DividendsIncentivesRuleRepository) Save(dividendsIncentivesRul
}
return dividendsIncentivesRule, nil
}
func (repository *DividendsIncentivesRuleRepository) Remove(dividendsIncentivesRule *domain.DividendsIncentivesRule) (*domain.DividendsIncentivesRule, error) {
tx := repository.transactionContext.PgTx
dividendsIncentivesRuleModel := new(models.DividendsIncentivesRule)
... ... @@ -138,6 +140,7 @@ func (repository *DividendsIncentivesRuleRepository) Remove(dividendsIncentivesR
}
return dividendsIncentivesRule, nil
}
func (repository *DividendsIncentivesRuleRepository) FindOne(queryOptions map[string]interface{}) (*domain.DividendsIncentivesRule, error) {
tx := repository.transactionContext.PgTx
dividendsIncentivesRuleModel := new(models.DividendsIncentivesRule)
... ... @@ -156,6 +159,7 @@ func (repository *DividendsIncentivesRuleRepository) FindOne(queryOptions map[st
return transform.TransformToDividendsIncentivesRuleDomainModelFromPgModels(dividendsIncentivesRuleModel)
}
}
func (repository *DividendsIncentivesRuleRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.DividendsIncentivesRule, error) {
tx := repository.transactionContext.PgTx
var dividendsIncentivesRuleModels []*models.DividendsIncentivesRule
... ... @@ -182,6 +186,7 @@ func (repository *DividendsIncentivesRuleRepository) Find(queryOptions map[strin
return int64(count), dividendsIncentivesRules, nil
}
}
func NewDividendsIncentivesRuleRepository(transactionContext *pgTransaction.TransactionContext) (*DividendsIncentivesRuleRepository, error) {
if transactionContext == nil {
return nil, fmt.Errorf("transactionContext参数不能为nil")
... ...
... ... @@ -24,6 +24,7 @@ func (repository *MoneyIncentivesRuleRepository) nextIdentify() (int64, error) {
id, err := IdWorker.NextId()
return id, err
}
func (repository *MoneyIncentivesRuleRepository) Save(moneyIncentivesRule *domain.MoneyIncentivesRule) (*domain.MoneyIncentivesRule, error) {
sqlBuildFields := []string{
"money_incentives_rule_id",
... ... @@ -129,6 +130,7 @@ func (repository *MoneyIncentivesRuleRepository) Save(moneyIncentivesRule *domai
}
return moneyIncentivesRule, nil
}
func (repository *MoneyIncentivesRuleRepository) Remove(moneyIncentivesRule *domain.MoneyIncentivesRule) (*domain.MoneyIncentivesRule, error) {
tx := repository.transactionContext.PgTx
moneyIncentivesRuleModel := new(models.MoneyIncentivesRule)
... ... @@ -138,6 +140,7 @@ func (repository *MoneyIncentivesRuleRepository) Remove(moneyIncentivesRule *dom
}
return moneyIncentivesRule, nil
}
func (repository *MoneyIncentivesRuleRepository) FindOne(queryOptions map[string]interface{}) (*domain.MoneyIncentivesRule, error) {
tx := repository.transactionContext.PgTx
moneyIncentivesRuleModel := new(models.MoneyIncentivesRule)
... ... @@ -156,6 +159,7 @@ func (repository *MoneyIncentivesRuleRepository) FindOne(queryOptions map[string
return transform.TransformToMoneyIncentivesRuleDomainModelFromPgModels(moneyIncentivesRuleModel)
}
}
func (repository *MoneyIncentivesRuleRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.MoneyIncentivesRule, error) {
tx := repository.transactionContext.PgTx
var moneyIncentivesRuleModels []*models.MoneyIncentivesRule
... ... @@ -182,6 +186,7 @@ func (repository *MoneyIncentivesRuleRepository) Find(queryOptions map[string]in
return int64(count), moneyIncentivesRules, nil
}
}
func NewMoneyIncentivesRuleRepository(transactionContext *pgTransaction.TransactionContext) (*MoneyIncentivesRuleRepository, error) {
if transactionContext == nil {
return nil, fmt.Errorf("transactionContext参数不能为nil")
... ...
... ... @@ -34,6 +34,7 @@ func (repository *OrderGoodRepository) Save(orderGood *domain.OrderGood) (*domai
"dividends_order_number",
"cooperation_contract_number",
"order_good_expense",
"order_good_dividends_status",
"org_id",
"company_id",
"created_at",
... ... @@ -63,6 +64,7 @@ func (repository *OrderGoodRepository) Save(orderGood *domain.OrderGood) (*domai
&orderGood.DividendsOrderNumber,
&orderGood.CooperationContractNumber,
&orderGood.OrderGoodExpense,
&orderGood.OrderGoodDividendsStatus,
&orderGood.OrgId,
&orderGood.CompanyId,
&orderGood.CreatedAt,
... ... @@ -78,6 +80,7 @@ func (repository *OrderGoodRepository) Save(orderGood *domain.OrderGood) (*domai
orderGood.DividendsOrderNumber,
orderGood.CooperationContractNumber,
orderGood.OrderGoodExpense,
orderGood.OrderGoodDividendsStatus,
orderGood.OrgId,
orderGood.CompanyId,
orderGood.CreatedAt,
... ... @@ -97,6 +100,7 @@ func (repository *OrderGoodRepository) Save(orderGood *domain.OrderGood) (*domai
&orderGood.DividendsOrderNumber,
&orderGood.CooperationContractNumber,
&orderGood.OrderGoodExpense,
&orderGood.OrderGoodDividendsStatus,
&orderGood.OrgId,
&orderGood.CompanyId,
&orderGood.CreatedAt,
... ... @@ -112,6 +116,7 @@ func (repository *OrderGoodRepository) Save(orderGood *domain.OrderGood) (*domai
orderGood.DividendsOrderNumber,
orderGood.CooperationContractNumber,
orderGood.OrderGoodExpense,
orderGood.OrderGoodDividendsStatus,
orderGood.OrgId,
orderGood.CompanyId,
orderGood.CreatedAt,
... ... @@ -124,6 +129,7 @@ func (repository *OrderGoodRepository) Save(orderGood *domain.OrderGood) (*domai
}
return orderGood, nil
}
func (repository *OrderGoodRepository) Remove(orderGood *domain.OrderGood) (*domain.OrderGood, error) {
tx := repository.transactionContext.PgTx
orderGoodModel := new(models.OrderGood)
... ... @@ -133,6 +139,7 @@ func (repository *OrderGoodRepository) Remove(orderGood *domain.OrderGood) (*dom
}
return orderGood, nil
}
func (repository *OrderGoodRepository) FindOne(queryOptions map[string]interface{}) (*domain.OrderGood, error) {
tx := repository.transactionContext.PgTx
orderGoodModel := new(models.OrderGood)
... ... @@ -151,6 +158,7 @@ func (repository *OrderGoodRepository) FindOne(queryOptions map[string]interface
return transform.TransformToOrderGoodDomainModelFromPgModels(orderGoodModel)
}
}
func (repository *OrderGoodRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.OrderGood, error) {
tx := repository.transactionContext.PgTx
var orderGoodModels []*models.OrderGood
... ... @@ -177,6 +185,7 @@ func (repository *OrderGoodRepository) Find(queryOptions map[string]interface{})
return int64(count), orderGoods, nil
}
}
func NewOrderGoodRepository(transactionContext *pgTransaction.TransactionContext) (*OrderGoodRepository, error) {
if transactionContext == nil {
return nil, fmt.Errorf("transactionContext参数不能为nil")
... ...
... ... @@ -10,6 +10,7 @@ type DividendsEstimateController struct {
BaseController
}
// CreateDividendsEstimate 新增分红预算单(预留)
func (controller *DividendsEstimateController) CreateDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
createDividendsEstimateCommand := &command.CreateDividendsEstimateCommand{}
... ... @@ -23,6 +24,7 @@ func (controller *DividendsEstimateController) CreateDividendsEstimate() {
controller.Response(data, err)
}
// UpdateDividendsEstimate 编辑分红预算单(预留)
func (controller *DividendsEstimateController) UpdateDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
updateDividendsEstimateCommand := &command.UpdateDividendsEstimateCommand{}
... ... @@ -38,6 +40,7 @@ func (controller *DividendsEstimateController) UpdateDividendsEstimate() {
controller.Response(data, err)
}
// GetDividendsEstimate 获取分红预算单详情
func (controller *DividendsEstimateController) GetDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
getDividendsEstimateQuery := &query.GetDividendsEstimateQuery{}
... ... @@ -52,6 +55,7 @@ func (controller *DividendsEstimateController) GetDividendsEstimate() {
controller.Response(data, err)
}
// RemoveDividendsEstimate 移除分红预算单(预留)
func (controller *DividendsEstimateController) RemoveDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
removeDividendsEstimateCommand := &command.RemoveDividendsEstimateCommand{}
... ... @@ -67,6 +71,7 @@ func (controller *DividendsEstimateController) RemoveDividendsEstimate() {
controller.Response(data, err)
}
// CancelDividendsEstimate 取消分红预算单
func (controller *DividendsEstimateController) CancelDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
cancelDividendsEstimateCommand := &command.CancelDividendsEstimateCommand{}
... ... @@ -82,20 +87,40 @@ func (controller *DividendsEstimateController) CancelDividendsEstimate() {
controller.Response(data, err)
}
// BatchCancelDividendsEstimate 批量取消分红预算单
func (controller *DividendsEstimateController) BatchCancelDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
batchCancelDividendsEstimateCommand := &command.BatchCancelDividendsEstimateCommand{}
_ = controller.Unmarshal(batchCancelDividendsEstimateCommand)
header := controller.GetRequestHeader(controller.Ctx)
batchCancelDividendsEstimateCommand.CompanyId = header.CompanyId
batchCancelDividendsEstimateCommand.OrgId = header.OrgId
batchCancelDividendsEstimateCommand.UserId = header.UserId
batchCancelDividendsEstimateCommand.UserBaseId = header.UserBaseId
data, err := dividendsEstimateService.BatchCancelDividendsEstimate(batchCancelDividendsEstimateCommand)
controller.Response(data, err)
}
// SearchDividendsEstimate 搜索分红预算单
func (controller *DividendsEstimateController) SearchDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchDividendsEstimateQuery := &query.SearchDividendsEstimateQuery{}
// 解析头部信息
_ = controller.Unmarshal(searchDividendsEstimateQuery)
header := controller.GetRequestHeader(controller.Ctx)
searchDividendsEstimateQuery.CompanyId = header.CompanyId
searchDividendsEstimateQuery.OrgId = header.OrgId
searchDividendsEstimateQuery.UserId = header.UserId
searchDividendsEstimateQuery.UserBaseId = header.UserBaseId
pageSize, _ := controller.GetInt64("pageSize")
searchDividendsEstimateQuery.PageSize = pageSize
pageNumber, _ := controller.GetInt64("pageNumber")
searchDividendsEstimateQuery.PageNumber = pageNumber
data, err := dividendsEstimateService.SearchDividendsEstimate(searchDividendsEstimateQuery)
controller.Response(data, err)
}
func (controller *DividendsEstimateController) EstimateDividendsIncentives() {
// ConfirmDividendsIncentivesEstimate 确定业绩激励分红预算
func (controller *DividendsEstimateController) ConfirmDividendsIncentivesEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
estimateDividendsIncentivesCommand := &command.ConfirmDividendsIncentivesEstimateCommand{}
_ = controller.Unmarshal(estimateDividendsIncentivesCommand)
... ... @@ -104,48 +129,61 @@ func (controller *DividendsEstimateController) EstimateDividendsIncentives() {
estimateDividendsIncentivesCommand.OrgId = header.OrgId
estimateDividendsIncentivesCommand.UserId = header.UserId
estimateDividendsIncentivesCommand.UserBaseId = header.UserBaseId
data, err := dividendsEstimateService.EstimateDividendsIncentives(estimateDividendsIncentivesCommand)
data, err := dividendsEstimateService.ConfirmDividendsIncentivesEstimate(estimateDividendsIncentivesCommand)
controller.Response(data, err)
}
func (controller *DividendsEstimateController) EstimateMoneyIncentives() {
// ConfirmMoneyIncentivesEstimate 确定金额激励分红预算
func (controller *DividendsEstimateController) ConfirmMoneyIncentivesEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
estimateMoneyIncentivesCommand := &command.ConfirmMoneyIncentivesEstimateCommand{}
_ = controller.Unmarshal(estimateMoneyIncentivesCommand)
confirmMoneyIncentivesEstimateCommand := &command.ConfirmMoneyIncentivesEstimateCommand{}
_ = controller.Unmarshal(confirmMoneyIncentivesEstimateCommand)
header := controller.GetRequestHeader(controller.Ctx)
estimateMoneyIncentivesCommand.CompanyId = header.CompanyId
estimateMoneyIncentivesCommand.OrgId = header.OrgId
estimateMoneyIncentivesCommand.UserId = header.UserId
estimateMoneyIncentivesCommand.UserBaseId = header.UserBaseId
data, err := dividendsEstimateService.EstimateMoneyIncentives(estimateMoneyIncentivesCommand)
confirmMoneyIncentivesEstimateCommand.CompanyId = header.CompanyId
confirmMoneyIncentivesEstimateCommand.OrgId = header.OrgId
confirmMoneyIncentivesEstimateCommand.UserId = header.UserId
confirmMoneyIncentivesEstimateCommand.UserBaseId = header.UserBaseId
data, err := dividendsEstimateService.ConfirmMoneyIncentivesEstimate(confirmMoneyIncentivesEstimateCommand)
controller.Response(data, err)
}
func (controller *DividendsEstimateController) ListMoneyIncentives() {
// ListMoneyIncentivesEstimate 返回金额激励分红预算信息列表
func (controller *DividendsEstimateController) ListMoneyIncentivesEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
listMoneyIncentivesQuery := &query.ListMoneyIncentivesEstimateQuery{}
listMoneyIncentivesEstimateQuery := &query.ListMoneyIncentivesEstimateQuery{}
header := controller.GetRequestHeader(controller.Ctx)
listMoneyIncentivesQuery.CompanyId = header.CompanyId
listMoneyIncentivesQuery.OrgId = header.OrgId
listMoneyIncentivesQuery.UserId = header.UserId
listMoneyIncentivesQuery.UserBaseId = header.UserBaseId
data, err := dividendsEstimateService.ListMoneyIncentives(listMoneyIncentivesQuery)
listMoneyIncentivesEstimateQuery.CompanyId = header.CompanyId
listMoneyIncentivesEstimateQuery.OrgId = header.OrgId
listMoneyIncentivesEstimateQuery.UserId = header.UserId
listMoneyIncentivesEstimateQuery.UserBaseId = header.UserBaseId
pageSize, _ := controller.GetInt64("pageSize")
listMoneyIncentivesEstimateQuery.PageSize = pageSize
pageNumber, _ := controller.GetInt64("pageNumber")
listMoneyIncentivesEstimateQuery.PageNumber = pageNumber
data, err := dividendsEstimateService.ListMoneyIncentivesEstimate(listMoneyIncentivesEstimateQuery)
controller.Response(data, err)
}
func (controller *DividendsEstimateController) SearchMoneyIncentives() {
// SearchMoneyIncentivesEstimate 搜索金额激励分红预算信息
func (controller *DividendsEstimateController) SearchMoneyIncentivesEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchMoneyIncentivesQuery := &query.SearchMoneyIncentivesEstimateQuery{}
searchMoneyIncentivesEstimateQuery := &query.SearchMoneyIncentivesEstimateQuery{}
_ = controller.Unmarshal(searchMoneyIncentivesEstimateQuery)
header := controller.GetRequestHeader(controller.Ctx)
searchMoneyIncentivesQuery.CompanyId = header.CompanyId
searchMoneyIncentivesQuery.OrgId = header.OrgId
searchMoneyIncentivesQuery.UserId = header.UserId
searchMoneyIncentivesQuery.UserBaseId = header.UserBaseId
data, err := dividendsEstimateService.SearchMoneyIncentives(searchMoneyIncentivesQuery)
searchMoneyIncentivesEstimateQuery.CompanyId = header.CompanyId
searchMoneyIncentivesEstimateQuery.OrgId = header.OrgId
searchMoneyIncentivesEstimateQuery.UserId = header.UserId
searchMoneyIncentivesEstimateQuery.UserBaseId = header.UserBaseId
pageSize, _ := controller.GetInt64("pageSize")
searchMoneyIncentivesEstimateQuery.PageSize = pageSize
pageNumber, _ := controller.GetInt64("pageNumber")
searchMoneyIncentivesEstimateQuery.PageNumber = pageNumber
data, err := dividendsEstimateService.SearchMoneyIncentivesEstimate(searchMoneyIncentivesEstimateQuery)
controller.Response(data, err)
}
func (controller *DividendsEstimateController) ListDividendsIncentives() {
// ListDividendsIncentivesEstimate 返回业绩激励分红预算信息列表
func (controller *DividendsEstimateController) ListDividendsIncentivesEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
listDividendsIncentivesQuery := &query.ListDividendsIncentivesEstimateQuery{}
header := controller.GetRequestHeader(controller.Ctx)
... ... @@ -153,22 +191,33 @@ func (controller *DividendsEstimateController) ListDividendsIncentives() {
listDividendsIncentivesQuery.OrgId = header.OrgId
listDividendsIncentivesQuery.UserId = header.UserId
listDividendsIncentivesQuery.UserBaseId = header.UserBaseId
data, err := dividendsEstimateService.ListDividendsIncentives(listDividendsIncentivesQuery)
pageSize, _ := controller.GetInt64("pageSize")
listDividendsIncentivesQuery.PageSize = pageSize
pageNumber, _ := controller.GetInt64("pageNumber")
listDividendsIncentivesQuery.PageNumber = pageNumber
data, err := dividendsEstimateService.ListDividendsIncentivesEstimate(listDividendsIncentivesQuery)
controller.Response(data, err)
}
func (controller *DividendsEstimateController) SearchDividendsIncentives() {
// SearchDividendsIncentivesEstimate 搜索业绩激励分红预算信息
func (controller *DividendsEstimateController) SearchDividendsIncentivesEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchDividendsIncentivesQuery := &query.SearchDividendsIncentivesEstimateQuery{}
_ = controller.Unmarshal(searchDividendsIncentivesQuery)
header := controller.GetRequestHeader(controller.Ctx)
searchDividendsIncentivesQuery.CompanyId = header.CompanyId
searchDividendsIncentivesQuery.OrgId = header.OrgId
searchDividendsIncentivesQuery.UserId = header.UserId
searchDividendsIncentivesQuery.UserBaseId = header.UserBaseId
data, err := dividendsEstimateService.SearchDividendsIncentives(searchDividendsIncentivesQuery)
pageSize, _ := controller.GetInt64("pageSize")
searchDividendsIncentivesQuery.PageSize = pageSize
pageNumber, _ := controller.GetInt64("pageNumber")
searchDividendsIncentivesQuery.PageNumber = pageNumber
data, err := dividendsEstimateService.SearchDividendsIncentivesEstimate(searchDividendsIncentivesQuery)
controller.Response(data, err)
}
// ListDividendsEstimate 返回分红预算单列表
func (controller *DividendsEstimateController) ListDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
listDividendsEstimateQuery := &query.ListDividendsEstimateQuery{}
... ...
... ... @@ -6,17 +6,18 @@ import (
)
func init() {
web.Router("/dividends-estimates/", &controllers.DividendsEstimateController{}, "Post:CreateDividendsEstimate")
web.Router("/dividends-estimates/:dividendsEstimateId", &controllers.DividendsEstimateController{}, "Put:UpdateDividendsEstimate")
web.Router("/dividends-estimates/:dividendsEstimateId", &controllers.DividendsEstimateController{}, "Get:GetDividendsEstimate")
web.Router("/dividends-estimates/:dividendsEstimateId", &controllers.DividendsEstimateController{}, "Delete:RemoveDividendsEstimate")
web.Router("/dividends-estimates/:dividendsEstimateId/cancel", &controllers.DividendsEstimateController{}, "Post:CancelDividendsEstimate")
web.Router("/dividends-estimates/search", &controllers.DividendsEstimateController{}, "Post:SearchDividendsEstimate")
web.Router("/dividends-estimates/estimate-dividends-incentives", &controllers.DividendsEstimateController{}, "Post:EstimateDividendsIncentives")
web.Router("/dividends-estimates/estimate-money-incentives", &controllers.DividendsEstimateController{}, "Post:EstimateMoneyIncentives")
web.Router("/dividends-estimates/list-money-incentives", &controllers.DividendsEstimateController{}, "Get:ListMoneyIncentives")
web.Router("/dividends-estimates/search-money-incentives", &controllers.DividendsEstimateController{}, "Post:SearchMoneyIncentives")
web.Router("/dividends-estimates/list-dividends-incentives", &controllers.DividendsEstimateController{}, "Get:ListDividendsIncentives")
web.Router("/dividends-estimates/search-dividends-incentives", &controllers.DividendsEstimateController{}, "Post:SearchDividendsIncentives")
web.Router("/dividends-estimates/", &controllers.DividendsEstimateController{}, "Get:ListDividendsEstimate")
web.Router("/dividends-estimates/", &controllers.DividendsEstimateController{}, "Post:CreateDividendsEstimate") // 新增分红预算单(预留)
web.Router("/dividends-estimates/:dividendsEstimateId", &controllers.DividendsEstimateController{}, "Put:UpdateDividendsEstimate") // 编辑分红预算单(预留)
web.Router("/dividends-estimates/:dividendsEstimateId", &controllers.DividendsEstimateController{}, "Get:GetDividendsEstimate") // 返回分红预算单详情
web.Router("/dividends-estimates/:dividendsEstimateId", &controllers.DividendsEstimateController{}, "Delete:RemoveDividendsEstimate") // 移除分红预算单(预留)
web.Router("/dividends-estimates/:dividendsEstimateId/cancel", &controllers.DividendsEstimateController{}, "Post:CancelDividendsEstimate") // 取消分红预算单
web.Router("/dividends-estimates/batch-cancel", &controllers.DividendsEstimateController{}, "Post:BatchCancelDividendsEstimate") // 批量取消分红预算单
web.Router("/dividends-estimates/search", &controllers.DividendsEstimateController{}, "Post:SearchDividendsEstimate") // 搜索分红预算单
web.Router("/dividends-estimates/estimate-dividends-incentives", &controllers.DividendsEstimateController{}, "Post:ConfirmDividendsIncentivesEstimate") // 确认业绩积累激励分红预算
web.Router("/dividends-estimates/estimate-money-incentives", &controllers.DividendsEstimateController{}, "Post:ConfirmMoneyIncentivesEstimate") // 确认金额激励分红预算
web.Router("/dividends-estimates/list-money-incentives", &controllers.DividendsEstimateController{}, "Get:ListMoneyIncentivesEstimate") // 返回金额激励分红预算信息列表
web.Router("/dividends-estimates/search-money-incentives", &controllers.DividendsEstimateController{}, "Post:SearchMoneyIncentivesEstimate") // 搜索金额激励分红预算信息列表
web.Router("/dividends-estimates/list-dividends-incentives", &controllers.DividendsEstimateController{}, "Get:ListDividendsIncentivesEstimate") // 返回业绩激励分红预算信息列表
web.Router("/dividends-estimates/search-dividends-incentives", &controllers.DividendsEstimateController{}, "Post:SearchDividendsIncentivesEstimate") // 搜索业绩激励分红预算信息列表
web.Router("/dividends-estimates/", &controllers.DividendsEstimateController{}, "Get:ListDividendsEstimate") // 返回分红预算单列表
}
... ...