增加施工月报
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionMonthReportMainCostService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工月报总包工程施工请款情况模板列表
|
||||
/// </summary>
|
||||
/// <param name="satartRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.ZHGL_ConstructionMonthReportMainCost> getListData(string ConstructionMonthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.ZHGL_ConstructionMonthReportMainCost
|
||||
where x.ConstructionMonthReportId == ConstructionMonthReportId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加施工月报总包工程施工请款情况
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">施工月报总包工程施工请款情况实体</param>
|
||||
public static void AddConstructionMonthReportMainCost(Model.ZHGL_ConstructionMonthReportMainCost ConstructionMonthReportMainCost)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionMonthReportMainCost newApprove = new Model.ZHGL_ConstructionMonthReportMainCost();
|
||||
newApprove.ConstructionMonthReportMainCostId = ConstructionMonthReportMainCost.ConstructionMonthReportMainCostId;
|
||||
newApprove.ConstructionMonthReportId = ConstructionMonthReportMainCost.ConstructionMonthReportId;
|
||||
newApprove.ContractConstructionCost = ConstructionMonthReportMainCost.ContractConstructionCost;
|
||||
newApprove.ThisRequestCost = ConstructionMonthReportMainCost.ThisRequestCost;
|
||||
newApprove.TotalRequestCost = ConstructionMonthReportMainCost.TotalRequestCost;
|
||||
newApprove.ThisCollection = ConstructionMonthReportMainCost.ThisCollection;
|
||||
newApprove.TotalCollection = ConstructionMonthReportMainCost.TotalCollection;
|
||||
newApprove.TotalCollectionRate = ConstructionMonthReportMainCost.TotalCollectionRate;
|
||||
|
||||
db.ZHGL_ConstructionMonthReportMainCost.InsertOnSubmit(newApprove);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id删除对应的所有施工月报总包工程施工请款情况
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReportId">施工月报总包工程施工请款情况编号</param>
|
||||
public static void DeleteConstructionMonthReportMainCostsByConstructionMonthReportId(string ConstructionMonthReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.ZHGL_ConstructionMonthReportMainCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
db.ZHGL_ConstructionMonthReportMainCost.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id获取对应的所有施工月报总包工程施工请款情况
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReportId">施工月报总包工程施工请款情况编号</param>
|
||||
public static List<Model.ZHGL_ConstructionMonthReportMainCost> GetConstructionMonthReportMainCostsByConstructionMonthReportId(string ConstructionMonthReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.ZHGL_ConstructionMonthReportMainCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionMonthReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 添加施工月报
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReport"></param>
|
||||
public static void AddConstructionMonthReport(Model.ZHGL_ConstructionMonthReport ConstructionMonthReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionMonthReport newConstructionMonthReport = new Model.ZHGL_ConstructionMonthReport();
|
||||
newConstructionMonthReport.ConstructionMonthReportId = ConstructionMonthReport.ConstructionMonthReportId;
|
||||
newConstructionMonthReport.ProjectId = ConstructionMonthReport.ProjectId;
|
||||
newConstructionMonthReport.Month = ConstructionMonthReport.Month;
|
||||
newConstructionMonthReport.OwnerName = ConstructionMonthReport.OwnerName;
|
||||
newConstructionMonthReport.ContractScope = ConstructionMonthReport.ContractScope;
|
||||
newConstructionMonthReport.ContractPriceAndPricingModel = ConstructionMonthReport.ContractPriceAndPricingModel;
|
||||
newConstructionMonthReport.ContractStartDate = ConstructionMonthReport.ContractStartDate;
|
||||
newConstructionMonthReport.ContractEndDate = ConstructionMonthReport.ContractEndDate;
|
||||
newConstructionMonthReport.MainConstructionActivities = ConstructionMonthReport.MainConstructionActivities;
|
||||
newConstructionMonthReport.ProgressDeviationAndCauseAnalysis = ConstructionMonthReport.ProgressDeviationAndCauseAnalysis;
|
||||
newConstructionMonthReport.KeyDeviationAndCauseAnalysis = ConstructionMonthReport.KeyDeviationAndCauseAnalysis;
|
||||
newConstructionMonthReport.TargetedCorrectiveMeasures = ConstructionMonthReport.TargetedCorrectiveMeasures;
|
||||
newConstructionMonthReport.NextMonthWork = ConstructionMonthReport.NextMonthWork;
|
||||
newConstructionMonthReport.NeedCoordinateMatter = ConstructionMonthReport.NeedCoordinateMatter;
|
||||
newConstructionMonthReport.CompileMan = ConstructionMonthReport.CompileMan;
|
||||
newConstructionMonthReport.CompileDate = ConstructionMonthReport.CompileDate;
|
||||
|
||||
db.ZHGL_ConstructionMonthReport.InsertOnSubmit(newConstructionMonthReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改施工月报
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReport"></param>
|
||||
public static void UpdateConstructionMonthReport(Model.ZHGL_ConstructionMonthReport ConstructionMonthReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionMonthReport newConstructionMonthReport = db.ZHGL_ConstructionMonthReport.First(e => e.ConstructionMonthReportId == ConstructionMonthReport.ConstructionMonthReportId);
|
||||
newConstructionMonthReport.OwnerName = ConstructionMonthReport.OwnerName;
|
||||
newConstructionMonthReport.ContractScope = ConstructionMonthReport.ContractScope;
|
||||
newConstructionMonthReport.ContractPriceAndPricingModel = ConstructionMonthReport.ContractPriceAndPricingModel;
|
||||
newConstructionMonthReport.ContractStartDate = ConstructionMonthReport.ContractStartDate;
|
||||
newConstructionMonthReport.ContractEndDate = ConstructionMonthReport.ContractEndDate;
|
||||
newConstructionMonthReport.MainConstructionActivities = ConstructionMonthReport.MainConstructionActivities;
|
||||
newConstructionMonthReport.ProgressDeviationAndCauseAnalysis = ConstructionMonthReport.ProgressDeviationAndCauseAnalysis;
|
||||
newConstructionMonthReport.KeyDeviationAndCauseAnalysis = ConstructionMonthReport.KeyDeviationAndCauseAnalysis;
|
||||
newConstructionMonthReport.TargetedCorrectiveMeasures = ConstructionMonthReport.TargetedCorrectiveMeasures;
|
||||
newConstructionMonthReport.NextMonthWork = ConstructionMonthReport.NextMonthWork;
|
||||
newConstructionMonthReport.NeedCoordinateMatter = ConstructionMonthReport.NeedCoordinateMatter;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据施工月报Id删除一个施工月报信息
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReportId"></param>
|
||||
public static void DeleteConstructionMonthReport(string ConstructionMonthReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionMonthReport ConstructionMonthReport = db.ZHGL_ConstructionMonthReport.First(e => e.ConstructionMonthReportId == ConstructionMonthReportId);
|
||||
db.ZHGL_ConstructionMonthReport.DeleteOnSubmit(ConstructionMonthReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据施工月报Id获取一个施工月报信息
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReportDetailId"></param>
|
||||
public static Model.ZHGL_ConstructionMonthReport GetConstructionMonthReport(string ConstructionMonthReportId)
|
||||
{
|
||||
return Funs.DB.ZHGL_ConstructionMonthReport.FirstOrDefault(e => e.ConstructionMonthReportId == ConstructionMonthReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月份获取一个施工月报信息
|
||||
/// </summary>
|
||||
/// <param name="months">月份</param>
|
||||
public static Model.ZHGL_ConstructionMonthReport GetConstructionMonthReportByMonth(DateTime month, string projectId)
|
||||
{
|
||||
return Funs.DB.ZHGL_ConstructionMonthReport.FirstOrDefault(e => e.Month == month && e.ProjectId == projectId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionMonthReportSubCostService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工月报分包工程施工付款情况模板列表
|
||||
/// </summary>
|
||||
/// <param name="satartRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.ZHGL_ConstructionMonthReportSubCost> getListData(string ConstructionMonthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.ZHGL_ConstructionMonthReportSubCost
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ConstructionMonthReportId == ConstructionMonthReportId
|
||||
orderby y.UnitCode
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加施工月报分包工程施工付款情况
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">施工月报分包工程施工付款情况实体</param>
|
||||
public static void AddConstructionMonthReportSubCost(Model.ZHGL_ConstructionMonthReportSubCost ConstructionMonthReportSubCost)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionMonthReportSubCost newApprove = new Model.ZHGL_ConstructionMonthReportSubCost();
|
||||
newApprove.ConstructionMonthReportSubCostId = ConstructionMonthReportSubCost.ConstructionMonthReportSubCostId;
|
||||
newApprove.ConstructionMonthReportId = ConstructionMonthReportSubCost.ConstructionMonthReportId;
|
||||
newApprove.UnitId = ConstructionMonthReportSubCost.UnitId;
|
||||
newApprove.ContractAmount = ConstructionMonthReportSubCost.ContractAmount;
|
||||
newApprove.ThisNeedPay = ConstructionMonthReportSubCost.ThisNeedPay;
|
||||
newApprove.ThisRealPay = ConstructionMonthReportSubCost.ThisRealPay;
|
||||
newApprove.TotalNeedPay = ConstructionMonthReportSubCost.TotalNeedPay;
|
||||
newApprove.TotalRealPay = ConstructionMonthReportSubCost.TotalRealPay;
|
||||
newApprove.TotalRealPayRate = ConstructionMonthReportSubCost.TotalRealPayRate;
|
||||
|
||||
db.ZHGL_ConstructionMonthReportSubCost.InsertOnSubmit(newApprove);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id删除对应的所有施工月报分包工程施工付款情况
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReportId">施工月报分包工程施工付款情况编号</param>
|
||||
public static void DeleteConstructionMonthReportSubCostsByConstructionMonthReportId(string ConstructionMonthReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.ZHGL_ConstructionMonthReportSubCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
db.ZHGL_ConstructionMonthReportSubCost.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id获取对应的所有施工月报分包工程施工付款情况
|
||||
/// </summary>
|
||||
/// <param name="ConstructionMonthReportId">施工月报分包工程施工付款情况编号</param>
|
||||
public static List<Model.ZHGL_ConstructionMonthReportSubCost> GetConstructionMonthReportSubCostsByConstructionMonthReportId(string ConstructionMonthReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.ZHGL_ConstructionMonthReportSubCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user