Documentation
¶
Index ¶
- Variables
- func DeleteLog(args *ArgsDeleteLog) (err error)
- func Init()
- func UpdateLogPurchaseFixPrice(args *ArgsUpdateLogPurchaseFixPrice) (err error)
- type ArgsCreateLog
- type ArgsCreateLogMarge
- type ArgsDeleteLog
- type ArgsGetAnalysisBuyCompanySort
- type ArgsGetAnalysisMarge
- type ArgsGetLogList
- type ArgsUpdateLogPurchaseFixPrice
- type DataGetAnalysisBuyCompanyDay
- type DataGetAnalysisBuyCompanyMarge
- type DataGetAnalysisBuyCompanySort
- type DataGetAnalysisMarge
- type FieldsLog
- func CreateLog(args *ArgsCreateLog) (data FieldsLog, errCode string, err error)
- func CreateLogMarge(args *ArgsCreateLogMarge) (data FieldsLog, errCode string, err error)
- func GetLogByID(id int64, orgID int64) (data FieldsLog)
- func GetLogList(args *ArgsGetLogList) (dataList []FieldsLog, dataCount int64, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //OpenSub 是否启动订阅 OpenSub = false )
Functions ¶
func DeleteLog ¶
func DeleteLog(args *ArgsDeleteLog) (err error)
func UpdateLogPurchaseFixPrice ¶
func UpdateLogPurchaseFixPrice(args *ArgsUpdateLogPurchaseFixPrice) (err error)
UpdateLogPurchaseFixPrice 更新成本底价 将自动核算新的毛利
Types ¶
type ArgsCreateLog ¶
type ArgsCreateLog struct {
//创建时间
CreateAt time.Time `db:"create_at" json:"createAt"`
//组织ID
OrgID int64 `db:"org_id" json:"orgID" check:"id"`
//创建人
CreateOrgBindID int64 `db:"create_org_bind_id" json:"createOrgBindID" check:"id" empty:"true"`
//进货对接人
FromOrgBindID int64 `db:"from_org_bind_id" json:"fromOrgBindID" check:"id" empty:"true"`
//销售对接人
SellOrgBindID int64 `db:"sell_org_bind_id" json:"sellOrgBindID" check:"id" empty:"true"`
//表单核对人
ConfirmOrgBindID int64 `db:"confirm_org_bind_id" json:"confirmOrgBindID" check:"id" empty:"true"`
//出货单类型
// 0 普通出货单; 1 退货; 2 补差价
SaleType int `db:"sale_type" json:"saleType" check:"intThan0" empty:"true"`
//同步来源
SyncSystem string `db:"sync_system" json:"syncSystem" check:"mark" empty:"true"`
SyncHash string `db:"sync_hash" json:"syncHash" check:"mark" empty:"true"`
//订单来源
OrderID int64 `db:"order_id" json:"orderID" check:"id" empty:"true"`
//商品来源
MallProductID int64 `db:"mall_product_id" json:"mallProductID" check:"id" empty:"true"`
//产品来源
ERPProductID int64 `db:"erp_product_id" json:"erpProductID" check:"id" empty:"true"`
//供货商来源
// 如果产品没有选择供货商,则查询绑定的供货商执行,如果还是没有将标记0,同时其他周边成本信息将标记为0
FromCompanyID int64 `db:"from_company_id" json:"fromCompanyID" check:"id" empty:"true"`
//购买人来源
BuyUserID int64 `db:"buy_user_id" json:"buyUserID" check:"id" empty:"true"`
BuyCompanyID int64 `db:"buy_company_id" json:"buyCompanyID" check:"id" empty:"true"`
//发货地址
ToAddress CoreSQLAddress.FieldsAddress `db:"to_address" json:"toAddress"`
//订单产品数量
SellCount int64 `db:"sell_count" json:"sellCount" check:"int64Than0" empty:"true"`
//折扣前原售价(不含税)
SellRawPrice int64 `db:"sell_raw_price" json:"sellRawPrice" check:"price" empty:"true"`
//折扣前原售价(含税)
SellRawTaxPrice int64 `db:"sell_raw_tax_price" json:"sellRawTaxPrice" check:"price" empty:"true"`
//最终售价(不含税)
SellFinalPrice int64 `db:"sell_final_price" json:"sellFinalPrice" check:"price" empty:"true"`
//最终售价(含税)
SellFinalTaxPrice int64 `db:"sell_final_tax_price" json:"sellFinalTaxPrice" check:"price" empty:"true"`
//享受折扣金额
SellExPrice int64 `db:"sell_ex_price" json:"sellExPrice" check:"price" empty:"true"`
//进货时供货商成本价(不含税)
PurchasePrice int64 `db:"purchase_price" json:"purchasePrice" check:"price" empty:"true"`
//进货时供货商成本价(含税)
PurchaseTaxPrice int64 `db:"purchase_tax_price" json:"purchaseTaxPrice" check:"price" empty:"true"`
//调整后的成本价(不含税)
PurchaseFixPrice int64 `db:"purchase_fix_price" json:"purchaseFixPrice" check:"price" empty:"true"`
//调整后的成本价(含税)
PurchaseFixTaxPrice int64 `db:"purchase_fix_tax_price" json:"purchaseFixTaxPrice" check:"price" empty:"true"`
//最终毛利(不含税)
ProfitPrice int64 `db:"profit_price" json:"profitPrice" check:"price" empty:"true"`
//最终毛利(含税)
ProfitTaxPrice int64 `db:"profit_tax_price" json:"profitTaxPrice" check:"price" empty:"true"`
}
type ArgsCreateLogMarge ¶
type ArgsCreateLogMarge struct {
//组织ID
OrgID int64 `db:"org_id" json:"orgID" check:"id"`
//创建人
CreateOrgBindID int64 `db:"create_org_bind_id" json:"createOrgBindID" check:"id" empty:"true"`
//进货对接人
FromOrgBindID int64 `db:"from_org_bind_id" json:"fromOrgBindID" check:"id" empty:"true"`
//销售对接人
SellOrgBindID int64 `db:"sell_org_bind_id" json:"sellOrgBindID" check:"id" empty:"true"`
//表单核对人
ConfirmOrgBindID int64 `db:"confirm_org_bind_id" json:"confirmOrgBindID" check:"id" empty:"true"`
//订单来源
OrderID int64 `db:"order_id" json:"orderID" check:"id"`
//商品来源
MallProductID int64 `db:"mall_product_id" json:"mallProductID" check:"id" empty:"true"`
//产品来源
ERPProductID int64 `db:"erp_product_id" json:"erpProductID" check:"id"`
//供货商来源
// 如果产品没有选择供货商,则查询绑定的供货商执行,如果还是没有将标记0,同时其他周边成本信息将标记为0
FromCompanyID int64 `db:"from_company_id" json:"fromCompanyID" check:"id" empty:"true"`
//购买人来源
BuyUserID int64 `db:"buy_user_id" json:"buyUserID" check:"id" empty:"true"`
BuyCompanyID int64 `db:"buy_company_id" json:"buyCompanyID" check:"id" empty:"true"`
//发货地址
ToAddress CoreSQLAddress.FieldsAddress `db:"to_address" json:"toAddress"`
//订单产品数量
SellCount int64 `db:"sell_count" json:"sellCount" check:"int64Than0" empty:"true"`
}
ArgsCreateLogMarge 联动创建参数
type ArgsDeleteLog ¶
type ArgsGetAnalysisBuyCompanySort ¶
type ArgsGetAnalysisBuyCompanySort struct {
//分页
Pages CoreSQLPages.ArgsDataList `json:"pages"`
//组织ID
OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
}
ArgsGetAnalysisBuyCompanySort 获取公司消费排名参数
type ArgsGetAnalysisMarge ¶
type ArgsGetAnalysisMarge struct {
//组织ID
OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
//创建人
CreateOrgBindID int64 `db:"create_org_bind_id" json:"createOrgBindID" check:"id" empty:"true"`
//进货对接人
FromOrgBindID int64 `db:"from_org_bind_id" json:"fromOrgBindID" check:"id" empty:"true"`
//销售对接人
SellOrgBindID int64 `db:"sell_org_bind_id" json:"sellOrgBindID" check:"id" empty:"true"`
//表单核对人
ConfirmOrgBindID int64 `db:"confirm_org_bind_id" json:"confirmOrgBindID" check:"id" empty:"true"`
//出货单类型
// 0 普通出货单; 1 退货; 2 补差价
SaleType int `db:"sale_type" json:"saleType"`
//同步来源
SyncSystem string `db:"sync_system" json:"syncSystem" check:"mark" empty:"true"`
SyncHash string `db:"sync_hash" json:"syncHash" check:"mark" empty:"true"`
//订单来源
OrderID int64 `db:"order_id" json:"orderID" check:"id" empty:"true"`
//商品来源
MallProductID int64 `db:"mall_product_id" json:"mallProductID" check:"id" empty:"true"`
//产品来源
ERPProductID int64 `db:"erp_product_id" json:"erpProductID" check:"id" empty:"true"`
//供货商来源
// 如果产品没有选择供货商,则查询绑定的供货商执行,如果还是没有将标记0,同时其他周边成本信息将标记为0
FromCompanyID int64 `db:"from_company_id" json:"fromCompanyID" check:"id" empty:"true"`
//购买人来源
BuyUserID int64 `db:"buy_user_id" json:"buyUserID" check:"id" empty:"true"`
BuyCompanyID int64 `db:"buy_company_id" json:"buyCompanyID" check:"id" empty:"true"`
//是否删除
IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"`
//时间范围
BetweenAt CoreSQLTime2.DataCoreTime `json:"betweenAt"`
}
type ArgsGetLogList ¶
type ArgsGetLogList struct {
//分页
Pages CoreSQLPages.ArgsDataList `json:"pages"`
//组织ID
OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
//创建人
CreateOrgBindID int64 `db:"create_org_bind_id" json:"createOrgBindID" check:"id" empty:"true"`
//进货对接人
FromOrgBindID int64 `db:"from_org_bind_id" json:"fromOrgBindID" check:"id" empty:"true"`
//销售对接人
SellOrgBindID int64 `db:"sell_org_bind_id" json:"sellOrgBindID" check:"id" empty:"true"`
//表单核对人
ConfirmOrgBindID int64 `db:"confirm_org_bind_id" json:"confirmOrgBindID" check:"id" empty:"true"`
//出货单类型
// 0 普通出货单; 1 退货; 2 补差价
SaleType int `db:"sale_type" json:"saleType"`
//同步来源
SyncSystem string `db:"sync_system" json:"syncSystem" check:"mark" empty:"true"`
SyncHash string `db:"sync_hash" json:"syncHash" check:"mark" empty:"true"`
//订单来源
OrderID int64 `db:"order_id" json:"orderID" check:"id" empty:"true"`
//商品来源
MallProductID int64 `db:"mall_product_id" json:"mallProductID" check:"id" empty:"true"`
//产品来源
ERPProductID int64 `db:"erp_product_id" json:"erpProductID" check:"id" empty:"true"`
//供货商来源
// 如果产品没有选择供货商,则查询绑定的供货商执行,如果还是没有将标记0,同时其他周边成本信息将标记为0
FromCompanyID int64 `db:"from_company_id" json:"fromCompanyID" check:"id" empty:"true"`
//购买人来源
BuyUserID int64 `db:"buy_user_id" json:"buyUserID" check:"id" empty:"true"`
BuyCompanyID int64 `db:"buy_company_id" json:"buyCompanyID" check:"id" empty:"true"`
//是否删除
IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"`
//时间范围
BetweenAt CoreSQLTime2.DataCoreTime `json:"betweenAt"`
//搜索
Search string `json:"search" check:"search" empty:"true"`
}
type ArgsUpdateLogPurchaseFixPrice ¶
type ArgsUpdateLogPurchaseFixPrice struct {
//ID
ID int64 `db:"id" json:"id" check:"id"`
//组织ID
OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
//调整后的成本价(不含税)
PurchaseFixPrice int64 `db:"purchase_fix_price" json:"purchaseFixPrice" check:"price" empty:"true"`
//调整后的成本价(含税)
PurchaseFixTaxPrice int64 `db:"purchase_fix_tax_price" json:"purchaseFixTaxPrice" check:"price" empty:"true"`
}
ArgsUpdateLogPurchaseFixPrice 更新成本底价参数
type DataGetAnalysisBuyCompanyDay ¶
type DataGetAnalysisBuyCompanyDay struct {
//时间
DayAt string `json:"dayAt"`
//订单产品数量
SellCount int64 `db:"sell_count" json:"sellCount"`
//折扣前原售价(不含税)
SellRawPrice int64 `db:"sell_raw_price" json:"sellRawPrice"`
//折扣前原售价(含税)
SellRawTaxPrice int64 `db:"sell_raw_tax_price" json:"sellRawTaxPrice"`
//最终售价(不含税)
SellFinalPrice int64 `db:"sell_final_price" json:"sellFinalPrice"`
//最终售价(含税)
SellFinalTaxPrice int64 `db:"sell_final_tax_price" json:"sellFinalTaxPrice"`
//享受折扣金额
SellExPrice int64 `db:"sell_ex_price" json:"sellExPrice"`
//进货时供货商成本价(不含税)
PurchasePrice int64 `db:"purchase_price" json:"purchasePrice"`
//进货时供货商成本价(含税)
PurchaseTaxPrice int64 `db:"purchase_tax_price" json:"purchaseTaxPrice"`
//调整后的成本价(不含税)
PurchaseFixPrice int64 `db:"purchase_fix_price" json:"purchaseFixPrice"`
//调整后的成本价(含税)
PurchaseFixTaxPrice int64 `db:"purchase_fix_tax_price" json:"purchaseFixTaxPrice"`
//最终毛利(不含税)
ProfitPrice int64 `db:"profit_price" json:"profitPrice"`
//最终毛利(含税)
ProfitTaxPrice int64 `db:"profit_tax_price" json:"profitTaxPrice"`
}
DataGetAnalysisBuyCompanyDay 获取指定日期的公司购买聚合数据数据
type DataGetAnalysisBuyCompanyMarge ¶
type DataGetAnalysisBuyCompanyMarge struct {
//最近30天数据
Last30Day []DataGetAnalysisBuyCompanyDay `json:"last30Day"`
}
DataGetAnalysisBuyCompanyMarge 获取购买公司的最近统计数据包
func GetAnalysisBuyCompanyMarge ¶
func GetAnalysisBuyCompanyMarge(orgID int64, buyCompanyID int64) (data DataGetAnalysisBuyCompanyMarge)
GetAnalysisBuyCompanyMarge 获取购买公司的最近统计数据包
type DataGetAnalysisBuyCompanySort ¶
type DataGetAnalysisBuyCompanySort struct {
//购买公司ID
BuyCompanyID int64 `db:"buy_company_id" json:"buyCompanyID"`
//订单产品数量
SellCount int64 `db:"sell_count" json:"sellCount"`
//折扣前原售价(不含税)
SellRawPrice int64 `db:"sell_raw_price" json:"sellRawPrice"`
//折扣前原售价(含税)
SellRawTaxPrice int64 `db:"sell_raw_tax_price" json:"sellRawTaxPrice"`
//最终售价(不含税)
SellFinalPrice int64 `db:"sell_final_price" json:"sellFinalPrice"`
//最终售价(含税)
SellFinalTaxPrice int64 `db:"sell_final_tax_price" json:"sellFinalTaxPrice"`
//享受折扣金额
SellExPrice int64 `db:"sell_ex_price" json:"sellExPrice"`
//进货时供货商成本价(不含税)
PurchasePrice int64 `db:"purchase_price" json:"purchasePrice"`
//进货时供货商成本价(含税)
PurchaseTaxPrice int64 `db:"purchase_tax_price" json:"purchaseTaxPrice"`
//调整后的成本价(不含税)
PurchaseFixPrice int64 `db:"purchase_fix_price" json:"purchaseFixPrice"`
//调整后的成本价(含税)
PurchaseFixTaxPrice int64 `db:"purchase_fix_tax_price" json:"purchaseFixTaxPrice"`
//最终毛利(不含税)
ProfitPrice int64 `db:"profit_price" json:"profitPrice"`
//最终毛利(含税)
ProfitTaxPrice int64 `db:"profit_tax_price" json:"profitTaxPrice"`
}
DataGetAnalysisBuyCompanySort 获取公司消费排名数据
func GetAnalysisBuyCompanySort ¶
func GetAnalysisBuyCompanySort(args *ArgsGetAnalysisBuyCompanySort) (dataList []DataGetAnalysisBuyCompanySort)
GetAnalysisBuyCompanySort 获取公司消费排名
type DataGetAnalysisMarge ¶
type DataGetAnalysisMarge struct {
//订单产品数量
SellCount int64 `db:"sell_count" json:"sellCount"`
//折扣前原售价(不含税)
SellRawPrice int64 `db:"sell_raw_price" json:"sellRawPrice"`
//折扣前原售价(含税)
SellRawTaxPrice int64 `db:"sell_raw_tax_price" json:"sellRawTaxPrice"`
//最终售价(不含税)
SellFinalPrice int64 `db:"sell_final_price" json:"sellFinalPrice"`
//最终售价(含税)
SellFinalTaxPrice int64 `db:"sell_final_tax_price" json:"sellFinalTaxPrice"`
//享受折扣金额
SellExPrice int64 `db:"sell_ex_price" json:"sellExPrice"`
//进货时供货商成本价(不含税)
PurchasePrice int64 `db:"purchase_price" json:"purchasePrice"`
//进货时供货商成本价(含税)
PurchaseTaxPrice int64 `db:"purchase_tax_price" json:"purchaseTaxPrice"`
//调整后的成本价(不含税)
PurchaseFixPrice int64 `db:"purchase_fix_price" json:"purchaseFixPrice"`
//调整后的成本价(含税)
PurchaseFixTaxPrice int64 `db:"purchase_fix_tax_price" json:"purchaseFixTaxPrice"`
//最终毛利(不含税)
ProfitPrice int64 `db:"profit_price" json:"profitPrice"`
//最终毛利(含税)
ProfitTaxPrice int64 `db:"profit_tax_price" json:"profitTaxPrice"`
}
func GetAnalysisMarge ¶
func GetAnalysisMarge(args *ArgsGetAnalysisMarge) (data DataGetAnalysisMarge)
type FieldsLog ¶
type FieldsLog 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" empty:"true"`
//创建人
CreateOrgBindID int64 `db:"create_org_bind_id" json:"createOrgBindID"`
//进货对接人
FromOrgBindID int64 `db:"from_org_bind_id" json:"fromOrgBindID"`
//销售对接人
SellOrgBindID int64 `db:"sell_org_bind_id" json:"sellOrgBindID"`
//表单核对人
ConfirmOrgBindID int64 `db:"confirm_org_bind_id" json:"confirmOrgBindID"`
//出货单类型
// 0 普通出货单; 1 退货; 2 补差价
SaleType int `db:"sale_type" json:"saleType"`
//同步来源
SyncSystem string `db:"sync_system" json:"syncSystem"`
SyncHash string `db:"sync_hash" json:"syncHash"`
//订单来源
OrderID int64 `db:"order_id" json:"orderID"`
//商品来源
MallProductID int64 `db:"mall_product_id" json:"mallProductID"`
//产品来源
ERPProductID int64 `db:"erp_product_id" json:"erpProductID"`
//供货商来源
// 如果产品没有选择供货商,则查询绑定的供货商执行,如果还是没有将标记0,同时其他周边成本信息将标记为0
FromCompanyID int64 `db:"from_company_id" json:"fromCompanyID"`
//购买人来源
BuyUserID int64 `db:"buy_user_id" json:"buyUserID"`
BuyCompanyID int64 `db:"buy_company_id" json:"buyCompanyID"`
//发货地址
ToAddress CoreSQLAddress.FieldsAddress `db:"to_address" json:"toAddress"`
//订单产品数量
SellCount int64 `db:"sell_count" json:"sellCount"`
//折扣前原售价(不含税)
SellRawPrice int64 `db:"sell_raw_price" json:"sellRawPrice"`
//折扣前原售价(含税)
SellRawTaxPrice int64 `db:"sell_raw_tax_price" json:"sellRawTaxPrice"`
//最终售价(不含税)
SellFinalPrice int64 `db:"sell_final_price" json:"sellFinalPrice"`
//最终售价(含税)
SellFinalTaxPrice int64 `db:"sell_final_tax_price" json:"sellFinalTaxPrice"`
//享受折扣金额
SellExPrice int64 `db:"sell_ex_price" json:"sellExPrice"`
//进货时供货商成本价(不含税)
PurchasePrice int64 `db:"purchase_price" json:"purchasePrice"`
//进货时供货商成本价(含税)
PurchaseTaxPrice int64 `db:"purchase_tax_price" json:"purchaseTaxPrice"`
//调整后的成本价(不含税)
PurchaseFixPrice int64 `db:"purchase_fix_price" json:"purchaseFixPrice"`
//调整后的成本价(含税)
PurchaseFixTaxPrice int64 `db:"purchase_fix_tax_price" json:"purchaseFixTaxPrice"`
//最终毛利(不含税)
ProfitPrice int64 `db:"profit_price" json:"profitPrice"`
//最终毛利(含税)
ProfitTaxPrice int64 `db:"profit_tax_price" json:"profitTaxPrice"`
}
func CreateLogMarge ¶
func CreateLogMarge(args *ArgsCreateLogMarge) (data FieldsLog, errCode string, err error)
CreateLogMarge 联动创建
func GetLogByID ¶
func GetLogList ¶
func GetLogList(args *ArgsGetLogList) (dataList []FieldsLog, dataCount int64, err error)
Click to show internal directories.
Click to hide internal directories.