This commit is contained in:
2026-03-23 14:33:54 +08:00
parent 1454442fd8
commit 58f23e59d1
68 changed files with 5316 additions and 432 deletions
@@ -321,5 +321,28 @@ namespace BLL
handleSteps.Add(handleStep4);
return handleSteps;
}
/// <summary>
/// 根据危险观察登记主键删除一个危险观察登记信息
/// </summary>
/// <param name="hazardRegisterId">危险观察登记主键</param>
public static void DeleteHazardRegisterByCheckSpecialId(string checkSpecialId)
{
Model.SGGLDB db = Funs.DB;
List<Model.HSSE_Hazard_HazardRegister> hazardRegisters = db.HSSE_Hazard_HazardRegister.Where(e => e.CheckSpecialId == checkSpecialId).ToList();
if (hazardRegisters.Count > 0)
{
foreach (var hazardRegister in hazardRegisters)
{
if (hazardRegister.IsUpdate != true)
{
BLL.UploadFileService.DeleteFile(Funs.RootPath, hazardRegister.ImageUrl);//删除整改前图片
BLL.UploadFileService.DeleteFile(Funs.RootPath, hazardRegister.RectificationImageUrl);//删除整改后图片
db.HSSE_Hazard_HazardRegister.DeleteOnSubmit(hazardRegister);
db.SubmitChanges();
}
}
}
}
}
}