提交代码
This commit is contained in:
@@ -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 作业票-安全措施
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user