Browse Source

修复写入bom出现不是Carset类型 不能写入的bug

pull/439/head
zhangxin 3 years ago
parent
commit
90746d11ec
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      services/me/implments/BomLst.service.impl.go

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

@ -141,10 +141,10 @@ func (impl *BomLstServiceImplement) InsertOne(user *models.Usertab, entity *mode
_ = session.Rollback()
return grmi.NewBusinessError("不存在对应的物料数据")
}
if article.ArtSpec1 != "CarSet" {
_ = session.Rollback()
return grmi.NewBusinessError("传递的物料不是CarSet物料ID")
}
//if article.ArtSpec1 != "CarSet" {
// _ = session.Rollback()
// return grmi.NewBusinessError("传递的物料不是CarSet物料ID")
//}
article2, err := articleDao.SelectOne(entity.CmatNr)
if err != nil {
@ -155,12 +155,12 @@ func (impl *BomLstServiceImplement) InsertOne(user *models.Usertab, entity *mode
_ = session.Rollback()
return grmi.NewBusinessError("不存在对应的物料数据")
}
if article2.ArtSpec1 != "CarSet" {
if article2.ArtSpec1 == "CarSet" {
_ = session.Rollback()
return grmi.NewBusinessError("传递的物料是CarSet物料ID")
return grmi.NewBusinessError("传递的物料是CarSet物料ID")
}
if entity.FmatNr == entity.CmatNr{
if entity.FmatNr == entity.CmatNr {
_ = session.Rollback()
return grmi.NewBusinessError("上级和下级物料ID相同")
}


Loading…
Cancel
Save