|
|
@ -342,3 +342,26 @@ func (impl *ArticleAtcodLstDAOImplement) SelectUnAllot(attrCodes []int) ([]model |
|
|
|
} |
|
|
|
return data, nil |
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
|
* |
|
|
|
* @Reference LAPP_LF_MOM_BACKEND/dao/base/ArticleAtcodLstDAOImplement.SelectAllAttributeWithValue |
|
|
|
* |
|
|
|
******************************************************************************/ |
|
|
|
func (impl *ArticleAtcodLstDAOImplement) SelectAllWithAttrValue() ([]model.ArticleWithAttrValue, error) { |
|
|
|
var err error |
|
|
|
result := make([]model.ArticleWithAttrValue, 0) |
|
|
|
condition := fmt.Sprintf("%s = %s and %s = %s and %s = %s", |
|
|
|
meta.ArticleAtcodLst_PlantNr.ColumnName, |
|
|
|
meta.AttributeValst_PlantNr.ColumnName, |
|
|
|
meta.ArticleAtcodLst_AttrCode.ColumnName, |
|
|
|
meta.AttributeValst_AttrCode.ColumnName, |
|
|
|
meta.ArticleAtcodLst_AttrValue.ColumnName, |
|
|
|
meta.AttributeValst_AttrValue.ColumnName, |
|
|
|
) |
|
|
|
err = impl.session.Table(impl.meta.TableName).Join("LEFT", meta.AttributeValst.TableName, condition).Find(&result) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
return result, err |
|
|
|
} |