20220315 代码初始化上传
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 其他巡检记录管理
|
||||
/// </summary>
|
||||
public static class TestRunOthersCheckService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取其他巡检记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunOthersCheckId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.ProduceTestRun_TestRunOthersCheck GetTestRunOthersCheckById(string testRunOthersCheckId)
|
||||
{
|
||||
return Funs.DB.ProduceTestRun_TestRunOthersCheck.FirstOrDefault(e => e.TestRunOthersCheckId == testRunOthersCheckId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加其他巡检记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunOthersCheck"></param>
|
||||
public static void AddTestRunOthersCheck(Model.ProduceTestRun_TestRunOthersCheck testRunOthersCheck)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunOthersCheck newTestRunOthersCheck = new Model.ProduceTestRun_TestRunOthersCheck();
|
||||
newTestRunOthersCheck.TestRunOthersCheckId = testRunOthersCheck.TestRunOthersCheckId;
|
||||
newTestRunOthersCheck.ProjectId = testRunOthersCheck.ProjectId;
|
||||
newTestRunOthersCheck.UnitWorkId = testRunOthersCheck.UnitWorkId;
|
||||
newTestRunOthersCheck.UnitHead = testRunOthersCheck.UnitHead;
|
||||
newTestRunOthersCheck.CheckRecord = testRunOthersCheck.CheckRecord;
|
||||
newTestRunOthersCheck.TestRunOthersCheckCode = testRunOthersCheck.TestRunOthersCheckCode;
|
||||
newTestRunOthersCheck.CheckMan = testRunOthersCheck.CheckMan;
|
||||
newTestRunOthersCheck.Major = testRunOthersCheck.Major;
|
||||
newTestRunOthersCheck.StartDate = testRunOthersCheck.StartDate;
|
||||
newTestRunOthersCheck.EndDate = testRunOthersCheck.EndDate;
|
||||
newTestRunOthersCheck.Description = testRunOthersCheck.Description;
|
||||
newTestRunOthersCheck.ProblemsAndSolutions = testRunOthersCheck.ProblemsAndSolutions;
|
||||
newTestRunOthersCheck.AttachUrl = testRunOthersCheck.AttachUrl;
|
||||
newTestRunOthersCheck.Remark = testRunOthersCheck.Remark;
|
||||
Funs.DB.ProduceTestRun_TestRunOthersCheck.InsertOnSubmit(newTestRunOthersCheck);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改其他巡检记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunOthersCheck"></param>
|
||||
public static void UpdateTestRunOthersCheck(Model.ProduceTestRun_TestRunOthersCheck testRunOthersCheck)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunOthersCheck newTestRunOthersCheck = Funs.DB.ProduceTestRun_TestRunOthersCheck.FirstOrDefault(e => e.TestRunOthersCheckId == testRunOthersCheck.TestRunOthersCheckId);
|
||||
if (newTestRunOthersCheck != null)
|
||||
{
|
||||
newTestRunOthersCheck.ProjectId = testRunOthersCheck.ProjectId;
|
||||
newTestRunOthersCheck.UnitWorkId = testRunOthersCheck.UnitWorkId;
|
||||
newTestRunOthersCheck.UnitHead = testRunOthersCheck.UnitHead;
|
||||
newTestRunOthersCheck.CheckRecord = testRunOthersCheck.CheckRecord;
|
||||
newTestRunOthersCheck.TestRunOthersCheckCode = testRunOthersCheck.TestRunOthersCheckCode;
|
||||
newTestRunOthersCheck.CheckMan = testRunOthersCheck.CheckMan;
|
||||
newTestRunOthersCheck.Major = testRunOthersCheck.Major;
|
||||
newTestRunOthersCheck.StartDate = testRunOthersCheck.StartDate;
|
||||
newTestRunOthersCheck.EndDate = testRunOthersCheck.EndDate;
|
||||
newTestRunOthersCheck.Description = testRunOthersCheck.Description;
|
||||
newTestRunOthersCheck.ProblemsAndSolutions = testRunOthersCheck.ProblemsAndSolutions;
|
||||
newTestRunOthersCheck.AttachUrl = testRunOthersCheck.AttachUrl;
|
||||
newTestRunOthersCheck.Remark = testRunOthersCheck.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除其他巡检记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunOthersCheckId"></param>
|
||||
public static void DeleteTestRunOthersCheckById(string testRunOthersCheckId)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunOthersCheck newTestRunOthersCheck = Funs.DB.ProduceTestRun_TestRunOthersCheck.FirstOrDefault(e => e.TestRunOthersCheckId == testRunOthersCheckId);
|
||||
if (newTestRunOthersCheck != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(newTestRunOthersCheck.AttachUrl))
|
||||
{
|
||||
UploadAttachmentService.DeleteFile(Funs.RootPath, newTestRunOthersCheck.AttachUrl);
|
||||
}
|
||||
Funs.DB.ProduceTestRun_TestRunOthersCheck.DeleteOnSubmit(newTestRunOthersCheck);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 机泵巡检记录管理
|
||||
/// </summary>
|
||||
public static class TestRunPumpCheckService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取机泵巡检记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunPumpCheckId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.ProduceTestRun_TestRunPumpCheck GetTestRunPumpCheckById(string testRunPumpCheckId)
|
||||
{
|
||||
return Funs.DB.ProduceTestRun_TestRunPumpCheck.FirstOrDefault(e => e.TestRunPumpCheckId == testRunPumpCheckId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加机泵巡检记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunPumpCheck"></param>
|
||||
public static void AddTestRunPumpCheck(Model.ProduceTestRun_TestRunPumpCheck testRunPumpCheck)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunPumpCheck newTestRunPumpCheck = new Model.ProduceTestRun_TestRunPumpCheck();
|
||||
newTestRunPumpCheck.TestRunPumpCheckId = testRunPumpCheck.TestRunPumpCheckId;
|
||||
newTestRunPumpCheck.ProjectId = testRunPumpCheck.ProjectId;
|
||||
newTestRunPumpCheck.UnitWorkId = testRunPumpCheck.UnitWorkId;
|
||||
newTestRunPumpCheck.UnitHead = testRunPumpCheck.UnitHead;
|
||||
newTestRunPumpCheck.CheckRecord = testRunPumpCheck.CheckRecord;
|
||||
newTestRunPumpCheck.TestRunPumpCheckCode = testRunPumpCheck.TestRunPumpCheckCode;
|
||||
newTestRunPumpCheck.CheckMan = testRunPumpCheck.CheckMan;
|
||||
newTestRunPumpCheck.StartDate = testRunPumpCheck.StartDate;
|
||||
newTestRunPumpCheck.EndDate = testRunPumpCheck.EndDate;
|
||||
newTestRunPumpCheck.Description = testRunPumpCheck.Description;
|
||||
newTestRunPumpCheck.ProblemsAndSolutions = testRunPumpCheck.ProblemsAndSolutions;
|
||||
newTestRunPumpCheck.AttachUrl = testRunPumpCheck.AttachUrl;
|
||||
newTestRunPumpCheck.Remark = testRunPumpCheck.Remark;
|
||||
Funs.DB.ProduceTestRun_TestRunPumpCheck.InsertOnSubmit(newTestRunPumpCheck);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改机泵巡检记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunPumpCheck"></param>
|
||||
public static void UpdateTestRunPumpCheck(Model.ProduceTestRun_TestRunPumpCheck testRunPumpCheck)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunPumpCheck newTestRunPumpCheck = Funs.DB.ProduceTestRun_TestRunPumpCheck.FirstOrDefault(e => e.TestRunPumpCheckId == testRunPumpCheck.TestRunPumpCheckId);
|
||||
if (newTestRunPumpCheck != null)
|
||||
{
|
||||
newTestRunPumpCheck.ProjectId = testRunPumpCheck.ProjectId;
|
||||
newTestRunPumpCheck.UnitWorkId = testRunPumpCheck.UnitWorkId;
|
||||
newTestRunPumpCheck.UnitHead = testRunPumpCheck.UnitHead;
|
||||
newTestRunPumpCheck.CheckRecord = testRunPumpCheck.CheckRecord;
|
||||
newTestRunPumpCheck.TestRunPumpCheckCode = testRunPumpCheck.TestRunPumpCheckCode;
|
||||
newTestRunPumpCheck.CheckMan = testRunPumpCheck.CheckMan;
|
||||
newTestRunPumpCheck.StartDate = testRunPumpCheck.StartDate;
|
||||
newTestRunPumpCheck.EndDate = testRunPumpCheck.EndDate;
|
||||
newTestRunPumpCheck.Description = testRunPumpCheck.Description;
|
||||
newTestRunPumpCheck.ProblemsAndSolutions = testRunPumpCheck.ProblemsAndSolutions;
|
||||
newTestRunPumpCheck.AttachUrl = testRunPumpCheck.AttachUrl;
|
||||
newTestRunPumpCheck.Remark = testRunPumpCheck.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除机泵巡检记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunPumpCheckId"></param>
|
||||
public static void DeleteTestRunPumpCheckById(string testRunPumpCheckId)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunPumpCheck testRunPumpCheck = Funs.DB.ProduceTestRun_TestRunPumpCheck.FirstOrDefault(e => e.TestRunPumpCheckId == testRunPumpCheckId);
|
||||
if (testRunPumpCheck != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(testRunPumpCheck.AttachUrl))
|
||||
{
|
||||
UploadAttachmentService.DeleteFile(Funs.RootPath, testRunPumpCheck.AttachUrl);
|
||||
}
|
||||
Funs.DB.ProduceTestRun_TestRunPumpCheck.DeleteOnSubmit(testRunPumpCheck);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 运行记录管理
|
||||
/// </summary>
|
||||
public static class TestRunRecordService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取运行记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRecordId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.ProduceTestRun_TestRunRecord GetTestRunRecordById(string testRecordId)
|
||||
{
|
||||
return Funs.DB.ProduceTestRun_TestRunRecord.FirstOrDefault(e => e.TestRunRecordId == testRecordId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加运行记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunRecord"></param>
|
||||
public static void AddTestRunRecord(Model.ProduceTestRun_TestRunRecord testRunRecord)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunRecord newTestRunRecord = new Model.ProduceTestRun_TestRunRecord();
|
||||
newTestRunRecord.TestRunRecordId = testRunRecord.TestRunRecordId;
|
||||
newTestRunRecord.ProjectId = testRunRecord.ProjectId;
|
||||
newTestRunRecord.UnitWorkId = testRunRecord.UnitWorkId;
|
||||
newTestRunRecord.UnitHead = testRunRecord.UnitHead;
|
||||
newTestRunRecord.RunRecord = testRunRecord.RunRecord;
|
||||
newTestRunRecord.TestRunRecordCode = testRunRecord.TestRunRecordCode;
|
||||
newTestRunRecord.RecordMan = testRunRecord.RecordMan;
|
||||
newTestRunRecord.StartDate = testRunRecord.StartDate;
|
||||
newTestRunRecord.EndDate = testRunRecord.EndDate;
|
||||
newTestRunRecord.Description = testRunRecord.Description;
|
||||
newTestRunRecord.ProblemsAndSolutions = testRunRecord.ProblemsAndSolutions;
|
||||
newTestRunRecord.AttachUrl = testRunRecord.AttachUrl;
|
||||
newTestRunRecord.Remark = testRunRecord.Remark;
|
||||
Funs.DB.ProduceTestRun_TestRunRecord.InsertOnSubmit(newTestRunRecord);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改运行记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunRecord"></param>
|
||||
public static void UpdateTestRunRecord(Model.ProduceTestRun_TestRunRecord testRunRecord)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunRecord newTestRunRecord = Funs.DB.ProduceTestRun_TestRunRecord.FirstOrDefault(e => e.TestRunRecordId == testRunRecord.TestRunRecordId);
|
||||
if (newTestRunRecord != null)
|
||||
{
|
||||
newTestRunRecord.ProjectId = testRunRecord.ProjectId;
|
||||
newTestRunRecord.UnitWorkId = testRunRecord.UnitWorkId;
|
||||
newTestRunRecord.UnitHead = testRunRecord.UnitHead;
|
||||
newTestRunRecord.RunRecord = testRunRecord.RunRecord;
|
||||
newTestRunRecord.TestRunRecordCode = testRunRecord.TestRunRecordCode;
|
||||
newTestRunRecord.RecordMan = testRunRecord.RecordMan;
|
||||
newTestRunRecord.StartDate = testRunRecord.StartDate;
|
||||
newTestRunRecord.EndDate = testRunRecord.EndDate;
|
||||
newTestRunRecord.Description = testRunRecord.Description;
|
||||
newTestRunRecord.ProblemsAndSolutions = testRunRecord.ProblemsAndSolutions;
|
||||
newTestRunRecord.AttachUrl = testRunRecord.AttachUrl;
|
||||
newTestRunRecord.Remark = testRunRecord.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除运行记录管理
|
||||
/// </summary>
|
||||
/// <param name="testRunRecordId"></param>
|
||||
public static void DeleteTestRunRecordById(string testRunRecordId)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunRecord newTestRunRecord = Funs.DB.ProduceTestRun_TestRunRecord.FirstOrDefault(e => e.TestRunRecordId == testRunRecordId);
|
||||
if (newTestRunRecord != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(newTestRunRecord.AttachUrl))
|
||||
{
|
||||
UploadAttachmentService.DeleteFile(Funs.RootPath, newTestRunRecord.AttachUrl);
|
||||
}
|
||||
Funs.DB.ProduceTestRun_TestRunRecord.DeleteOnSubmit(newTestRunRecord);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 运行报表管理
|
||||
/// </summary>
|
||||
public static class TestRunReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取运行报表管理
|
||||
/// </summary>
|
||||
/// <param name="testRunReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.ProduceTestRun_TestRunReport GetTestRunReportById(string testRunReportId)
|
||||
{
|
||||
return Funs.DB.ProduceTestRun_TestRunReport.FirstOrDefault(e => e.TestRunReportId == testRunReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加运行报表管理
|
||||
/// </summary>
|
||||
/// <param name="testRunReport"></param>
|
||||
public static void AddTestRunReport(Model.ProduceTestRun_TestRunReport testRunReport)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunReport newTestRunReport = new Model.ProduceTestRun_TestRunReport();
|
||||
newTestRunReport.TestRunReportId = testRunReport.TestRunReportId;
|
||||
newTestRunReport.ProjectId = testRunReport.ProjectId;
|
||||
newTestRunReport.UnitWorkId = testRunReport.UnitWorkId;
|
||||
newTestRunReport.UnitHead = testRunReport.UnitHead;
|
||||
newTestRunReport.TestRunReportName = testRunReport.TestRunReportName;
|
||||
newTestRunReport.TestRunReportCode = testRunReport.TestRunReportCode;
|
||||
newTestRunReport.CompileMan = testRunReport.CompileMan;
|
||||
newTestRunReport.StartDate = testRunReport.StartDate;
|
||||
newTestRunReport.EndDate = testRunReport.EndDate;
|
||||
newTestRunReport.AttachUrl = testRunReport.AttachUrl;
|
||||
newTestRunReport.Remark = testRunReport.Remark;
|
||||
Funs.DB.ProduceTestRun_TestRunReport.InsertOnSubmit(newTestRunReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改运行报表管理
|
||||
/// </summary>
|
||||
/// <param name="testRunReport"></param>
|
||||
public static void UpdateTestRunReport(Model.ProduceTestRun_TestRunReport testRunReport)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunReport newTestRunReport = Funs.DB.ProduceTestRun_TestRunReport.FirstOrDefault(e => e.TestRunReportId == testRunReport.TestRunReportId);
|
||||
if (newTestRunReport != null)
|
||||
{
|
||||
newTestRunReport.ProjectId = testRunReport.ProjectId;
|
||||
newTestRunReport.UnitWorkId = testRunReport.UnitWorkId;
|
||||
newTestRunReport.UnitHead = testRunReport.UnitHead;
|
||||
newTestRunReport.TestRunReportName = testRunReport.TestRunReportName;
|
||||
newTestRunReport.TestRunReportCode = testRunReport.TestRunReportCode;
|
||||
newTestRunReport.CompileMan = testRunReport.CompileMan;
|
||||
newTestRunReport.StartDate = testRunReport.StartDate;
|
||||
newTestRunReport.EndDate = testRunReport.EndDate;
|
||||
newTestRunReport.AttachUrl = testRunReport.AttachUrl;
|
||||
newTestRunReport.Remark = testRunReport.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除运行报表管理
|
||||
/// </summary>
|
||||
/// <param name="testRunReportId"></param>
|
||||
public static void DeleteTestRunReportById(string testRunReportId)
|
||||
{
|
||||
Model.ProduceTestRun_TestRunReport newTestRunReport = Funs.DB.ProduceTestRun_TestRunReport.FirstOrDefault(e => e.TestRunReportId == testRunReportId);
|
||||
if (newTestRunReport != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(newTestRunReport.AttachUrl))
|
||||
{
|
||||
UploadAttachmentService.DeleteFile(Funs.RootPath, newTestRunReport.AttachUrl);
|
||||
}
|
||||
Funs.DB.ProduceTestRun_TestRunReport.DeleteOnSubmit(newTestRunReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user