This commit is contained in:
2023-09-20 13:55:48 +08:00
82 changed files with 12597 additions and 3704 deletions
@@ -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();
}