Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -5762,6 +5762,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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,10 +37,11 @@ namespace BLL
|
||||
Months = quantityCompletion.Months,
|
||||
PlanNum = quantityCompletion.PlanNum,
|
||||
RealNum = quantityCompletion.RealNum,
|
||||
NextNum = quantityCompletion.NextNum,
|
||||
CompileMan = quantityCompletion.CompileMan,
|
||||
CompileDate = quantityCompletion.CompileDate,
|
||||
StartDate=quantityCompletion.StartDate,
|
||||
EndDate=quantityCompletion.EndDate
|
||||
StartDate = quantityCompletion.StartDate,
|
||||
EndDate = quantityCompletion.EndDate
|
||||
};
|
||||
db.JDGL_QuantityCompletion.InsertOnSubmit(newQuantityCompletion);
|
||||
db.SubmitChanges();
|
||||
@@ -56,10 +57,29 @@ namespace BLL
|
||||
Model.JDGL_QuantityCompletion newQuantityCompletion = db.JDGL_QuantityCompletion.FirstOrDefault(e => e.QuantityCompletionId == quantityCompletion.QuantityCompletionId);
|
||||
if (newQuantityCompletion != null)
|
||||
{
|
||||
newQuantityCompletion.QuantityListId = quantityCompletion.QuantityListId;
|
||||
newQuantityCompletion.PlanNum = quantityCompletion.PlanNum;
|
||||
newQuantityCompletion.RealNum = quantityCompletion.RealNum;
|
||||
newQuantityCompletion.NextNum = quantityCompletion.NextNum;
|
||||
newQuantityCompletion.CompileMan = quantityCompletion.CompileMan;
|
||||
newQuantityCompletion.CompileDate = quantityCompletion.CompileDate;
|
||||
newQuantityCompletion.StartDate = quantityCompletion.StartDate;
|
||||
newQuantityCompletion.EndDate = quantityCompletion.EndDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除工程量完成情况
|
||||
/// </summary>
|
||||
/// <param name="quantityCompletionId"></param>
|
||||
public static void DeleteQuantityCompletionByQuantityCompletionId(string QuantityCompletionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.JDGL_QuantityCompletion where x.QuantityCompletionId == QuantityCompletionId select x).FirstOrDefault();
|
||||
if (q != null)
|
||||
{
|
||||
db.JDGL_QuantityCompletion.DeleteOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user