|
|
@@ -132,10 +132,11 @@ func (r *ErmcpDGFactoryItem) GetData() (interface{}, error) {
|
|
|
|
|
|
// Ermcp3Brand 品牌(从品种选择项定义表中查)
|
|
|
type Ermcp3Brand struct {
|
|
|
- BRANDID int64 `json:"brandid"` // 品牌id
|
|
|
- BRANDNAME string `json:"brandname"` // 品牌名称
|
|
|
- DELIVERYGOODSID int64 `json:"deliverygoodsid"` // 品种ID
|
|
|
- AREAUSERID int64 `json:"areauserid"` // 用户id
|
|
|
+ BRANDID int64 `json:"brandid"` // 品牌id
|
|
|
+ BRANDNAME string `json:"brandname"` // 品牌名称
|
|
|
+ DELIVERYGOODSID int64 `json:"deliverygoodsid"` // 品种ID
|
|
|
+ AREAUSERID int64 `json:"areauserid"` // 用户id
|
|
|
+ ISVALID int32 `json:"isvalid" xorm:"'ISVALID'"` // 是否有效
|
|
|
}
|
|
|
|
|
|
// GetDataEx
|
|
|
@@ -155,7 +156,7 @@ func (r *Ermcp3Brand) GetData() ([]Ermcp3Brand, error) {
|
|
|
if dgLst, ok := d.([]ErmcpDGFactoryItem); ok {
|
|
|
for _, val := range dgLst {
|
|
|
sData = append(sData, Ermcp3Brand{BRANDID: val.DGFACTORYITEMID, AREAUSERID: val.AREAUSERID,
|
|
|
- BRANDNAME: val.DGFACTORYITEMVALUE, DELIVERYGOODSID: int64(val.DELIVERYGOODSID)})
|
|
|
+ BRANDNAME: val.DGFACTORYITEMVALUE, DELIVERYGOODSID: int64(val.DELIVERYGOODSID), ISVALID: val.ISVALID})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2466,6 +2467,7 @@ type XHBRAND struct {
|
|
|
BRANDNAME string `json:"brandname"` // 品牌名称
|
|
|
DELIVERYGOODSID int64 `json:"-"` // 品种ID
|
|
|
AREAUSERID int64 `json:"-"` // 用户id
|
|
|
+ ISVALID int32 `json:"isvalid"` // 是否有效
|
|
|
}
|
|
|
|
|
|
// GetDataEx 获取现货品种/品牌
|
|
|
@@ -2475,7 +2477,8 @@ func (r *XHBRAND) GetDataEx() (interface{}, error) {
|
|
|
d, err := m.GetData()
|
|
|
if err == nil {
|
|
|
for _, v := range d {
|
|
|
- sData = append(sData, XHBRAND{DELIVERYGOODSID: v.DELIVERYGOODSID, BRANDID: v.BRANDID, BRANDNAME: v.BRANDNAME})
|
|
|
+ sData = append(sData, XHBRAND{DELIVERYGOODSID: v.DELIVERYGOODSID,
|
|
|
+ BRANDID: v.BRANDID, BRANDNAME: v.BRANDNAME, ISVALID: v.ISVALID})
|
|
|
}
|
|
|
}
|
|
|
return sData, err
|
|
|
@@ -3075,7 +3078,7 @@ select s.userid,
|
|
|
left join useraccount u1
|
|
|
on s.customeruserid = u1.userid
|
|
|
left join enumdicitem e on w.unitid=e.enumitemname and e.enumdiccode='goodsunit'
|
|
|
- where 1 = 1 and t.middlegoodspricedqty3 > t.pricedqty
|
|
|
+ where 1 = 1 and t.middlegoodspricedqty > t.middlegoodspricedqty3
|
|
|
and t.middlegoodsid in
|
|
|
(select middlegoodsid from tmp where tmp.srcgoodsgroupid = %v)
|
|
|
`
|