|
@@ -1703,6 +1703,7 @@ func (r *Ermcp2stockspotchangelog) buildSql() string {
|
|
|
t.LOGVALUE,
|
|
t.LOGVALUE,
|
|
|
s.CONTRACTNO,
|
|
s.CONTRACTNO,
|
|
|
u1.ACCOUNTNAME,
|
|
u1.ACCOUNTNAME,
|
|
|
|
|
+ t.TradeDate,
|
|
|
(t.LOGVALUE * c.CONVERTRATIO * (1/(1 + ws.VATRATE))) MIDDLEGOODSCHANGE
|
|
(t.LOGVALUE * c.CONVERTRATIO * (1/(1 + ws.VATRATE))) MIDDLEGOODSCHANGE
|
|
|
FROM ERMCP2_StockSpotChangeLog t
|
|
FROM ERMCP2_StockSpotChangeLog t
|
|
|
LEFT JOIN ERMS2_WRSConvertDetail c ON c.WRStandardID = t.WRStandardID
|
|
LEFT JOIN ERMS2_WRSConvertDetail c ON c.WRStandardID = t.WRStandardID
|
|
@@ -1710,7 +1711,7 @@ func (r *Ermcp2stockspotchangelog) buildSql() string {
|
|
|
LEFT JOIN WRStandard ws ON ws.WRStandardID = t.WRStandardID
|
|
LEFT JOIN WRStandard ws ON ws.WRStandardID = t.WRStandardID
|
|
|
LEFT JOIN ERMCP_SPOTCONTRACT s ON s.SPOTCONTRACTID = t.RELATEDID
|
|
LEFT JOIN ERMCP_SPOTCONTRACT s ON s.SPOTCONTRACTID = t.RELATEDID
|
|
|
LEFT JOIN useraccount u ON u.userid = s.CUSTOMERUSERID
|
|
LEFT JOIN useraccount u ON u.userid = s.CUSTOMERUSERID
|
|
|
- LEFT JOIN useraccount u1 ON u.userid = s.TRADEUSERID
|
|
|
|
|
|
|
+ LEFT JOIN useraccount u1 ON u1.userid = s.TRADEUSERID
|
|
|
WHERE t.userid = %v AND mg.MiddleGoodsID = %v
|
|
WHERE t.userid = %v AND mg.MiddleGoodsID = %v
|
|
|
`
|
|
`
|
|
|
// var sqlId utils.SQLVal = `
|
|
// var sqlId utils.SQLVal = `
|
|
@@ -1795,6 +1796,7 @@ func (r *Ermcp2hedgeditemsDetail) buildSql() string {
|
|
|
SELECT DISTINCT
|
|
SELECT DISTINCT
|
|
|
to_char(t.CREATETIME, 'yyyy-mm-dd hh24:mi:ss') CREATETIME,
|
|
to_char(t.CREATETIME, 'yyyy-mm-dd hh24:mi:ss') CREATETIME,
|
|
|
t.SPOTTYPE,
|
|
t.SPOTTYPE,
|
|
|
|
|
+ t.HEDGEDTYPE,
|
|
|
wr.WRSTANDARDNAME,
|
|
wr.WRSTANDARDNAME,
|
|
|
e.ENUMDICNAME,
|
|
e.ENUMDICNAME,
|
|
|
h.UNEXEQTY,
|
|
h.UNEXEQTY,
|