This commit is contained in:
2026-03-24 17:43:52 +08:00
parent d36cec32ea
commit 2b9435744a
8 changed files with 126 additions and 21 deletions
+43 -5
View File
@@ -30,7 +30,7 @@ namespace BLL
/// <param name="projectId"></param>
/// <param name="states"></param>
/// <returns></returns>
public static List<Model.HazardRegisterItem> getHazardRegisterByProjectIdStates(string projectId, string states, int type ,int pageIndex)
public static List<Model.HazardRegisterItem> getHazardRegisterByProjectIdStates(string projectId, string states, int type, int pageIndex)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
@@ -82,7 +82,8 @@ namespace BLL
Requirements = hazardRegister.Requirements,
Risk_Level = hazardRegister.Risk_Level,
HiddenType= hazardRegister.HiddenType
PunishPerson = hazardRegister.PunishPerson,
HiddenType = hazardRegister.HiddenType
};
var RegisterTypesDt = db.HSSE_Hazard_HazardRegisterTypes.FirstOrDefault(x => x.RegisterTypesId == newHazardRegister.RegisterTypesId);
@@ -91,7 +92,7 @@ namespace BLL
newHazardRegister.Type = 1; //常规巡检
}
else
{
{
newHazardRegister.Type = 0; //日常巡检
}
var isUpdate = db.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.HazardRegisterId == newHazardRegister.HazardRegisterId);
@@ -103,7 +104,7 @@ namespace BLL
{
newHazardRegister.HazardRegisterId = SQLHelper.GetNewID();
}
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newHazardRegister);
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newHazardRegister);
}
else
{
@@ -132,6 +133,43 @@ namespace BLL
else if (hazardRegister.States == Const.State_2)
{
APICommonService.SendSubscribeMessage(hazardRegister.CheckManId, "安全巡检待复查验收", hazardRegister.ResponsibilityManName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", hazardRegister.RectificationTime));
//推送总包
var porject = BLL.ProjectService.GetProjectByProjectId(hazardRegister.ProjectId);
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
{
var register = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(hazardRegister.HazardRegisterId);
if (register != null)
{
if (register.DataSource == "1")
{
//推送到总包
APIHazardRegisterSyncService.pushHazardRegisterLists(register.ProjectId, register.HazardRegisterId);
}
}
}
}
else if (hazardRegister.States == Const.State_3)
{
//闭环后通过的并且有处罚人的数据添加到奖罚管理中
if (!string.IsNullOrEmpty(hazardRegister.PunishPerson))
{
Model.Check_RewardAndPunish RewardAndPunish = new Model.Check_RewardAndPunish();
RewardAndPunish.RewardAndPunishID = SQLHelper.GetNewID(typeof(Model.Check_RewardAndPunish));
RewardAndPunish.ProjectId = hazardRegister.ProjectId;
RewardAndPunish.Type = 2;
RewardAndPunish.ResponseUnit = hazardRegister.ResponsibleUnit;
RewardAndPunish.Date = hazardRegister.CheckTime;
RewardAndPunish.Description = hazardRegister.RegisterDef;
RewardAndPunish.CreateMan = hazardRegister.CheckManId;
RewardAndPunish.RewardAndPunishCode = BLL.RewardAndPunishService.getCode("1", "CF");
RewardAndPunish.RewardAndPunishMan = hazardRegister.PunishPerson;
RewardAndPunish.TeamGroupId =
BLL.PersonService.GetPersonById(hazardRegister.PunishPerson).TeamGroupId;
RewardAndPunish.DataSource = "1";
RewardAndPunish.SysTemType = "1";
RewardAndPunish.HazardRegisterId = hazardRegister.HazardRegisterId;
BLL.RewardAndPunishService.AddRewardAndPunish(RewardAndPunish);
}
}
}
}
@@ -177,7 +215,7 @@ namespace BLL
ResponsibilityManName = db.Sys_User.First(User => x.ResponsibleMan == User.UserId).UserName,
RectificationTime = x.RectificationTime,
Risk_Level = x.Risk_Level,
HiddenType=x.HiddenType
HiddenType = x.HiddenType
}).OrderBy(x => x.CheckTime).Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
return hazardRegisters;
+6 -1
View File
@@ -408,7 +408,12 @@ namespace BLL
{
CommonService.btnSaveData(meeting.ProjectId, Const.ProjectClassMeetingMenuId, newClassMeeting.ClassMeetingId, newClassMeeting.CompileMan, true, newClassMeeting.ClassMeetingName, "../Meeting/ClassMeetingView.aspx?ClassMeetingId={0}");
}
//班前会小程序新增推送到总包
var porject = BLL.ProjectService.GetProjectByProjectId(newClassMeeting.ProjectId);
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
{//项目关联了总包单位项目,保存成功后自动推送至总包单位
APIMeetingSyncService.PushClassMeetingLists(newClassMeeting.ProjectId, newClassMeeting.ClassMeetingId);
}
menuId = Const.ProjectClassMeetingMenuId;
}
else if (meeting.MeetingType == "W")