|
|
@@ -2891,8 +2891,7 @@ type Ermcp3SCMiddleGoodsReport struct {
|
|
|
USERID int64 `json:"userid" xorm:"'USERID'" form:"userid"` // 合同所属用户id
|
|
|
CONTRACTNO string `json:"contractno" xorm:"'CONTRACTNO'"` // 合同编号
|
|
|
CONTRACTTYPE int32 `json:"contracttype" xorm:"'CONTRACTTYPE'"` // 合同类型 1:采购 -1:销售
|
|
|
- MATHNAME string `json:"mathname" xorm:"'MATHNAME'"` // 交易对手方
|
|
|
- MATCHNICKNAME string `json:"matchnickname" xorm:"'MATCHNICKNAME'"` // 交易对手方简称
|
|
|
+ MATCHNAME string `json:"matchname" xorm:"'MATCHNAME'"` // 交易对手方(个人:用户名称 企业:简称)
|
|
|
DELIVERYGOODSCODE string `json:"deliverygoodscode" xorm:"'DELIVERYGOODSCODE'"` // 品种代码
|
|
|
DELIVERYGOODSNAME string `json:"deliverygoodsname" xorm:"'DELIVERYGOODSNAME'"` // 品种名称
|
|
|
WRSTANDARDCODE string `json:"wrstandardcode" xorm:"'WRSTANDARDCODE'"` // 商品(品类) 代码
|
|
|
@@ -2969,8 +2968,7 @@ select t.reckondate,
|
|
|
s.userid,
|
|
|
s.contractno,
|
|
|
s.contracttype,
|
|
|
- u.accountname mathname,
|
|
|
- ui.nickname matchnickname,
|
|
|
+ decode(ui.userinfotype, 2, ui.nickname,u.accountname) matchname,
|
|
|
g.deliverygoodscode,
|
|
|
g.deliverygoodsname,
|
|
|
w.wrstandardcode,
|
|
|
@@ -3031,7 +3029,7 @@ select t.cycletype,
|
|
|
s.userid,
|
|
|
s.contractno,
|
|
|
s.contracttype,
|
|
|
- u.accountname mathname,
|
|
|
+ decode(ui.userinfotype, 2, ui.nickname, u.accountname) matchname,
|
|
|
g.deliverygoodscode,
|
|
|
g.deliverygoodsname,
|
|
|
w.wrstandardcode,
|
|
|
@@ -3046,6 +3044,7 @@ select t.cycletype,
|
|
|
on t.spotcontractid = s.spotcontractid
|
|
|
left join useraccount u
|
|
|
on u.userid = (decode(s.contracttype, 1, s.selluserid, s.buyuserid))
|
|
|
+ left join userinfo ui on u.userid=ui.userid
|
|
|
left join deliverygoods g
|
|
|
on t.deliverygoodsid = g.deliverygoodsid
|
|
|
left join wrstandard w
|