From 8dca7417af40b8f8b88e3e1430ae343db5de7d03 Mon Sep 17 00:00:00 2001 From: yehongyang Date: Fri, 15 Oct 2021 16:57:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E4=BA=8E=20bom=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BC=BA=E5=B0=91=E4=BA=8C=E7=BA=A7=E9=AA=8C=E8=AF=81=20=20?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=AD=BB=E9=80=92=E5=BD=92=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/me/implments/BomLst.service.impl.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/me/implments/BomLst.service.impl.go b/services/me/implments/BomLst.service.impl.go index e0a461b..4cdf5dc 100644 --- a/services/me/implments/BomLst.service.impl.go +++ b/services/me/implments/BomLst.service.impl.go @@ -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相同") }