|
@ -352,14 +352,14 @@ func (impl *ArticleDAOImplement) UpdateWhere(predicates []grmi.Predicate, entity |
|
|
******************************************************************************/ |
|
|
******************************************************************************/ |
|
|
func (impl *ArticleDAOImplement) SelectArtData(artId string, opotionId string) ([]model.Article, error) { |
|
|
func (impl *ArticleDAOImplement) SelectArtData(artId string, opotionId string) ([]model.Article, error) { |
|
|
|
|
|
|
|
|
session := impl.session.Table(impl.meta.TableName).Where("PlantNr = ?", impl.plantNr) |
|
|
|
|
|
|
|
|
session := impl.session.Table(impl.meta.TableName).Where("PlantNr = ? AND ArtTypeId = ?", impl.plantNr,model.ART_TYPE_MATERIALS) |
|
|
|
|
|
|
|
|
if artId != "" { |
|
|
if artId != "" { |
|
|
session = session.And("ArtId = ?", artId) |
|
|
session = session.And("ArtId = ?", artId) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if opotionId != "" { |
|
|
if opotionId != "" { |
|
|
session = session.And("ArtSpec2 = ?", opotionId) |
|
|
|
|
|
|
|
|
session = session.And("ArtSpec1 = ?", opotionId) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
data := make([]model.Article, 0, 10) |
|
|
data := make([]model.Article, 0, 10) |
|
|