Browse Source

对于 bom添加缺少二级验证 导致死递归 修复

feature_escalate
yehongyang 3 years ago
parent
commit
8dca7417af
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      services/me/implments/BomLst.service.impl.go

+ 5
- 5
services/me/implments/BomLst.service.impl.go View File

@ -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相同")
}


Loading…
Cancel
Save