|
|
@@ -200,6 +200,10 @@ type ErmcpModel struct {
|
|
|
SELLUSERID int64 `json:"-" xorm:"'SELLUSERID'"` // 销售方ID
|
|
|
AUDITTIME string `json:"audittime" xorm:"'AUDITTIME'"` // 审核时间
|
|
|
CREATETIME string `json:"createtime" xorm:"'CREATETIME'"` // 创建时间
|
|
|
+ SPOTGOODSMODELID int32 `json:"spotgoodsmodelid" xorm:"'SPOTGOODSMODELID'"` // 现货型号ID
|
|
|
+ SPOTGOODSBRANDID int32 `json:"spotgoodsbrandid" xorm:"'SPOTGOODSBRANDID'"` // 现货品牌ID
|
|
|
+ BRANDNAME string `json:"brandname" xorm:"'brandname'"` // 品牌名称
|
|
|
+ MODELNAME string `json:"modelname" xorm:"'modelname'"` // 型号名称
|
|
|
}
|
|
|
|
|
|
func (r *ErmcpModel) calc() {
|
|
|
@@ -251,11 +255,15 @@ func (r *ErmcpModel) buildSql(nContractType, nQueryType int32) string {
|
|
|
" to_char(t.contractattachment) attachment," +
|
|
|
" t.margin," +
|
|
|
" t.contractmargin," +
|
|
|
+ " t.SPOTGOODSMODELID," +
|
|
|
+ " t.SPOTGOODSBRANDID," +
|
|
|
" u.accountname," +
|
|
|
" g.deliverygoodscode," +
|
|
|
" g.deliverygoodsname," +
|
|
|
" g2.goodscode," +
|
|
|
" g2.goodsname," +
|
|
|
+ " gb.brandname," +
|
|
|
+ " gm.modelname," +
|
|
|
" e.enumdicname," +
|
|
|
" t.contracttype," +
|
|
|
" t.pricedamount + t.pricedqty * t.pricemove as pricedamount," +
|
|
|
@@ -275,6 +283,8 @@ func (r *ErmcpModel) buildSql(nContractType, nQueryType int32) string {
|
|
|
" on t.deliverygoodsid = g.deliverygoodsid" +
|
|
|
" left join goods g2" +
|
|
|
" on t.goodsid = g2.goodsid" +
|
|
|
+ " left join spotgoodsbrand gb on t.spotgoodsbrandid=gb.brandid" +
|
|
|
+ " left join spotgoodsmodel gm on t.spotgoodsmodelid=gm.modelid" +
|
|
|
" left join wrstandard wr" +
|
|
|
" on t.wrstandardid = wr.wrstandardid" +
|
|
|
" left join enumdicitem e" +
|