From 4b9b7b3a7261acb9d83ba10f4f94c97f7a0b0777 Mon Sep 17 00:00:00 2001 From: "DESKTOP-H7A6KL3\\wenzh" Date: Mon, 23 Oct 2023 16:09:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E6=A3=80=E6=89=93=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/qm/implments/DefectRecord.service.impl.go | 2 +- services/qm/implments/View.service.impl.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/services/qm/implments/DefectRecord.service.impl.go b/services/qm/implments/DefectRecord.service.impl.go index 9844ba2..68ae4e9 100644 --- a/services/qm/implments/DefectRecord.service.impl.go +++ b/services/qm/implments/DefectRecord.service.impl.go @@ -282,7 +282,7 @@ func (impl *DefectRecordServiceImplement) Insert(user *global.User, entities mod if info == nil { return grmi.NewBusinessError("该记录不存在!") } - if info.Status != common.WO_STATUS_FINISHED { + if info.Status != common.WO_STATUS_FINISHED && count <= 0 { return grmi.NewBusinessError("该工单状态未完成或已取消!") } diff --git a/services/qm/implments/View.service.impl.go b/services/qm/implments/View.service.impl.go index 2f0645b..347f1b9 100644 --- a/services/qm/implments/View.service.impl.go +++ b/services/qm/implments/View.service.impl.go @@ -12,7 +12,6 @@ import ( "LAPP_ACURA_MOM_BACKEND/grmi" baseMeta "LAPP_ACURA_MOM_BACKEND/meta/base" meta "LAPP_ACURA_MOM_BACKEND/meta/qm" - common "LAPP_ACURA_MOM_BACKEND/models/base" model "LAPP_ACURA_MOM_BACKEND/models/qm" "fmt" "github.com/go-xorm/xorm" @@ -621,9 +620,6 @@ func (impl *ViewServiceImplement) ViewsOfArticle(user *global.User, orderId stri return nil, grmi.NewBusinessError("序列订单查询错误!") } - if statusInfo.Status != common.WO_STATUS_FINISHED { - return nil, grmi.NewBusinessError("该工单前序未完成!") - } // 获取Article articleDAO := dalOfBase.NewArticleDAO(session, user.PlantNr, user.UserId) articleLi, err := articleDAO.Select([]grmi.Predicate{baseMeta.Article_ArtId.NewPredicate(grmi.Equal, artId)}, nil)