20230530集团看板数据来源页面添加
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user