20230530集团看板数据来源页面添加

This commit is contained in:
2023-05-30 08:52:00 +08:00
parent 9c804196e7
commit f4b1c42fa9
118 changed files with 18934 additions and 137 deletions
+21 -8
View File
@@ -289,24 +289,37 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
List<Model.Base_Unit> unitList = new List<Model.Base_Unit>();
if (unitType != Const.ProjectUnitType_2)
if (!string.IsNullOrEmpty(unitType))
{
unitList = (from x in db.Base_Unit
join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId
where y.ProjectId == projectId && y.UnitType == unitType
orderby x.UnitCode
select x).ToList();
if (unitType != Const.ProjectUnitType_2)
{
unitList = (from x in db.Base_Unit
join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId
where y.ProjectId == projectId && y.UnitType == unitType
orderby x.UnitCode
select x).ToList();
}
else
{
unitList = (from x in db.Base_Unit
join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId
where y.ProjectId == projectId && (y.UnitType == BLL.Const.ProjectUnitType_2 || y.UnitType == BLL.Const.ProjectUnitType_6)
orderby x.UnitCode
select x).ToList();
}
}
else
{
unitList = (from x in db.Base_Unit
join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId
where y.ProjectId == projectId && (y.UnitType == BLL.Const.ProjectUnitType_2 || y.UnitType == BLL.Const.ProjectUnitType_6)
where y.ProjectId == projectId
orderby x.UnitCode
select x).ToList();
}
return unitList;
}
}