|
|
@@ -15,7 +15,7 @@ import (
|
|
|
|
|
|
// WrOrderQuote 买卖大厅行情
|
|
|
type WrOrderQuote struct {
|
|
|
- WRFACTORTYPEID int64 `json:"wrfactortypeid" xorm:"'WRFACTORTYPEID'" form:"wrfactortypeid"` // 仓单要素id
|
|
|
+ WRFACTORTYPEID string `json:"wrfactortypeid" xorm:"'WRFACTORTYPEID'" form:"wrfactortypeid"` // 仓单要素id
|
|
|
BUYPRICE float64 `json:"buyprice" xorm:"'BUYPRICE'"` // 买价
|
|
|
BUYQTY float64 `json:"buyqty" xorm:"'BUYQTY'"` // 买量
|
|
|
SELLPRICE float64 `json:"sellprice" xorm:"'SELLPRICE'"` // 卖价
|
|
|
@@ -52,7 +52,7 @@ func (r *WrOrderQuote) calc() {
|
|
|
func (r *WrOrderQuote) buildSqlFixedPrice() string {
|
|
|
var sqlId utils.SQLVal = "with buyQuote as" +
|
|
|
" (" +
|
|
|
- " select a.wrfactortypeid, a.fixedprice buyPrice, sum(a.orderqty) buyQty" +
|
|
|
+ " select to_char(a.wrfactortypeid) wrfactortypeid, a.fixedprice buyPrice, sum(a.orderqty) buyQty" +
|
|
|
" from (select t.wrfactortypeid," +
|
|
|
" t.marketid," +
|
|
|
" t.buyorsell," +
|
|
|
@@ -66,7 +66,7 @@ func (r *WrOrderQuote) buildSqlFixedPrice() string {
|
|
|
" group by a.wrfactortypeid, a.fixedprice)," +
|
|
|
"sellQuote as" +
|
|
|
" (" +
|
|
|
- " select a.wrfactortypeid, a.fixedprice sellPrice, sum(a.orderqty) sellQty" +
|
|
|
+ " select to_char(a.wrfactortypeid) wrfactortypeid, a.fixedprice sellPrice, sum(a.orderqty) sellQty" +
|
|
|
" from (select t.wrfactortypeid," +
|
|
|
" t.marketid," +
|
|
|
" t.buyorsell," +
|
|
|
@@ -129,7 +129,7 @@ func (r *WrOrderQuote) buildSqlFixedPrice() string {
|
|
|
// buildSqlPriceMove 浮动价
|
|
|
func (r *WrOrderQuote) buildSqlPriceMove() string {
|
|
|
var sqlId utils.SQLVal = "with buyQuote as" +
|
|
|
- " (select a.wrfactortypeid," +
|
|
|
+ " (select to_char(a.wrfactortypeid) wrfactortypeid," +
|
|
|
" a.pricemove buypricemove," +
|
|
|
" sum(a.orderqty) buyQty," +
|
|
|
" a.goodsid," +
|
|
|
@@ -153,7 +153,7 @@ func (r *WrOrderQuote) buildSqlPriceMove() string {
|
|
|
" where a.cnt = 1" +
|
|
|
" group by a.wrfactortypeid, a.pricemove, a.goodsid, a.goodscode, a.deliverymonth)," +
|
|
|
"sellQuote as" +
|
|
|
- " (select a.wrfactortypeid," +
|
|
|
+ " (select to_char(a.wrfactortypeid) wrfactortypeid," +
|
|
|
" a.pricemove sellpricemove," +
|
|
|
" a.goodsid," +
|
|
|
" a.goodscode," +
|
|
|
@@ -268,7 +268,7 @@ func (r *WrOrderQuoteDetail) calc() {
|
|
|
|
|
|
func (r *WrOrderQuoteDetail) buildSql() string {
|
|
|
var sqlId utils.SQLVal = "select t.wrtradeorderid," +
|
|
|
- " t.wrfactortypeid," +
|
|
|
+ " to_char(t.wrfactortypeid) wrfactortypeid," +
|
|
|
" t.userid," +
|
|
|
" t.orderqty - t.tradeqty as qty," +
|
|
|
" t.fixedprice as price," +
|
|
|
@@ -324,7 +324,7 @@ func (r *WrOrderQuoteDetail) GetDataByPage() (interface{}, error, int, int, int)
|
|
|
|
|
|
// Wr2FactorType 仓单要素类型
|
|
|
type Wr2FactorType struct {
|
|
|
- WRFACTORTYPEID int64 `json:"wrfactortypeid" xorm:"WRFACTORTYPEID" form:"wrfactortypeid"` // 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
|
|
|
+ WRFACTORTYPEID string `json:"wrfactortypeid" xorm:"WRFACTORTYPEID" form:"wrfactortypeid"` // 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
|
|
|
WRFACTORTYPENAME string `json:"wrfactortypename" xorm:"WRFACTORTYPENAME" form:"wrfactortypename"` // 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
|
|
|
DELIVERYGOODSID int32 `json:"deliverygoodsid" xorm:"DELIVERYGOODSID" form:"deliverygoodsid"` // 品种ID
|
|
|
WAREHOUSEID int64 `json:"warehouseid" xorm:"WAREHOUSEID" form:"warehouseid"` // 仓库ID
|
|
|
@@ -506,7 +506,7 @@ type WrOrderDetail struct {
|
|
|
BUYORSELL int32 `json:"buyorsell" xorm:"BUYORSELL" form:"buyorsell"` // 买卖 - 0:买 1:卖(挂牌类型 买为采购 卖为销售)
|
|
|
MARKETID int64 `json:"marketid" xorm:"MARKETID" form:"marketid"` // 市场ID
|
|
|
USERID int64 `json:"userid" xorm:"USERID" form:"userid"` // 用户ID
|
|
|
- WRFACTORTYPEID int64 `json:"wrfactortypeid" xorm:"WRFACTORTYPEID"` // 仓单要素类型ID/商品ID(77)
|
|
|
+ WRFACTORTYPEID string `json:"wrfactortypeid" xorm:"WRFACTORTYPEID"` // 仓单要素类型ID/商品ID(77)
|
|
|
ORDERQTY float64 `json:"orderqty" xorm:"ORDERQTY" form:"orderqty"` // 委托数量
|
|
|
TRADEQTY float64 `json:"tradeqty" xorm:"TRADEQTY" form:"tradeqty"` // 成交数量
|
|
|
CANCELQTY float64 `json:"cancelqty" xorm:"CANCELQTY" form:"cancelqty"` // 撤销数量
|
|
|
@@ -537,7 +537,7 @@ func (r *WrOrderDetail) calc() {
|
|
|
|
|
|
func (r *WrOrderDetail) buildSql() string {
|
|
|
var sqlId utils.SQLVal = "with tmp as" +
|
|
|
- " (select t.wrfactortypeid," +
|
|
|
+ " (select to_char(t.wrfactortypeid) wrfactortypeid," +
|
|
|
" t.wrfactortypename2 wrfactortypename," +
|
|
|
" t.wrstandardid," +
|
|
|
" t.deliverygoodsid," +
|
|
|
@@ -631,7 +631,7 @@ func (r *WrTradeDetail) calc() {
|
|
|
|
|
|
func (r *WrTradeDetail) buildSql() string {
|
|
|
var sqlId utils.SQLVal = "with tmp as" +
|
|
|
- " (select t.wrfactortypeid," +
|
|
|
+ " (select to_char(t.wrfactortypeid) wrfactortypeid," +
|
|
|
" t.wrfactortypename," +
|
|
|
" t.wrstandardid," +
|
|
|
" t.deliverygoodsid," +
|
|
|
@@ -1114,9 +1114,9 @@ func (r *WrPerformancePlan) GetDataEx() (interface{}, error) {
|
|
|
|
|
|
// WrHoldLB 仓单持有记录
|
|
|
type WrHoldLB struct {
|
|
|
- LADINGBILLID int64 `json:"ladingbillid" xorm:"LADINGBILLID" form:"ladingbillid"` // 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
|
|
|
+ LADINGBILLID string `json:"ladingbillid" xorm:"LADINGBILLID" form:"ladingbillid"` // 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
|
|
|
SUBNUM int32 `json:"subnum" xorm:"SUBNUM" form:"subnum"` // 提单子单号
|
|
|
- WRFACTORTYPEID int64 `json:"wrfactortypeid" xorm:"WRFACTORTYPEID" form:"wrfactortypeid"` // 仓单要素类型ID
|
|
|
+ WRFACTORTYPEID string `json:"wrfactortypeid" xorm:"WRFACTORTYPEID" form:"wrfactortypeid"` // 仓单要素类型ID
|
|
|
DELIVERYGOODSID int32 `json:"deliverygoodsid" xorm:"DELIVERYGOODSID" form:"deliverygoodsid"` // 品种ID
|
|
|
QTY float64 `json:"qty" xorm:"QTY" form:"qty"` // 数量
|
|
|
FREEZERQTY float64 `json:"freezerqty" xorm:"FREEZERQTY" form:"freezerqty"` // 冻结数量
|
|
|
@@ -1124,7 +1124,7 @@ type WrHoldLB struct {
|
|
|
ACCOUNTID int64 `json:"accountid" xorm:"ACCOUNTID" form:"accountid"` // 持有人帐户ID
|
|
|
CREATETIME string `json:"createtime" xorm:"CREATETIME" form:"createtime"` // 创建时间(过户时间)
|
|
|
TRADEDATE string `json:"tradedate" xorm:"TRADEDATE" form:"tradedate"` // 交易日(yyyyMMdd)
|
|
|
- WRID int64 `json:"wrid" xorm:"WRID" form:"wrid"` // 仓单变更ID
|
|
|
+ WRID string `json:"wrid" xorm:"WRID" form:"wrid"` // 仓单变更ID
|
|
|
PARENTSUBNUM int32 `json:"parentsubnum" xorm:"PARENTSUBNUM" form:"parentsubnum"` // 拆分父子单号
|
|
|
PLEDGEQTY float64 `json:"pledgeqty" xorm:"'-'"` // 质押数量
|
|
|
Wr2FactorType `xorm:"extends"`
|