作者 tangxuhui

分红预算 更新

{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego\\routers":1628752601441259500}
\ No newline at end of file
{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego\\routers":1628818869330120900}
\ No newline at end of file
... ...
... ... @@ -112,7 +112,6 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
DepartmentName: v.Department.DepartmentName,
}}
relevants = append(relevants, r)
}
for _, v := range param.DividendsIncentivesRules {
... ...
package command
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type CancelDividendsEstimateCommand struct {
//操作人
Operator domain.Operator `json:"-"`
DividendsEstimateId []string `json:"dividendsEstimateId"`
}
func (cancelDividendsEstimateCommand *CancelDividendsEstimateCommand) Valid(validation *validation.Validation) {
}
func (cancelDividendsEstimateCommand *CancelDividendsEstimateCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(cancelDividendsEstimateCommand)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package command
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type EstimateDividendsIncentivesCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 分红订单号/退货单号
OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum" valid:"Required"`
// 合约编号
CooperationContractNumber string `json:"cooperationContractNumber" valid:"Required"`
}
func (estimateDividendsIncentivesCommand *EstimateDividendsIncentivesCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (estimateDividendsIncentivesCommand *EstimateDividendsIncentivesCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(estimateDividendsIncentivesCommand)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package command
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type EstimateMoneyIncentivesCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 共创项目合约编号
CooperationContractNumber string `json:"cooperationContractNumber" valid:"Required"`
// 承接人UID
UndertakerUid string `json:"undertakerUid,omitempty"`
}
func (estimateMoneyIncentivesCommand *EstimateMoneyIncentivesCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (estimateMoneyIncentivesCommand *EstimateMoneyIncentivesCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(estimateMoneyIncentivesCommand)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package command
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type RemoveDividendsEstimateCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 承接人分红预算记录ID
DividendsEstimateId int64 `json:"dividendsEstimateId" valid:"Required"`
}
func (removeDividendsEstimateCommand *RemoveDividendsEstimateCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (removeDividendsEstimateCommand *RemoveDividendsEstimateCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(removeDividendsEstimateCommand)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package command
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type UpdateDividendsEstimateCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 承接人分红预算记录ID
DividendsEstimateId int64 `json:"dividendsEstimateId" valid:"Required"`
}
func (updateDividendsEstimateCommand *UpdateDividendsEstimateCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (updateDividendsEstimateCommand *UpdateDividendsEstimateCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(updateDividendsEstimateCommand)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type GetDividendsEstimateQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 承接人分红预算记录ID
DividendsEstimateId int64 `json:"dividendsEstimateId" valid:"Required"`
}
func (getDividendsEstimateQuery *GetDividendsEstimateQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (getDividendsEstimateQuery *GetDividendsEstimateQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(getDividendsEstimateQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type ListDividendsEstimateQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 查询偏离量
PageNumber int `json:"pageNumber" `
// 查询限制
PageSize int `json:"pageSize"`
}
func (listDividendsEstimateQuery *ListDividendsEstimateQuery) Valid(validation *validation.Validation) {
}
func (listDividendsEstimateQuery *ListDividendsEstimateQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(listDividendsEstimateQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type ListDividendsIncentivesQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 查询偏离量
PageNumber int `json:"pageNumber" `
// 查询限制
PageSize int `json:"pageSize" `
}
func (listDividendsIncentivesQuery *ListDividendsIncentivesQuery) Valid(validation *validation.Validation) {
}
func (listDividendsIncentivesQuery *ListDividendsIncentivesQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(listDividendsIncentivesQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type ListMoneyIncentivesQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 查询偏离量
PageNumber int `json:"pageNumber" valid:"Required"`
// 查询限制
PageSize int `json:"pageSize" valid:"Required"`
}
func (listMoneyIncentivesQuery *ListMoneyIncentivesQuery) Valid(validation *validation.Validation) {
}
func (listMoneyIncentivesQuery *ListMoneyIncentivesQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(listMoneyIncentivesQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type SearchDividendsEstimateQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 承接人分红预算单号
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
// 分红类型,1订单分红,2退货冲销,3金额激励
DividendsType int `json:"dividendsType" valid:"Required"`
}
func (searchDividendsEstimateQuery *SearchDividendsEstimateQuery) Valid(validation *validation.Validation) {
}
func (searchDividendsEstimateQuery *SearchDividendsEstimateQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(searchDividendsEstimateQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type SearchDividendsIncentivesQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 合约编号
CooperationContractNumber string `json:"cooperationContractNumber,omitempty"`
// 分红订单号/退货单号
OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum,omitempty"`
}
func (searchDividendsIncentivesQuery *SearchDividendsIncentivesQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (searchDividendsIncentivesQuery *SearchDividendsIncentivesQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(searchDividendsIncentivesQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type SearchMoneyIncentivesQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 共创合约名称
CooperationContractName string `json:"cooperationContractName,omitempty"`
}
func (searchMoneyIncentivesQuery *SearchMoneyIncentivesQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (searchMoneyIncentivesQuery *SearchMoneyIncentivesQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(searchMoneyIncentivesQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
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
}
... ...
... ... @@ -15,10 +15,10 @@ var HTTP_PORT int = 8083
var ALLIED_CREATION_BASIC_HOST = "http://localhost:8080"
//天联共创用户模块
var ALLIED_CREATION_USER_HOST = "http://localhost:8081"
var ALLIED_CREATION_USER_HOST = "http://allied-creation-user-dev.fjmaimaimai.com"
//天联共创业务模块
var ALLIED_CREATION_COOPERATION_HOST = "http://localhost:8082"
var ALLIED_CREATION_COOPERATION_HOST = "http://allied-creation-cooperation-dev.fjmaimaimai.com"
//通用模块短信服务
var SMS_SERVE_HOST = "https://sms.fjmaimaimai.com:9897"
... ...
... ... @@ -9,67 +9,36 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
)
// DividendsEstimateIncentive 确定预算分红激励
func (gateway HttplibAlliedCreationCooperation) DividendsEstimateIncentive(param ReqDividendsEstimateIncentive) (*DataDividendsEstimateIncentive, error) {
url := gateway.baseUrL + "/dividends-estimates/estimate-dividends-incentives"
method := "POST"
req := gateway.CreateRequest(url, method)
log.Logger.Debug("向业务模块请求数据:确定预算分红激励。", map[string]interface{}{
"api": method + ":" + url,
"param": param,
})
req, err := req.JSONBody(param)
if err != nil {
return nil, fmt.Errorf("请求确定预算分红激励失败:%w", err)
}
byteResult, err := req.Bytes()
if err != nil {
return nil, fmt.Errorf("获取确定预算分红激励失败:%w", err)
}
log.Logger.Debug("获取业务模块请求数据:确定预算分红激励。", map[string]interface{}{
"result": string(byteResult),
})
var result service_gateway.GatewayResponse
err = json.Unmarshal(byteResult, &result)
if err != nil {
return nil, fmt.Errorf("解析确定预算分红激励:%w", err)
}
var data DataDividendsEstimateIncentive
err = gateway.GetResponseData(result, &data)
return &data, err
}
// DividendsEstimateUpdate 更新分红预算
func (gateway HttplibAlliedCreationCooperation) DividendsEstimateUpdate(param ReqDividendsEstimateUpdate) (*DataDividendsEstimateUpdate, error) {
url := gateway.baseUrL + "/dividends-estimates/{dividendsEstimateId}"
method := "PUT"
req := gateway.CreateRequest(url, method)
log.Logger.Debug("向业务模块请求数据:更新分红预算。", map[string]interface{}{
"api": method + ":" + url,
"param": param,
})
req, err := req.JSONBody(param)
if err != nil {
return nil, fmt.Errorf("请求更新分红预算失败:%w", err)
}
// func (gateway HttplibAlliedCreationCooperation) DividendsEstimateUpdate(param ReqDividendsEstimateUpdate) (*DataDividendsEstimateUpdate, error) {
// url := gateway.baseUrL + "/dividends-estimates/{dividendsEstimateId}"
// method := "PUT"
// req := gateway.CreateRequest(url, method)
// log.Logger.Debug("向业务模块请求数据:更新分红预算。", map[string]interface{}{
// "api": method + ":" + url,
// "param": param,
// })
// req, err := req.JSONBody(param)
// if err != nil {
// return nil, fmt.Errorf("请求更新分红预算失败:%w", err)
// }
byteResult, err := req.Bytes()
if err != nil {
return nil, fmt.Errorf("获取更新分红预算失败:%w", err)
}
log.Logger.Debug("获取业务模块请求数据:更新分红预算。", map[string]interface{}{
"result": string(byteResult),
})
var result service_gateway.GatewayResponse
err = json.Unmarshal(byteResult, &result)
if err != nil {
return nil, fmt.Errorf("解析更新分红预算:%w", err)
}
var data DataDividendsEstimateUpdate
err = gateway.GetResponseData(result, &data)
return &data, err
}
// byteResult, err := req.Bytes()
// if err != nil {
// return nil, fmt.Errorf("获取更新分红预算失败:%w", err)
// }
// log.Logger.Debug("获取业务模块请求数据:更新分红预算。", map[string]interface{}{
// "result": string(byteResult),
// })
// var result service_gateway.GatewayResponse
// err = json.Unmarshal(byteResult, &result)
// if err != nil {
// return nil, fmt.Errorf("解析更新分红预算:%w", err)
// }
// var data DataDividendsEstimateUpdate
// err = gateway.GetResponseData(result, &data)
// return &data, err
// }
// Dividends-estimatesSearch-dividends-incentives 查询业绩分红
func (gateway HttplibAlliedCreationCooperation) DividendsEstimateSearchDividends(param ReqDividendsEstimateSearchDividend) (*DataDividendsEstimateSearchDividend, error) {
... ... @@ -381,3 +350,34 @@ func (gateway HttplibAlliedCreationCooperation) DividendsEstimatesListMoney(para
err = gateway.GetResponseData(result, &data)
return &data, err
}
// DividendsEstimatesBatchCancel 取消分红预算
func (gateway HttplibAlliedCreationCooperation) DividendsEstimatesBatchCancel(param ReqDividendsEstimateBatchCancel) (*DataDividendsEstimateBatchCancel, error) {
url := gateway.baseUrL + "/dividends-estimates/batch-cancel"
method := "POST"
req := gateway.CreateRequest(url, method)
log.Logger.Debug("向业务模块请求数据:批量取消分红预算。", map[string]interface{}{
"api": method + ":" + url,
"param": param,
})
req, err := req.JSONBody(param)
if err != nil {
return nil, fmt.Errorf("请求批量取消分红预算失败:%w", err)
}
byteResult, err := req.Bytes()
if err != nil {
return nil, fmt.Errorf("获取批量取消分红预算失败:%w", err)
}
log.Logger.Debug("获取业务模块请求数据:批量取消分红预算。", map[string]interface{}{
"result": string(byteResult),
})
var result service_gateway.GatewayResponse
err = json.Unmarshal(byteResult, &result)
if err != nil {
return nil, fmt.Errorf("解析批量取消分红预算:%w", err)
}
var data DataDividendsEstimateBatchCancel
err = gateway.GetResponseData(result, &data)
return &data, err
}
... ...
... ... @@ -2,31 +2,15 @@ package allied_creation_cooperation
import "time"
//确定预算分红激励
type (
ReqDividendsEstimateIncentive struct {
CooperationContractNumber string //合约编号
OrderOrReturnedOrderNum string //分红订单号/退货单号
}
DataDividendsEstimateIncentive struct {
}
)
//更新分红预算
type (
ReqDividendsEstimateUpdate struct {
}
DataDividendsEstimateUpdate struct {
}
)
//查询业绩分红
type (
ReqDividendsEstimateSearchDividend struct {
PageNumber int `json:"pageNumber"`
PageSize int `json:"pageSize"`
//合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
//分红订单号/退货单号
OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"`
}
DataDividendsEstimateSearchDividend struct {
... ... @@ -36,57 +20,72 @@ type (
//查询分红预算单
type (
ReqDividendsEstimateSearch struct {
PageNumber int `json:"pageNumber"`
PageSize int `json:"pageSize"`
//承接人分红预算单号
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
//分红类型,1订单分红,2退货冲销,3金额激励
DividendsType int `json:"dividendsType"`
PageNumber int `json:"pageNumber"`
PageSize int `json:"pageSize"`
}
DataDividendsEstimateSearch struct {
Grid struct {
Total int
Total int `json:"total"`
List []struct {
DividendsEstimateId int64 `json:"dividendsEstimateId,string"` // 承接人分红预算记录ID
DividendsAccountStatus int32 `json:"dividendsAccountStatus"` // 分红结算状态
DividendsEstimateId int `json:"dividendsEstimateId,string,"` // 承接人分红预算记录ID
DividendsAccountStatus int `json:"dividendsAccountStatus"` // 分红结算状态
DividendsAmount float64 `json:"dividendsAmount"` // 分红金额
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"` // 承接人分红预算单号
DividendsEstimateTime time.Time `json:"dividendsEstimateTime"` // 分红预算时间
DividendsParticipateType int32 `json:"dividendsParticipateType"` // 参与分红类型,1承接人,2推荐人,3关联业务员
DividendsType int32 `json:"dividendsType"` // 分红类型,1订单分红,2退货冲销,3金额激励
DividendsParticipateType int `json:"dividendsParticipateType"` // 参与分红类型,1承接人,2推荐人,3关联业务员
DividendsType int `json:"dividendsType"` // 分红类型,1订单分红,2退货冲销,3金额激励
OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"` // 分红订单号或退货单号
CooperationProjectNumber string `json:"cooperationProjectNumber"` // 共创项目编号,
DividendsUser struct {
UserId int64 `json:"userId,string"` // 用户ID,
UserBaseId int64 `json:"userBaseId,string"` // 用户基本id
UserType int32 `json:"userType"` // 用户类型
UserId int `json:"userId,string,"` // 用户ID,
UserBaseId int `json:"userBaseId,string,"` // 用户基本id
UserType int `json:"userType"` // 用户类型
} `json:"dividendsUser"` // 分红用户
Org struct {
OrgId int64 `json:"orgId,string"` // 组织机构ID
OrgName string `json:"orgName"` // 组织名称
OrgId int `json:"orgId,string,"` // 组织机构ID
OrgName string `json:"orgName"` // 组织名称
} `json:"org"` // 数据所属组织机构
Company struct {
CompanyId int64 `json:"companyId,string"` // 公司ID,
CompanyLogo string `json:"companyLogo"` // 公司logo
CompanyName string `json:"companyName"` // 公司名称
CompanyId int `json:"companyId,string,"` // 公司ID,
CompanyLogo string `json:"companyLogo"` // 公司logo
CompanyName string `json:"companyName"` // 公司名称
} `json:"company"` // 公司
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
}
} `json:"list"`
} `json:"grid"`
}
)
//查询金额激励分红
type (
ReqDividendsEstimateSearchMoney struct {
PageNumber int `json:"pageNumber"`
PageSize int `json:"pageSize"`
//共创合约名称
CooperationContractName string `json:"cooperationContractName"`
//发起部门名称
DepartmentName string `json:"departmentName"`
}
DataDividendsEstimateSearchMoney struct {
Grid struct {
Total int
List []struct {
}
}
}
)
//取消分红预算
type (
ReqDividendsEstimateCancel struct {
DividendsEstimateId int
DividendsEstimateId int `json:"dividendsEstimateId"`
}
DataDividendsEstimateCancel struct {
... ... @@ -105,7 +104,7 @@ type (
//移除分红预算
type (
ReqDividendsEstimateRemove struct {
DividendsEstimateId int
DividendsEstimateId int `json:"dividendsEstimateId"`
}
DataDividendsEstimateRemove struct {
... ... @@ -133,7 +132,7 @@ type (
//返回分红预算详情
type (
ReqDividendsEstimateGet struct {
DividendsEstimateId int
DividendsEstimateId int `json:"dividendsEstimateId"`
}
DataDividendsEstimateGet struct {
... ... @@ -173,3 +172,13 @@ type (
DataDividendsEstimatesListMoney struct {
}
)
//取消分红预算
type (
ReqDividendsEstimateBatchCancel struct {
DividendsEstimateIds []string `json:"dividendsEstimateIds"`
}
DataDividendsEstimateBatchCancel struct {
}
)
... ...