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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user