File was renamed from models/seOrder.go |
| | |
| | | package models |
| | | package kingdee |
| | | |
| | | // 销售订单表 |
| | | type SEOrder struct { |
| | |
| | | FCess float64 `gorm:"column:FCess" json:"FCess"` // 税率 |
| | | FNote string `gorm:"column:FNote" json:"FNote"` // 备注 |
| | | FAdviceConsignDate string `gorm:"column:FAdviceConsignDate" json:"FAdviceConsignDate"` // 交货日期 |
| | | Fdate string `gorm:"column:Fdate" json:"Fdate"` // 订单日期 |
| | | FCustID string `gorm:"column:FCustID" json:"FCustID"` // 购货单位 |
| | | FInventory float64 `gorm:"column:FInventory" json:"FInventory"` // 即时库存 |
| | | // 含税单价 |
| | |
| | | i.FCess, |
| | | i.FNote, |
| | | i.FAdviceConsignDate, |
| | | i.Fdate, |
| | | i.FCustID, |
| | | SUM(ICInventory.FQty) AS FInventory |
| | | FROM vwICBill_32 AS i |
| | | FROM |
| | | vwICBill_32 AS i |
| | | JOIN t_ICitem ON i.FShortNumber = t_ICitem.FShortNumber |
| | | JOIN ICInventory ON ICInventory.FItemID = t_ICitem.FItemID |
| | | WHERE |
| | | DateDiff(dd,fDate,getdate())=0 |
| | | GROUP BY |
| | | i.FBillNo, |
| | | i.FNumber, |
| | |
| | | i.FCess, |
| | | i.FNote, |
| | | i.FAdviceConsignDate, |
| | | i.Fdate, |
| | | i.FCustID; |
| | | ` |
| | | |
| | | //查询当天日期 |
| | | //select * from vwICBill_32 where DateDiff(dd,fDate,getdate())=0 |
| | | var result []SEOrder |
| | | |
| | | db.Raw(sql).Debug().Scan(&result) |
| | | db.Raw(sql).Scan(&result) |
| | | //db.Raw(sql).Debug().Scan(&result) |
| | | |
| | | return result |
| | | } |