Documentation ¶
Index ¶
- Constants
- type Analyzer
- type Assemble
- func (a *Assemble) BeforeInsert(ctx context.Context) error
- func (a *Assemble) BeforeRemove(ctx context.Context) error
- func (a *Assemble) BeforeUpdate(ctx context.Context) error
- func (a Assemble) Mapping() map[string]interface{}
- func (a Assemble) TableCnName() string
- func (a Assemble) TableName() string
- func (a Assemble) ToESDoc() map[string]interface{}
- type AssembleTemplate
- type BasicModel
- type BookNameInfo
- type Credential
- type CredentialEvent
- type CredentialMapping
- type CredentialTemplate
- type Disassemble
- func (d *Disassemble) BeforeInsert(ctx context.Context) error
- func (d *Disassemble) BeforeRemove(ctx context.Context) error
- func (d *Disassemble) BeforeUpdate(ctx context.Context) error
- func (d Disassemble) Mapping() map[string]interface{}
- func (d Disassemble) TableCnName() string
- func (d Disassemble) TableName() string
- func (d Disassemble) ToESDoc() map[string]interface{}
- type PayType
- type Purchase
- func (p *Purchase) BeforeInsert(ctx context.Context) error
- func (p *Purchase) BeforeRemove(ctx context.Context) error
- func (p *Purchase) BeforeUpdate(ctx context.Context) error
- func (p Purchase) Mapping() map[string]interface{}
- func (p Purchase) TableCnName() string
- func (p Purchase) TableName() string
- func (p Purchase) ToESDoc() map[string]interface{}
- type RelatedInvoice
- type Return
- func (r *Return) AfterDelete(ctx context.Context) error
- func (r *Return) AfterInsert(ctx context.Context) error
- func (r *Return) AfterUpdate(ctx context.Context) error
- func (r Return) Mapping() map[string]interface{}
- func (r Return) TableCnName() string
- func (r Return) TableName() string
- func (r Return) ToESDoc() map[string]interface{}
- type StockInRecord
- func (s *StockInRecord) BeforeInsert(ctx context.Context) error
- func (s *StockInRecord) BeforeRemove(ctx context.Context) error
- func (s *StockInRecord) BeforeUpdate(ctx context.Context) error
- func (s StockInRecord) Mapping() map[string]interface{}
- func (s StockInRecord) TableCnName() string
- func (s StockInRecord) TableName() string
- func (s *StockInRecord) ToCredential(ctx *gin.Context)
- func (s StockInRecord) ToESDoc() map[string]interface{}
- type StockOutRecord
- func (m *StockOutRecord) BeforeInsert(ctx context.Context) error
- func (m *StockOutRecord) BeforeRemove(ctx context.Context) error
- func (m *StockOutRecord) BeforeUpdate(ctx context.Context) error
- func (m StockOutRecord) Mapping() map[string]interface{}
- func (m StockOutRecord) TableCnName() string
- func (m StockOutRecord) TableName() string
- func (m StockOutRecord) ToCredential(ctx *gin.Context)
- func (m StockOutRecord) ToESDoc() map[string]interface{}
- type Transaction
- func (t *Transaction) BeforeDelete(ctx context.Context) error
- func (t *Transaction) BeforeInsert(ctx context.Context) error
- func (t *Transaction) BeforeUpdate(ctx context.Context) error
- func (t Transaction) Mapping() map[string]interface{}
- func (t Transaction) TableCnName() string
- func (t Transaction) TableName() string
- func (t Transaction) ToESDoc() map[string]interface{}
Constants ¶
View Source
const ( IK_SMART = "ik_smart" IK_MAX_WORD = "ik_max_word" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assemble ¶
type Assemble struct { BasicModel `bson:"inline"` BookNameInfo `bson:"-"` AssembleName *string `form:"assemble_name,omitempty" json:"assemble_name,omitempty" bson:"assemble_name,omitempty" cn:"组装单名称"` AssembleOwnerID *int `` /* 131-byte string literal not displayed */ AssembleOwnerName *string `` /* 137-byte string literal not displayed */ AssembleTemplateID int `form:"assemble_template_id" json:"assemble_template_id" bson:"assemble_template_id" cn:"组装拆卸模板编号"` AssembleContent []stockRecordContent `form:"assemble_content" json:"assemble_content" bson:"assemble_content" cn:"组装单内容"` Remark *string `form:"remark,omitempty" json:"remark,omitempty" bson:"remark,omitempty" cn:"备注"` }
Assemble 组装
func (Assemble) TableCnName ¶
type AssembleTemplate ¶
type AssembleTemplate struct { BasicModel `bson:"inline"` BookNameInfo `bson:"-"` AssembleTemplateName *string `form:"assemble_template_name,omitempty" json:"assemble_template_name,omitempty" bson:"assemble_template_name,omitempty"` AssembleMaterialList []assembleElement `bson:"assemble_material_list" json:"assemble_material_list" form:"assemble_material_list"` AssembleCommodityList []assembleElement `bson:"assemble_commodity_list" json:"assemble_commodity_list" form:"assemble_commodity_list"` OperatorID *int `bson:"operator_id" json:"operator_id" form:"operator_id"` OperatorName *string `bson:"operator_name" json:"operator_name" form:"operator_name"` Remark *string `bson:"remark" json:"remark" form:"remark"` }
AssembleTemplate 组装拆卸模板
func (AssembleTemplate) TableCnName ¶
func (a AssembleTemplate) TableCnName() string
func (AssembleTemplate) TableName ¶
func (a AssembleTemplate) TableName() string
type BasicModel ¶
type BookNameInfo ¶
type Credential ¶
type Credential struct { BasicModel `bson:"inline"` BookNameInfo `bson:"-"` CredentialName *string `json:"credential_name,omitempty" form:"credential_name,omitempty" bson:"credential_name,omitempty" cn:"凭证标题"` CredentialOwnerID int `json:"credential_owner_id" form:"credential_owner_id" bson:"credential_owner_id" cn:"凭证责任人编号"` CredentialOwnerName string `json:"credential_owner_name" form:"credential_owner_name" bson:"credential_owner_name" cn:"凭证责任人名称"` CredentialEvents []CredentialEvent `json:"credential_events" form:"credential_events" bson:"credential_events" cn:"凭证分录"` CredentialMakerID *int `json:"credential_maker_id" form:"credential_maker_id" bson:"credential_maker_id" cn:"制单人编号"` CredentialMakerName *string `json:"credential_maker_name" form:"credential_maker_name" bson:"credential_maker_name" cn:"制单人名称"` CredentialAccountantID *int `json:"credential_accountant_id" form:"credential_accountant_id" bson:"credential_accountant_id" cn:"会计编号"` CredentialAccountantName *string `json:"credential_accountant_name" form:"credential_accountant_name" bson:"credential_accountant_name" cn:"会计名称"` CredentialCashierID *int `json:"credential_cashier_id" form:"credential_cashier_id" bson:"credential_cashier_id" cn:"出纳编号"` CredentialCashierName *string `json:"credential_cashier_name" form:"credential_cashier_name" bson:"credential_cashier_name" cn:"出纳名称"` CredentialCheckerID *int `json:"credential_checker_id" form:"credential_checker_id" bson:"credential_checker_id" cn:"复核编号"` CredentialCheckerName *string `json:"credential_checker_name" form:"credential_checker_name" bson:"credential_checker_name" cn:"复核名称"` CredentialStatus *_const.CredentialStatus `json:"credential_status,omitempty" form:"credential_status,omitempty" bson:"credential_status,omitempty"` Remark *string `json:"remark" form:"remark" bson:"remark" cn:"备注"` }
Credential 财务凭证
func (Credential) Mapping ¶
func (c Credential) Mapping() map[string]interface{}
func (Credential) TableCnName ¶
func (c Credential) TableCnName() string
func (Credential) TableName ¶
func (c Credential) TableName() string
type CredentialEvent ¶
type CredentialEvent struct { Abstract string `json:"abstract" form:"abstract" bson:"abstract" cn:"摘要"` Classify string `json:"classify" form:"classify" bson:"classify" cn:"科目"` DetailClassify string `json:"detail_classify" form:"detail_classify" bson:"detail_classify" cn:"明细科目"` LoanAmount string `json:"loan_amount" form:"loan_amount" bson:"loan_amount" cn:"贷方金额"` DebitAmount string `json:"debit_amount" form:"debit_amount" bson:"debit_amount" cn:"借方金额"` }
CredentialEvent 凭证条目
type CredentialMapping ¶
type CredentialMapping struct { OriginalColumnEn string `bson:"original_column_en" json:"original_column_en" form:"original_column_en"` OriginalColumnCn string `bson:"original_column_cn" json:"original_column_cn" form:"original_column_cn"` TargetColumnEn string `bson:"target_column_en" json:"target_column_en" form:"target_column_en"` TargetColumnCn string `bson:"target_column_cn" json:"target_column_cn" form:"target_column_cn"` }
type CredentialTemplate ¶
type CredentialTemplate struct { BasicModel `bson:"inline"` CredentialTemplateName string `bson:"credential_template_name" json:"credential_template_name" form:"credential_template_name"` CredentialMappingList []CredentialMapping }
func (CredentialTemplate) TableCnName ¶
func (c CredentialTemplate) TableCnName() string
func (CredentialTemplate) TableName ¶
func (c CredentialTemplate) TableName() string
type Disassemble ¶
type Disassemble struct { BasicModel `bson:"inline"` BookNameInfo `bson:"-"` DisassembleName *string `form:"disassemble_name,omitempty" json:"disassemble_name,omitempty" bson:"disassemble_name,omitempty" cn:"拆卸单名称"` DisassembleOwnerID *int `` /* 143-byte string literal not displayed */ DisassembleOwnerName *string `` /* 149-byte string literal not displayed */ AssembleTemplateID int `form:"assemble_template_id" json:"assemble_template_id" bson:"assemble_template_id" cn:"组装拆卸模板编号"` DisassembleContent []stockRecordContent `form:"disassemble_content" json:"disassemble_content" bson:"disassemble_content" cn:"拆卸单内容"` Remark *string `form:"remark,omitempty" json:"remark,omitempty" bson:"remark,omitempty" cn:"备注"` }
Disassemble 拆卸
func (*Disassemble) BeforeInsert ¶
func (d *Disassemble) BeforeInsert(ctx context.Context) error
func (*Disassemble) BeforeRemove ¶
func (d *Disassemble) BeforeRemove(ctx context.Context) error
func (*Disassemble) BeforeUpdate ¶
func (d *Disassemble) BeforeUpdate(ctx context.Context) error
func (Disassemble) Mapping ¶
func (d Disassemble) Mapping() map[string]interface{}
func (Disassemble) TableCnName ¶
func (d Disassemble) TableCnName() string
func (Disassemble) TableName ¶
func (d Disassemble) TableName() string
func (Disassemble) ToESDoc ¶
func (d Disassemble) ToESDoc() map[string]interface{}
type Purchase ¶
type Purchase struct { BasicModel `bson:"inline"` BookNameInfo `bson:"-"` PurchaseName *string `json:"purchase_name,omitempty" form:"purchase_name,omitempty" bson:"purchase_name,omitempty"` ProviderID *int `json:"provider_id,omitempty" form:"provider_id" bson:"provider_id" cn:"供应商编号"` ProviderName *string `json:"provider_name,omitempty" form:"provider_name" bson:"provider_name" cn:"供应商名称"` ProviderOwner *string `json:"provider_owner,omitempty" form:"provider_owner" bson:"provider_owner" cn:"对方联络人"` ProviderOwnerPhone *string `json:"provider_owner_phone,omitempty" form:"provider_owner_phone" bson:"provider_owner_phone" cn:"对方联系方式"` PurchaseOwnerID *int `json:"purchase_owner_id,omitempty" form:"purchase_owner_id" bson:"purchase_owner_id" cn:"负责人ID"` PurchaseOwnerName *string `json:"purchase_owner_name,omitempty" form:"purchase_owner_name" bson:"purchase_owner_name" cn:"负责人名称"` PurchaseTotalAmount string `json:"purchase_total_amount" form:"purchase_total_amount" bson:"purchase_total_amount" cn:"总金额"` PurchaseTotalIncludedTax string `json:"purchase_total_included_tax" form:"purchase_total_included_tax" bson:"purchase_total_included_tax" cn:"含税总额"` PurchaseContent []purchaseContent `json:"purchase_content" form:"purchase_content" bson:"purchase_content" cn:"采购内容"` PurchaseDate *string `json:"purchase_date" form:"purchase_date" bson:"purchase_date" cn:"采购日期"` Remark *string `json:"remark,omitempty" form:"remark,omitempty" bson:"remark" cn:"备注"` }
Purchase 采购
func (*Purchase) BeforeInsert ¶
BeforeInsert 同步创建应收
func (*Purchase) BeforeRemove ¶
BeforeRemove 采购同步删除应付
func (Purchase) TableCnName ¶
type RelatedInvoice ¶
type RelatedInvoice struct { InvoiceType _const.InvoiceType `json:"invoice_type" form:"invoice_tye" bson:"invoice_tye" cn:"单据类型"` InvoiceID int `json:"invoice_id" form:"invoice_id" bson:"invoice_id" cn:"单据编号"` }
RelatedInvoice 关联相关单据
type Return ¶
type Return struct { BasicModel `bson:"inline"` BookNameInfo `bson:"-"` ReturnContent []returnContent `json:"return_content" form:"return_content" bson:"return_content" cn:"退款订单内容" ` ReturnActualAmount *string `json:"return_actual_amount" form:"return_actual_amount" bson:"return_actual_amount" cn:"实际退款金额" ` ReturnAmount *string `json:"return_bill_amount" form:"return_bill_amount" cn:"应退金额" ` ReturnOwnerID *int `json:"return_owner_id,omitempty" form:"return_owner_id,omitempty" json:"return_owner_id" cn:"退款记录负责人ID"` ReturnOwnerName *string `` /* 127-byte string literal not displayed */ TransactionID *int `json:"transaction_id,omitempty" form:"transaction_id" bson:"transaction_id" cn:"关联销售订单ID"` ReceiveID *int `json:"receive_id,omitempty" form:"receive_id,omitempty" bson:"receive_id" cn:"关联红字应收记录ID" ` Remark *string `json:"remark,omitempty" form:"remark,omitempty" bson:"remark" cn:"备注"` }
func (Return) TableCnName ¶
type StockInRecord ¶
type StockInRecord struct { BasicModel `bson:"inline"` BookNameInfo `bson:"-"` StockInRecordName *string `json:"stock_in_record_name,omitempty" form:"stock_in_record_name,omitempty" bson:"stock_in_record_name,omitempty"` StockInRecordOwnerID *int `json:"stock_in_record_owner_id,omitempty" form:"stock_in_record_owner_id" bson:"stock_in_record_owner_id" ` StockInRecordOwnerName *string `json:"stock_in_record_owner_name,omitempty" form:"stock_in_record_owner_name" bson:"stock_in_record_owner_name" ` StockInWarehouseID *int `json:"stock_in_warehouse_id,omitempty" form:"stock_in_warehouse_id,omitempty" bson:"stock_in_warehouse_id"` StockInWarehouseName *string `json:"stock_in_warehouse_name,omitempty" form:"stock_in_warehouse_name,omitempty" bson:"stock_in_warehouse_name"` StockInDetailPosition *string `json:"stock_in_detail_position,omitempty" form:"stock_in_detail_position" bson:"stock_in_detail_position"` StockInRecordType string `json:"stock_in_record_type" form:"stock_in_record_type" bson:"stock_in_record_type" ` StockInRecordContent []stockRecordContent `json:"stock_in_record_content" form:"stock_in_record_content" bson:"stock_in_record_content" ` RelateInvoice []RelatedInvoice `json:"relate_invoice" form:"relate_invoice" bson:"relate_invoice"` Remark *string `json:"remark,omitempty" form:"remark" bson:"remark"` }
StockInRecord 入库记录
func (*StockInRecord) BeforeInsert ¶
func (s *StockInRecord) BeforeInsert(ctx context.Context) error
BeforeInsert 创建入库
func (*StockInRecord) BeforeRemove ¶
func (s *StockInRecord) BeforeRemove(ctx context.Context) error
func (*StockInRecord) BeforeUpdate ¶
func (s *StockInRecord) BeforeUpdate(ctx context.Context) error
func (StockInRecord) Mapping ¶
func (s StockInRecord) Mapping() map[string]interface{}
func (StockInRecord) TableCnName ¶
func (s StockInRecord) TableCnName() string
func (StockInRecord) TableName ¶
func (s StockInRecord) TableName() string
func (*StockInRecord) ToCredential ¶
func (s *StockInRecord) ToCredential(ctx *gin.Context)
func (StockInRecord) ToESDoc ¶
func (s StockInRecord) ToESDoc() map[string]interface{}
type StockOutRecord ¶
type StockOutRecord struct { BasicModel `bson:"inline"` BookNameInfo `bson:"-"` StockOutRecordName *string `json:"stock_out_record_name,omitempty" form:"stock_out_record_name,omitempty" bson:"stock_out_record_name,omitempty"` StockOutRecordOwnerID *int `` /* 128-byte string literal not displayed */ StockOutRecordOwnerName *string `` /* 134-byte string literal not displayed */ StockOutRecordType string `json:"stock_out_record_type" form:"stock_out_record_type" bson:"stock_out_record_type"` StockOutWarehouseID *int `json:"stock_out_warehouse_id,omitempty" form:"stock_out_warehouse_id,omitempty" bson:"stock_out_warehouse_id"` StockOutWarehouseName *string `json:"stock_out_warehouse_name,omitempty" form:"stock_out_warehouse_name,omitempty" bson:"stock_out_warehouse_name"` StockOutDetailPosition *string `json:"stock_out_detail_position,omitempty" form:"stock_out_detail_position" bson:"stock_out_detail_position"` StockOutRecordContent []stockRecordContent `json:"stock_out_record_content" form:"stock_out_record_content" bson:"stock_out_record_content"` RelateInvoice []RelatedInvoice `json:"relate_invoice" form:"relate_invoice" bson:"relate_invoice"` Remark *string `json:"remark,omitempty" form:"remark" bson:"remark"` }
StockOutRecord 出库记录
func (*StockOutRecord) BeforeInsert ¶
func (m *StockOutRecord) BeforeInsert(ctx context.Context) error
BeforeInsert 出库 同步产品或者其他
TODO 前端或后端实现 同一原材料,同一批次只可选择一次!!!
func (*StockOutRecord) BeforeRemove ¶
func (m *StockOutRecord) BeforeRemove(ctx context.Context) error
BeforeRemove 撤销/删除 出库嘛 换为新增红字
FIXME 万一他删除我的删除的记录呢??? 套娃???
func (*StockOutRecord) BeforeUpdate ¶
func (m *StockOutRecord) BeforeUpdate(ctx context.Context) error
BeforeUpdate
todo 前端禁止! 修改时不允许新增!!!! 不允许修改批次号!!! 除了数量啥也不能改!!!! 可以删!!!
func (StockOutRecord) Mapping ¶
func (m StockOutRecord) Mapping() map[string]interface{}
func (StockOutRecord) TableCnName ¶
func (m StockOutRecord) TableCnName() string
func (StockOutRecord) TableName ¶
func (m StockOutRecord) TableName() string
func (StockOutRecord) ToCredential ¶
func (m StockOutRecord) ToCredential(ctx *gin.Context)
func (StockOutRecord) ToESDoc ¶
func (m StockOutRecord) ToESDoc() map[string]interface{}
type Transaction ¶
type Transaction struct { BasicModel `bson:"inline"` BookNameInfo `bson:"-"` TransactionName *string `json:"transaction_name,omitempty" form:"transaction_name,omitempty" bson:"transaction_name,omitempty"` TransactionContent []transactionContent `json:"transaction_content" form:"transaction_content" bson:"transaction_content" cn:"销售详情"` TransactionAmount string `json:"transaction_amount" form:"transaction_amount" bson:"transaction_amount" cn:"销售金额"` TransactionActualAmount string `json:"transaction_actual_amount" form:"transaction_actual_amount" bson:"transaction_actual_amount" cn:"实际收款金额"` CustomerID *int `json:"customer_id" form:"customer_id" bson:"customer_id" cn:"客户编号"` CustomerName *string `json:"customer_name,omitempty" form:"customer_name,omitempty" json:"customer_name" cn:"客户姓名"` TransactionOwnerID *int `json:"transaction_owner_id,omitempty" form:"transaction_owner_id" bson:"transaction_owner_id" cn:"销售管理员ID"` TransactionOwnerName *string `` /* 126-byte string literal not displayed */ TransactionTime *string `json:"transaction_time,omitempty" form:"transaction_time" bson:"transaction_time" cn:"交易时间"` ReceiveID *int `json:"receive_id,omitempty" form:"receive_id" bson:"receive_id" cn:"关联应收记录"` Remark *string `json:"remark,omitempty" form:"remark" bson:"remark" cn:"备注"` }
Transaction 销售
func (*Transaction) BeforeDelete ¶
func (t *Transaction) BeforeDelete(ctx context.Context) error
BeforeDelete TODO !
func (*Transaction) BeforeInsert ¶
func (t *Transaction) BeforeInsert(ctx context.Context) error
BeforeInsert 创建销售记录 如果自动创建应收记录则 mongo 事务套MySQL事务 逻辑上保证原子性 之所以选择前触发器,是想把mysql的
func (*Transaction) BeforeUpdate ¶
func (t *Transaction) BeforeUpdate(ctx context.Context) error
BeforeUpdate TODO !
func (Transaction) Mapping ¶
func (t Transaction) Mapping() map[string]interface{}
func (Transaction) TableCnName ¶
func (t Transaction) TableCnName() string
func (Transaction) TableName ¶
func (t Transaction) TableName() string
Click to show internal directories.
Click to hide internal directories.