Documentation ¶
Index ¶
- func AuditBudget(args *ArgsAuditBudget) (err error)
- func CreateBudget(args *ArgsCreateBudget) (id int64, err error)
- func DeleteBudget(args *ArgsDeleteBudget) (err error)
- func Init()
- func UpdateBudget(args *ArgsUpdateBudget) (err error)
- type ArgsAuditBudget
- type ArgsCreateBudget
- type ArgsDeleteBudget
- type ArgsGetBudgetByID
- type ArgsGetBudgetList
- type ArgsUpdateBudget
- type FieldsBudget
- type FieldsBudgetFlow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditBudget ¶ added in v5.1.8
func AuditBudget(args *ArgsAuditBudget) (err error)
AuditBudget 审批Budget
func CreateBudget ¶ added in v5.1.8
func CreateBudget(args *ArgsCreateBudget) (id int64, err error)
CreateBudget 创建Budget
func DeleteBudget ¶ added in v5.1.8
func DeleteBudget(args *ArgsDeleteBudget) (err error)
DeleteBudget 删除Budget
func UpdateBudget ¶ added in v5.1.8
func UpdateBudget(args *ArgsUpdateBudget) (err error)
UpdateBudget 修改Budget
Types ¶
type ArgsAuditBudget ¶ added in v5.1.8
type ArgsAuditBudget struct { //ID ID int64 `db:"id" json:"id" check:"id"` //审批状态 // 0: 未审批; 1: 审批中; 2: 审批通过; 3: 审批拒绝 Status int `db:"status" json:"status"` }
ArgsAuditBudget 审批Budget参数
type ArgsCreateBudget ¶ added in v5.1.8
type ArgsCreateBudget struct { //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"50"` //描述 Desc string `db:"desc" json:"desc" check:"des" min:"1" max:"300" empty:"true"` //预算总金额 Total float64 `db:"total" json:"total" check:"float64Than0"` //已使用金额 Used float64 `db:"used" json:"used" check:"float64Than0"` //占用金额 // 正在使用中,但尚未归档 Occupied float64 `db:"occupied" json:"occupied" check:"float64Than0"` }
ArgsCreateBudget 创建Budget参数
type ArgsDeleteBudget ¶ added in v5.1.8
type ArgsDeleteBudget struct { //ID ID int64 `db:"id" json:"id" check:"id"` }
ArgsDeleteBudget 删除Budget参数
type ArgsGetBudgetByID ¶ added in v5.1.8
type ArgsGetBudgetByID struct { //ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` }
ArgsGetBudgetByID 获取Budget数据包参数
type ArgsGetBudgetList ¶ added in v5.1.8
type ArgsGetBudgetList struct { //分页参数 Pages CoreSQL2.ArgsPages `json:"pages"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //审批状态 // 0: 未审批; 1: 审批中; 2: 审批通过; 3: 审批拒绝 Status int `db:"status" json:"status"` //是否删除 IsRemove bool `json:"isRemove" check:"bool"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetBudgetList 获取Budget列表参数
type ArgsUpdateBudget ¶ added in v5.1.8
type ArgsUpdateBudget struct { //ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"50"` //描述 Desc string `db:"desc" json:"desc" check:"des" min:"1" max:"300" empty:"true"` //预算总金额 Total float64 `db:"total" json:"total" check:"float64Than0"` //已使用金额 Used float64 `db:"used" json:"used" check:"float64Than0"` //占用金额 // 正在使用中,但尚未归档 Occupied float64 `db:"occupied" json:"occupied" check:"float64Than0"` }
ArgsUpdateBudget 修改Budget参数
type FieldsBudget ¶
type FieldsBudget struct { //ID ID int64 `db:"id" json:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt"` //删除时间 DeleteAt time.Time `db:"delete_at" json:"deleteAt"` //审批状态 // 0: 未审批; 1: 审批中; 2: 审批通过; 3: 审批拒绝 Status int `db:"status" json:"status"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"50"` //描述 Desc string `db:"desc" json:"desc" check:"des" min:"1" max:"300" empty:"true"` //预算总金额 Total float64 `db:"total" json:"total" check:"float64Than0"` //已使用金额 Used float64 `db:"used" json:"used" check:"float64Than0"` //占用金额 // 正在使用中,但尚未归档 Occupied float64 `db:"occupied" json:"occupied" check:"float64Than0"` }
FieldsBudget 预算池
func GetBudgetByID ¶ added in v5.1.8
func GetBudgetByID(args *ArgsGetBudgetByID) (data FieldsBudget, err error)
GetBudgetByID 获取Budget数
func GetBudgetList ¶ added in v5.1.8
func GetBudgetList(args *ArgsGetBudgetList) (dataList []FieldsBudget, dataCount int64, err error)
GetBudgetList 获取Budget列表
type FieldsBudgetFlow ¶
type FieldsBudgetFlow struct { //ID ID int64 `db:"id" json:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt"` //删除时间 DeleteAt time.Time `db:"delete_at" json:"deleteAt"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //生效的预算ID BudgetID int64 `db:"budget_id" json:"budgetID" check:"id"` //备注 Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"300" empty:"true"` //提交人ID Submitter int64 `db:"submitter" json:"submitter" check:"id"` //审批人ID Approver int64 `db:"approver" json:"approver" check:"id"` }
FieldsBudgetFlow 预算审批流
Click to show internal directories.
Click to hide internal directories.