|
|
@@ -53,7 +53,8 @@ type QueryTradePositionRsp struct {
|
|
|
GoodsCode string `json:"goodscode" xorm:"GOODSCODE"` // 商品代码
|
|
|
GoodsName string `json:"goodsname" xorm:"GOODSNAME"` // 商品名称
|
|
|
AgreeUnit float64 `json:"agreeunit" xorm:"'AGREEUNIT'"` // 合约单位
|
|
|
- CurrencyID int64 `json:"currencyid" xorm:"'CURRENCYID'"` // 报价货币ID
|
|
|
+ CurrencyID int64 `json:"currencyid" xorm:"'CURRENCYID'"` // 报价货币ID - goods
|
|
|
+ TaCurrencyid int64 `json:"tacurrencyid" xorm:"'TACURRENCYID'"` // 报价货币ID - taaccount
|
|
|
GoodUnitID int64 `json:"goodunitid" xorm:"'GOODUNITID'"` // 报价单位ID
|
|
|
Goodunit string `json:"goodunit" xorm:"'GOODUNIT'"` // 报价单位
|
|
|
DecimalPlace int64 `json:"decimalplace" xorm:"'DECIMALPLACE'"` // 报价小数位
|
|
|
@@ -126,7 +127,8 @@ func GetTradePosition(accIds string, tradeModes string) (rst []QueryTradePositio
|
|
|
models.Tradeposition `xorm:"extends"`
|
|
|
Goodscode string `json:"goodscode" xorm:"'GOODSCODE'"` // 商品代码(内部)
|
|
|
Goodsname string `json:"goodsname" xorm:"'GOODSNAME'"` // 商品名称
|
|
|
- Currencyid int64 `json:"currencyid" xorm:"'CURRENCYID'"` // 报价货币ID
|
|
|
+ Currencyid int64 `json:"currencyid" xorm:"'CURRENCYID'"` // 报价货币ID - goods
|
|
|
+ TaCurrencyid int64 `json:"tacurrencyid" xorm:"'TACURRENCYID'"` // 报价货币ID - taaccount
|
|
|
Goodunitid int64 `json:"goodunitid" xorm:"'GOODUNITID'"` // 报价单位ID
|
|
|
Goodunit string `json:"goodunit" xorm:"'GOODUNIT'"` // 报价单位
|
|
|
Agreeunit float64 `json:"agreeunit" xorm:"'AGREEUNIT'"` // 合约单位
|
|
|
@@ -148,7 +150,8 @@ func GetTradePosition(accIds string, tradeModes string) (rst []QueryTradePositio
|
|
|
Join("LEFT", "MARKET", "GOODS.MARKETID = MARKET.MARKETID").
|
|
|
Join("LEFT", "ENUMDICITEM", "GOODS.GOODUNITID = ENUMDICITEM.ENUMITEMNAME and ENUMDICITEM.ENUMDICCODE = 'goodsunit'").
|
|
|
Join("LEFT", "USERINFO UI", "UI.USERID = GOODS.PROVIDERUSERID").
|
|
|
- Select("TRADEPOSITION.*, GOODS.GOODSCODE, GOODS.GOODSNAME, GOODS.CURRENCYID, GOODS.GOODUNITID,GOODS.QTYDECIMALPLACE, GOODS.REFGOODSID, GOODS.REFGOODSCODE, " +
|
|
|
+ Join("LEFT", "TAACCOUNT TA", "TA.ACCOUNTID = TRADEPOSITION.ACCOUNTID").
|
|
|
+ Select("TRADEPOSITION.*, GOODS.GOODSCODE, GOODS.GOODSNAME, GOODS.CURRENCYID, TA.CURRENCYID TACURRENCYID, GOODS.GOODUNITID,GOODS.QTYDECIMALPLACE, GOODS.REFGOODSID, GOODS.REFGOODSCODE, " +
|
|
|
"ENUMDICITEM.ENUMDICNAME as GOODUNIT, GOODS.AGREEUNIT, GOODS.DECIMALPLACE, MARKET.MARKETID, MARKET.TRADEMODE, UI.CUSTOMERNAME as MATCHNAME, nvl(EX.MINDELIVERYLOT, 1) MINDELIVERYLOT").
|
|
|
Where(fmt.Sprintf(`TRADEPOSITION.ACCOUNTID in (%s)`, accIds))
|
|
|
if len(tradeModes) > 0 {
|