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();
}
}
}
}
}
}
@@ -1390,5 +1390,26 @@ namespace BLL
return str;
}
#endregion
/// <summary>
/// 根据UserId主键获取人员信息
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public static void UpdatePersonTypeByProjectIdAndIdentityCard(string projectId, string identityCard)
{
var persons = Funs.DB.SitePerson_Person.Where(x => x.IdentityCard == identityCard).ToList();
foreach (var item in persons)
{
if (item.ProjectId != projectId && item.States == Const.ProjectPersonStates_1)
{
item.States = Const.ProjectPersonStates_2;
item.OutTime = DateTime.Now;
Funs.DB.SubmitChanges();
}
}
}
}
}
@@ -41,6 +41,7 @@ namespace BLL
TrainPersonNum = largerHazard.TrainPersonNum,
IsSuperLargerHazard = largerHazard.IsSuperLargerHazard,
Descriptions = largerHazard.Descriptions,
ApprovalState = largerHazard.ApprovalState,
OperativesNum = largerHazard.OperativesNum
};
@@ -73,6 +74,7 @@ namespace BLL
newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard;
newLargerHazard.Descriptions = largerHazard.Descriptions;
newLargerHazard.RecordTime = largerHazard.RecordTime;
newLargerHazard.ApprovalState = largerHazard.ApprovalState;
newLargerHazard.IsUpdate = null;
newLargerHazard.OperativesNum = largerHazard.OperativesNum;
db.SubmitChanges();