|
|
@@ -1805,8 +1805,9 @@ type WrHoldLB struct {
|
|
|
THUMURLS string `json:"thumurls" xorm:"thumurls"` // 缩略图
|
|
|
Wr2FactorType `xorm:"extends"`
|
|
|
|
|
|
- WRHOLDENO string `json:"wrholdeno"` // 仓单编号
|
|
|
- ENABLEQTY float64 `json:"enableqty"` // 可用数量
|
|
|
+ WRHOLDENO string `json:"wrholdeno"` // 仓单编号
|
|
|
+ ENABLEQTY float64 `json:"enableqty"` // 可用数量
|
|
|
+ SPOTGOODSPRICE float64 `json:"spotgoodsprice" xorm:"'SPOTGOODSPRICE'"` // 参考价(THJ)
|
|
|
|
|
|
DGITEMNAME string `json:"-" form:"dgitemname"`
|
|
|
}
|
|
|
@@ -1856,11 +1857,14 @@ func (r *WrHoldLB) buildSql() string {
|
|
|
" t.ACCOUNTID," +
|
|
|
" to_char(t.CREATETIME, 'yyyy-mm-dd hh24:mi:ss') CREATETIME," +
|
|
|
" t.TRADEDATE," +
|
|
|
- " t.WRID," +
|
|
|
+ " to_char(t.WRID) WRID," +
|
|
|
" t.PARENTSUBNUM," +
|
|
|
+ " sgp.SPOTGOODSPRICE," +
|
|
|
" tmp.*" +
|
|
|
" FROM WRHOLDLB t" +
|
|
|
" LEFT JOIN tmp on t.wrfactortypeid= tmp.wrfactortypeid" +
|
|
|
+ " LEFT JOIN ERMCP_SpotGoodsPrice sgp ON sgp.deliverygoodsid = tmp.deliverygoodsid" +
|
|
|
+ " AND sgp.wrstandardid = tmp.wrstandardid AND sgp.spotgoodsbrandid =0 and sgp.currencyid = 1" +
|
|
|
" WHERE 1 = 1"
|
|
|
sqlId.And("t.ACCOUNTID", r.ACCOUNTID)
|
|
|
sqlId.AndEx("tmp.DELIVERYGOODSID", r.DELIVERYGOODSID, r.DELIVERYGOODSID > 0)
|