|
|
@@ -199,6 +199,10 @@ type Ermcp3ReportAreaSpotPL struct {
|
|
|
DELIVERYGOODSID int32 `json:"deliverygoodsid" xorm:"'DELIVERYGOODSID'"` // 现货品种id
|
|
|
DELIVERYGOODSCODE string `json:"deliverygoodscode" xorm:"'DELIVERYGOODSCODE'"` // 现货品种代码
|
|
|
DELIVERYGOODSNAME string `json:"deliverygoodsname" xorm:"'DELIVERYGOODSNAME'"` // 现货品种名称
|
|
|
+ BIZTYPE int32 `json:"biztype" xorm:"'BIZTYPE'"` // 业务类型 1-套保 2-套利
|
|
|
+ CURRENCYID int32 `json:"currencyid" xorm:"'CURRENCYID'"` // 币种id
|
|
|
+
|
|
|
+ CURRENCYNAME string `json:"currencyname"` // 币种名称
|
|
|
|
|
|
ENUMDICNAME string `json:"enumdicname"` // 现货商品单位名称
|
|
|
WRENUMDICNAME string `json:"gbenumdicname"` // 品类单位名称
|
|
|
@@ -210,6 +214,7 @@ type Ermcp3ReportAreaSpotPL struct {
|
|
|
func (r *Ermcp3ReportAreaSpotPL) calc() {
|
|
|
r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.GBUNITID)
|
|
|
r.WRENUMDICNAME = mtpcache.GetEnumDicitemName(r.WRUNITID)
|
|
|
+ r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
|
|
|
}
|
|
|
|
|
|
func (r *Ermcp3ReportAreaSpotPL) buildSql() string {
|
|
|
@@ -240,6 +245,8 @@ func (r *Ermcp3ReportAreaSpotPL) buildSql() string {
|
|
|
" t.CURMARKETVALUE," +
|
|
|
" t.ACTUALPL," +
|
|
|
" t.FLOATPL," +
|
|
|
+ " t.currencyid," +
|
|
|
+ " t.biztype," +
|
|
|
" to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME," +
|
|
|
" w.wrstandardcode," +
|
|
|
" w.wrstandardname," +
|
|
|
@@ -331,7 +338,10 @@ type Ermcp3ReckonAreaSpotSub struct {
|
|
|
GOODSUNITID int32 `json:"goodsunitid" xorm:"'goodsunitid'"` // 现货商品单位id
|
|
|
BRANDNAME string `json:"brandname" xorm:"'brandname'"` // 品牌名称
|
|
|
ACCOUNTNAME string `json:"accountname" xorm:"'accountname'"` // 所属机构名称
|
|
|
+ BIZTYPE int32 `json:"biztype" xorm:"'BIZTYPE'"` // 业务类型 1-套保 2-套利
|
|
|
+ CURRENCYID int32 `json:"currencyid" xorm:"'CURRENCYID'"` // 币种id
|
|
|
|
|
|
+ CURRENCYNAME string `json:"currencyname"` // 币种名称
|
|
|
TOTALBUYPRICEDQTY float64 `json:"totalbuypricedqty"` // 采购定价量 = 期末 - 期初
|
|
|
TOTALSELLPRICEDQTY float64 `json:"totalsellpricedqty"` // 销售定价量 = 期末 - 期初
|
|
|
BeginDate string `json:"-"` // 开始日期
|
|
|
@@ -341,6 +351,7 @@ type Ermcp3ReckonAreaSpotSub struct {
|
|
|
func (r *Ermcp3ReckonAreaSpotSub) calc() {
|
|
|
r.TOTALBUYPRICEDQTY = r.BUYPRICEDQTY - r.ORIBUYPRICEDQTY
|
|
|
r.TOTALSELLPRICEDQTY = r.SELLPRICEDQTY - r.ORISELLPRICEDQTY
|
|
|
+ r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
|
|
|
}
|
|
|
|
|
|
func (r *Ermcp3ReckonAreaSpotSub) buildSql() string {
|
|
|
@@ -375,6 +386,8 @@ func (r *Ermcp3ReckonAreaSpotSub) buildSql() string {
|
|
|
" t.ORISELLPRICEDAMOUNT," +
|
|
|
" t.BUYPRICEDAMOUNT," +
|
|
|
" t.SELLPRICEDAMOUNT," +
|
|
|
+ " t.currencyid," +
|
|
|
+ " t.biztype," +
|
|
|
" w.wrstandardname," +
|
|
|
" w.wrstandardcode," +
|
|
|
" g.deliverygoodscode," +
|
|
|
@@ -472,12 +485,16 @@ type Ermcp3ReportAreaSpotSub struct {
|
|
|
GOODSUNITID int32 `json:"goodsunitid" xorm:"'goodsunitid'"` // 现货商品单位id
|
|
|
BRANDNAME string `json:"brandname" xorm:"'brandname'"` // 品牌名称
|
|
|
ACCOUNTNAME string `json:"accountname" xorm:"'accountname'"` // 所属机构名称
|
|
|
+ BIZTYPE int32 `json:"biztype" xorm:"'BIZTYPE'"` // 业务类型 1-套保 2-套利
|
|
|
+ CURRENCYID int32 `json:"currencyid" xorm:"'CURRENCYID'"` // 币种id
|
|
|
|
|
|
+ CURRENCYNAME string `json:"currencyname"` // 币种名称
|
|
|
TOTALBUYPRICEDQTY float64 `json:"totalbuypricedqty"` // 采购定价量 = 期末 - 期初
|
|
|
TOTALSELLPRICEDQTY float64 `json:"totalsellpricedqty"` // 销售定价量 = 期末 - 期初
|
|
|
}
|
|
|
|
|
|
func (r *Ermcp3ReportAreaSpotSub) calc() {
|
|
|
+ r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
|
|
|
r.TOTALBUYPRICEDQTY = r.BUYPRICEDQTY - r.ORIBUYPRICEDQTY
|
|
|
r.TOTALSELLPRICEDQTY = r.SELLPRICEDQTY - r.ORISELLPRICEDQTY
|
|
|
}
|
|
|
@@ -515,6 +532,8 @@ func (r *Ermcp3ReportAreaSpotSub) buildSql() string {
|
|
|
" t.ORISELLPRICEDAMOUNT," +
|
|
|
" t.BUYPRICEDAMOUNT," +
|
|
|
" t.SELLPRICEDAMOUNT," +
|
|
|
+ " t.currencyid," +
|
|
|
+ " t.biztype," +
|
|
|
" w.wrstandardname," +
|
|
|
" w.wrstandardcode," +
|
|
|
" g.deliverygoodscode," +
|