SGGL_SGY/SUBQHSE/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs

64 lines
2.5 KiB
C#
Raw Normal View History

2025-02-19 15:58:42 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
2025-05-08 14:26:36 +08:00
public static class DCGLCheckRectifyService
2025-02-19 15:58:42 +08:00
{
/// <summary>
2025-05-08 14:26:36 +08:00
/// 根据整改ID获取督查检查信息
2025-02-19 15:58:42 +08:00
/// </summary>
/// <param name="CheckRectifyName"></param>
/// <returns></returns>
2025-05-08 14:26:36 +08:00
public static Model.DCGL_Check_CheckRectify GetCheckRectifyByCheckRectifyId(string checkRectifyId)
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
return Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == checkRectifyId);
2025-02-19 15:58:42 +08:00
}
/// <summary>
2025-05-08 14:26:36 +08:00
/// 添加督查检查整改
2025-02-19 15:58:42 +08:00
/// </summary>
/// <param name="checkRectify"></param>
2025-05-08 14:26:36 +08:00
public static void AddCheckRectify(Model.DCGL_Check_CheckRectify checkRectify)
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
Model.DCGL_Check_CheckRectify newCheckRectify = new Model.DCGL_Check_CheckRectify
2025-02-19 15:58:42 +08:00
{
CheckRectifyId = checkRectify.CheckRectifyId,
CheckRectifyCode = checkRectify.CheckRectifyCode,
ProjectId = checkRectify.ProjectId,
UnitId = checkRectify.UnitId,
CheckDate = checkRectify.CheckDate,
IssueMan = checkRectify.IssueMan,
IssueDate = checkRectify.IssueDate,
HandleState = checkRectify.HandleState
};
2025-05-08 14:26:36 +08:00
Funs.DB.DCGL_Check_CheckRectify.InsertOnSubmit(newCheckRectify);
2025-02-19 15:58:42 +08:00
Funs.DB.SubmitChanges();
}
/// <summary>
2025-05-08 14:26:36 +08:00
/// 修改督查检查整改
2025-02-19 15:58:42 +08:00
/// </summary>
/// <param name="checkRectify"></param>
2025-05-08 14:26:36 +08:00
public static void UpdateCheckRectify(Model.DCGL_Check_CheckRectify checkRectify)
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
Model.DCGL_Check_CheckRectify newCheckRectify = Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == checkRectify.CheckRectifyId);
2025-02-19 15:58:42 +08:00
if (newCheckRectify != null)
{
newCheckRectify.CheckRectifyCode = checkRectify.CheckRectifyCode;
newCheckRectify.ProjectId = checkRectify.ProjectId;
newCheckRectify.UnitId = checkRectify.UnitId;
newCheckRectify.CheckDate = checkRectify.CheckDate;
newCheckRectify.IssueMan = checkRectify.IssueMan;
newCheckRectify.IssueDate = checkRectify.IssueDate;
newCheckRectify.HandleState = checkRectify.HandleState;
Funs.DB.SubmitChanges();
}
}
}
}