|
|
@@ -585,11 +585,11 @@ type InternalUncorrelatedTradeDetail struct {
|
|
|
ACCOUNTNAME string `json:"accountname" xorm:"ACCOUNTNAME" form:"accountname"` // 套期主体
|
|
|
ENABLEQTY float64 `json:"enableqty" xorm:"ENABLEQTY"` // 项目可关联手数 = 成交手数 - 关联数量
|
|
|
|
|
|
- USERID int64 `form:"userid" binding:"required"` // 用户编号
|
|
|
- BEGINDATE string `json:"-" form:"begindate"` // 起始日期, 格式:yyyymmdd
|
|
|
- ENDDATE string `json:"-" form:"enddate"` // 终止日期, 格式:yyyymmdd
|
|
|
- GOODSCODE string `json:"goodscode" form:"goodscode"` // 合约代码
|
|
|
- GOODSNAME string `json:"goodsname" form:"goodsname"` // 合约名称
|
|
|
+ USERID int64 `json:"-" form:"userid" binding:"required"` // 用户编号
|
|
|
+ BEGINDATE string `json:"-" form:"begindate"` // 起始日期, 格式:yyyymmdd
|
|
|
+ ENDDATE string `json:"-" form:"enddate"` // 终止日期, 格式:yyyymmdd
|
|
|
+ GOODSCODE string `json:"goodscode" form:"goodscode"` // 合约代码
|
|
|
+ GOODSNAME string `json:"goodsname" form:"goodsname"` // 合约名称
|
|
|
}
|
|
|
|
|
|
func (r *InternalUncorrelatedTradeDetail) calc() {
|
|
|
@@ -638,7 +638,7 @@ func (r *InternalUncorrelatedTradeDetail) buildSql() string {
|
|
|
sqlId.AndLike("g.goodscode", r.GOODSCODE)
|
|
|
sqlId.AndLike("g.goodsname", r.GOODSNAME)
|
|
|
sqlId.AndEx("ept.TRADEID", r.TRADEID, r.TRADEID != "")
|
|
|
- sqlId.And("ept.BUYORSELL", r.BUYORSELL)
|
|
|
+ sqlId.AndEx("ept.BUYORSELL", r.BUYORSELL, r.BUYORSELL != -1)
|
|
|
sqlId.AndLikes2("ta.accountname", "ta.accountid", r.ACCOUNTNAME)
|
|
|
sqlId.OrderByDesc("ept.tradetime")
|
|
|
|