|
|
@@ -1547,12 +1547,14 @@ func (r *PromotionIncomeDetail) buildSql() string {
|
|
|
wr.WRSTANDARDID,
|
|
|
wr.WRSTANDARDCODE,
|
|
|
wr.WRSTANDARDNAME,
|
|
|
- case t.marketid when 64201 then '采购' else '供求' end MARKET,
|
|
|
- case t.buyorsell when 0 then '采购' else '销售' end BUYORSELL,
|
|
|
+ en.enumdicname MARKET,
|
|
|
+ en1.enumdicname BUYORSELL,
|
|
|
case t.profitroletype when 3 then '一级' else '二级' end PROFITROLETYPE,
|
|
|
t.PROFITAMOUNT
|
|
|
from THJ_Reckon_ProfitRecode t
|
|
|
left join wrstandard wr on t.wrstandardid = wr.wrstandardid
|
|
|
+ left join enumdicitem en on t.marketid = en.enumitemname and en.enumdiccode='THJMarket'
|
|
|
+ left join enumdicitem en1 on t.buyorsell = en1.enumitemname and en1.enumdiccode='buyOrSell'
|
|
|
where substr(t.tradedate,0,6) = '%v' and t.userid = %v and t.profitroletype in (3,4)
|
|
|
order by t.tradetime desc
|
|
|
`
|