This commit is contained in:
2023-09-20 13:55:48 +08:00
82 changed files with 12597 additions and 3704 deletions
+4 -4
View File
@@ -237,7 +237,7 @@ namespace BLL
CheckItemDetailSetId = x.CheckItemSetId,
CheckItemDetailContent = x.CheckItemSetContent,
Rectification_Date = x.Rectification_Date
Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
};
return getInfo.ToList();
}
@@ -289,7 +289,7 @@ namespace BLL
CheckItemDetailSetId=x.CheckItemSetId,
CheckItemDetailContent=x.CheckItemSetContent,
Rectification_Date=x.Rectification_Date
Rectification_Date= string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
};
return getInfo.First();
}
@@ -328,7 +328,7 @@ namespace BLL
//整改日期、检查内容、检查内容id
CheckItemSetId= newDetail.CheckItemDetailSetId,
CheckItemSetContent= newDetail.CheckItemDetailContent,
Rectification_Date=newDetail.Rectification_Date
Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date)
};
if (newCheckSpecialDetail.CompleteStatus == false && newCheckSpecialDetail.HandleStep.Contains("1") && string.IsNullOrEmpty(newCheckSpecialDetail.HiddenHazardType))
{
@@ -374,7 +374,7 @@ namespace BLL
//整改日期、检查内容、检查内容id
updateDetail.CheckItemSetId = newDetail.CheckItemDetailSetId;
updateDetail.CheckItemSetContent = newDetail.CheckItemDetailContent;
updateDetail.Rectification_Date = newDetail.Rectification_Date;
updateDetail.Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date);
db.SubmitChanges();
}
////保存附件
+552 -17
View File
@@ -58,6 +58,12 @@ namespace BLL
AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.FireWorkId).AttachUrl.Replace('\\', '/'),
States = x.States,
OldLicenseId = x.OldLicenseId,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason = x.Reason,
FireLevel = x.FireLevel,
SignatureUrl=x.SignatureUrl
}).FirstOrDefault();
}
#endregion
@@ -96,6 +102,15 @@ namespace BLL
AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.HeightWorkId).AttachUrl.Replace('\\', '/'),
States = x.States,
OldLicenseId = x.OldLicenseId,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
WorkHeight = x.WorkHeight,
HeightLevel = x.HeightLevel,
FireWatchManName = x.FireWatchManName,
WorkLeaderName = x.WorkLeaderName,
WorkLeaderTel = x.WorkLeaderTel,
SignatureUrl = x.SignatureUrl
}).FirstOrDefault();
}
#endregion
@@ -134,6 +149,17 @@ namespace BLL
AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.LimitedSpaceId).AttachUrl.Replace('\\', '/'),
States = x.States,
OldLicenseId = x.OldLicenseId,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
LimitedDescribe = x.LimitedDescribe,
IsBoolOther = x.IsBoolOther,
IsBoolHarmfulGas = x.IsBoolHarmfulGas,
TestResult = x.TestResult,
TestDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TestDate),
TestPerson = x.TestPerson,
VenStep = x.VenStep,
SignatureUrl = x.SignatureUrl
}).FirstOrDefault();
}
#endregion
@@ -155,14 +181,18 @@ namespace BLL
ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate),
RadialType = x.RadialType,
WorkLeaderId = x.WorkLeaderId,
WorkLeaderName = db.Sys_User.First(u => u.UserId == x.WorkLeaderId).UserName,
//负责人
// WorkLeaderName = db.Sys_User.First(u => u.UserId == x.WorkLeaderId).UserName,
WorkLeaderName=x.WorkLeaderName,
WorkLeaderTel = x.WorkLeaderTel,
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
WorkPalce = x.WorkPalce,
WorkMeasures = x.WorkMeasures,
FireWatchManId = x.FireWatchManId,
FireWatchManName = db.Sys_User.First(u => u.UserId == x.FireWatchManId).UserName,
//监护人
// FireWatchManName = db.Sys_User.First(u => u.UserId == x.FireWatchManId).UserName,
FireWatchManName=x.FireWatchManName,
WatchManContact = x.WatchManContact,
CancelManId = x.CancelManId,
CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName,
@@ -177,6 +207,10 @@ namespace BLL
AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.RadialWorkId).AttachUrl.Replace('\\', '/'),
States = x.States,
OldLicenseId = x.OldLicenseId,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
SignatureUrl = x.SignatureUrl
}).FirstOrDefault();
}
#endregion
@@ -215,6 +249,12 @@ namespace BLL
AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.OpenCircuitId).AttachUrl.Replace('\\', '/'),
States = x.States,
OldLicenseId = x.OldLicenseId,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason = x.Reason,
FireWatchManName = x.FireWatchManName,
SignatureUrl = x.SignatureUrl
}).FirstOrDefault();
}
#endregion
@@ -252,6 +292,13 @@ namespace BLL
AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.BreakGroundId).AttachUrl.Replace('\\', '/'),
States = x.States,
OldLicenseId = x.OldLicenseId,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason = x.Reason,
FireWatchManName = x.FireWatchManName,
SignatureUrl = x.SignatureUrl
}).FirstOrDefault();
}
#endregion
@@ -294,6 +341,7 @@ namespace BLL
AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.NightWorkId).AttachUrl.Replace('\\', '/'),
States = x.States,
OldLicenseId = x.OldLicenseId,
SignatureUrl = x.SignatureUrl
}).FirstOrDefault();
}
#endregion
@@ -332,6 +380,64 @@ namespace BLL
AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.LiftingWorkId).AttachUrl.Replace('\\', '/'),
States = x.States,
OldLicenseId = x.OldLicenseId,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
LiftingHeight = x.LiftingHeight,
FireWatchManName = x.FireWatchManName,
WorkLeaderName = x.WorkLeaderName,
WorkLeaderTel = x.WorkLeaderTel,
QzgName = x.QzgName,
QzgPhone = x.QzgPhone,
SignatureUrl = x.SignatureUrl,
SjPhone=x.SjPhone,
SjName=x.SjName
}).FirstOrDefault();
}
#endregion
#region
if (strMenuId == Const.ProjectElectricityMenuId)
{
getInfo = (from x in db.License_Electricity
where x.ElectricityId == id
select new Model.LicenseDataItem
{
LicenseId = x.ElectricityId,
MenuId = strMenuId,
ProjectId = x.ProjectId,
LicenseCode = x.LicenseCode,
ApplyUnitId = x.ApplyUnitId,
ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.ApplyUnitId).UnitName,
ApplyManId = x.ApplyManId,
ApplyManName = db.Sys_User.First(u => u.UserId == x.ApplyManId).UserName,
ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate),
WorkPalce = x.WorkPalce,
WorkDepth = x.WorkDepth,
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
WorkMeasures = x.WorkMeasures,
CancelManId = x.CancelManId,
CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName,
CancelReasons = x.CancelReasons,
CancelTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CancelTime),
CloseManId = x.CloseManId,
CloseManName = db.Sys_User.First(u => u.UserId == x.CloseManId).UserName,
CloseReasons = x.CloseReasons,
CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime),
NextManId = x.NextManId,
NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName,
AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.ElectricityId).AttachUrl.Replace('\\', '/'),
States = x.States,
OldLicenseId = x.OldLicenseId,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason = x.Reason,
FireWatchManName = x.FireWatchManName,
WorkLeaderName=x.WorkLeaderName,
WorkLeaderTel=x.WorkLeaderTel,
SignatureUrl = x.SignatureUrl
}).FirstOrDefault();
}
#endregion
@@ -419,6 +525,12 @@ namespace BLL
CloseReasons = x.CloseReasons,
CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason=x.Reason,
FireLevel=x.FireLevel,
SignatureUrl = x.SignatureUrl
}).ToList();
}
#endregion
@@ -455,6 +567,16 @@ namespace BLL
CloseReasons = x.CloseReasons,
CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
WorkHeight=x.WorkHeight,
HeightLevel=x.HeightLevel,
FireWatchManName=x.FireWatchManName,
WorkLeaderName=x.WorkLeaderName,
WorkLeaderTel=x.WorkLeaderTel,
SignatureUrl = x.SignatureUrl
}).ToList();
}
#endregion
@@ -491,6 +613,20 @@ namespace BLL
CloseReasons = x.CloseReasons,
CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
LimitedDescribe=x.LimitedDescribe,
IsBoolOther=x.IsBoolOther,
IsBoolHarmfulGas=x.IsBoolHarmfulGas,
TestResult=x.TestResult,
TestDate= string.Format("{0:yyyy-MM-dd HH:mm}", x.TestDate),
TestPerson=x.TestPerson,
VenStep=x.VenStep,
SignatureUrl = x.SignatureUrl
}).ToList();
}
#endregion
@@ -514,14 +650,16 @@ namespace BLL
ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate),
RadialType = x.RadialType,
WorkLeaderId = x.WorkLeaderId,
WorkLeaderName = db.Sys_User.First(u => u.UserId == x.WorkLeaderId).UserName,
//WorkLeaderName = db.Sys_User.First(u => u.UserId == x.WorkLeaderId).UserName,
WorkLeaderName=x.WorkLeaderName,
WorkLeaderTel = x.WorkLeaderTel,
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
WorkPalce = x.WorkPalce,
WorkMeasures = x.WorkMeasures,
FireWatchManId = x.FireWatchManId,
FireWatchManName = db.Sys_User.First(u => u.UserId == x.FireWatchManId).UserName,
//FireWatchManName = db.Sys_User.First(u => u.UserId == x.FireWatchManId).UserName,
FireWatchManName=x.FireWatchManName,
WatchManContact = x.WatchManContact,
CancelManId = x.CancelManId,
CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName,
@@ -534,6 +672,10 @@ namespace BLL
NextManId = x.NextManId,
NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName,
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
SignatureUrl = x.SignatureUrl
}).ToList();
}
#endregion
@@ -570,6 +712,12 @@ namespace BLL
CloseReasons = x.CloseReasons,
CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason=x.Reason,
FireWatchManName=x.FireWatchManName,
SignatureUrl = x.SignatureUrl
}).ToList();
}
#endregion
@@ -605,6 +753,12 @@ namespace BLL
CloseReasons = x.CloseReasons,
CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason=x.Reason,
FireWatchManName=x.FireWatchManName,
SignatureUrl = x.SignatureUrl
}).ToList();
}
#endregion
@@ -647,6 +801,7 @@ namespace BLL
NextManId = x.NextManId,
NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName,
States = x.States,
SignatureUrl = x.SignatureUrl
}).ToList();
}
#endregion
@@ -685,6 +840,60 @@ namespace BLL
NextManId = x.NextManId,
NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName,
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
LiftingHeight=x.LiftingHeight,
FireWatchManName=x.FireWatchManName,
WorkLeaderName=x.WorkLeaderName,
WorkLeaderTel=x.WorkLeaderTel,
QzgName=x.QzgName,
QzgPhone=x.QzgPhone,
SignatureUrl = x.SignatureUrl
}).ToList();
}
#endregion
#region
if (strMenuId == Const.ProjectElectricityMenuId)
{
getInfoList = (from x in db.License_Electricity
where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null)
&& (states == null || x.States == states)
orderby x.LicenseCode descending
select new Model.LicenseDataItem
{
LicenseId = x.ElectricityId,
MenuId = strMenuId,
ProjectId = x.ProjectId,
LicenseCode = x.LicenseCode,
ApplyUnitId = x.ApplyUnitId,
ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.ApplyUnitId).UnitName,
ApplyManId = x.ApplyManId,
ApplyManName = db.Sys_User.First(u => u.UserId == x.ApplyManId).UserName,
ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate),
WorkPalce = x.WorkPalce,
WorkDepth = x.WorkDepth,
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
WorkMeasures = x.WorkMeasures,
CancelManId = x.CancelManId,
CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName,
CancelReasons = x.CancelReasons,
CancelTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CancelTime),
CloseManId = x.CloseManId,
CloseManName = db.Sys_User.First(u => u.UserId == x.CloseManId).UserName,
CloseReasons = x.CloseReasons,
CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason = x.Reason,
FireWatchManName = x.FireWatchManName,
WorkLeaderName=x.WorkLeaderName,
WorkLeaderTel=x.WorkLeaderTel,
SignatureUrl = x.SignatureUrl
}).ToList();
}
#endregion
@@ -760,6 +969,11 @@ namespace BLL
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason = x.Reason,
FireLevel = x.FireLevel,
}).ToList();
if (getFireWork.Count() > 0)
{
@@ -788,6 +1002,14 @@ namespace BLL
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
WorkHeight = x.WorkHeight,
HeightLevel = x.HeightLevel,
FireWatchManName = x.FireWatchManName,
WorkLeaderName = x.WorkLeaderName,
WorkLeaderTel = x.WorkLeaderTel,
}).ToList();
if (getHeightWork.Count() > 0)
{
@@ -815,6 +1037,17 @@ namespace BLL
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
LimitedDescribe = x.LimitedDescribe,
IsBoolOther = x.IsBoolOther,
IsBoolHarmfulGas = x.IsBoolHarmfulGas,
TestResult = x.TestResult,
TestDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TestDate),
TestPerson = x.TestPerson,
VenStep = x.VenStep,
}).ToList();
if (getLimitedSpace.Count() > 0)
{
@@ -843,6 +1076,9 @@ namespace BLL
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
WorkPalce = x.WorkPalce,
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
}).ToList();
if (getRadialWork.Count() > 0)
{
@@ -871,6 +1107,11 @@ namespace BLL
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
RoadName = x.RoadName,
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason = x.Reason,
FireWatchManName = x.FireWatchManName,
}).ToList();
if (getOpenCircuit.Count() > 0)
{
@@ -899,6 +1140,11 @@ namespace BLL
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason = x.Reason,
FireWatchManName = x.FireWatchManName,
}).ToList();
if (getBreakGround.Count() > 0)
{
@@ -954,6 +1200,15 @@ namespace BLL
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
LiftingHeight = x.LiftingHeight,
FireWatchManName = x.FireWatchManName,
WorkLeaderName = x.WorkLeaderName,
WorkLeaderTel = x.WorkLeaderTel,
QzgName = x.QzgName,
QzgPhone = x.QzgPhone,
}).ToList();
if (getLiftingWork.Count() > 0)
{
@@ -961,6 +1216,41 @@ namespace BLL
}
#endregion
#region
var getElectricity = (from x in db.License_Electricity
where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null)
&& (states == null || x.States == states)
select new Model.LicenseDataItem
{
LicenseId = x.ElectricityId,
MenuId = Const.ProjectElectricityMenuId,
MenuName = "临时用电",
ProjectId = x.ProjectId,
LicenseCode = x.LicenseCode,
ApplyUnitId = x.ApplyUnitId,
ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.ApplyUnitId).UnitName,
ApplyManId = x.ApplyManId,
ApplyManName = db.Sys_User.First(u => u.UserId == x.ApplyManId).UserName,
ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate),
WorkPalce = x.WorkPalce,
WorkDepth = x.WorkDepth,
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime),
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime),
States = x.States,
WorkAreaId = x.WorkAreaId,
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
Reason = x.Reason,
FireWatchManName = x.FireWatchManName,
WorkLeaderName=x.WorkLeaderName,
WorkLeaderTel=x.WorkLeaderTel,
}).ToList();
if (getElectricity.Count() > 0)
{
getInfoList.AddRange(getElectricity);
}
#endregion
#region 稿 "待开工"="1";"作业中"="2";"已关闭"="3";"已取消"="-1"
var getLicenseManager = (from x in db.License_LicenseManager
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
@@ -1049,6 +1339,8 @@ namespace BLL
IsAgree = x.IsAgree,
Opinion = x.Opinion,
IsFlowEnd = x.IsFlowEnd ?? false,
SignatureUrl = x.SignatureUrl,
AttachUrl = AttachFileService.getFileUrl(x.FlowOperateId)
}).ToList();
return getInfoList;
@@ -1106,6 +1398,11 @@ namespace BLL
CloseTime = Funs.GetNewDateTime(newItem.CloseTime),
NextManId = newItem.NextManId,
States = newItem.States,
WorkAreaId=newItem.WorkAreaId,
Reason=newItem.Reason,
FireLevel=newItem.FireLevel,
SignatureUrl = newItem.SignatureUrl
};
if (newItem.States == Const.State_0)
@@ -1156,6 +1453,11 @@ namespace BLL
updateFireWork.WorkMeasures = newFireWork.WorkMeasures;
updateFireWork.NextManId = newFireWork.NextManId;
updateFireWork.States = newFireWork.States;
updateFireWork.WorkAreaId = newItem.WorkAreaId;
updateFireWork.Reason = newItem.Reason;
updateFireWork.FireLevel = newItem.FireLevel;
updateFireWork.SignatureUrl = newItem.SignatureUrl;
}
updateFireWork.States = newFireWork.States;
}
@@ -1186,6 +1488,15 @@ namespace BLL
CloseTime = Funs.GetNewDateTime(newItem.CloseTime),
NextManId = newItem.NextManId,
States = newItem.States,
WorkAreaId=newItem.WorkAreaId,
WorkHeight=newItem.WorkHeight,
HeightLevel=newItem.HeightLevel,
FireWatchManName=newItem.FireWatchManName,
WorkLeaderName=newItem.WorkLeaderName,
WorkLeaderTel=newItem.WorkLeaderTel,
SignatureUrl = newItem.SignatureUrl
};
if (newItem.States == Const.State_0)
{
@@ -1236,6 +1547,13 @@ namespace BLL
updateHeightWork.EquipmentTools = newHeightWork.EquipmentTools;
updateHeightWork.NextManId = newHeightWork.NextManId;
updateHeightWork.States = newHeightWork.States;
updateHeightWork.WorkAreaId = newItem.WorkAreaId;
updateHeightWork.WorkHeight = newItem.WorkHeight;
updateHeightWork.HeightLevel = newItem.HeightLevel;
updateHeightWork.FireWatchManName = newItem.FireWatchManName;
updateHeightWork.WorkLeaderName = newItem.WorkLeaderName;
updateHeightWork.WorkLeaderTel = newItem.WorkLeaderTel;
updateHeightWork.SignatureUrl = newItem.SignatureUrl;
}
updateHeightWork.States = newHeightWork.States;
}
@@ -1266,6 +1584,16 @@ namespace BLL
CloseTime = Funs.GetNewDateTime(newItem.CloseTime),
NextManId = newItem.NextManId,
States = newItem.States,
WorkAreaId=newItem.WorkAreaId,
LimitedDescribe =newItem.LimitedDescribe,
IsBoolOther=newItem.IsBoolOther,
IsBoolHarmfulGas=newItem.IsBoolHarmfulGas,
TestResult=newItem.TestResult,
TestDate= Funs.GetNewDateTime(newItem.TestDate),
TestPerson=newItem.TestPerson,
VenStep=newItem.VenStep,
SignatureUrl=newItem.SignatureUrl
};
if (newItem.States == Const.State_0)
{
@@ -1315,6 +1643,16 @@ namespace BLL
updateLimitedSpace.WorkMeasures = newLimitedSpace.WorkMeasures;
updateLimitedSpace.NextManId = newLimitedSpace.NextManId;
updateLimitedSpace.States = newLimitedSpace.States;
updateLimitedSpace.WorkAreaId = newLimitedSpace.WorkAreaId;
updateLimitedSpace.LimitedDescribe = newLimitedSpace.LimitedDescribe;
updateLimitedSpace.IsBoolOther = newLimitedSpace.IsBoolOther;
updateLimitedSpace.IsBoolHarmfulGas = newLimitedSpace.IsBoolHarmfulGas;
updateLimitedSpace.TestResult = newLimitedSpace.TestResult;
updateLimitedSpace.TestDate = Funs.GetNewDateTime(newItem.TestDate);
updateLimitedSpace.TestPerson = newLimitedSpace.TestPerson;
updateLimitedSpace.VenStep = newLimitedSpace.VenStep;
updateLimitedSpace.SignatureUrl = newLimitedSpace.SignatureUrl;
}
updateLimitedSpace.States = newLimitedSpace.States;
}
@@ -1333,12 +1671,14 @@ namespace BLL
ApplyDate = Funs.GetNewDateTime(newItem.ApplyDate),
RadialType = newItem.RadialType,
WorkLeaderId = newItem.WorkLeaderId,
WorkLeaderName = newItem.WorkLeaderName,
WorkLeaderTel = newItem.WorkLeaderTel,
ValidityStartTime = Funs.GetNewDateTime(newItem.ValidityStartTime),
ValidityEndTime = Funs.GetNewDateTime(newItem.ValidityEndTime),
WorkPalce = newItem.WorkPalce,
WorkMeasures = newItem.WorkMeasures,
FireWatchManId = newItem.FireWatchManId,
FireWatchManName=newItem.FireWatchManName,
WatchManContact = newItem.WatchManContact,
CancelManId = newItem.CancelManId,
CancelReasons = newItem.CancelReasons,
@@ -1348,6 +1688,9 @@ namespace BLL
CloseTime = Funs.GetNewDateTime(newItem.CloseTime),
NextManId = newItem.NextManId,
States = newItem.States,
WorkAreaId = newItem.WorkAreaId,
SignatureUrl = newItem.SignatureUrl
};
if (newItem.States == Const.State_0)
{
@@ -1391,15 +1734,19 @@ namespace BLL
{
updateRadialWork.RadialType = newRadialWork.RadialType;
updateRadialWork.WorkLeaderId = newRadialWork.WorkLeaderId;
updateRadialWork.WorkLeaderName = newRadialWork.WorkLeaderName;
updateRadialWork.WorkLeaderTel = newRadialWork.WorkLeaderTel;
updateRadialWork.ValidityStartTime = newRadialWork.ValidityStartTime;
updateRadialWork.ValidityEndTime = newRadialWork.ValidityEndTime;
updateRadialWork.WorkPalce = newRadialWork.WorkPalce;
updateRadialWork.WorkMeasures = newRadialWork.WorkMeasures;
updateRadialWork.FireWatchManId = newRadialWork.FireWatchManId;
updateRadialWork.FireWatchManName = newRadialWork.FireWatchManName;
updateRadialWork.WatchManContact = newRadialWork.WatchManContact;
updateRadialWork.NextManId = newRadialWork.NextManId;
updateRadialWork.States = newRadialWork.States;
updateRadialWork.WorkAreaId = newRadialWork.WorkAreaId;
updateRadialWork.SignatureUrl = newRadialWork.SignatureUrl;
}
updateRadialWork.States = newRadialWork.States;
}
@@ -1430,6 +1777,12 @@ namespace BLL
CloseTime = Funs.GetNewDateTime(newItem.CloseTime),
NextManId = newItem.NextManId,
States = newItem.States,
WorkAreaId = newItem.WorkAreaId,
Reason = newItem.Reason,
FireWatchManName = newItem.FireWatchManName,
SignatureUrl = newItem.SignatureUrl
};
if (newItem.States == Const.State_0)
{
@@ -1479,6 +1832,11 @@ namespace BLL
updateOpenCircuit.SafeMeasures = newOpenCircuit.SafeMeasures;
updateOpenCircuit.NextManId = newOpenCircuit.NextManId;
updateOpenCircuit.States = newOpenCircuit.States;
updateOpenCircuit.WorkAreaId = newOpenCircuit.WorkAreaId;
updateOpenCircuit.Reason = newOpenCircuit.Reason;
updateOpenCircuit.FireWatchManName = newOpenCircuit.FireWatchManName;
updateOpenCircuit.SignatureUrl = newOpenCircuit.SignatureUrl;
}
updateOpenCircuit.States = newOpenCircuit.States;
}
@@ -1508,6 +1866,11 @@ namespace BLL
CloseTime = Funs.GetNewDateTime(newItem.CloseTime),
NextManId = newItem.NextManId,
States = newItem.States,
WorkAreaId = newItem.WorkAreaId,
Reason = newItem.Reason,
FireWatchManName = newItem.FireWatchManName,
SignatureUrl = newItem.SignatureUrl
};
if (newItem.States == Const.State_0)
{
@@ -1556,6 +1919,11 @@ namespace BLL
updateBreakGround.WorkMeasures = newBreakGround.WorkMeasures;
updateBreakGround.NextManId = newBreakGround.NextManId;
updateBreakGround.States = newBreakGround.States;
updateBreakGround.WorkAreaId = newBreakGround.WorkAreaId;
updateBreakGround.Reason = newBreakGround.Reason;
updateBreakGround.FireWatchManName = newBreakGround.FireWatchManName;
updateBreakGround.SignatureUrl = newBreakGround.SignatureUrl;
}
updateBreakGround.States = newBreakGround.States;
}
@@ -1588,6 +1956,7 @@ namespace BLL
CloseTime = Funs.GetNewDateTime(newItem.CloseTime),
NextManId = newItem.NextManId,
States = newItem.States,
SignatureUrl = newItem.SignatureUrl
};
if (newItem.States == Const.State_0)
{
@@ -1639,6 +2008,7 @@ namespace BLL
updateNightWork.SafeLeaderTel = newItem.SafeLeaderTel;
updateNightWork.NextManId = newNightWork.NextManId;
updateNightWork.States = newNightWork.States;
updateNightWork.SignatureUrl = newItem.SignatureUrl;
}
updateNightWork.States = newNightWork.States;
}
@@ -1669,6 +2039,18 @@ namespace BLL
CloseTime = Funs.GetNewDateTime(newItem.CloseTime),
NextManId = newItem.NextManId,
States = newItem.States,
WorkAreaId = newItem.WorkAreaId,
LiftingHeight = newItem.LiftingHeight,
FireWatchManName = newItem.FireWatchManName,
WorkLeaderName = newItem.WorkLeaderName,
WorkLeaderTel = newItem.WorkLeaderTel,
QzgName = newItem.QzgName,
QzgPhone = newItem.QzgPhone,
SignatureUrl = newItem.SignatureUrl,
SjName=newItem.SjName,
SjPhone=newItem.SjPhone
};
if (newItem.States == Const.State_0)
{
@@ -1718,12 +2100,116 @@ namespace BLL
updateLiftingWork.CraneCapacity = newLiftingWork.CraneCapacity;
updateLiftingWork.NextManId = newLiftingWork.NextManId;
updateLiftingWork.States = newLiftingWork.States;
updateLiftingWork.WorkAreaId = newLiftingWork.WorkAreaId;
updateLiftingWork.LiftingHeight = newLiftingWork.LiftingHeight;
updateLiftingWork.FireWatchManName = newLiftingWork.FireWatchManName;
updateLiftingWork.WorkLeaderName = newLiftingWork.WorkLeaderName;
updateLiftingWork.WorkLeaderTel = newLiftingWork.WorkLeaderTel;
updateLiftingWork.QzgName = newLiftingWork.QzgName;
updateLiftingWork.QzgPhone = newLiftingWork.QzgPhone;
updateLiftingWork.SignatureUrl = newLiftingWork.SignatureUrl;
updateLiftingWork.SjName = newLiftingWork.SjName;
updateLiftingWork.SjPhone = newLiftingWork.SjPhone;
}
updateLiftingWork.States = newLiftingWork.States;
}
}
#endregion
#region
if (newItem.MenuId == Const.ProjectElectricityMenuId)
{
Model.License_Electricity newElectricity = new Model.License_Electricity
{
ElectricityId = strLicenseId,
ProjectId = projectId,
LicenseCode = newItem.LicenseCode,
ApplyUnitId = newItem.ApplyUnitId,
ApplyManId = newItem.ApplyManId,
ApplyDate = Funs.GetNewDateTime(newItem.ApplyDate),
WorkPalce = newItem.WorkPalce,
WorkDepth = newItem.WorkDepth,
ValidityStartTime = Funs.GetNewDateTime(newItem.ValidityStartTime),
ValidityEndTime = Funs.GetNewDateTime(newItem.ValidityEndTime),
WorkMeasures = newItem.WorkMeasures,
CancelManId = newItem.CancelManId,
CancelReasons = newItem.CancelReasons,
CancelTime = Funs.GetNewDateTime(newItem.CancelTime),
CloseManId = newItem.CloseManId,
CloseReasons = newItem.CloseReasons,
CloseTime = Funs.GetNewDateTime(newItem.CloseTime),
NextManId = newItem.NextManId,
States = newItem.States,
WorkAreaId = newItem.WorkAreaId,
Reason = newItem.Reason,
FireWatchManName = newItem.FireWatchManName,
WorkLeaderName= newItem.WorkLeaderName,
WorkLeaderTel = newItem.WorkLeaderTel,
SignatureUrl=newItem.SignatureUrl
};
if (newItem.States == Const.State_0)
{
newElectricity.NextManId = newItem.ApplyManId;
}
////保存
var updateElectricity = db.License_Electricity.FirstOrDefault(x => x.ElectricityId == strLicenseId);
if (updateElectricity == null)
{
newElectricity.ApplyDate = DateTime.Now;
strLicenseId = newElectricity.ElectricityId = SQLHelper.GetNewID();
newElectricity.OldLicenseId = newItem.OldLicenseId;
newItem.LicenseCode = newElectricity.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectElectricityMenuId, newElectricity.ProjectId, newElectricity.ApplyUnitId);
db.License_Electricity.InsertOnSubmit(newElectricity);
////增加一条编码记录
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectElectricityMenuId, newElectricity.ProjectId, newElectricity.ApplyUnitId, newElectricity.ElectricityId, newElectricity.ApplyDate);
}
else
{
if (newItem.States == Const.State_3)
{
updateElectricity.CloseManId = newElectricity.CloseManId;
updateElectricity.CloseReasons = newElectricity.CloseReasons;
updateElectricity.CloseTime = DateTime.Now;
if (newElectricity.ValidityEndTime.HasValue && newElectricity.ValidityEndTime < DateTime.Now)
{
updateElectricity.CloseTime = newElectricity.ValidityEndTime;
}
}
else if (newItem.States == Const.State_R)
{
updateElectricity.CancelManId = newElectricity.CancelManId;
updateElectricity.CancelReasons = newElectricity.CancelReasons;
updateElectricity.CancelTime = DateTime.Now;
if (newElectricity.ValidityEndTime.HasValue && newElectricity.ValidityEndTime < DateTime.Now)
{
updateElectricity.CancelTime = newElectricity.ValidityEndTime;
}
}
else
{
updateElectricity.WorkPalce = newElectricity.WorkPalce;
updateElectricity.WorkDepth = newElectricity.WorkDepth;
updateElectricity.ValidityStartTime = newElectricity.ValidityStartTime;
updateElectricity.ValidityEndTime = newElectricity.ValidityEndTime;
updateElectricity.WorkMeasures = newElectricity.WorkMeasures;
updateElectricity.NextManId = newElectricity.NextManId;
updateElectricity.States = newElectricity.States;
updateElectricity.WorkAreaId = newElectricity.WorkAreaId;
updateElectricity.Reason = newElectricity.Reason;
updateElectricity.FireWatchManName = newElectricity.FireWatchManName;
updateElectricity.WorkLeaderName = newElectricity.WorkLeaderName;
updateElectricity.WorkLeaderTel = newElectricity.WorkLeaderTel;
updateElectricity.SignatureUrl = newElectricity.SignatureUrl;
}
updateElectricity.States = newElectricity.States;
}
}
#endregion
#region 稿
if (newItem.MenuId == Const.ProjectLicenseManagerMenuId)
{
@@ -1862,7 +2348,7 @@ namespace BLL
updateFlowOperate.IsAgree = newItem.IsAgree;
updateFlowOperate.Opinion = newItem.Opinion;
updateFlowOperate.IsClosed = true;
updateFlowOperate.SignatureUrl = newItem.SignatureUrl;
db.SubmitChanges();
/////增加一条审核明细记录
@@ -1880,23 +2366,26 @@ namespace BLL
#region
if (newItem.IsAgree == true)
{
var getCloseAllOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && (!x.IsClosed.HasValue || x.IsClosed == false) && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false));
if (getCloseAllOperate == null)
{
var getNextFlowOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && x.IsFlowEnd == true);
////判断审核步骤是否结束
if (getNextFlowOperate != null)
{
/////最后一步是关闭所有 步骤
getNextFlowOperate.IsClosed = true;
//修改只需要一个人审批直接通过
//var getCloseAllOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && (!x.IsClosed.HasValue || x.IsClosed == false) && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false));
//if (getCloseAllOperate == null)
//{
//var getNextFlowOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && x.IsFlowEnd == true);
var getNextFlowOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId);
// ////判断审核步骤是否结束
// if (getNextFlowOperate != null)
// {
/////最后一步是关闭所有 步骤
getNextFlowOperate.IsClosed = true;
getNextFlowOperate.OperaterTime = DateTime.Now;
getNextFlowOperate.IsAgree = true;
getNextFlowOperate.OperaterId = newItem.OperaterId;
getNextFlowOperate.Opinion = "审核完成!";
boolIsFlowEnd = true;
db.SubmitChanges();
}
}
// }
//}
#region
if (strMenuId == Const.ProjectFireWorkMenuId)
@@ -2163,6 +2652,39 @@ namespace BLL
}
#endregion
#region
if (strMenuId == Const.ProjectElectricityMenuId)
{
var getElectricity = db.License_Electricity.FirstOrDefault(x => x.ElectricityId == updateFlowOperate.DataId);
if (getElectricity != null)
{
getElectricity.NextManId = newItem.NextOperaterId;
if (newItem.IsAgree == true)
{
if (boolIsFlowEnd == true)
{
getElectricity.NextManId = null;
getElectricity.States = Const.State_2;
if (getElectricity.ValidityStartTime.HasValue && getElectricity.ValidityStartTime < DateTime.Now)
{
int days = 7;
if (getElectricity.ValidityEndTime.HasValue)
{
days = Convert.ToInt32((getElectricity.ValidityEndTime - getElectricity.ValidityStartTime).Value.TotalDays);
}
getElectricity.ValidityStartTime = DateTime.Now;
getElectricity.ValidityEndTime = DateTime.Now.AddDays(days);
}
}
}
else
{
getElectricity.States = Const.State_0;
}
db.SubmitChanges();
}
}
#endregion
if (!boolIsFlowEnd && !string.IsNullOrEmpty(newItem.NextOperaterId))
{
List<string> getUserIds = Funs.GetStrListByStr(newItem.NextOperaterId, ',');
@@ -2270,7 +2792,8 @@ namespace BLL
IsAgree = x.IsAgree,
Opinion = x.Opinion,
IsFlowEnd = x.IsFlowEnd ?? false,
SignatureUrl = db.Sys_User.First(y => y.UserId == x.OperaterId).SignatureUrl.Replace('\\', '/'),
SignatureUrl = x.SignatureUrl.Replace('\\', '/'),
AttachUrl = AttachFileService.getFileUrl(x.FlowOperateId)
};
return getFlowOperate.FirstOrDefault();
}
@@ -2291,6 +2814,7 @@ namespace BLL
var getAllFlows = from x in db.License_FlowOperate
where x.DataId == licenseInfo.LicenseId && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false)
select x;
if (licenseInfo == null || string.IsNullOrEmpty(licenseInfo.LicenseId) || getAllFlows.Count() == 0)
{
getFlowOperate = (from x in db.Sys_MenuFlowOperate
@@ -2617,6 +3141,17 @@ namespace BLL
}
#endregion
#region
else if (newItem.MenuId == Const.ProjectElectricityMenuId)
{
var updateElectricity = db.License_Electricity.FirstOrDefault(x => x.ElectricityId == strLicenseId);
if (updateElectricity == null)
{
updateElectricity.NextManId = null;
updateElectricity.States = Const.State_C;
}
}
#endregion
db.SubmitChanges();
}
+14
View File
@@ -296,6 +296,11 @@ namespace BLL
/// </summary>
public static string WorkPost_SafetyManager = "eac153fd-4cf3-4f5f-984d-022a636d47aa";
/// <summary>
/// HSE副经理岗位Id
/// </summary>
public static string WorkPost_SafetyManagerFu = "46AA7960-1D35-4D5B-8C8F-AA4C874D63C8";
/// <summary>
/// 无损检测工岗位Id
/// </summary>
@@ -1951,6 +1956,10 @@ namespace BLL
/// 吊装作业票
/// </summary>
public const string ProjectLiftingWorkMenuId = "A1BE3AB6-9D4A-41E7-8870-E73423165451";
/// <summary>
/// 临时用电作业票
/// </summary>
public const string ProjectElectricityMenuId = "48F64E0F-38B2-4BDC-9B61-6200BD02CBF5";
#endregion
#region HSSE检查管理
@@ -5543,5 +5552,10 @@ namespace BLL
/// 实业
/// </summary>
public const string SYHSEData_DataMenuId = "S89E5EC2-F725-4656-9110-5AF83C18FB6C";
/// <summary>
/// 检查表尾项管理
/// </summary>
public const string InspectTailTerm = "B6A6EA7D-EDAB-40C8-920D-A106731D0E08";
}
}
@@ -62,36 +62,42 @@ namespace BLL
string type = string.Empty;
if (CheckItem != null)
{
Model.Check_ProjectCheckItemDetail detail = BLL.Check_ProjectCheckItemDetailService.GetCheckItemDetailById(CheckItem.ToString());
//Model.Check_ProjectCheckItemDetail detail = BLL.Check_ProjectCheckItemDetailService.GetCheckItemDetailById(CheckItem.ToString());
//修改为项目安全检查项
Model.Technique_CheckItemSet detail = Funs.DB.Technique_CheckItemSet.FirstOrDefault(x => x.CheckItemSetId == CheckItem.ToString());
if (detail != null)
{
Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(detail.CheckItemSetId);
if (item != null)
{
if (item.SupCheckItem == "0")
{
type = item.CheckItemName;
}
else
{
type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem);
}
}
type = detail.CheckItemName;
//Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(detail.CheckItemSetId);
//if (item != null)
//{
// if (item.SupCheckItem == "0")
// {
// type = item.CheckItemName;
// }
// else
// {
// type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem);
// }
//}
}
else
{
Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(CheckItem.ToString());
if (item != null)
{
if (item.SupCheckItem == "0")
{
type = item.CheckItemName;
}
else
{
type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem);
}
}
type = "季节性/节假日检查(无类型)";
//Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(CheckItem.ToString());
//if (item != null)
//{
// if (item.SupCheckItem == "0")
// {
// type = item.CheckItemName;
// }
// else
// {
// type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem);
// }
//}
}
}
return type;
+195 -1
View File
@@ -76,6 +76,11 @@ namespace BLL
CloseTime = fireWork.CloseTime,
NextManId=fireWork.NextManId,
States = fireWork.States,
WorkAreaId=fireWork.WorkAreaId,
Reason=fireWork.Reason,
FireLevel=fireWork.FireLevel,
};
db.License_FireWork.InsertOnSubmit(newFireWork);
db.SubmitChanges();
@@ -105,7 +110,11 @@ namespace BLL
newFireWork.CloseReasons = fireWork.CloseReasons;
newFireWork.CloseTime = fireWork.CloseTime;
newFireWork.NextManId = fireWork.NextManId;
newFireWork.States = fireWork.States;
newFireWork.States = fireWork.States;
newFireWork.WorkAreaId = fireWork.WorkAreaId;
newFireWork.Reason = fireWork.Reason;
newFireWork.FireLevel = fireWork.FireLevel;
db.SubmitChanges();
}
}
@@ -172,6 +181,14 @@ namespace BLL
CloseTime = heightWork.CloseTime,
NextManId = heightWork.NextManId,
States = heightWork.States,
WorkAreaId=heightWork.WorkAreaId,
WorkHeight=heightWork.WorkHeight,
HeightLevel=heightWork.HeightLevel,
FireWatchManName=heightWork.FireWatchManName,
WorkLeaderName=heightWork.WorkLeaderName,
WorkLeaderTel= heightWork.WorkLeaderTel,
};
db.License_HeightWork.InsertOnSubmit(newHeightWork);
db.SubmitChanges();
@@ -203,6 +220,13 @@ namespace BLL
newHeightWork.CloseTime = heightWork.CloseTime;
newHeightWork.NextManId = heightWork.NextManId;
newHeightWork.States = heightWork.States;
newHeightWork.WorkAreaId = heightWork.WorkAreaId;
newHeightWork.WorkHeight = heightWork.WorkHeight;
newHeightWork.HeightLevel = heightWork.HeightLevel;
newHeightWork.FireWatchManName = heightWork.FireWatchManName;
newHeightWork.WorkLeaderName = heightWork.WorkLeaderName;
newHeightWork.WorkLeaderTel = heightWork.WorkLeaderTel;
db.SubmitChanges();
}
}
@@ -269,6 +293,16 @@ namespace BLL
CloseTime = limitedSpace.CloseTime,
NextManId = limitedSpace.NextManId,
States = limitedSpace.States,
WorkAreaId=limitedSpace.WorkAreaId,
LimitedDescribe=limitedSpace.LimitedDescribe,
IsBoolOther=limitedSpace.IsBoolOther,
IsBoolHarmfulGas=limitedSpace.IsBoolHarmfulGas,
TestResult=limitedSpace.TestResult,
TestDate=limitedSpace.TestDate,
TestPerson=limitedSpace.TestPerson,
VenStep=limitedSpace.VenStep,
};
db.License_LimitedSpace.InsertOnSubmit(newLimitedSpace);
db.SubmitChanges();
@@ -299,6 +333,15 @@ namespace BLL
newLimitedSpace.CloseTime = limitedSpace.CloseTime;
newLimitedSpace.NextManId = limitedSpace.NextManId;
newLimitedSpace.States = limitedSpace.States;
newLimitedSpace.WorkAreaId = limitedSpace.WorkAreaId;
newLimitedSpace.LimitedDescribe = limitedSpace.LimitedDescribe;
newLimitedSpace.IsBoolOther = limitedSpace.IsBoolOther;
newLimitedSpace.IsBoolHarmfulGas = limitedSpace.IsBoolHarmfulGas;
newLimitedSpace.TestResult = limitedSpace.TestResult;
newLimitedSpace.TestDate = limitedSpace.TestDate;
newLimitedSpace.TestPerson = limitedSpace.TestPerson;
newLimitedSpace.VenStep = limitedSpace.VenStep;
db.SubmitChanges();
}
}
@@ -368,6 +411,9 @@ namespace BLL
CloseTime = radialWork.CloseTime,
NextManId = radialWork.NextManId,
States = radialWork.States,
WorkAreaId=radialWork.WorkAreaId,
};
db.License_RadialWork.InsertOnSubmit(newRadialWork);
db.SubmitChanges();
@@ -408,6 +454,8 @@ namespace BLL
newRadialWork.CloseTime = radialWork.CloseTime;
newRadialWork.NextManId = radialWork.NextManId;
newRadialWork.States = radialWork.States;
newRadialWork.WorkAreaId = radialWork.WorkAreaId;
db.SubmitChanges();
}
}
@@ -476,6 +524,11 @@ namespace BLL
CloseTime = openCircuit.CloseTime,
NextManId = openCircuit.NextManId,
States = openCircuit.States,
WorkAreaId=openCircuit.WorkAreaId,
Reason=openCircuit.Reason,
FireWatchManName=openCircuit.FireWatchManName,
};
db.License_OpenCircuit.InsertOnSubmit(newOpenCircuit);
db.SubmitChanges();
@@ -507,6 +560,10 @@ namespace BLL
newOpenCircuit.CloseTime = openCircuit.CloseTime;
newOpenCircuit.NextManId = openCircuit.NextManId;
newOpenCircuit.States = openCircuit.States;
newOpenCircuit.WorkAreaId = openCircuit.WorkAreaId;
newOpenCircuit.Reason = openCircuit.Reason;
newOpenCircuit.FireWatchManName = openCircuit.FireWatchManName;
db.SubmitChanges();
}
}
@@ -572,6 +629,11 @@ namespace BLL
CloseTime = breakGround.CloseTime,
NextManId = breakGround.NextManId,
States = breakGround.States,
WorkAreaId=breakGround.WorkAreaId,
Reason=breakGround.Reason,
FireWatchManName=breakGround.FireWatchManName,
};
db.License_BreakGround.InsertOnSubmit(newBreakGround);
db.SubmitChanges();
@@ -602,6 +664,10 @@ namespace BLL
newBreakGround.CloseTime = breakGround.CloseTime;
newBreakGround.NextManId = breakGround.NextManId;
newBreakGround.States = breakGround.States;
newBreakGround.WorkAreaId = breakGround.WorkAreaId;
newBreakGround.Reason = breakGround.Reason;
newBreakGround.FireWatchManName = breakGround.FireWatchManName;
db.SubmitChanges();
}
}
@@ -771,6 +837,15 @@ namespace BLL
CloseTime = liftingWork.CloseTime,
NextManId = liftingWork.NextManId,
States = liftingWork.States,
WorkAreaId=liftingWork.WorkAreaId,
LiftingHeight=liftingWork.LiftingHeight,
FireWatchManName=liftingWork.FireWatchManName,
WorkLeaderName=liftingWork.WorkLeaderName,
WorkLeaderTel=liftingWork.WorkLeaderTel,
QzgName=liftingWork.QzgName,
QzgPhone=liftingWork.QzgPhone,
};
db.License_LiftingWork.InsertOnSubmit(newLiftingWork);
db.SubmitChanges();
@@ -802,6 +877,14 @@ namespace BLL
newLiftingWork.CloseTime = liftingWork.CloseTime;
newLiftingWork.NextManId = liftingWork.NextManId;
newLiftingWork.States = liftingWork.States;
newLiftingWork.WorkAreaId = liftingWork.WorkAreaId;
newLiftingWork.LiftingHeight = liftingWork.LiftingHeight;
newLiftingWork.FireWatchManName = liftingWork.FireWatchManName;
newLiftingWork.WorkLeaderName = liftingWork.WorkLeaderName;
newLiftingWork.WorkLeaderTel = liftingWork.WorkLeaderTel;
newLiftingWork.QzgName = liftingWork.QzgName;
newLiftingWork.QzgPhone = liftingWork.QzgPhone;
db.SubmitChanges();
}
}
@@ -828,6 +911,117 @@ namespace BLL
}
#endregion
#region
/// <summary>
/// 根据主键获取临时用电作业票
/// </summary>
/// <param name="ElectricityId"></param>
/// <returns></returns>
public static Model.License_Electricity GetElectricityById(string ElectricityId)
{
return Funs.DB.License_Electricity.FirstOrDefault(e => e.ElectricityId == ElectricityId);
}
/// <summary>
/// 添加临时用电作业票
/// </summary>
/// <param name="Electricity"></param>
public static void AddElectricity(Model.License_Electricity Electricity)
{
Model.SGGLDB db = Funs.DB;
Model.License_Electricity newElectricity = new Model.License_Electricity
{
ElectricityId = Electricity.ElectricityId,
ProjectId = Electricity.ProjectId,
LicenseCode = Electricity.LicenseCode,
ApplyUnitId = Electricity.ApplyUnitId,
ApplyManId = Electricity.ApplyManId,
ApplyDate = Electricity.ApplyDate,
WorkPalce = Electricity.WorkPalce,
WorkDepth = Electricity.WorkDepth,
ValidityStartTime = Electricity.ValidityStartTime,
ValidityEndTime = Electricity.ValidityEndTime,
WorkMeasures = Electricity.WorkMeasures,
CancelManId = Electricity.CancelManId,
CancelReasons = Electricity.CancelReasons,
CancelTime = Electricity.CancelTime,
CloseManId = Electricity.CloseManId,
CloseReasons = Electricity.CloseReasons,
CloseTime = Electricity.CloseTime,
NextManId = Electricity.NextManId,
States = Electricity.States,
WorkAreaId= Electricity.WorkAreaId,
Reason = Electricity.Reason,
FireWatchManName = Electricity.FireWatchManName,
WorkLeaderName = Electricity.WorkLeaderName,
WorkLeaderTel = Electricity.WorkLeaderTel,
};
db.License_Electricity.InsertOnSubmit(newElectricity);
db.SubmitChanges();
////增加一条编码记录
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectElectricityMenuId, Electricity.ProjectId, Electricity.ApplyUnitId, Electricity.ElectricityId, Electricity.ApplyDate);
}
/// <summary>
/// 修改临时用电作业票
/// </summary>
/// <param name="Electricity"></param>
public static void UpdateElectricity(Model.License_Electricity Electricity)
{
Model.SGGLDB db = Funs.DB;
Model.License_Electricity newElectricity = db.License_Electricity.FirstOrDefault(e => e.ElectricityId == Electricity.ElectricityId);
if (newElectricity != null)
{
newElectricity.WorkPalce = Electricity.WorkPalce;
newElectricity.WorkDepth = Electricity.WorkDepth;
newElectricity.ValidityStartTime = Electricity.ValidityStartTime;
newElectricity.ValidityEndTime = Electricity.ValidityEndTime;
newElectricity.WorkMeasures = Electricity.WorkMeasures;
newElectricity.CancelManId = Electricity.CancelManId;
newElectricity.CancelReasons = Electricity.CancelReasons;
newElectricity.CancelTime = Electricity.CancelTime;
newElectricity.CloseManId = Electricity.CloseManId;
newElectricity.CloseReasons = Electricity.CloseReasons;
newElectricity.CloseTime = Electricity.CloseTime;
newElectricity.NextManId = Electricity.NextManId;
newElectricity.States = Electricity.States;
newElectricity.WorkAreaId = Electricity.WorkAreaId;
newElectricity.Reason = Electricity.Reason;
newElectricity.FireWatchManName = Electricity.FireWatchManName;
newElectricity.WorkLeaderName = Electricity.WorkLeaderName;
newElectricity.WorkLeaderTel = Electricity.WorkLeaderTel;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除临时用电作业票
/// </summary>
/// <param name="ElectricityId"></param>
public static void DeleteElectricityById(string ElectricityId)
{
Model.SGGLDB db = Funs.DB;
Model.License_Electricity Electricity = db.License_Electricity.FirstOrDefault(e => e.ElectricityId == ElectricityId);
if (Electricity != null)
{
///删除编码表记录
CodeRecordsService.DeleteCodeRecordsByDataId(ElectricityId);
////删除附件
CommonService.DeleteAttachFileById(ElectricityId);
///删除-安全措施
DeleteLicenseItemByDataId(ElectricityId);
///删除作业票审核信息
DeleteFlowOperateByDataId(ElectricityId);
db.License_Electricity.DeleteOnSubmit(Electricity);
db.SubmitChanges();
}
}
#endregion
#endregion
#region -
+185 -1
View File
@@ -102,7 +102,7 @@ namespace BLL
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Manager_HSSELog newHSSELog =db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId);
Model.Manager_HSSELog newHSSELog = db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId);
if (newHSSELog != null)
{
newHSSELog.CompileDate = updateHSSELog.CompileDate;
@@ -980,5 +980,189 @@ namespace BLL
}
}
#endregion
#region
/// <summary>
/// 返回列表
/// </summary>
/// <param name="projectId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public static List<Model.HSSELogItem> getHSSELogDataList(string projectId, string userId,string CompileMan,string CompileDate)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
List<Model.HSSELogItem> getInfoList = new List<Model.HSSELogItem>();
getInfoList = (from x in db.Manager_HSSELog
join y in db.Sys_User on x.CompileMan equals y.UserId
join z in db.Sys_Const on x.Weather equals z.ConstValue
orderby x.CompileDate
where x.IsVisible != false && z.GroupId == BLL.ConstValue.Group_Weather && x.ProjectId == projectId
select new Model.HSSELogItem
{
HSSELogId = x.HSSELogId,
ProjectId = x.ProjectId,
CompileDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
CompileMan = x.CompileMan,
Weather = x.Weather,
IsVisible = x.IsVisible,
CompileManName = y.UserName,
WeatherName = z.ConstText
}).ToList();
Model.Project_ProjectUser projectUser = BLL.ProjectUserService.GetProjectUserByUserIdProjectId(projectId, userId);
if (projectUser != null)
{
if (projectUser.RoleId.Contains(BLL.Const.HSSEEngineer)) //项目安全工程师只能看到自己的日志内容
{
getInfoList = getInfoList.Where(x => x.CompileMan == userId).ToList();
}
}
if (!string.IsNullOrEmpty(CompileMan))
{
getInfoList = getInfoList.Where(x => x.CompileMan == CompileMan).ToList();
}
if (!string.IsNullOrEmpty(CompileDate))
{
getInfoList = getInfoList.Where(x => x.CompileDate == CompileDate).ToList();
}
return getInfoList;
}
}
public static Model.HSSELogItem getHSSELogData(string HSSELogId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.HSSELogItem model = new Model.HSSELogItem();
model = (from x in db.Manager_HSSELog
join y in db.Sys_User on x.CompileMan equals y.UserId
join z in db.Sys_Const on x.Weather equals z.ConstValue
orderby x.CompileDate
where x.IsVisible != false && z.GroupId == BLL.ConstValue.Group_Weather && x.HSSELogId == HSSELogId
select new Model.HSSELogItem
{
HSSELogId = x.HSSELogId,
ProjectId = x.ProjectId,
CompileDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
CompileMan = x.CompileMan,
Weather = x.Weather,
IsVisible = x.IsVisible,
CompileManName = y.UserName,
WeatherName = z.ConstText,
Content1 = x.Num11.ToString(),
Content2= x.Contents12,
Content3= x.Contents13,
Content4= x.Contents21,
Content5= x.Num21.ToString(),
Content6= x.Contents22,
Content7 = x.Num22.ToString(),
Content8 = x.Contents23,
Content9 = x.Num23.ToString(),
Content10 = x.Contents24,
Content11 = x.Num24.ToString(),
Content12 = x.Contents210,
Content13 = x.Num210.ToString(),
Content14 = x.Num211.ToString(),
Content15 = x.Contents31,
Content16 = x.Num31.ToString(),
Content17 = x.Contents32,
Content18 = x.Num32.ToString(),
Content19 = x.Contents41,
Content20 = x.Contents42
}).FirstOrDefault();
return model;
}
}
/// <summary>
/// 增加HSSE日志暨管理数据收集
/// </summary>
/// <param name="HSSELog">HSSE日志暨管理数据收集实体</param>
public static void AddHSSELogApi(Model.HSSELogItem HSSELog)
{
Model.Manager_HSSELog newHSSELog = new Model.Manager_HSSELog
{
HSSELogId = HSSELog.HSSELogId,
ProjectId = HSSELog.ProjectId,
CompileDate = Convert.ToDateTime(HSSELog.CompileDate),
CompileMan = HSSELog.CompileMan,
Weather = HSSELog.Weather,
IsVisible = HSSELog.IsVisible,
Num11 = Convert.ToInt32(HSSELog.Content1),
Contents12 = HSSELog.Content2,
Contents13 = HSSELog.Content3,
Contents21 = HSSELog.Content4,
Num21 = Convert.ToInt32(HSSELog.Content5),
Contents22 = HSSELog.Content6,
Num22 = Convert.ToInt32(HSSELog.Content7),
Contents23 = HSSELog.Content8,
Num23 = Convert.ToInt32(HSSELog.Content9),
Contents24 = HSSELog.Content10,
Num24 = Convert.ToInt32(HSSELog.Content11),
Contents210 = HSSELog.Content12,
Num210 = Convert.ToInt32(HSSELog.Content13),
Num211 = Convert.ToInt32(HSSELog.Content14),
Contents31 = HSSELog.Content15,
Num31 = Convert.ToInt32(HSSELog.Content16),
Contents32 = HSSELog.Content17,
Num32 = Convert.ToInt32(HSSELog.Content18),
Contents41 = HSSELog.Content19,
Contents42 = HSSELog.Content20
};
Funs.DB.Manager_HSSELog.InsertOnSubmit(newHSSELog);
Funs.DB.SubmitChanges();
}
/// <summary>
/// 修改HSSE日志暨管理数据收集
/// </summary>
/// <param name="updateHSSELog"></param>
public static void UpdateHSSELogApi(Model.HSSELogItem updateHSSELog)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Manager_HSSELog newHSSELog = db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId);
if (newHSSELog != null)
{
newHSSELog.CompileDate = Convert.ToDateTime(updateHSSELog.CompileDate);
newHSSELog.CompileMan = updateHSSELog.CompileMan;
newHSSELog.Weather = updateHSSELog.Weather;
newHSSELog.IsVisible = updateHSSELog.IsVisible;
newHSSELog.Num11 = Convert.ToInt32(updateHSSELog.Content1);
newHSSELog.Contents12 = updateHSSELog.Content2;
newHSSELog.Contents13 = updateHSSELog.Content3;
newHSSELog.Contents21 = updateHSSELog.Content4;
newHSSELog.Num21 = Convert.ToInt32(updateHSSELog.Content5);
newHSSELog.Contents22 = updateHSSELog.Content6;
newHSSELog.Num22 = Convert.ToInt32(updateHSSELog.Content7);
newHSSELog.Contents23 = updateHSSELog.Content8;
newHSSELog.Num23 = Convert.ToInt32(updateHSSELog.Content9);
newHSSELog.Contents24 = updateHSSELog.Content10;
newHSSELog.Num24 = Convert.ToInt32(updateHSSELog.Content11);
newHSSELog.Contents210 = updateHSSELog.Content12;
newHSSELog.Num210 = Convert.ToInt32(updateHSSELog.Content13);
newHSSELog.Num211 = Convert.ToInt32(updateHSSELog.Content14);
newHSSELog.Contents31 = updateHSSELog.Content15;
newHSSELog.Num31 = Convert.ToInt32(updateHSSELog.Content16);
newHSSELog.Contents32 = updateHSSELog.Content17;
newHSSELog.Num32 = Convert.ToInt32(updateHSSELog.Content18);
newHSSELog.Contents41 = updateHSSELog.Content19;
newHSSELog.Contents42 = updateHSSELog.Content20;
db.SubmitChanges();
}
}
}
#endregion
}
}
+4 -1
View File
@@ -397,7 +397,10 @@ namespace BLL
/// <returns>HSE人员的数量</returns>
public static int GetHSEPersonCountByUnitId(string unitId, string projectId)
{
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == true select x).ToList();
var q = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.UnitId == unitId && x.ProjectId == projectId && y.IsHsse==true && x.IsUsed == true select x).ToList();
//var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == true select x).ToList();
return q.Count();
}