This commit is contained in:
geh 2025-09-16 11:01:15 +08:00
parent bf9f9c44b5
commit d10d6843cb
1 changed files with 6 additions and 6 deletions

View File

@ -2236,7 +2236,7 @@ namespace WebAPI.Controllers._7HJ
new Model.Environmental_ArchitectureReport
{
Year = newItem.Year,
Quarters = newItem.Quarters,
Month = newItem.Month,
UnitId = newItem.UnitId,
FillingDate = date,
DutyPerson = newItem.DutyPerson,
@ -2244,8 +2244,8 @@ namespace WebAPI.Controllers._7HJ
};
var chemicalReportId = newItem.ArchitectureReportId ?? "";
var oldArchitectureReport = db.Environmental_ArchitectureReport.FirstOrDefault(x =>
x.UnitId == chemicalReport.UnitId && x.Year == chemicalReport.Year &&
x.Quarters == chemicalReport.Quarters);
x.UnitId == chemicalReport.UnitId && x.Year == chemicalReport.Year && x.Month == chemicalReport.Month
);
if (oldArchitectureReport == null)
{
chemicalReport.ArchitectureReportId = SQLHelper.GetNewID();
@ -2371,7 +2371,7 @@ namespace WebAPI.Controllers._7HJ
new Model.Environmental_ArchitectureReport
{
Year = newItem.Year,
Quarters = newItem.Quarters,
Month = newItem.Month,
UnitId = newItem.UnitId,
FillingDate = date,
DutyPerson = newItem.DutyPerson,
@ -2379,8 +2379,8 @@ namespace WebAPI.Controllers._7HJ
};
var chemicalReportId = newItem.ArchitectureReportId ?? "";
var oldArchitectureReport = db.Environmental_ArchitectureReport.FirstOrDefault(x =>
x.UnitId == chemicalReport.UnitId && x.Year == chemicalReport.Year &&
x.Quarters == chemicalReport.Quarters);
x.UnitId == chemicalReport.UnitId && x.Year == chemicalReport.Year && x.Month == chemicalReport.Month
);
if (oldArchitectureReport == null)
{
chemicalReport.ArchitectureReportId = SQLHelper.GetNewID();