Browse Source

以原材料查询

pull/110/head
娄文智 3 years ago
parent
commit
7a8b071f70
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      dao/base/implments/Article.dao.impl.go

+ 2
- 2
dao/base/implments/Article.dao.impl.go View File

@ -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)


Loading…
Cancel
Save