|
|
@@ -77,7 +77,7 @@ func (r *WrOrderQuote) buildSqlFixedPrice() string {
|
|
|
" nvl(t.deliverymonth,'0') deliverymonth," +
|
|
|
" rank() over(partition by t.wrfactortypeid, nvl(t.deliverymonth,'0') order by t.fixedprice desc) cnt" +
|
|
|
" from wrtrade_orderdetail t" +
|
|
|
- " where t.wrtradetype = 1 and t.isspecified=0 and t.buyorsell = 0 and t.wrtradeorderstatus in(3,10) %v" +
|
|
|
+ " where t.wrtradetype = 1 and t.isspecified=0 and t.buyorsell = 0 and t.wrtradeorderstatus in(3,7) %v" +
|
|
|
" ) a" +
|
|
|
" where a.cnt = 1" +
|
|
|
" group by a.wrfactortypeid, a.fixedprice, a.deliverymonth)," +
|
|
|
@@ -92,7 +92,7 @@ func (r *WrOrderQuote) buildSqlFixedPrice() string {
|
|
|
" nvl(t.deliverymonth,'0') deliverymonth," +
|
|
|
" rank() over(partition by t.wrfactortypeid, nvl(t.deliverymonth,'0') order by t.fixedprice asc) cnt" +
|
|
|
" from wrtrade_orderdetail t" +
|
|
|
- " where t.wrtradetype = 1 and t.isspecified=0 and t.buyorsell = 1 and t.wrtradeorderstatus in(3,10) %v " +
|
|
|
+ " where t.wrtradetype = 1 and t.isspecified=0 and t.buyorsell = 1 and t.wrtradeorderstatus in(3,7) %v " +
|
|
|
" ) a" +
|
|
|
" where a.cnt = 1" +
|
|
|
" group by a.wrfactortypeid, a.fixedprice, a.deliverymonth)," +
|
|
|
@@ -176,7 +176,7 @@ func (r *WrOrderQuote) buildSqlPriceMove() string {
|
|
|
" from wrtrade_orderdetail t" +
|
|
|
" left join WRTrade_GoodsConfig c" +
|
|
|
" on t.wrtradeorderid = c.wrtradeorderid" +
|
|
|
- " where t.wrtradetype = 1 and t.isspecified=0 and t.wrtradeorderstatus in(3,10)" +
|
|
|
+ " where t.wrtradetype = 1 and t.isspecified=0 and t.wrtradeorderstatus in(3, 7)" +
|
|
|
" and t.buyorsell = 0 %v) a" +
|
|
|
" where a.cnt = 1" +
|
|
|
" group by a.wrfactortypeid, a.pricemove, a.goodsid, a.goodscode, a.deliverymonth)," +
|
|
|
@@ -199,7 +199,7 @@ func (r *WrOrderQuote) buildSqlPriceMove() string {
|
|
|
" from wrtrade_orderdetail t" +
|
|
|
" left join WRTrade_GoodsConfig c" +
|
|
|
" on t.wrtradeorderid = c.wrtradeorderid" +
|
|
|
- " where t.wrtradetype = 1 and t.isspecified=0 and t.wrtradeorderstatus in(3,10)" +
|
|
|
+ " where t.wrtradetype = 1 and t.isspecified=0 and t.wrtradeorderstatus in(3, 7)" +
|
|
|
" and t.buyorsell = 1 %v) a" +
|
|
|
" where a.cnt = 1" +
|
|
|
" group by a.wrfactortypeid, a.pricemove, a.goodsid, a.goodscode, a.deliverymonth)," +
|
|
|
@@ -776,7 +776,7 @@ select t.HASWR,
|
|
|
on t.wrtradeorderid = mr.wrtradeorderid
|
|
|
left join taaccount ta
|
|
|
on t.accountid = ta.accountid
|
|
|
- where t.WRTRADETYPE = 1
|
|
|
+ where t.WRTRADETYPE = 1 and t.WRTRADEORDERSTATUS not in(2)
|
|
|
`
|
|
|
sqlId.And("t.USERID", r.USERID)
|
|
|
sqlId.And("t.haswr", r.HASWR)
|