0923-gaofei
This commit is contained in:
@@ -18,6 +18,21 @@ namespace BLL
|
||||
return Funs.DB.WBS_CostControlDetail.FirstOrDefault(e => e.CostControlDetailId == costControlDetailId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取有对应月份的周计划的费控项明细id
|
||||
/// </summary>
|
||||
/// <param name="costControlDetailId">费控项明细Id</param>
|
||||
public static string GetHasWeekPlanCostControlIdByProjectIdAndMonth(string projectId, DateTime months)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.WBS_CostControl
|
||||
join y in db.Wbs_WbsSet
|
||||
on x.WbsSetId equals y.WbsSetId
|
||||
where y.ProjectId == projectId && y.IsApprove == true &&
|
||||
(from a in db.WBS_CostControlDetail where a.CostControlId == x.CostControlId && a.Months == months && a.StartDate != null select a).Count() > 0
|
||||
select x.CostControlId).FirstOrDefault();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据CostControlId判断是否存在费控项明细信息
|
||||
/// </summary>
|
||||
@@ -46,7 +61,7 @@ namespace BLL
|
||||
/// <param name="toFlag">对应标志</param>
|
||||
/// <param name="years">年</param>
|
||||
/// <param name="months">月</param>
|
||||
public static Model.WBS_CostControlDetail GetCostControlDetailByCostControlIdAndMonthsWeek(string costControlId, DateTime months,DateTime startDate)
|
||||
public static Model.WBS_CostControlDetail GetCostControlDetailByCostControlIdAndMonthsWeek(string costControlId, DateTime months, DateTime startDate)
|
||||
{
|
||||
return (from x in Funs.DB.WBS_CostControlDetail where x.CostControlId == costControlId && x.Months == months && x.StartDate == startDate select x).FirstOrDefault();
|
||||
}
|
||||
|
||||
@@ -160,6 +160,16 @@ namespace BLL
|
||||
return (from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == superWbsSetId && x.IsApprove == true orderby x.WbsSetCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据上级Id获取是否存在同级别的其他已勾选项
|
||||
/// </summary>
|
||||
/// <param name="superWbsSetId">上级Id</param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitOtherApproveWbsSetsBySuperWbsSetId(string superWbsSetId, string wbsSetId)
|
||||
{
|
||||
return (from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == superWbsSetId && x.IsApprove == true && x.WbsSetId != wbsSetId orderby x.WbsSetCode select x).FirstOrDefault() != null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据上级Id获取集合
|
||||
/// </summary>
|
||||
@@ -337,9 +347,10 @@ namespace BLL
|
||||
}
|
||||
var cn = (from x in db.WBS_CnProfession where x.InstallationId == inId && x.OldId.ToString() == cnCode select x).FirstOrDefault();
|
||||
var list = (from x in db.Wbs_WbsSet
|
||||
join y in db.Wbs_UnitProject
|
||||
on x.UnitProjectId equals y.UnitProjectId
|
||||
where x.CnProfessionId == cn.CnProfessionId && y.UnitProjectCode == unitProjectCode && x.WbsSetCode==wbsSetCode select x.WbsSetId).ToList();
|
||||
join y in db.Wbs_UnitProject
|
||||
on x.UnitProjectId equals y.UnitProjectId
|
||||
where x.CnProfessionId == cn.CnProfessionId && y.UnitProjectCode == unitProjectCode && x.WbsSetCode == wbsSetCode
|
||||
select x.WbsSetId).ToList();
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user