提交代码

This commit is contained in:
2024-03-18 09:09:37 +08:00
27 changed files with 5390 additions and 245 deletions
+6 -3
View File
@@ -44,9 +44,6 @@
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Apache.NMS.ActiveMQ">
<HintPath>..\..\..\SGGL_CWCEC\SGGL\BLL\bin\Debug\Apache.NMS.ActiveMQ.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words">
<HintPath>..\FineUIPro\Reference BLL\Aspose.Words.dll</HintPath>
</Reference>
@@ -260,6 +257,9 @@
<Compile Include="CQMS\ManageReport\NextQualityControlService.cs" />
<Compile Include="CQMS\ManageReport\ProjectQualityWorkSummaryReportService.cs" />
<Compile Include="CQMS\ManageReport\ProjectQuarterlyProjectQualityService.cs" />
<Compile Include="CQMS\ManageReport\ReportNew\CqmsTargetService.cs" />
<Compile Include="CQMS\ManageReport\ReportNew\TextBoxContentService.cs" />
<Compile Include="CQMS\ManageReport\ReportNew\WeekAndMonthReportNewService.cs" />
<Compile Include="CQMS\ManageReport\RowMaterialProblemService.cs" />
<Compile Include="CQMS\ManageReport\ThisWeekOrMonthContentService.cs" />
<Compile Include="CQMS\ManageReport\WeekAndMonthReportService.cs" />
@@ -1031,6 +1031,9 @@
<WCFMetadataStorage Include="Service References\MCSService\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Apache.NMS.ActiveMQ">
<Version>1.8.0</Version>
</PackageReference>
<PackageReference Include="EmitMapper">
<Version>1.0.0</Version>
</PackageReference>
@@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class CqmsTargetService
{
public static bool Insert(Model.Report_CqmsTarget model)
{
try
{
Funs.DB.Report_CqmsTarget.InsertOnSubmit(model);
Funs.DB.SubmitChanges();
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"插入数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Update(Model.Report_CqmsTarget model)
{
try
{
var result = Funs.DB.Report_CqmsTarget.FirstOrDefault(a => a.Id == model.Id);
if (result != null)
{
result.ProStage = model.ProStage;
result.ProDescribe = model.ProDescribe;
result.TargetValue = model.TargetValue;
result.MonthPer = model.MonthPer;
result.Remarks = model.Remarks;
result.SortId = model.SortId;
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_CqmsTarget.Where(a => newId.Contains(a.Id)).ToList();
if (result.Count > 0)
{
Funs.DB.Report_CqmsTarget.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_CqmsTarget.Where(a => a.ReportId == newId).ToList();
if (result.Count > 0)
{
Funs.DB.Report_CqmsTarget.DeleteAllOnSubmit(result);
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
return false;
}
}
public static Model.Report_CqmsTarget Detail(string newId)
{
var result = Funs.DB.Report_CqmsTarget.FirstOrDefault(a => a.Id == newId);
return result;
}
}
}
@@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 质量月报-文本框 内容接口
/// </summary>
public class TextBoxContentService
{
public static bool Insert(Model.Report_TextBoxContent model)
{
try
{
Funs.DB.Report_TextBoxContent.InsertOnSubmit(model);
Funs.DB.SubmitChanges();
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"插入数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Update(Model.Report_TextBoxContent model)
{
try
{
var result = Funs.DB.Report_TextBoxContent.FirstOrDefault(a => a.Id == model.Id);
if (result != null)
{
result.ContentText = model.ContentText;
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_TextBoxContent.Where(a => newId.Contains(a.Id)).ToList();
if (result.Count > 0)
{
Funs.DB.Report_TextBoxContent.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_TextBoxContent.Where(a => a.ReportId==newId).ToList();
if (result.Count > 0)
{
Funs.DB.Report_TextBoxContent.DeleteAllOnSubmit(result);
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
return false;
}
}
public static Model.Report_TextBoxContent Detail(string newId)
{
var result = Funs.DB.Report_TextBoxContent.FirstOrDefault(a => a.Id == newId);
return result;
}
}
}
@@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 最新质量月报接口
/// </summary>
public class WeekAndMonthReportNewService
{
public static bool Insert(Model.Report_WeekAndMonthReport_New model)
{
try
{
Funs.DB.Report_WeekAndMonthReport_New.InsertOnSubmit(model);
Funs.DB.SubmitChanges();
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"插入数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Update(Model.Report_WeekAndMonthReport_New model)
{
try
{
var result = Funs.DB.Report_WeekAndMonthReport_New.FirstOrDefault(a => a.Id == model.Id);
if (result != null)
{
result.StartDate = model.StartDate;
result.EndDate = model.EndDate;
result.SortId = model.SortId;
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_WeekAndMonthReport_New.Where(a => newId.Contains(a.Id)).ToList();
if (result.Count > 0)
{
Funs.DB.Report_WeekAndMonthReport_New.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_WeekAndMonthReport_New.Where(a => a.Id== newId).ToList();
if (result.Count > 0)
{
Funs.DB.Report_WeekAndMonthReport_New.DeleteAllOnSubmit(result);
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
return false;
}
}
public static Model.Report_WeekAndMonthReport_New Detail(string newId)
{
var result = Funs.DB.Report_WeekAndMonthReport_New.FirstOrDefault(a => a.Id == newId);
return result;
}
}
}
+5
View File
@@ -3520,6 +3520,11 @@ namespace BLL
/// </summary>
public const string DivisionId15 = "BD0C9DC9-C621-497E-B947-A85F46D86AA4";
/// <summary>
/// 质量周报(新)
/// </summary>
public const string CQWeekReportNewMenuId = "4164BF9B-DA7C-4287-AC11-D1EB6A664F57";
#region
#region
/// <summary>