|
|
@@ -618,30 +618,42 @@ func (r *WrPosition) GetDataEx() (interface{}, error) {
|
|
|
|
|
|
// WrOrderDetail 仓单贸易委托单
|
|
|
type WrOrderDetail struct {
|
|
|
- HASWR int32 `json:"haswr" xorm:"HASWR" form:"haswr"` // 是否有仓单-卖方 - 0:无仓单 1:有仓单
|
|
|
- WRTRADEORDERID string `json:"wrtradeorderid" xorm:"WRTRADEORDERID"` // 仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
|
|
|
- TRADEDATE string `json:"tradedate" xorm:"TRADEDATE" form:"tradedate"` // 交易日(yyyyMMdd)
|
|
|
- WRTRADETYPE int32 `json:"wrtradetype" xorm:"WRTRADETYPE" form:"wrtradetype"` // 仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
|
|
|
- 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 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"` // 撤销数量
|
|
|
- WRPRICETYPE int32 `json:"wrpricetype" xorm:"WRPRICETYPE" form:"wrpricetype"` // 价格方式 - 1:固定价 2-浮动价 - [挂牌]
|
|
|
- FIXEDPRICE float64 `json:"fixedprice" xorm:"FIXEDPRICE" form:"fixedprice"` // 固定价格 - [挂牌]
|
|
|
- PRICEMOVE float64 `json:"pricemove" xorm:"PRICEMOVE" form:"pricemove"` // 升贴水(浮动价时填写) - [挂牌]
|
|
|
- TRADEPRICE float64 `json:"tradeprice" xorm:"TRADEPRICE" form:"tradeprice"` // 成交价格 - [摘牌] (浮动价 ((商品1价格*商品1价格系数+升贴水)* 商品1重量系数 + 商品2价格*商品2价格系数+商品2升贴水)* 商品2重量系数 ...)* 委托单价格系数 + 委托单升贴水)
|
|
|
- ORDERTIME string `json:"ordertime" xorm:"ORDERTIME" form:"ordertime"` // 委托时间(挂牌时间)
|
|
|
- WRTRADEORDERSTATUS int32 `json:"wrtradeorderstatus" xorm:"WRTRADEORDERSTATUS"` // 委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 10:挂牌部分成交 11:仓单生成失败 12:首付扣款失败 13:履约失败 14:撤单解冻贷款失败 15:部成部撤
|
|
|
- GOODSID int32 `json:"goodsid" xorm:"'GOODSID'"` // 期货商品id
|
|
|
- GOODSCODE string `json:"goodscode" xorm:"'GOODSCODE'"` // 期货合约
|
|
|
- GOODSNAME string `json:"goodsname" xorm:"'GOODSNAME'"` // 商品名称
|
|
|
- FUTUPRICEMOVE float64 `json:"futupricemove" xorm:"'FUTUPRICEMOVE'"` // 期货升贴水
|
|
|
- DELIVERYMONTH string `json:"deliverymonth" xorm:"'DELIVERYMONTH'"` // 交收月
|
|
|
- Wr2FactorType `xorm:"extends"`
|
|
|
- PageEx `xorm:"extends"`
|
|
|
+ HASWR int32 `json:"haswr" xorm:"HASWR" form:"haswr"` // 是否有仓单-卖方 - 0:无仓单 1:有仓单
|
|
|
+ WRTRADEORDERID string `json:"wrtradeorderid" xorm:"WRTRADEORDERID"` // 仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
|
|
|
+ TRADEDATE string `json:"tradedate" xorm:"TRADEDATE" form:"tradedate"` // 交易日(yyyyMMdd)
|
|
|
+ WRTRADETYPE int32 `json:"wrtradetype" xorm:"WRTRADETYPE" form:"wrtradetype"` // 仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
|
|
|
+ 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 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"` // 撤销数量
|
|
|
+ WRPRICETYPE int32 `json:"wrpricetype" xorm:"WRPRICETYPE" form:"wrpricetype"` // 价格方式 - 1:固定价 2-浮动价 - [挂牌]
|
|
|
+ FIXEDPRICE float64 `json:"fixedprice" xorm:"FIXEDPRICE" form:"fixedprice"` // 固定价格 - [挂牌]
|
|
|
+ PRICEMOVE float64 `json:"pricemove" xorm:"PRICEMOVE" form:"pricemove"` // 升贴水(浮动价时填写) - [挂牌]
|
|
|
+ TRADEPRICE float64 `json:"tradeprice" xorm:"TRADEPRICE" form:"tradeprice"` // 成交价格 - [摘牌] (浮动价 ((商品1价格*商品1价格系数+升贴水)* 商品1重量系数 + 商品2价格*商品2价格系数+商品2升贴水)* 商品2重量系数 ...)* 委托单价格系数 + 委托单升贴水)
|
|
|
+ ORDERTIME string `json:"ordertime" xorm:"ORDERTIME" form:"ordertime"` // 委托时间(挂牌时间)
|
|
|
+ WRTRADEORDERSTATUS int32 `json:"wrtradeorderstatus" xorm:"WRTRADEORDERSTATUS"` // 委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 10:挂牌部分成交 11:仓单生成失败 12:首付扣款失败 13:履约失败 14:撤单解冻贷款失败 15:部成部撤
|
|
|
+ GOODSID int32 `json:"goodsid" xorm:"'GOODSID'"` // 期货商品id
|
|
|
+ GOODSCODE string `json:"goodscode" xorm:"'GOODSCODE'"` // 期货合约
|
|
|
+ GOODSNAME string `json:"goodsname" xorm:"'GOODSNAME'"` // 商品名称
|
|
|
+ FUTUPRICEMOVE float64 `json:"futupricemove" xorm:"'FUTUPRICEMOVE'"` // 期货升贴水
|
|
|
+ DELIVERYMONTH string `json:"deliverymonth" xorm:"'DELIVERYMONTH'"` // 交收月
|
|
|
+ MARGINVALUE SFLOAT64 `json:"marginvalue" xorm:"'MARGINVALUE'"` // 保证金设置值(履约保证金)
|
|
|
+ FREEZEMARGIN SFLOAT64 `json:"freezemargin" xorm:"'FREEZEMARGIN'"` // 冻结保证金(保证金)
|
|
|
+ DELISTMINQTY int64 `json:"delistminqty" xorm:"'DELISTMINQTY'"` // 起摘数量
|
|
|
+ CANBARGAIN int32 `json:"canbargain" xorm:"'CANBARGAIN'"` // 是否可议价 - 0:不可 1:可
|
|
|
+ CANPART int32 `json:"canpart" xorm:"'CANPART'"` // 是否允许部份摘牌 - 0:不允许(要求整单) 1:允许(可以不整单)
|
|
|
+ ALLFRIENDSFLAG int32 `json:"allfriendsflag" xorm:"'ALLFRIENDSFLAG'"` // 是否全好友可见 - 0:否 1:是
|
|
|
+ ISSPECIFIED int32 `json:"isspecified" xorm:"'ISSPECIFIED'"` // 是否指定对手 - 0:不指定 1:指定 - [挂牌]
|
|
|
+ ACCOUNTID int64 `json:"accountid" xorm:"'ACCOUNTID'"` // 交易账号(资金账号)
|
|
|
+ MATCHUSERID int64 `json:"matchuserid" xorm:"'MATCHUSERID'"` // 对手方id
|
|
|
+ MATCHUSERNAME string `json:"matchusername" xorm:"'MATCHUSERNAME'"` // 对手方名称(当ISSPECIFIED=1时,有值,指定朋友的名称)
|
|
|
+ TANAME string `json:"taname" xorm:"'TANAME'"` // 交易用户名称(资金账号名称)
|
|
|
+
|
|
|
+ Wr2FactorType `xorm:"extends"`
|
|
|
+ PageEx `xorm:"extends"`
|
|
|
|
|
|
FUTUSHOW string `json:"futushow"` // 期货合约/升贴水
|
|
|
}
|
|
|
@@ -653,62 +665,82 @@ func (r *WrOrderDetail) calc() {
|
|
|
r.FUTUSHOW = fmt.Sprintf("%v/%.2f", r.GOODSNAME, r.PRICEMOVE)
|
|
|
}
|
|
|
r.Wr2FactorType.Calc()
|
|
|
+ r.MATCHUSERNAME = EncryptByStar(r.MATCHUSERNAME)
|
|
|
}
|
|
|
|
|
|
func (r *WrOrderDetail) buildSql() string {
|
|
|
- var sqlId utils.SQLVal = "with tmp as" +
|
|
|
- " (select to_char(t.wrfactortypeid) wrfactortypeid," +
|
|
|
- " t.wrfactortypename2 wrfactortypename," +
|
|
|
- " t.wrstandardid," +
|
|
|
- " t.deliverygoodsid," +
|
|
|
- " g.deliverygoodscode," +
|
|
|
- " g.deliverygoodsname," +
|
|
|
- " w.wrstandardcode," +
|
|
|
- " w.wrstandardname," +
|
|
|
- " h.warehousecode," +
|
|
|
- " h.warehousename," +
|
|
|
- " e.enumdicname," +
|
|
|
- " w.wrstandardname || t.wrfactortypename2 as wrtypename" +
|
|
|
- " from wrfactortype t" +
|
|
|
- " left join deliverygoods g" +
|
|
|
- " on t.deliverygoodsid = g.deliverygoodsid" +
|
|
|
- " left join wrstandard w" +
|
|
|
- " on t.wrstandardid = w.wrstandardid" +
|
|
|
- " left join warehouseinfo h" +
|
|
|
- " on t.warehouseid = h.autoid" +
|
|
|
- " left join enumdicitem e" +
|
|
|
- " on w.unitid = e.enumitemname" +
|
|
|
- " and e.enumdiccode = 'goodsunit')" +
|
|
|
- "select t.HASWR," +
|
|
|
- " to_char(t.WRTRADEORDERID) WRTRADEORDERID," +
|
|
|
- " t.TRADEDATE," +
|
|
|
- " t.DELIVERYMONTH," +
|
|
|
- " t.WRTRADETYPE," +
|
|
|
- " t.BUYORSELL," +
|
|
|
- " t.MARKETID," +
|
|
|
- " t.USERID," +
|
|
|
- " t.ORDERQTY," +
|
|
|
- " t.TRADEQTY," +
|
|
|
- " t.CANCELQTY," +
|
|
|
- " t.WRPRICETYPE," +
|
|
|
- " t.FIXEDPRICE," +
|
|
|
- " t.PRICEMOVE," +
|
|
|
- " t.TRADEPRICE," +
|
|
|
- " to_char(t.ORDERTIME, 'yyyy-mm-dd hh24:mi:ss') ORDERTIME," +
|
|
|
- " t.WRTRADEORDERSTATUS," +
|
|
|
- " c.GOODSID," +
|
|
|
- " c.GOODSCODE," +
|
|
|
- " c.pricemove FUTUPRICEMOVE," +
|
|
|
- " g.goodsname," +
|
|
|
- " k.*" +
|
|
|
- " from wrtrade_orderdetail t" +
|
|
|
- " left join wrtrade_goodsconfig c" +
|
|
|
- " on t.wrtradeorderid = c.wrtradeorderid" +
|
|
|
- " left join goods g on c.goodsid=g.goodsid" +
|
|
|
- " left join tmp k" +
|
|
|
- " on t.wrfactortypeid = k.wrfactortypeid" +
|
|
|
- " where t.WRTRADETYPE = 1" +
|
|
|
- " and t.isspecified = 0"
|
|
|
+ var sqlId utils.SQLVal = `
|
|
|
+with tmp as
|
|
|
+ (select to_char(t.wrfactortypeid) wrfactortypeid,
|
|
|
+ t.wrfactortypename2 wrfactortypename,
|
|
|
+ t.wrstandardid,
|
|
|
+ t.deliverygoodsid,
|
|
|
+ g.deliverygoodscode,
|
|
|
+ g.deliverygoodsname,
|
|
|
+ w.wrstandardcode,
|
|
|
+ w.wrstandardname,
|
|
|
+ h.warehousecode,
|
|
|
+ h.warehousename,
|
|
|
+ e.enumdicname,
|
|
|
+ w.wrstandardname || t.wrfactortypename2 as wrtypename
|
|
|
+ from wrfactortype t
|
|
|
+ left join deliverygoods g
|
|
|
+ on t.deliverygoodsid = g.deliverygoodsid
|
|
|
+ left join wrstandard w
|
|
|
+ on t.wrstandardid = w.wrstandardid
|
|
|
+ left join warehouseinfo h
|
|
|
+ on t.warehouseid = h.autoid
|
|
|
+ left join enumdicitem e
|
|
|
+ on w.unitid = e.enumitemname
|
|
|
+ and e.enumdiccode = 'goodsunit')
|
|
|
+select t.HASWR,
|
|
|
+ to_char(t.WRTRADEORDERID) WRTRADEORDERID,
|
|
|
+ t.TRADEDATE,
|
|
|
+ t.DELIVERYMONTH,
|
|
|
+ t.WRTRADETYPE,
|
|
|
+ t.BUYORSELL,
|
|
|
+ t.MARKETID,
|
|
|
+ t.USERID,
|
|
|
+ t.ORDERQTY,
|
|
|
+ t.TRADEQTY,
|
|
|
+ t.CANCELQTY,
|
|
|
+ t.WRPRICETYPE,
|
|
|
+ t.FIXEDPRICE,
|
|
|
+ t.PRICEMOVE,
|
|
|
+ t.TRADEPRICE,
|
|
|
+ to_char(t.ORDERTIME, 'yyyy-mm-dd hh24:mi:ss') ORDERTIME,
|
|
|
+ t.WRTRADEORDERSTATUS,
|
|
|
+ t.marginvalue,
|
|
|
+ t.freezemargin,
|
|
|
+ t.delistminqty,
|
|
|
+ t.canbargain,
|
|
|
+ t.canpart,
|
|
|
+ t.allfriendsflag,
|
|
|
+ t.isspecified,
|
|
|
+ t.accountid,
|
|
|
+ c.GOODSID,
|
|
|
+ c.GOODSCODE,
|
|
|
+ c.pricemove FUTUPRICEMOVE,
|
|
|
+ g.goodsname,
|
|
|
+ m.matchuserid,
|
|
|
+ u.accountname matchusername,
|
|
|
+ ta.accountname taname,
|
|
|
+ k.*
|
|
|
+ from wrtrade_orderdetail t
|
|
|
+ left join wrtrade_goodsconfig c
|
|
|
+ on t.wrtradeorderid = c.wrtradeorderid
|
|
|
+ left join goods g
|
|
|
+ on c.goodsid = g.goodsid
|
|
|
+ left join tmp k
|
|
|
+ on t.wrfactortypeid = k.wrfactortypeid
|
|
|
+ left join wrtrade_matchdetail m
|
|
|
+ on t.wrtradeorderid = m.wrtradeorderid
|
|
|
+ left join useraccount u
|
|
|
+ on m.matchuserid = u.userid
|
|
|
+ left join taaccount ta
|
|
|
+ on t.accountid = ta.accountid
|
|
|
+ where t.WRTRADETYPE = 1
|
|
|
+`
|
|
|
sqlId.And("t.USERID", r.USERID)
|
|
|
sqlId.And("t.haswr", r.HASWR)
|
|
|
sqlId.AndEx("t.marketid", r.MARKETID, r.MARKETID > 0)
|
|
|
@@ -2546,7 +2578,8 @@ select t.xgoodsid,
|
|
|
t.accountid,
|
|
|
t.matchaccountid,
|
|
|
t.tradedate,
|
|
|
- t.wrfactortypeid,
|
|
|
+ to_char(t.wrfactortypeid) wrfactortypeid,
|
|
|
+ to_char(t.deliveryorderid) deliveryorderid,
|
|
|
g.goodscode xgoodscode,
|
|
|
g.goodsname xgoodsname,
|
|
|
t.pgoodsid,
|
|
|
@@ -2766,24 +2799,27 @@ type WrQuoteOrderMyq struct {
|
|
|
ORDERTIME string `json:"ordertime" xorm:"'ORDERTIME'"` // 委托时间
|
|
|
DELISTMINQTY SFLOAT64 `json:"delistminqty" xorm:"'DELISTMINQTY'"` // 起摘数量
|
|
|
|
|
|
- CANBARGAIN int32 `json:"canbargain" xorm:"'CANBARGAIN'"` // 是否可议价 - 0:不可 1:可
|
|
|
- CANPART int32 `json:"canpart" xorm:"'CANPART'"` // 是否允许部份摘牌 - 0:不允许 1:允许
|
|
|
- MARGINFLAG int32 `json:"marginflag" xorm:"'MARGINFLAG'"` // 挂牌是否指定保证金 - 0:未指定 1:指定
|
|
|
- MARGINVALUE float64 `json:"marginvalue" xorm:"'MARGINVALUE'"` // 保证金设置值
|
|
|
- VALIDTYPE int32 `json:"validtype" xorm:"'VALIDTYPE'"` // 有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效
|
|
|
- VALIDTIME string `json:"validtime" xorm:"'VALIDTIME'"` // 有效期限
|
|
|
- PERFORMANCETEMPLATEID int64 `json:"performancetemplateid" xorm:"'PERFORMANCETEMPLATEID'"` // 履约模板id
|
|
|
- GOODSCODE string `json:"goodscode" xorm:"'GOODSCODE'"` // 商品合约代码
|
|
|
- TEMPLATENAME string `json:"templatename" xorm:"'TEMPLATENAME'"` // 履约模板名称
|
|
|
- WAREHOUSENAME string `json:"warehousename" xorm:"'WAREHOUSENAME'"` // 仓库名称
|
|
|
- WRTYPENAME string `json:"wrtypename" xorm:"'WRTYPENAME'"` // 商品
|
|
|
+ CANBARGAIN int32 `json:"canbargain" xorm:"'CANBARGAIN'"` // 是否可议价 - 0:不可 1:可
|
|
|
+ CANPART int32 `json:"canpart" xorm:"'CANPART'"` // 是否允许部份摘牌 - 0:不允许 1:允许
|
|
|
+ MARGINFLAG int32 `json:"marginflag" xorm:"'MARGINFLAG'"` // 挂牌是否指定保证金 - 0:未指定 1:指定
|
|
|
+ MARGINVALUE float64 `json:"marginvalue" xorm:"'MARGINVALUE'"` // 保证金设置值
|
|
|
+ VALIDTYPE int32 `json:"validtype" xorm:"'VALIDTYPE'"` // 有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效
|
|
|
+ VALIDTIME string `json:"validtime" xorm:"'VALIDTIME'"` // 有效期限
|
|
|
+ PERFORMANCETEMPLATEID int64 `json:"performancetemplateid" xorm:"'PERFORMANCETEMPLATEID'"` // 履约模板id
|
|
|
+ GOODSCODE string `json:"goodscode" xorm:"'GOODSCODE'"` // 商品合约代码
|
|
|
+ TEMPLATENAME string `json:"templatename" xorm:"'TEMPLATENAME'"` // 履约模板名称
|
|
|
+ WAREHOUSENAME string `json:"warehousename" xorm:"'WAREHOUSENAME'"` // 仓库名称
|
|
|
+ WRTYPENAME string `json:"wrtypename" xorm:"'WRTYPENAME'"` // 商品
|
|
|
+ WRSTANDARDID int64 `json:"wrstandardid" xorm:"WRSTANDARDID" form:"wrstandardid"` // 现货商品ID
|
|
|
+ DELIVERYGOODSID int32 `json:"deliverygoodsid" xorm:"DELIVERYGOODSID" form:"deliverygoodsid"` // 品种ID
|
|
|
PageEx `xorm:"extends"`
|
|
|
|
|
|
- WRFACTORTYPEID int64 `json:"-" form:"wrfactortypeid"` // 仓单要素id
|
|
|
- HasWr int32 `json:"-" form:"haswr"` // 是否有仓单 0-没有 1-有
|
|
|
- WrPriceType int32 `json:"-" form:"wrpricetype"` // 价格方式 - 1:固定价 2-浮动价 - [挂牌]
|
|
|
- MarketId int32 `json:"-" form:"marketid"` // 市场id
|
|
|
- GOODSID int32 `json:"-" form:"goodsid"` // 商品id
|
|
|
+ WRFACTORTYPEID int64 `json:"-" form:"wrfactortypeid"` // 仓单要素id
|
|
|
+ HasWr int32 `json:"-" form:"haswr"` // 是否有仓单 0-没有 1-有
|
|
|
+ WrPriceType int32 `json:"-" form:"wrpricetype"` // 价格方式 - 1:固定价 2-浮动价 - [挂牌]
|
|
|
+ MarketId int32 `json:"-" form:"marketid"` // 市场id
|
|
|
+ GOODSID int32 `json:"-" form:"goodsid"` // 商品id
|
|
|
+ DGITEMNAME string `json:"-" form:"dgitemname"` // 筛选项
|
|
|
}
|
|
|
|
|
|
func (r *WrQuoteOrderMyq) calc() {
|
|
|
@@ -2817,6 +2853,8 @@ func (r *WrQuoteOrderMyq) buildSql() string {
|
|
|
" wd.minivalue," +
|
|
|
" e.enumdicname," +
|
|
|
" wd.wrstandardname || w.wrfactortypename2 WRTYPENAME," +
|
|
|
+ " w.wrstandardid," +
|
|
|
+ " w.deliverygoodsid," +
|
|
|
" s.templatename," +
|
|
|
" h.warehousename" +
|
|
|
" from WRTRADE_ORDERDETAIL t" +
|
|
|
@@ -2844,6 +2882,11 @@ func (r *WrQuoteOrderMyq) buildSql() string {
|
|
|
sqlId.And("t.buyorsell", r.BUYORSELL)
|
|
|
sqlId.AndEx("t.marketid", r.MarketId, r.MarketId > 0)
|
|
|
sqlId.AndEx("t.deliverymonth", r.DELIVERYMONTH, len(r.DELIVERYMONTH) > 0)
|
|
|
+ sqlId.AndEx("w.wrstandardid", r.WRSTANDARDID, r.WRSTANDARDID > 0)
|
|
|
+ sqlId.AndEx("w.deliverygoodsid", r.DELIVERYGOODSID, r.DELIVERYGOODSID > 0)
|
|
|
+ if d, ok := FtItemName(r.DGITEMNAME); ok {
|
|
|
+ sqlId.AndLikes("w.wrfactortypename", d...)
|
|
|
+ }
|
|
|
|
|
|
if r.BUYORSELL == 0 {
|
|
|
if r.WrPriceType == 1 {
|
|
|
@@ -3263,6 +3306,8 @@ type WRTradeBargainApply struct {
|
|
|
VALIDTIME string `json:"validtime" xorm:"'VALIDTIME'"` // 有效期限
|
|
|
TEMPLATENAME string `json:"templatename" xorm:"'TEMPLATENAME'"` // 履约方式(履约模板名称)
|
|
|
Wr2FactorType `xorm:"extends"`
|
|
|
+
|
|
|
+ HASWR int32 `json:"-" form:"haswr"` // 0-仓单预售 1-仓单贸易
|
|
|
}
|
|
|
|
|
|
func (r *WRTradeBargainApply) calc() {
|
|
|
@@ -3343,6 +3388,7 @@ SELECT to_char(t.WRBARGAINID) WRBARGAINID,
|
|
|
} else {
|
|
|
sqlId.AndEx("t.WRTRADEORDERID", r.WRTRADEORDERID, r.WRTRADEORDERID != "")
|
|
|
}
|
|
|
+ sqlId.And("o.haswr", r.HASWR)
|
|
|
|
|
|
return sqlId.String()
|
|
|
}
|