diff --git a/FactorySystemApi/Controllers/MaterialController.cs b/FactorySystemApi/Controllers/MaterialController.cs index b0d319c..282a955 100644 --- a/FactorySystemApi/Controllers/MaterialController.cs +++ b/FactorySystemApi/Controllers/MaterialController.cs @@ -420,7 +420,11 @@ namespace FactorySystemApi.Controllers apiResult.Data = BaseBll.UpdateDataModel(inParam, "TFS_Material"); - List result = MaterialBll.GetMaterial(tempId); + TFS_FTeamwork fS_FTeamwork = BaseBll.GetTempModel("FID=" + tempId); + //fS_FTeamwork.FMaterialHalfIDs + //fMaterialFormulaIDs + List result = MaterialBll.GetMaterial(fS_FTeamwork.FMaterialFormulaIDs); + if (result.Where(m => m.FSuccedaneumID == 0).Count() == 0) { diff --git a/FactorySystemBll/MaterialBll.cs b/FactorySystemBll/MaterialBll.cs index b2e94fc..4f85299 100644 --- a/FactorySystemBll/MaterialBll.cs +++ b/FactorySystemBll/MaterialBll.cs @@ -99,11 +99,11 @@ namespace FactorySystemBll return result; } - public List GetMaterial(int tempId) + public List GetMaterial(string fMaterialFormulaIDs) { return AppSettingsHelper.GetSqlSugar() .Queryable((a, b) => new JoinQueryInfos(JoinType.Left, a.FID == b.FMaterialID)) - .Where((a, b) => b.FTeamID == tempId).Select((a, b) => a).ToList(); + .Where((a, b) => fMaterialFormulaIDs.Contains(a.FID.ToString())).Select((a, b) => a).ToList(); } /// /// 更具试验号获取物料 diff --git a/FactorySystemBll/TaskBll.cs b/FactorySystemBll/TaskBll.cs index 1e007bc..8e68a29 100644 --- a/FactorySystemBll/TaskBll.cs +++ b/FactorySystemBll/TaskBll.cs @@ -37,7 +37,7 @@ namespace FactorySystemBll .WhereIF(tq.FUserID != null, a => (',' + a.FUserID + ',').Contains(',' + tq.FUserID + ',')) // 协同 .WhereIF(tq.FTeamID > 0, a => a.FTeamID == tq.FTeamID).OrderBy((a, b, c) => a.FID, OrderByType.Desc) - .Select("a.*,b.FSaleCode,b.FFormulaTestCode as FTestCode,b.FMdmCode,b.FFormulaName,b.FMaterialHalfIDs,cast(substring(c.FRemark,4,2)as int)as FViewType,(case when b.FBomJson IS NULL then 0 when cast(b.FBomJson as nvarchar) = '' then 0 else 1 end) as FHasBomJson") + .Select("a.*,b.FSaleCode,b.FFormulaTestCode as FTestCode,b.FMdmCode,b.FFormulaName,b.FMaterialHalfIDs,cast(substring(c.FRemark,4,2)as int)as FViewType,(case when b.FBomJson IS NULL then 0 when cast(b.FBomJson as nvarchar) = '' then 0 else 1 end) as FHasBomJson,b.FBomJson") .ToPageList(tq.FPageIndex, tq.FPageSize, ref totalNumber); } diff --git a/FactorySystemModel/ResponseModel/TaskRow.cs b/FactorySystemModel/ResponseModel/TaskRow.cs index 703cefd..780690e 100644 --- a/FactorySystemModel/ResponseModel/TaskRow.cs +++ b/FactorySystemModel/ResponseModel/TaskRow.cs @@ -53,5 +53,7 @@ namespace FactorySystemModel.ResponseModel /// Desc:是否有FHasBomJson /// public int FHasBomJson { get; set; } + + public string FBomJson { get; set; } } } \ No newline at end of file