提交代码

This commit is contained in:
2024-05-07 09:45:10 +08:00
parent 90f61fc20d
commit fcca8c7a20
12 changed files with 1233 additions and 2 deletions
+1
View File
@@ -580,6 +580,7 @@
<Compile Include="JDGL\Check\EquipmentCompletionService.cs" />
<Compile Include="JDGL\Check\LowTankCompletionService.cs" />
<Compile Include="JDGL\Check\MeterCompletionService.cs" />
<Compile Include="JDGL\Check\MonthPlanService.cs" />
<Compile Include="JDGL\Check\PipelineCompletionService.cs" />
<Compile Include="JDGL\Check\ProgressCompletionService.cs" />
<Compile Include="JDGL\Check\QuantityCompletionService.cs" />
+5
View File
@@ -5757,6 +5757,11 @@ namespace BLL
/// </summary>
public const string RectificationMeasureMenuId = "0629BAB1-DB1C-42CE-A333-49F3813617D7";
/// <summary>
/// 工程量完成情况
/// </summary>
public const string MonthPlanMenuId = "94287B92-7E96-4B90-BC6F-DAF30AE3B314";
/// <summary>
/// 进度完成情况
/// </summary>
+88
View File
@@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
{
/// <summary>
/// 月度计划情况
/// </summary>
public class MonthPlanService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取月度计划情况
/// </summary>
/// <param name="MonthPlanId"></param>
/// <returns></returns>
public static Model.JDGL_MonthPlan GetMonthPlanById(string MonthPlanId)
{
return Funs.DB.JDGL_MonthPlan.FirstOrDefault(e => e.MonthPlanId == MonthPlanId);
}
/// <summary>
/// 添加月度计划情况
/// </summary>
/// <param name="MonthPlan"></param>
public static void AddMonthPlan(Model.JDGL_MonthPlan MonthPlan)
{
Model.SGGLDB db = Funs.DB;
Model.JDGL_MonthPlan newMonthPlan = new Model.JDGL_MonthPlan
{
MonthPlanId = MonthPlan.MonthPlanId,
ProjectId = MonthPlan.ProjectId,
Months = MonthPlan.Months,
UnitId = MonthPlan.UnitId,
NodeContent = MonthPlan.NodeContent,
PlanDate = MonthPlan.PlanDate,
DutyPerson = MonthPlan.DutyPerson,
RealDate = MonthPlan.RealDate,
Remark = MonthPlan.Remark,
CompileMan = MonthPlan.CompileMan,
CompileDate = MonthPlan.CompileDate,
};
db.JDGL_MonthPlan.InsertOnSubmit(newMonthPlan);
db.SubmitChanges();
}
/// <summary>
/// 修改月度计划情况
/// </summary>
/// <param name="MonthPlan"></param>
public static void UpdateMonthPlan(Model.JDGL_MonthPlan MonthPlan)
{
Model.SGGLDB db = Funs.DB;
Model.JDGL_MonthPlan newMonthPlan = db.JDGL_MonthPlan.FirstOrDefault(e => e.MonthPlanId == MonthPlan.MonthPlanId);
if (newMonthPlan != null)
{
newMonthPlan.UnitId = MonthPlan.UnitId;
newMonthPlan.NodeContent = MonthPlan.NodeContent;
newMonthPlan.PlanDate = MonthPlan.PlanDate;
newMonthPlan.DutyPerson = MonthPlan.DutyPerson;
newMonthPlan.RealDate = MonthPlan.RealDate;
newMonthPlan.Remark = MonthPlan.Remark;
newMonthPlan.CompileMan = MonthPlan.CompileMan;
newMonthPlan.CompileDate = MonthPlan.CompileDate;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除月度计划情况
/// </summary>
/// <param name="MonthPlanId"></param>
public static void DeleteMonthPlanByMonthPlanId(string MonthPlanId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.JDGL_MonthPlan where x.MonthPlanId == MonthPlanId select x).FirstOrDefault();
if (q != null)
{
db.JDGL_MonthPlan.DeleteOnSubmit(q);
db.SubmitChanges();
}
}
}
}