From f73d478ccfb526b6fb8260b78ee49c86530fd0d0 Mon Sep 17 00:00:00 2001 From: zhangxin Date: Thu, 21 Apr 2022 21:00:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86=E4=BA=A7=E7=BA=BF?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=E6=89=AB=E7=A0=81=E8=A7=84=E5=88=99=E7=9A=84?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dao/base/ArtCheckRule.dao.go | 2 +- dao/base/implments/ArtCheckRule.dao.impl.go | 7 +++---- services/base/implments/Operation.service.impl.go | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dao/base/ArtCheckRule.dao.go b/dao/base/ArtCheckRule.dao.go index bcf1ff0..0d41bbd 100644 --- a/dao/base/ArtCheckRule.dao.go +++ b/dao/base/ArtCheckRule.dao.go @@ -297,7 +297,7 @@ type ArtCheckRuleDAO interface { * @Date : 2022-02-08 * ******************************************************************************/ - SelectOperationCheckRule(artId string, attrCode int, projectId string, workLineId string) ([]model.ArtCheckRule, error) + SelectOperationCheckRule(artId string, attrCode int, projectId string) ([]model.ArtCheckRule, error) } /****************************************************************************** diff --git a/dao/base/implments/ArtCheckRule.dao.impl.go b/dao/base/implments/ArtCheckRule.dao.impl.go index d05e3ec..686d8d9 100644 --- a/dao/base/implments/ArtCheckRule.dao.impl.go +++ b/dao/base/implments/ArtCheckRule.dao.impl.go @@ -364,14 +364,13 @@ func (impl *ArtCheckRuleDAOImplement) SelectByArtId(artId string, projectId stri * @Reference LAPP_ACURA_MOM_BACKEND/dao/base/ArtCheckRuleDAO.SelectByArtId * ******************************************************************************/ -func (impl *ArtCheckRuleDAOImplement) SelectOperationCheckRule(artId string, attrCode int, projectId string, workLineId string) ([]model.ArtCheckRule, error) { +func (impl *ArtCheckRuleDAOImplement) SelectOperationCheckRule(artId string, attrCode int, projectId string) ([]model.ArtCheckRule, error) { result := make([]model.ArtCheckRule, 0) - parameters := []interface{}{impl.plantNr, attrCode, projectId, workLineId, model.MES_MATCH_ALL, artId} - where := fmt.Sprintf("%s = ? and %s = ? and %s = ? and %s = ? and ( %s = ? or %s = ? )", + parameters := []interface{}{impl.plantNr, attrCode, projectId, model.MES_MATCH_ALL, artId} + where := fmt.Sprintf("%s = ? and %s = ? and %s = ? and ( %s = ? or %s = ? )", meta.ArtCheckRule_PlantNr.ColumnName, meta.ArtCheckRule_AttriCode.ColumnName, meta.ArtCheckRule_ProjectId.ColumnName, - meta.ArtCheckRule_WorkLineId.ColumnName, meta.ArtCheckRule_SubObject.ColumnName, meta.ArtCheckRule_SubObject.ColumnName) err := impl.session.Table(impl.meta.TableName).Where(where, parameters...).OrderBy(meta.ArtCheckRule_AttriCode.SortColumnName).Find(&result) diff --git a/services/base/implments/Operation.service.impl.go b/services/base/implments/Operation.service.impl.go index 4cec2ef..f085030 100644 --- a/services/base/implments/Operation.service.impl.go +++ b/services/base/implments/Operation.service.impl.go @@ -750,7 +750,8 @@ func (impl *OperationServiceImplement) SelectOperationByArtId(user *global.User, if article != nil { artDesc = article.Descr1 } - checkRuleLi, err := artCheckRuleDao.SelectOperationCheckRule(artId, attrCode, projectId, workLineId) + // TODO 删除了产线作为条件 + checkRuleLi, err := artCheckRuleDao.SelectOperationCheckRule(artId, attrCode, projectId) if err != nil { return nil, grmi.NewBusinessError("查询零件校验规则失败, error:" + err.Error()) }