param_credit_account.go 5.1 KB
package allied_creation_cooperation

import (
	"time"

	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)

type CreditAccount struct {
	CreditAccountId           int       `json:"creditAccountId,string,"`   // 账期结算单ID
	ActuallyPaidAmount        float64   `json:"actuallyPaidAmount"`        // 账期结算实付金额
	CreditAccountOrderNum     string    `json:"creditAccountOrderNum"`     // 账期结算单号
	PaymentStatus             int       `json:"paymentStatus"`             // 账期结算支付状态,1待支付,2已支付
	PaymentTime               time.Time `json:"paymentTime"`               // 共创账期结算支付时间
	SettlementAmount          float64   `json:"settlementAmount"`          // 账期结算金额
	SettlementTime            time.Time `json:"settlementTime"`            // 共创账期结算时间
	CooperationContractNumber string    `json:"cooperationContractNumber"` // 关联共创合约编号
	Participator              struct {
		UserId     int             `json:"userId,string,"`     // 用户ID,
		UserBaseId int             `json:"userBaseId,string,"` // 用户基本id
		UserInfo   domain.UserInfo `json:"userInfo"`           //
		UserName   string          `json:"userName"`           // 用户姓名
		UserPhone  string          `json:"userPhone"`          // 用户手机号
		UserType   int             `json:"userType"`           // 用户类型,1员工,2共创用户,3公开
		Status     int             `json:"status"`             // 状态
	} `json:"participator"` // 参与人
	// 操作人
	Operator struct {
		UserId     int             `json:"userId,string,"`     // 用户ID,
		UserBaseId int             `json:"userBaseId,string,"` // 用户基本id
		UserName   string          `json:"userName"`           // 用户姓名
		UserPhone  string          `json:"userPhone"`          // 用户手机号
		UserInfo   domain.UserInfo `json:"userInfo"`           //
	} `json:"operator"`
	ParticipateType           string            `json:"participateType"`           // 参与类型
	PaymentDocumentAttachment domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件
	Org                       struct {
		OrgID   int    `json:"orgId,string"`
		OrgName string `json:"orgName"`
	} `json:"org"` // 数据所属组织机构
	Company       domain.CompanyData `json:"company1"`  // 公司
	CreatedAt     time.Time          `json:"createdAt"` // 创建时间
	UpdatedAt     time.Time          `json:"updatedAt"` // 更新时间
	AccountDetail struct {
		DividendsEstimateOrderNumber string  `json:"dividendsEstimateOrderNumber"`
		DividendsType                int     `json:"dividendsType"`
		DividendsAmount              float64 `json:"dividendsAmount"`
	} `json:"accountDetail"` //结算明细
}

//支付账期结算
type (
	ReqCreditAccountsPay struct {
		CreditAccountId    int               `json:"creditAccountId,string"`
		ActuallyPaidAmount float64           `json:"actuallyPaidAmount"` //实际支付金额
		Remarks            string            `json:"remarks"`
		Attachment         domain.Attachment `json:"paymentDocumentAttachment"` //附件
	}

	DataCreditAccountsPay struct {
	}
)

//查询账期结算单
type (
	ReqCreditAccountsSearch struct {
		// 页面大小
		PageNumber int64 `json:"pageNumber,omitempty"`
		// 页面大小
		PageSize int64 `json:"pageSize,omitempty"`
		// 账期结算单号
		CreditAccountOrderNum string `json:"creditAccountOrderNum" valid:"Required"`
		// 参与人姓名
		ParticipatorName string ` json:"participatorName,omitempty"`
		// 账期结算支付状态,1待支付,2已支付,APP端结算记录返回已结算的账期结算单
		PaymentStatus int32 `json:"paymentStatus" valid:"Required"`
		// 结算周期,按年“2021”或者按月结算”2021-07“
		Period time.Time `json:"period,omitempty"`
		// 公司ID,通过集成REST上下文获取
		CompanyId int64 `cname:"公司ID" json:"companyId"`
		// 组织机构ID
		OrgId int64 `cname:"组织机构ID" json:"orgId"`
		// 关联的组织机构ID列表
		OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
		// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
		UserId int64 `cname:"用户ID" json:"userId"`
		// 用户基础数据id
		UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
	}

	DataCreditAccountsSearch struct {
		Grid struct {
			Total int             `json:"total"`
			List  []CreditAccount `json:"list"`
		} `json:"grid"`
	}
)

//移除账期结算单
type (
	ReqCreditAccountRemove struct {
		CreditAccountId int `json:"creditAccountId"`
	}

	DataCreditAccountRemove struct {
	}
)

//返回账期结算单列表
type (
	ReqCreditAccountList struct {
	}

	DataCreditAccountList struct {
	}
)

//返回账期结算单详情
type (
	ReqCreditAccountGet struct {
		CreditAccountId int `json:"creditAccountId,string"`
	}

	DataCreditAccountGet struct {
		CreditAccount
	}
)

//创建账期结算
type (
	ReqCreditAccountsAdd struct {
		DividendsEstimateIds []string `json:"dividendsEstimateIds"`
	}

	DataCreditAccountsAdd []struct {
	}
)