20251211 工程中间交接证书
This commit is contained in:
@@ -246,6 +246,7 @@
|
||||
<Compile Include="HJGL\WeldingManage\WelderOKRateStatisticsService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\WeldRecordInService.cs" />
|
||||
<Compile Include="JGZL\CommencementReportService.cs" />
|
||||
<Compile Include="JGZL\HandoverCertificateService.cs" />
|
||||
<Compile Include="JsonHelper.cs" />
|
||||
<Compile Include="libFace.cs" />
|
||||
<Compile Include="libOpenCV.cs" />
|
||||
|
||||
@@ -1759,6 +1759,11 @@ namespace BLL
|
||||
/// 工程施工开工报告
|
||||
/// </summary>
|
||||
public const string JGZL_CommencementReportMenuId = "A4B2E5A9-96A8-460F-885A-BE5FF9B5019E";
|
||||
|
||||
/// <summary>
|
||||
/// 工程中间交接证书
|
||||
/// </summary>
|
||||
public const string JGZL_HandoverCertificateMenuId = "7BB74C3E-52E6-49C2-91FA-FF73128FF8E6";
|
||||
#endregion
|
||||
|
||||
#region 报表对应ID
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.Configuration;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 工程中间交接证书
|
||||
/// </summary>
|
||||
public class HandoverCertificateService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取工程中间交接证书
|
||||
/// </summary>
|
||||
/// <param name="handoverCertificateId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.JGZL_HandoverCertificate GetHandoverCertificateById(string handoverCertificateId)
|
||||
{
|
||||
return Funs.DB.JGZL_HandoverCertificate.FirstOrDefault(e => e.HandoverCertificateId == handoverCertificateId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加工程中间交接证书
|
||||
/// </summary>
|
||||
/// <param name="handoverCertificate"></param>
|
||||
public static void AddHandoverCertificate(Model.JGZL_HandoverCertificate handoverCertificate)
|
||||
{
|
||||
SGGLDB db = Funs.DB;
|
||||
Model.JGZL_HandoverCertificate newHandoverCertificate = new JGZL_HandoverCertificate();
|
||||
newHandoverCertificate.HandoverCertificateId = handoverCertificate.HandoverCertificateId;
|
||||
newHandoverCertificate.ProjectId = handoverCertificate.ProjectId;
|
||||
newHandoverCertificate.ContractNumber = handoverCertificate.ContractNumber;
|
||||
newHandoverCertificate.HandoverDate = handoverCertificate.HandoverDate;
|
||||
newHandoverCertificate.ProjectContent = handoverCertificate.ProjectContent;
|
||||
newHandoverCertificate.ReceiveOpinions = handoverCertificate.ReceiveOpinions;
|
||||
newHandoverCertificate.HeaderMan = handoverCertificate.HeaderMan;
|
||||
newHandoverCertificate.SupervisionOpinion = handoverCertificate.SupervisionOpinion;
|
||||
newHandoverCertificate.CompileMan = handoverCertificate.CompileMan;
|
||||
newHandoverCertificate.CompileDate = handoverCertificate.CompileDate;
|
||||
db.JGZL_HandoverCertificate.InsertOnSubmit(newHandoverCertificate);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改工程中间交接证书
|
||||
/// </summary>
|
||||
/// <param name="handoverCertificate"></param>
|
||||
public static void UpdateHandoverCertificate(Model.JGZL_HandoverCertificate handoverCertificate)
|
||||
{
|
||||
SGGLDB db = Funs.DB;
|
||||
Model.JGZL_HandoverCertificate newHandoverCertificate = db.JGZL_HandoverCertificate.FirstOrDefault(e => e.HandoverCertificateId == handoverCertificate.HandoverCertificateId);
|
||||
if (newHandoverCertificate != null)
|
||||
{
|
||||
newHandoverCertificate.ContractNumber = handoverCertificate.ContractNumber;
|
||||
newHandoverCertificate.HandoverDate = handoverCertificate.HandoverDate;
|
||||
newHandoverCertificate.ProjectContent = handoverCertificate.ProjectContent;
|
||||
newHandoverCertificate.ReceiveOpinions = handoverCertificate.ReceiveOpinions;
|
||||
newHandoverCertificate.HeaderMan = handoverCertificate.HeaderMan;
|
||||
newHandoverCertificate.SupervisionOpinion = handoverCertificate.SupervisionOpinion;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除工程中间交接证书
|
||||
/// </summary>
|
||||
/// <param name="handoverCertificateId"></param>
|
||||
public static void DeleteHandoverCertificateById(string handoverCertificateId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.JGZL_HandoverCertificate handoverCertificate = db.JGZL_HandoverCertificate.FirstOrDefault(e => e.HandoverCertificateId == handoverCertificateId);
|
||||
if (handoverCertificate != null)
|
||||
{
|
||||
db.JGZL_HandoverCertificate.DeleteOnSubmit(handoverCertificate);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user