svr

package
v0.0.0-...-9198155 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DtmServer = "http://localhost:36789/api/dtmsvr"
View Source
const SvrUrl = "http://localhost:8080"

Variables

View Source
var DbConf = &dtmcli.DBConf{
	Driver:   "mysql",
	Host:     "localhost",
	Port:     3306,
	User:     "root",
	Password: "",
}

Functions

func AllocateInventory

func AllocateInventory(db *gorm.DB, reqs []*AllocateInventoryReq)

func CreateSO

func CreateSO(db *gorm.DB, soMasters []*SoMaster)

func E2P

func E2P(e error)

func GetGinApp

func GetGinApp() *gin.Engine

GetGinApp init and return gin

func Main

func Main()

func NextID

func NextID() uint64

Types

type AllocateInventoryReq

type AllocateInventoryReq struct {
	ProductSysNo int64
	Qty          int32
}

type Inventory

type Inventory struct {
	Sysno           uint64
	ProductSysno    uint64
	AccountQty      int32
	AvailableQty    int32
	AllocatedQty    int32
	AdjustLockedQty int32
}

func (*Inventory) TableName

func (*Inventory) TableName() string

type SoItem

type SoItem struct {
	Sysno         int64   `json:"sysNo"`
	SoSysno       int64   `json:"soSysNo"`
	ProductSysno  int64   `json:"productSysNo"`
	ProductName   string  `json:"productName"`
	CostPrice     float64 `json:"costPrice"`
	OriginalPrice float64 `json:"originalPrice"`
	DealPrice     float64 `json:"dealPrice"`
	Quantity      int32   `json:"quantity"`
}

func (*SoItem) TableName

func (*SoItem) TableName() string

type SoMaster

type SoMaster struct {
	Sysno                int64   `json:"sysNo"`
	SoId                 string  `json:"soID"`
	BuyerUserSysno       int64   `json:"buyerUserSysNo"`
	SellerCompanyCode    string  `json:"sellerCompanyCode"`
	ReceiveDivisionSysno int64   `json:"receiveDivisionSysNo"`
	ReceiveAddress       string  `json:"receiveAddress"`
	ReceiveZip           string  `json:"receiveZip"`
	ReceiveContact       string  `json:"receiveContact"`
	ReceiveContactPhone  string  `json:"receiveContactPhone"`
	StockSysno           int64   `json:"stockSysNo"`
	PaymentType          int32   `json:"paymentType"`
	SoAmt                float64 `json:"soAmt"`
	//10,创建成功,待支付;30;支付成功,待发货;50;发货成功,待收货;70,确认收货,已完成;90,下单失败;100已作废
	Status       int32      `json:"status"`
	OrderDate    time.Time  `json:"orderDate"`
	PaymentDate  *time.Time `json:"paymentDate"`
	DeliveryDate *time.Time `json:"deliveryDate"`
	ReceiveDate  *time.Time `json:"receiveDate"`
	Appid        string     `json:"appID"`
	Memo         string     `json:"memo"`
	CreateUser   *string    `json:"createUser"`
	GmtCreate    *time.Time `json:"gmtCreate"`
	ModifyUser   *string    `json:"modifyUser"`
	GmtModified  *time.Time `json:"gmtModified"`

	SoItems []*SoItem `gorm:"-"`
}

func (*SoMaster) TableName

func (*SoMaster) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL