|
|
package allied_creation_cooperation
|
|
|
|
|
|
import "time"
|
|
|
import (
|
|
|
"time"
|
|
|
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
|
|
)
|
|
|
|
|
|
//创建共创合约
|
|
|
type (
|
|
|
//分红激励规则
|
|
|
DividendsIncentivesRule struct {
|
|
|
// 关联的项目合约编号
|
|
|
CooperationContractNumber string `json:"cooperationContractNumber"`
|
|
|
// 推荐人抽成比例
|
|
|
ReferrerPercentage float64 `json:"referrerPercentage"`
|
|
|
// 业务员抽成比例
|
|
|
SalesmanPercentage float64 `json:"salesmanPercentage"`
|
|
|
// 分红规则激励百分点
|
|
|
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
|
|
|
// 分红规则激励阶段,
|
|
|
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"`
|
|
|
// 分红规则激励阶段结束
|
|
|
DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"`
|
|
|
// 分红规则激励阶段开始
|
|
|
DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"`
|
|
|
}
|
|
|
//金额激励规则
|
|
|
MoneyIncentivesRule struct {
|
|
|
// 金额激励规则ID
|
|
|
MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string"`
|
|
|
// 关联的共创合约编号
|
|
|
CooperationContractNumber string `json:"cooperationContractNumber"`
|
|
|
// 激励金额
|
|
|
MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"`
|
|
|
// 金额激励阶段
|
|
|
MoneyIncentivesStage int `json:"moneyIncentivesStage"`
|
|
|
// 金额激励规则时间
|
|
|
MoneyIncentivesTime time.Time `json:"moneyIncentivesTime"`
|
|
|
// 推荐人抽成比例
|
|
|
ReferrerPercentage float64 `json:"referrerPercentage"`
|
|
|
// 业务员抽成比例
|
|
|
SalesmanPercentage float64 `json:"salesmanPercentage"`
|
|
|
}
|
|
|
|
|
|
//合约承接方
|
|
|
Undertaker struct {
|
|
|
UndertakerId string `json:"undertakerId"` //承接人用户id
|
|
|
RerferrerId string `json:"rerferrerId"` //推荐人用户id
|
|
|
SalesmanId string `json:"salesmanId"` //关联业务员id
|
|
|
Attachment domain.Attachment `json:"attachment"`
|
|
|
}
|
|
|
|
|
|
ReqCooperationContractAdd struct {
|
|
|
// 共创合约描述
|
|
|
CooperationContractDescription string ` json:"cooperationContractDescription"`
|
|
|
CooperationContractDescription string `json:"cooperationContractDescription"`
|
|
|
// 共创合约编号
|
|
|
CooperationContractNumber string ` json:"cooperationContractNumber"`
|
|
|
CooperationContractNumber string `json:"cooperationContractNumber"`
|
|
|
// 共创项目编号,
|
|
|
CooperationProjectNumber string `json:"cooperationProjectNumber" `
|
|
|
// 共创合约发起部门编码
|
|
|
DepartmentNumber string `json:"departmentNumber"`
|
|
|
CooperationProjectNumber string `json:"cooperationProjectNumber"`
|
|
|
// 共创合约发起部门id
|
|
|
DepartmentId string `json:"departmentId"`
|
|
|
// 共创合约承接对象,1员工,2共创用户,3公开
|
|
|
CooperationContractUndertakerType []int ` json:"cooperationContractUndertakerType"`
|
|
|
CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"`
|
|
|
// 共创合约名称
|
|
|
CooperationContractName string `json:"cooperationContractName"`
|
|
|
// 共创模式编码,手动输入,唯一确定
|
|
|
CooperationModeNumber string ` json:"cooperationModeNumber"`
|
|
|
// 共创模式编码,
|
|
|
CooperationModeNumber string `json:"cooperationModeNumber"`
|
|
|
// 共创合约发起人uid
|
|
|
SponsorUid string `json:"sponsorUid,omitempty"`
|
|
|
SponsorUid string `json:"sponsorUid"`
|
|
|
// 业绩分红激励规则列表
|
|
|
DividendsIncentivesRules []struct {
|
|
|
// 关联的项目合约编号
|
|
|
CooperationContractNumber string `json:"cooperationContractNumber"`
|
|
|
// 推荐人抽成比例
|
|
|
ReferrerPercentage float64 `json:"referrerPercentage"`
|
|
|
// 业务员抽成比例
|
|
|
SalesmanPercentage float64 `json:"salesmanPercentage"`
|
|
|
// 分红规则激励百分点
|
|
|
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
|
|
|
// 分红规则激励阶段,阶段返回时需要转换为中文数字
|
|
|
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"`
|
|
|
// 分红规则激励阶段结束
|
|
|
DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"`
|
|
|
// 分红规则激励阶段开始
|
|
|
DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"`
|
|
|
} `json:"dividendsIncentivesRules"`
|
|
|
DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"`
|
|
|
// 金额激励规则列表
|
|
|
MoneyIncentivesRules []struct {
|
|
|
// 金额激励规则ID
|
|
|
MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string"`
|
|
|
// 关联的共创合约编号
|
|
|
CooperationContractNumber string `json:"cooperationContractNumber"`
|
|
|
// 激励金额
|
|
|
MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"`
|
|
|
// 金额激励阶段,阶段返回时需要转换为中文数字
|
|
|
MoneyIncentivesStage int64 `json:"moneyIncentivesStage,string"`
|
|
|
// 金额激励阶段有效期结束
|
|
|
MoneyIncentivesStageEnd time.Time `json:"moneyIncentivesStageEnd"`
|
|
|
// 金额激励阶段有效期开始
|
|
|
MoneyIncentivesStageStart time.Time `json:"moneyIncentivesStageStart"`
|
|
|
// 金额激励规则时间
|
|
|
MoneyIncentivesTime time.Time `json:"moneyIncentivesTime"`
|
|
|
// 推荐人抽成比例
|
|
|
ReferrerPercentage float64 `json:"referrerPercentage"`
|
|
|
// 业务员抽成比例
|
|
|
SalesmanPercentage float64 `json:"salesmanPercentage"`
|
|
|
} `json:"moneyIncentivesRules"`
|
|
|
MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"`
|
|
|
// 承接方列表
|
|
|
Undertakers []struct {
|
|
|
UserId int64 `json:"userId,string"`
|
|
|
// 用户基本id
|
|
|
UserBaseId int64 `json:"userBaseId,string"`
|
|
|
// 用户所属组织机构
|
|
|
Org struct {
|
|
|
// 组织机构ID
|
|
|
OrgId int64 `json:"orgId,string"`
|
|
|
// 组织名称
|
|
|
OrgName string `json:"orgName"`
|
|
|
}
|
|
|
} `json:"undertakers"`
|
|
|
Undertakers []Undertaker `json:"undertakers"`
|
|
|
//关联业务员
|
|
|
RelevantIds []string `json:"relevantIds"`
|
|
|
}
|
|
|
|
|
|
DataCooperationContractAdd struct {
|
...
|
...
|
@@ -81,7 +85,31 @@ type ( |
|
|
//更新共创合约
|
|
|
type (
|
|
|
ReqCooperationContractUpdate struct {
|
|
|
CooperationContractId int
|
|
|
CooperationContractId int `json:"cooperationContractId"`
|
|
|
// 共创合约描述
|
|
|
CooperationContractDescription string `json:"cooperationContractDescription"`
|
|
|
// 共创合约编号
|
|
|
CooperationContractNumber string `json:"cooperationContractNumber"`
|
|
|
// 共创项目编号,
|
|
|
CooperationProjectNumber string `json:"cooperationProjectNumber"`
|
|
|
// 共创合约发起部门id
|
|
|
DepartmentId string `json:"departmentId"`
|
|
|
// 共创合约承接对象,1员工,2共创用户,3公开
|
|
|
CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"`
|
|
|
// 共创合约名称
|
|
|
CooperationContractName string `json:"cooperationContractName"`
|
|
|
// 共创模式编码,
|
|
|
CooperationModeNumber string `json:"cooperationModeNumber"`
|
|
|
// 共创合约发起人uid
|
|
|
SponsorUid string `json:"sponsorUid,omitempty,"`
|
|
|
// 业绩分红激励规则列表
|
|
|
DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"`
|
|
|
// 金额激励规则列表
|
|
|
MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"`
|
|
|
// 承接方列表
|
|
|
Undertakers []Undertaker `json:"undertakers"`
|
|
|
//关联业务员
|
|
|
RelevantIds []string `json:"relevantIds"`
|
|
|
}
|
|
|
|
|
|
DataCooperationContractUpdate struct {
|
...
|
...
|
@@ -100,6 +128,11 @@ type ( |
|
|
//根据承接人查询并返回共创项目合约
|
|
|
type (
|
|
|
ReqCooperationContractSearchByUndertaker struct {
|
|
|
CooperationContractName string //合约名称
|
|
|
SponsorName string //项目发起人姓名
|
|
|
UserId int //合约发起人
|
|
|
PageNumber int
|
|
|
PageIndex int
|
|
|
}
|
|
|
|
|
|
DataCooperationContractSearchByUndertaker struct {
|
...
|
...
|
|