|
@@ -1889,6 +1889,10 @@ type Ermcp3HedgePlan struct {
|
|
|
TRADEUSERID int64 `json:"tradeuserid" xorm:"'TRADEUSERID'"` // 交易用户id
|
|
TRADEUSERID int64 `json:"tradeuserid" xorm:"'TRADEUSERID'"` // 交易用户id
|
|
|
CURRENCYID int32 `json:"currencyid" xorm:"'CURRENCYID'"` // 币种id
|
|
CURRENCYID int32 `json:"currencyid" xorm:"'CURRENCYID'"` // 币种id
|
|
|
WRUNITID int32 `json:"wrunitid" xorm:"'WRUNITID'"` // 品类单位id
|
|
WRUNITID int32 `json:"wrunitid" xorm:"'WRUNITID'"` // 品类单位id
|
|
|
|
|
+ AUDITID int64 `json:"auditid" xorm:"'auditid'"` // 审核id
|
|
|
|
|
+ AUDITSRC int32 `json:"auditsrc" xorm:"'AUDITSRC'"` // 审核来源 1-管理端 2-终端
|
|
|
|
|
+ AUDITREMARK string `json:"auditremark" xorm:"'auditremark'"` // 审核备注
|
|
|
|
|
+ AUDITNAME string `json:"auditname" xorm:"'AUDITNAME'"` // 审核人名称
|
|
|
|
|
|
|
|
WRUNITIDNAME string `json:"wrunitidame"` // 品类单位名称
|
|
WRUNITIDNAME string `json:"wrunitidame"` // 品类单位名称
|
|
|
TRADEUSERNAME string `json:"tradeusername"` // 交易用户名称
|
|
TRADEUSERNAME string `json:"tradeusername"` // 交易用户名称
|
|
@@ -1904,6 +1908,11 @@ func (r *Ermcp3HedgePlan) calc() {
|
|
|
if r.WRUNITID > 0 {
|
|
if r.WRUNITID > 0 {
|
|
|
r.WRUNITIDNAME = mtpcache.GetEnumDicitemName(r.WRUNITID)
|
|
r.WRUNITIDNAME = mtpcache.GetEnumDicitemName(r.WRUNITID)
|
|
|
}
|
|
}
|
|
|
|
|
+ if r.AUDITSRC == 1 {
|
|
|
|
|
+ if r.AUDITNAME == "" && r.AUDITID > 0 {
|
|
|
|
|
+ r.AUDITNAME = mtpcache.GetSystemmangerLoginCode(r.AUDITID)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (r *Ermcp3HedgePlan) buildSql(status string) string {
|
|
func (r *Ermcp3HedgePlan) buildSql(status string) string {
|
|
@@ -1931,12 +1940,19 @@ func (r *Ermcp3HedgePlan) buildSql(status string) string {
|
|
|
" t.accountid," +
|
|
" t.accountid," +
|
|
|
" t.tradeuserid," +
|
|
" t.tradeuserid," +
|
|
|
" t.currencyid," +
|
|
" t.currencyid," +
|
|
|
- " ta.accountname taaccountname" +
|
|
|
|
|
|
|
+ " t.auditid," +
|
|
|
|
|
+ " t.auditsrc," +
|
|
|
|
|
+ " t.auditremark," +
|
|
|
|
|
+ " ta.accountname taaccountname," +
|
|
|
|
|
+ " l.accountname auditname" +
|
|
|
" from ermcp_hedgeplan t" +
|
|
" from ermcp_hedgeplan t" +
|
|
|
" left join deliverygoods g" +
|
|
" left join deliverygoods g" +
|
|
|
" on t.deliverygoodsid = g.deliverygoodsid" +
|
|
" on t.deliverygoodsid = g.deliverygoodsid" +
|
|
|
- " left join wrstandard w on t.wrstandardid=w.wrstandardid" +
|
|
|
|
|
- " left join taaccount ta on t.accountid=ta.accountid" +
|
|
|
|
|
|
|
+ " left join wrstandard w" +
|
|
|
|
|
+ " on t.wrstandardid = w.wrstandardid" +
|
|
|
|
|
+ " left join taaccount ta" +
|
|
|
|
|
+ " on t.accountid = ta.accountid" +
|
|
|
|
|
+ " left join loginaccount l on t.auditid=l.loginid" +
|
|
|
" where t.hedgeplanstatus in (%v)"
|
|
" where t.hedgeplanstatus in (%v)"
|
|
|
|
|
|
|
|
if r.UserType == 0 {
|
|
if r.UserType == 0 {
|