|
|
@ -145,10 +145,10 @@ func (impl *BomLstServiceImplement) InsertOne(user *global.User, entity *model.B |
|
|
|
_ = session.Rollback() |
|
|
|
return grmi.NewBusinessError("不存在对应的物料数据") |
|
|
|
} |
|
|
|
if article.ArtSpec1 != baseModel.ART_TYPE_FINISHED && article.ArtSpec1 != baseModel.ART_TYPE_VIRTUAL { |
|
|
|
_ = session.Rollback() |
|
|
|
return grmi.NewBusinessError("传递的物料不是总成或虚拟物料ID,artId:" + article.ArtId) |
|
|
|
} |
|
|
|
//if article.ArtSpec1 != baseModel.ART_TYPE_FINISHED && article.ArtSpec1 != baseModel.ART_TYPE_VIRTUAL {
|
|
|
|
// _ = session.Rollback()
|
|
|
|
// return grmi.NewBusinessError("传递的物料不是总成或虚拟物料ID,artId:" + article.ArtId)
|
|
|
|
//}
|
|
|
|
|
|
|
|
article2, err := articleDao.SelectOne(entity.CmatNr) |
|
|
|
if err != nil { |
|
|
@ -171,7 +171,7 @@ func (impl *BomLstServiceImplement) InsertOne(user *global.User, entity *model.B |
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
if entity.FmatNr == entity.CmatNr { |
|
|
|
if entity.FmatNr == entity.CmatNr || entity.CmatNr == entity.BomId { |
|
|
|
_ = session.Rollback() |
|
|
|
return grmi.NewBusinessError("上级和下级物料ID相同") |
|
|
|
} |
|
|
|