提交集团数据穿透修改
This commit is contained in:
@@ -46,7 +46,8 @@ namespace BLL
|
||||
FileContent = accidentPersonRecord.FileContent,
|
||||
CompileMan = accidentPersonRecord.CompileMan,
|
||||
CompileDate = accidentPersonRecord.CompileDate,
|
||||
States = accidentPersonRecord.States
|
||||
States = accidentPersonRecord.States,
|
||||
IsAttempt= accidentPersonRecord.IsAttempt,
|
||||
};
|
||||
db.Accident_AccidentPersonRecord.InsertOnSubmit(newAccidentPersonRecord);
|
||||
db.SubmitChanges();
|
||||
@@ -77,6 +78,7 @@ namespace BLL
|
||||
newAccidentPersonRecord.CompileMan = accidentPersonRecord.CompileMan;
|
||||
newAccidentPersonRecord.CompileDate = accidentPersonRecord.CompileDate;
|
||||
newAccidentPersonRecord.States = accidentPersonRecord.States;
|
||||
newAccidentPersonRecord.IsAttempt= accidentPersonRecord.IsAttempt;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,6 +387,7 @@ namespace BLL
|
||||
NotConfirmWorkingHoursLoss = accidentReport.NotConfirmWorkingHoursLoss,
|
||||
NotConfirmEconomicLoss = accidentReport.NotConfirmEconomicLoss,
|
||||
NotConfirmEconomicOtherLoss = accidentReport.NotConfirmEconomicOtherLoss,
|
||||
AccidentDegree = accidentReport.AccidentDegree,
|
||||
NotConfirmed = accidentReport.NotConfirmed
|
||||
};
|
||||
db.Accident_AccidentReport.InsertOnSubmit(newAccidentReport);
|
||||
@@ -430,6 +431,7 @@ namespace BLL
|
||||
newAccidentReport.IsNotConfirm = accidentReport.IsNotConfirm;
|
||||
newAccidentReport.NotConfirmWorkingHoursLoss = accidentReport.NotConfirmWorkingHoursLoss;
|
||||
newAccidentReport.NotConfirmEconomicLoss = accidentReport.NotConfirmEconomicLoss;
|
||||
newAccidentReport.AccidentDegree = accidentReport.AccidentDegree;
|
||||
newAccidentReport.NotConfirmEconomicOtherLoss = accidentReport.NotConfirmEconomicOtherLoss;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace BLL
|
||||
x.PromptTime,
|
||||
x.Remark,
|
||||
x.WorkStage,
|
||||
x.Position,
|
||||
//HazardLevelName = (from y in db.Hazard_HazardLevel where y.HazardLevelId == x.HazardLevel select y.HazardLevelName).First(),
|
||||
};
|
||||
}
|
||||
@@ -72,6 +73,7 @@ namespace BLL
|
||||
x.PromptTime,
|
||||
x.Remark,
|
||||
x.WorkStage,
|
||||
x.Position,
|
||||
//HazardLevelName = (from y in db.Hazard_HazardLevel where y.HazardLevelId == x.HazardLevel select y.HazardLevelName).First(),
|
||||
};
|
||||
}
|
||||
@@ -104,6 +106,16 @@ namespace BLL
|
||||
return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardId == hazardId && x.HazardListId == hazardListId && x.WorkStage == workStage);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险源辨识与评价清单Id获取一个危险源辨识与评价清单审批信息
|
||||
/// </summary>
|
||||
/// <param name="hazardId">危险源辨识与评价清单Id</param>
|
||||
/// <returns>一个危险源辨识与评价清单审批实体</returns>
|
||||
public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardSelectedItemId(string hazardSelectedItemId)
|
||||
{
|
||||
return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardSelectedItemId == hazardSelectedItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险源辨识与评价清单Id获取一个危险源辨识与评价清单审批信息
|
||||
/// </summary>
|
||||
@@ -156,11 +168,13 @@ namespace BLL
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Hazard_HazardSelectedItem newHazardSelectedItem = new Model.Hazard_HazardSelectedItem
|
||||
{
|
||||
HazardSelectedItemId = hazardSelectedItem.HazardSelectedItemId,
|
||||
HazardId = hazardSelectedItem.HazardId,
|
||||
HazardListTypeId = hazardSelectedItem.HazardListTypeId,
|
||||
HazardListId = hazardSelectedItem.HazardListId,
|
||||
HazardItems = hazardSelectedItem.HazardItems,
|
||||
DefectsType = hazardSelectedItem.DefectsType,
|
||||
ProjectId = hazardSelectedItem.ProjectId,
|
||||
MayLeadAccidents = hazardSelectedItem.MayLeadAccidents,
|
||||
HelperMethod = hazardSelectedItem.HelperMethod,
|
||||
HazardJudge_L = hazardSelectedItem.HazardJudge_L,
|
||||
@@ -171,9 +185,12 @@ namespace BLL
|
||||
ControlMeasures = hazardSelectedItem.ControlMeasures,
|
||||
IsResponse = hazardSelectedItem.IsResponse,
|
||||
ResponseRecode = hazardSelectedItem.ResponseRecode,
|
||||
DutyPerson = hazardSelectedItem.DutyPerson,
|
||||
PromptTime = hazardSelectedItem.PromptTime,
|
||||
Remark = hazardSelectedItem.Remark,
|
||||
WorkStage = hazardSelectedItem.WorkStage
|
||||
State = hazardSelectedItem.State,
|
||||
WorkStage = hazardSelectedItem.WorkStage,
|
||||
Position = hazardSelectedItem.Position,
|
||||
};
|
||||
|
||||
Funs.DB.Hazard_HazardSelectedItem.InsertOnSubmit(newHazardSelectedItem);
|
||||
@@ -187,7 +204,7 @@ namespace BLL
|
||||
public static void UpdateHazardSelectedItem(Model.Hazard_HazardSelectedItem hazardSelectedItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Hazard_HazardSelectedItem newHazardSelectedItem = db.Hazard_HazardSelectedItem.FirstOrDefault(e => e.HazardId == hazardSelectedItem.HazardId && e.HazardListId == hazardSelectedItem.HazardListId && e.WorkStage == hazardSelectedItem.WorkStage);
|
||||
Model.Hazard_HazardSelectedItem newHazardSelectedItem = db.Hazard_HazardSelectedItem.FirstOrDefault(e => e.HazardSelectedItemId == hazardSelectedItem.HazardSelectedItemId);
|
||||
if (newHazardSelectedItem != null)
|
||||
{
|
||||
newHazardSelectedItem.HazardListTypeId = hazardSelectedItem.HazardListTypeId;
|
||||
@@ -204,9 +221,16 @@ namespace BLL
|
||||
newHazardSelectedItem.ControlMeasures = hazardSelectedItem.ControlMeasures;
|
||||
newHazardSelectedItem.IsResponse = hazardSelectedItem.IsResponse;
|
||||
newHazardSelectedItem.ResponseRecode = hazardSelectedItem.ResponseRecode;
|
||||
newHazardSelectedItem.DutyPerson = hazardSelectedItem.DutyPerson;
|
||||
newHazardSelectedItem.PromptTime = hazardSelectedItem.PromptTime;
|
||||
newHazardSelectedItem.Remark = hazardSelectedItem.Remark;
|
||||
newHazardSelectedItem.WorkStage = hazardSelectedItem.WorkStage;
|
||||
newHazardSelectedItem.CheckStartDate = hazardSelectedItem.CheckStartDate;
|
||||
newHazardSelectedItem.IsStart = hazardSelectedItem.IsStart;
|
||||
newHazardSelectedItem.State = hazardSelectedItem.State;
|
||||
newHazardSelectedItem.PlanExistDate = hazardSelectedItem.PlanExistDate;
|
||||
newHazardSelectedItem.QRCodeAttachUrl = hazardSelectedItem.QRCodeAttachUrl;
|
||||
newHazardSelectedItem.Position = hazardSelectedItem.Position;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -222,8 +246,30 @@ namespace BLL
|
||||
var q = (from x in db.Hazard_HazardSelectedItem where x.HazardListId == hazardListId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
foreach (var item in q)
|
||||
{
|
||||
var h = db.Hazard_RiskEvaluationRecord.Where(x => x.DataId == item.HazardSelectedItemId);
|
||||
if (h.Count() > 0)
|
||||
{
|
||||
db.Hazard_RiskEvaluationRecord.DeleteAllOnSubmit(h);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
var p = db.Hazard_PatrolPlan.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
|
||||
if (p.Count() > 0)
|
||||
{
|
||||
db.Hazard_PatrolPlan.DeleteAllOnSubmit(p);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
var r = db.Hazard_RoutingInspection.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
|
||||
if (r.Count() > 0)
|
||||
{
|
||||
db.Hazard_RoutingInspection.DeleteAllOnSubmit(r);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
db.Hazard_HazardSelectedItem.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 巡检计划表
|
||||
/// </summary>
|
||||
public static class Hazard_PatrolPlanService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据巡检计划ID获取巡检计划信息
|
||||
/// </summary>
|
||||
/// <param name="PatrolPlanName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Hazard_PatrolPlan GetPatrolPlanByPatrolPlanId(string PatrolPlanId)
|
||||
{
|
||||
return Funs.DB.Hazard_PatrolPlan.FirstOrDefault(e => e.PatrolPlanId == PatrolPlanId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据风险ID和巡检时限获取巡检计划信息
|
||||
/// </summary>
|
||||
/// <param name="PatrolPlanName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Hazard_PatrolPlan GetPatrolPlanByHazardSelectedItemIdAndLimitCheckDate(string hazardSelectedItemId, DateTime? limitCheckDate)
|
||||
{
|
||||
return Funs.DB.Hazard_PatrolPlan.FirstOrDefault(e => e.HazardSelectedItemId == hazardSelectedItemId && e.LimitCheckDate == limitCheckDate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据巡检日期获取之前未巡检计划信息集合
|
||||
/// </summary>
|
||||
/// <param name="PatrolPlanName"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Hazard_PatrolPlan> GetBeforePatrolPlansByCheckDate(string hazardSelectedItemId, DateTime checkDate)
|
||||
{
|
||||
return (from x in Funs.DB.Hazard_PatrolPlan where x.HazardSelectedItemId == hazardSelectedItemId && x.LimitCheckDate < checkDate select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安全巡检计划
|
||||
/// </summary>
|
||||
/// <param name="patrolPlan"></param>
|
||||
public static void AddPatrolPlan(Model.Hazard_PatrolPlan patrolPlan)
|
||||
{
|
||||
Model.Hazard_PatrolPlan newPatrolPlan = new Model.Hazard_PatrolPlan
|
||||
{
|
||||
PatrolPlanId = patrolPlan.PatrolPlanId,
|
||||
HazardSelectedItemId = patrolPlan.HazardSelectedItemId,
|
||||
HazardLevel = patrolPlan.HazardLevel,
|
||||
DutyPerson = patrolPlan.DutyPerson,
|
||||
Days = patrolPlan.Days,
|
||||
CheckStartDate = patrolPlan.CheckStartDate,
|
||||
LimitCheckDate = patrolPlan.LimitCheckDate,
|
||||
CheckDate = patrolPlan.CheckDate,
|
||||
State = patrolPlan.State
|
||||
};
|
||||
|
||||
Funs.DB.Hazard_PatrolPlan.InsertOnSubmit(newPatrolPlan);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改安全巡检计划
|
||||
/// </summary>
|
||||
/// <param name="patrolPlan"></param>
|
||||
public static void UpdatePatrolPlan(Model.Hazard_PatrolPlan patrolPlan)
|
||||
{
|
||||
Model.Hazard_PatrolPlan newPatrolPlan = Funs.DB.Hazard_PatrolPlan.FirstOrDefault(e => e.PatrolPlanId == patrolPlan.PatrolPlanId);
|
||||
if (newPatrolPlan != null)
|
||||
{
|
||||
newPatrolPlan.CheckDate = patrolPlan.CheckDate;
|
||||
newPatrolPlan.State = patrolPlan.State;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据巡检计划ID删除对应巡检计划记录信息
|
||||
/// </summary>
|
||||
/// <param name="superviseCheckReportId"></param>
|
||||
public static void DeletePatrolPlan(string PatrolPlanId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Hazard_PatrolPlan where x.PatrolPlanId == PatrolPlanId select x).FirstOrDefault();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Hazard_PatrolPlan.DeleteOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 巡检记录表
|
||||
/// </summary>
|
||||
public static class Hazard_RoutingInspectionService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据巡检记录ID获取巡检记录信息
|
||||
/// </summary>
|
||||
/// <param name="RoutingInspectionName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Hazard_RoutingInspection GetRoutingInspectionByRoutingInspectionId(string RoutingInspectionId)
|
||||
{
|
||||
return Funs.DB.Hazard_RoutingInspection.FirstOrDefault(e => e.RoutingInspectionId == RoutingInspectionId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据巡检计划ID获取巡检记录信息
|
||||
/// </summary>
|
||||
/// <param name="RoutingInspectionName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Hazard_RoutingInspection GetRoutingInspectionByPatrolPlanId(string PatrolPlanId)
|
||||
{
|
||||
return Funs.DB.Hazard_RoutingInspection.FirstOrDefault(e => e.PatrolPlanId == PatrolPlanId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安全巡检记录
|
||||
/// </summary>
|
||||
/// <param name="RoutingInspection"></param>
|
||||
public static void AddRoutingInspection(Model.Hazard_RoutingInspection RoutingInspection)
|
||||
{
|
||||
Model.Hazard_RoutingInspection newRoutingInspection = new Model.Hazard_RoutingInspection
|
||||
{
|
||||
RoutingInspectionId = RoutingInspection.RoutingInspectionId,
|
||||
HazardSelectedItemId = RoutingInspection.HazardSelectedItemId,
|
||||
PatrolManId = RoutingInspection.PatrolManId,
|
||||
PatrolTime = RoutingInspection.PatrolTime,
|
||||
PatrolResult = RoutingInspection.PatrolResult,
|
||||
OldRiskLevel = RoutingInspection.OldRiskLevel,
|
||||
PohotoUrl = RoutingInspection.PohotoUrl,
|
||||
ControlMeasures = RoutingInspection.ControlMeasures,
|
||||
DealReason = RoutingInspection.DealReason,
|
||||
RiskManId = RoutingInspection.RiskManId,
|
||||
PatrolPlanId = RoutingInspection.PatrolPlanId
|
||||
};
|
||||
|
||||
Funs.DB.Hazard_RoutingInspection.InsertOnSubmit(newRoutingInspection);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改安全巡检记录
|
||||
/// </summary>
|
||||
/// <param name="RoutingInspection"></param>
|
||||
public static void UpdateRoutingInspection(Model.Hazard_RoutingInspection RoutingInspection)
|
||||
{
|
||||
Model.Hazard_RoutingInspection newRoutingInspection = Funs.DB.Hazard_RoutingInspection.FirstOrDefault(e => e.RoutingInspectionId == RoutingInspection.RoutingInspectionId);
|
||||
if (newRoutingInspection != null)
|
||||
{
|
||||
newRoutingInspection.PatrolManId = RoutingInspection.PatrolManId;
|
||||
newRoutingInspection.PatrolTime = RoutingInspection.PatrolTime;
|
||||
newRoutingInspection.PatrolResult = RoutingInspection.PatrolResult;
|
||||
newRoutingInspection.OldRiskLevel = RoutingInspection.OldRiskLevel;
|
||||
newRoutingInspection.PohotoUrl = RoutingInspection.PohotoUrl;
|
||||
newRoutingInspection.ControlMeasures = RoutingInspection.ControlMeasures;
|
||||
newRoutingInspection.DealReason = RoutingInspection.DealReason;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据巡检记录ID删除对应巡检记录记录信息
|
||||
/// </summary>
|
||||
/// <param name="superviseCheckReportId"></param>
|
||||
public static void DeleteRoutingInspection(string RoutingInspectionId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Hazard_RoutingInspection where x.RoutingInspectionId == RoutingInspectionId select x).FirstOrDefault();
|
||||
if (q != null)
|
||||
{
|
||||
///删除附件
|
||||
BLL.CommonService.DeleteAttachFileById(RoutingInspectionId);
|
||||
Funs.DB.Hazard_RoutingInspection.DeleteOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class RiskEvaluationRecordService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取风险评价记录
|
||||
/// </summary>
|
||||
/// <param name="hazardId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Hazard_RiskEvaluationRecord GetRiskEvaluationRecordByLECItemRecordId(string LECItemRecordId)
|
||||
{
|
||||
return Funs.DB.Hazard_RiskEvaluationRecord.FirstOrDefault(e => e.LECItemRecordId == LECItemRecordId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据风险主键获取风险评价记录
|
||||
/// </summary>
|
||||
/// <param name="hazardId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Hazard_RiskEvaluationRecord GetRiskEvaluationRecordByDataIdAndEvaluatorDate(string dataId)
|
||||
{
|
||||
return Funs.DB.Hazard_RiskEvaluationRecord.FirstOrDefault(e => e.DataId == dataId && e.EvaluatorDate == null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据整理人获取风险评价记录
|
||||
/// </summary>
|
||||
/// <param name="compileMan"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Hazard_RiskEvaluationRecord> GetRiskEvaluationRecordByDataId(string dataId)
|
||||
{
|
||||
return (from x in Funs.DB.Hazard_RiskEvaluationRecord where x.DataId == dataId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加风险评价记录
|
||||
/// </summary>
|
||||
/// <param name="RiskEvaluationRecord"></param>
|
||||
public static void AddRiskEvaluationRecord(Model.Hazard_RiskEvaluationRecord RiskEvaluationRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Hazard_RiskEvaluationRecord newRiskEvaluationRecord = new Model.Hazard_RiskEvaluationRecord
|
||||
{
|
||||
LECItemRecordId = RiskEvaluationRecord.LECItemRecordId,
|
||||
DataId = RiskEvaluationRecord.DataId,
|
||||
DataType = RiskEvaluationRecord.DataType,
|
||||
Evaluatorld = RiskEvaluationRecord.Evaluatorld,
|
||||
EvaluatorDate = RiskEvaluationRecord.EvaluatorDate,
|
||||
L = RiskEvaluationRecord.L,
|
||||
E = RiskEvaluationRecord.E,
|
||||
C = RiskEvaluationRecord.C,
|
||||
D = RiskEvaluationRecord.D,
|
||||
RiskLevel = RiskEvaluationRecord.RiskLevel,
|
||||
ControlMeasures = RiskEvaluationRecord.ControlMeasures,
|
||||
Remark = RiskEvaluationRecord.Remark,
|
||||
};
|
||||
db.Hazard_RiskEvaluationRecord.InsertOnSubmit(newRiskEvaluationRecord);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改风险评价记录
|
||||
/// </summary>
|
||||
/// <param name="RiskEvaluationRecord"></param>
|
||||
public static void UpdateRiskEvaluationRecord(Model.Hazard_RiskEvaluationRecord RiskEvaluationRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Hazard_RiskEvaluationRecord newRiskEvaluationRecord = db.Hazard_RiskEvaluationRecord.FirstOrDefault(e => e.LECItemRecordId == RiskEvaluationRecord.LECItemRecordId);
|
||||
if (newRiskEvaluationRecord != null)
|
||||
{
|
||||
newRiskEvaluationRecord.DataId = RiskEvaluationRecord.DataId;
|
||||
newRiskEvaluationRecord.DataType = RiskEvaluationRecord.DataType;
|
||||
newRiskEvaluationRecord.Evaluatorld = RiskEvaluationRecord.Evaluatorld;
|
||||
newRiskEvaluationRecord.EvaluatorDate = RiskEvaluationRecord.EvaluatorDate;
|
||||
newRiskEvaluationRecord.L = RiskEvaluationRecord.L;
|
||||
newRiskEvaluationRecord.E = RiskEvaluationRecord.E;
|
||||
newRiskEvaluationRecord.C = RiskEvaluationRecord.C;
|
||||
newRiskEvaluationRecord.D = RiskEvaluationRecord.D;
|
||||
newRiskEvaluationRecord.RiskLevel = RiskEvaluationRecord.RiskLevel;
|
||||
newRiskEvaluationRecord.ControlMeasures = RiskEvaluationRecord.ControlMeasures;
|
||||
newRiskEvaluationRecord.Remark = RiskEvaluationRecord.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除风险评价记录
|
||||
/// </summary>
|
||||
/// <param name="LECItemRecordId"></param>
|
||||
public static void DeleteRiskEvaluationRecordByLECItemRecordId(string LECItemRecordId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Hazard_RiskEvaluationRecord RiskEvaluationRecord = db.Hazard_RiskEvaluationRecord.FirstOrDefault(e => e.LECItemRecordId == LECItemRecordId);
|
||||
if (RiskEvaluationRecord != null)
|
||||
{
|
||||
db.Hazard_RiskEvaluationRecord.DeleteOnSubmit(RiskEvaluationRecord);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,8 @@ namespace BLL
|
||||
RegistrationNum = equipmentInItem.RegistrationNum,
|
||||
OperationQualificationNum = equipmentInItem.OperationQualificationNum,
|
||||
InsuranceNum = equipmentInItem.InsuranceNum,
|
||||
CommercialInsuranceNum = equipmentInItem.CommercialInsuranceNum
|
||||
CommercialInsuranceNum = equipmentInItem.CommercialInsuranceNum,
|
||||
IsUsed = equipmentInItem.IsUsed,
|
||||
};
|
||||
db.InApproveManager_EquipmentInItem.InsertOnSubmit(newEquipmentItem);
|
||||
db.SubmitChanges();
|
||||
@@ -79,6 +80,7 @@ namespace BLL
|
||||
newEquipmentItem.OperationQualificationNum = equipmentInItem.OperationQualificationNum;
|
||||
newEquipmentItem.InsuranceNum = equipmentInItem.InsuranceNum;
|
||||
newEquipmentItem.CommercialInsuranceNum = equipmentInItem.CommercialInsuranceNum;
|
||||
newEquipmentItem.IsUsed = equipmentInItem.IsUsed;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,8 @@ namespace BLL
|
||||
SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId,
|
||||
SizeModel = generalEquipmentInItem.SizeModel,
|
||||
OwnerCheck = generalEquipmentInItem.OwnerCheck,
|
||||
CertificateNum = generalEquipmentInItem.CertificateNum
|
||||
CertificateNum = generalEquipmentInItem.CertificateNum,
|
||||
IsUsed = generalEquipmentInItem.IsUsed,
|
||||
};
|
||||
db.InApproveManager_GeneralEquipmentInItem.InsertOnSubmit(newEquipmentItem);
|
||||
db.SubmitChanges();
|
||||
@@ -65,6 +66,7 @@ namespace BLL
|
||||
newGeneralEquipmentInItem.SizeModel = generalEquipmentInItem.SizeModel;
|
||||
newGeneralEquipmentInItem.OwnerCheck = generalEquipmentInItem.OwnerCheck;
|
||||
newGeneralEquipmentInItem.CertificateNum = generalEquipmentInItem.CertificateNum;
|
||||
newGeneralEquipmentInItem.IsUsed = generalEquipmentInItem.IsUsed;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,8 @@ namespace BLL
|
||||
WorkAreaId = licenseManager.WorkAreaId,
|
||||
StartDate = licenseManager.StartDate,
|
||||
EndDate = licenseManager.EndDate,
|
||||
WorkStates=licenseManager.WorkStates,
|
||||
WorkStates = licenseManager.WorkStates,
|
||||
IsHighRisk = licenseManager.IsHighRisk,
|
||||
};
|
||||
db.License_LicenseManager.InsertOnSubmit(newLicenseManager);
|
||||
db.SubmitChanges();
|
||||
@@ -88,6 +89,7 @@ namespace BLL
|
||||
newLicenseManager.StartDate = licenseManager.StartDate;
|
||||
newLicenseManager.EndDate = licenseManager.EndDate;
|
||||
newLicenseManager.WorkStates = licenseManager.WorkStates;
|
||||
newLicenseManager.IsHighRisk = licenseManager.IsHighRisk;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -100,7 +102,7 @@ namespace BLL
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.License_LicenseManager licenseManager = db.License_LicenseManager.FirstOrDefault(e => e.LicenseManagerId == licenseManagerId);
|
||||
if (licenseManager!=null)
|
||||
if (licenseManager != null)
|
||||
{
|
||||
///删除编码表记录
|
||||
BLL.CodeRecordsService.DeleteCodeRecordsByDataId(licenseManagerId);
|
||||
@@ -110,7 +112,7 @@ namespace BLL
|
||||
if (flowOperate.Count() > 0)
|
||||
{
|
||||
BLL.CommonService.DeleteFlowOperateByID(licenseManager.LicenseManagerId); ////删除审核流程表
|
||||
}
|
||||
}
|
||||
db.License_LicenseManager.DeleteOnSubmit(licenseManager);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -14,6 +14,93 @@ namespace BLL
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 劳务人员列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count2
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.View_SitePerson_Person> getDataLists = from x in db.View_SitePerson_Person
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 数据列表
|
||||
/// </summary>
|
||||
/// <param name="projetcId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="workPostId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="idCard"></param>
|
||||
/// <param name="states"></param>
|
||||
/// <param name="Grid1"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string projetcId, string unitId, string workPostId, string name, string idCard, string states, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.View_SitePerson_Person> getDataList = getDataLists.OrderBy(x => x.ProjectId).ThenBy(x => x.UnitId);
|
||||
if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(e => e.ProjectId == projetcId);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(e => e.UnitId == unitId);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(workPostId) && workPostId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(e => e.WorkPostId == workPostId);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(states) && states != "-2")
|
||||
{
|
||||
getDataList = getDataList.Where(e => e.IsUsed == Convert.ToInt32(states));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
getDataList = getDataList.Where(e => e.PersonName.Contains(name));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(idCard))
|
||||
{
|
||||
getDataList = getDataList.Where(e => e.IdentityCard.Contains(idCard));
|
||||
}
|
||||
count2 = getDataList.Count();
|
||||
if (count2 == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in getDataList
|
||||
select new
|
||||
{
|
||||
x.PersonId,
|
||||
x.PersonName,
|
||||
x.CardNo,
|
||||
x.IdentityCard,
|
||||
x.Sex,
|
||||
x.SexName,
|
||||
x.UnitId,
|
||||
x.UnitName,
|
||||
x.WorkPostId,
|
||||
x.WorkPostName,
|
||||
x.ProjectId,
|
||||
ProjectName = db.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName,
|
||||
ShortName = db.Base_Project.First(u => u.ProjectId == x.ProjectId).ShortName,
|
||||
NativePlace = x.CountryName ?? "" + x.ProvinceName ?? "",
|
||||
x.TeamGroupId,
|
||||
x.TeamGroupName,
|
||||
x.InTime,
|
||||
x.OutTime,
|
||||
x.IsUsed,
|
||||
OutName = (x.IsUsed == 1 ? "是" : "否"),
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取人员信息
|
||||
/// </summary>
|
||||
@@ -278,6 +365,7 @@ namespace BLL
|
||||
Nation = person.Nation,
|
||||
CountryCode = person.CountryCode,
|
||||
ProvinceCode = person.ProvinceCode,
|
||||
IsSafetyMonitoring = person.IsSafetyMonitoring,
|
||||
IsCardNoOK = IDCardValid.CheckIDCard(person.IdentityCard),
|
||||
};
|
||||
|
||||
@@ -332,6 +420,7 @@ namespace BLL
|
||||
newPerson.PositionId = person.PositionId;
|
||||
newPerson.PostTitleId = person.PostTitleId;
|
||||
newPerson.PhotoUrl = person.PhotoUrl;
|
||||
newPerson.IsSafetyMonitoring = person.IsSafetyMonitoring;
|
||||
newPerson.HeadImage = person.HeadImage;
|
||||
newPerson.IsUsed = person.IsUsed;
|
||||
newPerson.IsCardUsed = person.IsCardUsed;
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace BLL
|
||||
RecardMan = largerHazard.RecardMan,
|
||||
Remark = largerHazard.Remark,
|
||||
States = largerHazard.States,
|
||||
TrainPersonNum = largerHazard.TrainPersonNum,
|
||||
IsSuperLargerHazard = largerHazard.IsSuperLargerHazard,
|
||||
Descriptions = largerHazard.Descriptions
|
||||
};
|
||||
|
||||
@@ -68,6 +70,8 @@ namespace BLL
|
||||
newLargerHazard.IsArgument = largerHazard.IsArgument;
|
||||
newLargerHazard.Remark = largerHazard.Remark;
|
||||
newLargerHazard.States = largerHazard.States;
|
||||
newLargerHazard.TrainPersonNum = largerHazard.TrainPersonNum;
|
||||
newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard;
|
||||
newLargerHazard.Descriptions = largerHazard.Descriptions;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user