From 8879212606fb00fa27d5cd5479ffe9dd8550848d Mon Sep 17 00:00:00 2001 From: leo <10200039@qq.com> Date: Sat, 22 Apr 2023 17:02:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=8F=E5=90=8C=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FactorySystemBll/TeamworkBll.cs | 2 +- FactorySystemBll/ViewBll.cs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/FactorySystemBll/TeamworkBll.cs b/FactorySystemBll/TeamworkBll.cs index 0727eab..bc834ef 100644 --- a/FactorySystemBll/TeamworkBll.cs +++ b/FactorySystemBll/TeamworkBll.cs @@ -608,7 +608,7 @@ namespace FactorySystemBll FTeamID = teamInfo.FID, FFactoryID = teamInfo.FCreateFactoryID, FFactoryCode = teamInfo.FCreateFactoryCode, - FViewType = (int)Constant.ViewType.物料分类视图, + FViewType = (int)Constant.ViewType.成品视图, FLevel = 1, FEditUser = userId, FBaseMaterialCode = teamInfo.FMdmCode, diff --git a/FactorySystemBll/ViewBll.cs b/FactorySystemBll/ViewBll.cs index 266166a..65dc714 100644 --- a/FactorySystemBll/ViewBll.cs +++ b/FactorySystemBll/ViewBll.cs @@ -32,25 +32,24 @@ namespace FactorySystemBll * 此处的viewType来自TBasicCode中FType=33时,的FRemark字段 * **/ List> viewList = new List>(); - List viewTypes=new List { 2,3,4,5,10}; + List viewTypes=new List { 2,3,4,5,1}; if (viewTypes.Contains(viewType)) { viewList = db.Queryable((a, b) => new JoinQueryInfos(JoinType.Inner, a.FMaterialID == b.FID)) .Where((a, b) => a.FTeamID == teamId) .WhereIF(currUser != null, (a, b) => a.FFactoryID == currUser.FFactoryID) - .WhereIF(viewType > 0, (a, b) => a.FViewType == 2 || a.FViewType == 3 || a.FViewType == 4 || a.FViewType == 5||a.FViewType==10) + .WhereIF(viewType > 0, (a, b) => a.FViewType == viewType) .Select("distinct a.*,b.FTypeID1,b.FTypeID2,b.FK3Code,b.FK3Name,b.FK3ShortCode,b.FTestCode,b.FRelationCode,b.FRelationName,b.FSAPCode,b.FSAPDescription,b.FMaterialGroup,b.FMaterialType,b.FCustomerCode,b.FStoreHouse," + "b.FBomEntry,b.FLineHouse,b.FProductDesc,b.FWorkCenter,b.FCraftExplain,b.FIidentifier,b.FGuaranteePeriod,b.FBStorageConditions,b.FSafetyStock,b.FTriggerRatio,b.FMinAmount,b.FMaxAmount,b.FYield,b.FFixedLoss,b.FTheoryYield," + "b.FQualityTest1,b.FQualityTest2").ToDictionaryList(); } - else + else if (viewType == 10) { viewList = db.Queryable((a, b) => new JoinQueryInfos(JoinType.Inner, a.FMaterialID == b.FID)) .Where((a, b) => a.FTeamID == teamId) .WhereIF(currUser != null, (a, b) => a.FFactoryID == currUser.FFactoryID) - .WhereIF(viewType > 0, (a, b) => a.FViewType == viewType) .Select("distinct a.*,b.FTypeID1,b.FTypeID2,b.FK3Code,b.FK3Name,b.FK3ShortCode,b.FTestCode,b.FRelationCode,b.FRelationName,b.FSAPCode,b.FSAPDescription,b.FMaterialGroup,b.FMaterialType,b.FCustomerCode,b.FStoreHouse," + "b.FBomEntry,b.FLineHouse,b.FProductDesc,b.FWorkCenter,b.FCraftExplain,b.FIidentifier,b.FGuaranteePeriod,b.FBStorageConditions,b.FSafetyStock,b.FTriggerRatio,b.FMinAmount,b.FMaxAmount,b.FYield,b.FFixedLoss,b.FTheoryYield," + "b.FQualityTest1,b.FQualityTest2").ToDictionaryList();