施工月报新 增加3、4、5、6节点内容

This commit is contained in:
2024-03-19 10:46:55 +08:00
parent c3f952cc79
commit c4c2b07321
33 changed files with 5338 additions and 169 deletions
@@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL.CQMS.ManageReport.ReportNew
{
/// <summary>
/// 质量施工月报施工方案及检验试验计划审批情况
/// </summary>
public class ConstructionPlanService
{
public static bool Insert(Model.Report_Construction_Plan model)
{
try
{
Funs.DB.Report_Construction_Plan.InsertOnSubmit(model);
Funs.DB.SubmitChanges();
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"插入数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Update(Model.Report_Construction_Plan model)
{
try
{
var result = Funs.DB.Report_Construction_Plan.FirstOrDefault(a => a.Id == model.Id);
if (result != null)
{
result.Remarks = model.Remarks;
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"更新表数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Delete(List<string> newId)
{
try
{
var result = Funs.DB.Report_Construction_Plan.Where(a => newId.Contains(a.Id)).ToList();
if (result.Count > 0)
{
Funs.DB.Report_Construction_Plan.DeleteAllOnSubmit(result);
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Delete(string newId)
{
try
{
var result = Funs.DB.Report_Construction_Plan.Where(a => a.ReportId == newId).ToList();
if (result.Count > 0)
{
Funs.DB.Report_Construction_Plan.DeleteAllOnSubmit(result);
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
return false;
}
}
public static Model.Report_Construction_Plan Detail(string newId)
{
var result = Funs.DB.Report_Construction_Plan.FirstOrDefault(a => a.Id == newId);
return result;
}
}
}