diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockSelectDetail.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockSelectDetail.aspx.cs index 9975b77..8d6570e 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockSelectDetail.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockSelectDetail.aspx.cs @@ -73,7 +73,7 @@ namespace FineUIPro.Web.WeldMat.Stock LEFT JOIN dbo.Sys_User AS Users ON Users.UserId=StockIn.Materialman LEFT JOIN dbo.Weld_UnitStore store ON store.UnitStoreId = StockIn.UnitStoreId LEFT JOIN dbo.Base_Unit unit ON unit.UnitId = store.UnitId - WHERE (StockIn.Amount-ISNULL(StockIn.UsingAmount,0))>=0 "; + WHERE (StockIn.Amount-ISNULL(StockIn.UsingAmount,0))>0 "; List listStr = new List(); if (!cbShowAll.Checked) { diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanImport.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanImport.aspx.cs index 931ba11..b4b86cc 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanImport.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanImport.aspx.cs @@ -188,27 +188,29 @@ namespace FineUIPro.Web.WeldMat.UsingPlan } string unitId = string.Empty; - if (ds.Tables[0].Rows[i]["使用单位"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用单位"].ToString())) - { - var unit = from x in Funs.DB.Project_Unit - join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId - where x.ProjectId == projectId && y.UnitName == ds.Tables[0].Rows[i]["使用单位"].ToString() - select x; - if (unit.Count() > 0) - { - usingPlan.UsingUnit = unit.First().UnitId; - unitId = unit.First().UnitId; - } - else - { - errorInfos += (i + 2) + "行, [使用单位] 不存在
"; - } + //if (ds.Tables[0].Rows[i]["使用单位"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用单位"].ToString())) + //{ + // var unit = from x in Funs.DB.Project_Unit + // join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + // where x.ProjectId == projectId && y.UnitName == ds.Tables[0].Rows[i]["使用单位"].ToString() + // select x; + // if (unit.Count() > 0) + // { + // usingPlan.UsingUnit = this.CurrUser.UnitId; + // unitId = this.CurrUser.UnitId; + // } + // else + // { + // errorInfos += (i + 2) + "行, [使用单位] 不存在
"; + // } - } - else - { - errorInfos += (i + 2) + "行, [使用单位] 不能为空
"; - } + //} + //else + //{ + // errorInfos += (i + 2) + "行, [使用单位] 不能为空
"; + //} + usingPlan.UsingUnit = this.CurrUser.UnitId; + unitId = this.CurrUser.UnitId; if (ds.Tables[0].Rows[i]["使用位置"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用位置"].ToString())) {