修改焊接模块WBS树显示权限问题

This commit is contained in:
2023-08-30 16:19:19 +08:00
parent 690a06fa47
commit d6ea8320fa
29 changed files with 367 additions and 364 deletions
@@ -403,7 +403,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
materialCheck.ProjectId = this.CurrUser.LoginProjectId;
materialCheck.ContractNo = pds.Rows[i][0].ToString().Trim();
materialCheck.UnitId = units.First(e => e.UnitName == pds.Rows[i][1].ToString().Trim()).UnitId;
materialCheck.MainItemId = mainItems.First(e => e.MainItemName == pds.Rows[i][2].ToString().Trim()).MainItemId;
if (mainItems.FirstOrDefault(e => e.MainItemName == pds.Rows[i][2].ToString().Trim()) != null)
{
materialCheck.MainItemId = mainItems.First(e => e.MainItemName == pds.Rows[i][2].ToString().Trim()).MainItemId;
}
materialCheck.MaterialName = pds.Rows[i][3].ToString().Trim();
materialCheck.SpecificationAndModel = pds.Rows[i][4].ToString().Trim();
materialCheck.MaterialCode = pds.Rows[i][5].ToString().Trim();
@@ -98,21 +98,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
// 当前为施工单位,只能操作本单位的数据
if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
{
unitWork1 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
select x).ToList();
unitWork2 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
select x).ToList();
}
else
{
//// 当前为施工单位,只能操作本单位的数据
//if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
//{
// unitWork1 = (from x in unitWorkList
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
// select x).ToList();
// unitWork2 = (from x in unitWorkList
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
// select x).ToList();
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
}
//}
if (unitWork1.Count() > 0)
{
@@ -65,21 +65,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
// 当前为施工单位,只能操作本单位的数据
if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
{
unitWork1 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
select x).ToList();
unitWork2 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
select x).ToList();
}
else
{
//// 当前为施工单位,只能操作本单位的数据
//if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
//{
// unitWork1 = (from x in unitWorkList
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
// select x).ToList();
// unitWork2 = (from x in unitWorkList
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
// select x).ToList();
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
}
//}
if (unitWork1.Count() > 0)
{
@@ -99,21 +99,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
// 当前为施工单位,只能操作本单位的数据
if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
{
unitWork1 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
select x).ToList();
unitWork2 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
select x).ToList();
}
else
{
//// 当前为施工单位,只能操作本单位的数据
//if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
//{
// unitWork1 = (from x in unitWorkList
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
// select x).ToList();
// unitWork2 = (from x in unitWorkList
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
// select x).ToList();
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
}
//}
if (unitWork1.Count() > 0)
{