|
@@ -1895,15 +1895,15 @@ func (r *THJUserLevelInfo) Get() (err error) {
|
|
|
|
|
|
|
|
// Spotgoodsprice 现货市价
|
|
// Spotgoodsprice 现货市价
|
|
|
type Spotgoodsprice struct {
|
|
type Spotgoodsprice struct {
|
|
|
- WRSTANDARDID int64 `json:"wrstandardid" xorm:"WRSTANDARDID" form:"wrstandardid"` // 现货商品ID(通用则为0)
|
|
|
|
|
- WRSTANDARDCODE string `json:"wrstandardcode" xorm:"WRSTANDARDCODE"` // 现货商品代码
|
|
|
|
|
- WRSTANDARDNAME string `json:"wrstandardname" xorm:"WRSTANDARDNAME"` // 现货商品名称
|
|
|
|
|
- SPOTGOODSPRICE float64 `json:"spotgoodsprice" xorm:"SPOTGOODSPRICE"` // 当前价格
|
|
|
|
|
- PRESPOTGOODSPRICE float64 `json:"prespotgoodsprice" xorm:"PRESPOTGOODSPRICE"` // 上日价格
|
|
|
|
|
- TRADEDATE string `json:"tradedate" xorm:"TRADEDATE"` // 交易日(yyyyMMdd)
|
|
|
|
|
- SPOTGOODSQTY float64 `json:"spotgoodsqty" xorm:"SPOTGOODSQTY"` // 招标量
|
|
|
|
|
-
|
|
|
|
|
- PageEx `xorm:"extends"` // 页码信息
|
|
|
|
|
|
|
+ WRSTANDARDID int64 `json:"wrstandardid" xorm:"WRSTANDARDID" form:"wrstandardid"` // 现货商品ID(通用则为0)
|
|
|
|
|
+ WRSTANDARDCODE string `json:"wrstandardcode" xorm:"WRSTANDARDCODE"` // 现货商品代码
|
|
|
|
|
+ WRSTANDARDNAME string `json:"wrstandardname" xorm:"WRSTANDARDNAME"` // 现货商品名称
|
|
|
|
|
+ SPOTGOODSPRICE float64 `json:"spotgoodsprice" xorm:"SPOTGOODSPRICE"` // 当前价格
|
|
|
|
|
+ PRESPOTGOODSPRICE float64 `json:"prespotgoodsprice" xorm:"PRESPOTGOODSPRICE"` // 上日价格
|
|
|
|
|
+ TRADEDATE string `json:"tradedate" xorm:"TRADEDATE"` // 交易日(yyyyMMdd)
|
|
|
|
|
+ SPOTGOODSQTY float64 `json:"spotgoodsqty" xorm:"SPOTGOODSQTY"` // 招标量
|
|
|
|
|
+ PRICEFLAG int `json:"priceflag" xorm:"PRICEFLAG"` // 点价标识(1:为可点价-本月招标价已发布,否则为0)
|
|
|
|
|
+ PageEx `xorm:"extends"` // 页码信息
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (r *Spotgoodsprice) calc() {
|
|
func (r *Spotgoodsprice) calc() {
|
|
@@ -1919,7 +1919,10 @@ func (r *Spotgoodsprice) buildSql() string {
|
|
|
t.prespotgoodsprice,
|
|
t.prespotgoodsprice,
|
|
|
t.spotgoodsprice,
|
|
t.spotgoodsprice,
|
|
|
t.spotgoodsqty,
|
|
t.spotgoodsqty,
|
|
|
- to_char(to_date(t.TRADEDATE, 'yyyymmdd'), 'yyyy-mm-dd') TRADEDATE
|
|
|
|
|
|
|
+ to_char(to_date(t.TRADEDATE, 'yyyymmdd'), 'yyyy-mm-dd') TRADEDATE,
|
|
|
|
|
+ case
|
|
|
|
|
+ when substr(t.tradedate, 0, 6) - to_char(sysdate, 'yyyyMM') = 0 then 1
|
|
|
|
|
+ else 0 end priceflag
|
|
|
from ERMCP_SpotGoodsPrice t
|
|
from ERMCP_SpotGoodsPrice t
|
|
|
left join wrstandard wr
|
|
left join wrstandard wr
|
|
|
on t.wrstandardid = wr.wrstandardid
|
|
on t.wrstandardid = wr.wrstandardid
|