1
This commit is contained in:
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentHandleService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取HSSE事故(含未遂)处理
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentPersonRecordService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取HSSE事故(对人员)记录
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentReportOtherService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故调查处理报告
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentReportService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故调查报告
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class NoFourLetoffService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取四不放过
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class Check_CheckColligationDetailService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据综合检查id获取所有相关明细信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class Check_CheckDayDetailService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据日常巡检id获取所有相关明细信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class Check_CheckSpecialDetailService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据专项检查id获取所有相关明细信息
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class Check_ProjectLeaderCheckService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取领导带班检查
|
||||
@@ -37,7 +37,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Check_ProjectLeaderCheck> getDataLists = from x in db.Check_ProjectLeaderCheck
|
||||
private static IQueryable<Model.Check_ProjectLeaderCheck> getDataLists = from x in Funs.DB.Check_ProjectLeaderCheck
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
@@ -48,6 +48,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string projectId, string startTime, string endTime, Grid Grid1)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
IQueryable<Model.Check_ProjectLeaderCheck> getDataList = getDataLists;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class IncentiveNoticeService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取奖励通知单
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class PunishNoticeService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取处罚通知单
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ViolationPersonService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取违规人员记录
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostManageItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除费用管理明细
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostManageService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全费用管理
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostSmallDetailItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全费用投入登记明细
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostSmallDetailService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全费用投入登记
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ExpenseService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取措施费用使用计划
|
||||
|
||||
@@ -8,7 +8,6 @@ namespace BLL
|
||||
{
|
||||
public class AccidentCaseItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据常见事故案例明细Id获取事故案例明细
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace BLL
|
||||
{
|
||||
public class AccidentCaseService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故伤害及预防
|
||||
|
||||
@@ -8,7 +8,6 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class CompanyTrainingItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取公司培训明细信息
|
||||
@@ -17,6 +16,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Training_CompanyTrainingItem GetCompanyTrainingItemById(string companyTrainingItemId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == companyTrainingItemId);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace BLL
|
||||
/// <param name="model"></param>
|
||||
public static void AddCompanyTrainingItem(Model.Training_CompanyTrainingItem model)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_CompanyTrainingItem newModel = new Model.Training_CompanyTrainingItem();
|
||||
newModel.CompanyTrainingItemId = model.CompanyTrainingItemId;
|
||||
newModel.CompanyTrainingId = model.CompanyTrainingId;
|
||||
@@ -49,6 +50,7 @@ namespace BLL
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCompanyTrainingItem(Model.Training_CompanyTrainingItem model)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_CompanyTrainingItem newModel = db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == model.CompanyTrainingItemId);
|
||||
if (newModel != null)
|
||||
{
|
||||
@@ -72,6 +74,7 @@ namespace BLL
|
||||
/// <param name="companyTrainItemId"></param>
|
||||
public static void DeleteCompanyTrainingItemById(string companyTrainItemId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_CompanyTrainingItem model = db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == companyTrainItemId);
|
||||
if (model != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,6 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EduTrain_TrainRecordDetailService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据教育培训主键获取所有的教育培训明细信息
|
||||
|
||||
@@ -11,8 +11,6 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EduTrain_TrainRecordService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据教育培训主键获取教育培训信息
|
||||
/// </summary>
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EduTrain_TrainTestService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据教育培训主键获取所有的教育培训明细信息
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TestPlanService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训计划
|
||||
@@ -26,6 +26,7 @@ namespace BLL
|
||||
/// <param name="testPlan"></param>
|
||||
public static void AddTestPlan(Model.Training_TestPlan testPlan)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestPlan newTestPlan = new Model.Training_TestPlan
|
||||
{
|
||||
TestPlanId = testPlan.TestPlanId,
|
||||
@@ -63,6 +64,7 @@ namespace BLL
|
||||
/// <param name="TestPlan"></param>
|
||||
public static void UpdateTestPlan(Model.Training_TestPlan TestPlan)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestPlan newTestPlan = db.Training_TestPlan.FirstOrDefault(e => e.TestPlanId == TestPlan.TestPlanId);
|
||||
if (newTestPlan != null)
|
||||
{
|
||||
@@ -93,7 +95,6 @@ namespace BLL
|
||||
/// <param name="TestPlanId"></param>
|
||||
public static void DeleteTestPlanById(string TestPlanId)
|
||||
{
|
||||
|
||||
var getTestPlan = GetTestPlanById(TestPlanId);
|
||||
if (getTestPlan != null)
|
||||
{
|
||||
@@ -138,6 +139,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_TestPlan> GetTestPlanList()
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Training_TestPlan orderby x.PlanCode select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TestRecordItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据考试记录Id获取明细信息
|
||||
@@ -28,6 +28,7 @@ namespace BLL
|
||||
/// <param name="planId"></param>
|
||||
public static void DeleteTestRecordItemmByTestRecordItemId(string testRecordItemId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var testRecordItem = db.Training_TestRecordItem.FirstOrDefault(x => x.TestRecordItemId == testRecordItemId);
|
||||
if (testRecordItem != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TestRecordService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取考试记录
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class TestTrainingItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace BLL
|
||||
{
|
||||
public static class TestTrainingService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
@@ -84,6 +83,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_TestTraining> GetTestTrainingList()
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Training_TestTraining orderby x.TrainingCode select x).ToList();
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_TestTraining> GetEndTestTrainingList()
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Training_TestTraining
|
||||
where x.IsEndLever == true
|
||||
orderby x.TrainingCode
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainTestDBItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除安全试题库明细信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainTestDBService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全试题库信息
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainTestRecordService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取考试记录
|
||||
|
||||
@@ -8,8 +8,6 @@ namespace BLL
|
||||
{
|
||||
public class TrainingItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainingPlanItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据培训计划明细表Id获取所有相关明细信息
|
||||
@@ -19,6 +19,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_PlanItem> GetPlanItemByPlanId(string planId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Training_PlanItem where x.PlanId == planId select x).ToList();
|
||||
}
|
||||
|
||||
@@ -28,6 +29,7 @@ namespace BLL
|
||||
/// <param name="planItem"></param>
|
||||
public static void AddPlanItem(Model.Training_PlanItem planItem)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_PlanItem newPlanItem = new Model.Training_PlanItem
|
||||
{
|
||||
PlanItemId = planItem.PlanItemId,
|
||||
@@ -47,6 +49,7 @@ namespace BLL
|
||||
/// <param name="model"></param>
|
||||
public static void UpdatePlanItem(Model.Training_PlanItem model)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_PlanItem newItem = db.Training_PlanItem.FirstOrDefault(e => e.PlanItemId == model.PlanItemId);
|
||||
if (newItem != null)
|
||||
{
|
||||
@@ -65,6 +68,7 @@ namespace BLL
|
||||
/// <param name="planItemId"></param>
|
||||
public static void DeletePlanItemById(string planItemId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var planItem = db.Training_PlanItem.FirstOrDefault(e => e.PlanItemId == planItemId);
|
||||
if (planItem != null)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainingPlanService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训计划
|
||||
@@ -20,6 +20,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Training_Plan GetPlanById(string planId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Training_Plan.FirstOrDefault(e => e.PlanId == planId);
|
||||
}
|
||||
|
||||
@@ -30,6 +31,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Training_Plan GetPlanByCheckId(string checkId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Training_Plan.FirstOrDefault(e => e.CheckId == checkId && e.IsRetakeCourse == 1);
|
||||
}
|
||||
|
||||
@@ -42,6 +44,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_Plan> GetThisYearPlanByCompanyTrainingItemId(string projectId, string itemId, int year)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var list = db.Training_Plan.Where(e => e.CompanyTrainingItemId == itemId && e.IsRetakeCourse != 1 && ((DateTime)e.DesignerDate).Year == year).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(projectId))
|
||||
{
|
||||
@@ -57,6 +60,7 @@ namespace BLL
|
||||
/// <param name="model"></param>
|
||||
public static void AddPlan(Model.Training_Plan model)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_Plan newModel = new Model.Training_Plan
|
||||
{
|
||||
PlanId = model.PlanId,
|
||||
@@ -92,6 +96,7 @@ namespace BLL
|
||||
/// <param name="model"></param>
|
||||
public static void UpdatePlan(Model.Training_Plan model)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_Plan isUpdate = Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == model.PlanId);
|
||||
if (isUpdate != null)
|
||||
{
|
||||
@@ -138,6 +143,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_Plan> GetPlanList()
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Training_Plan orderby x.PlanCode select x).ToList();
|
||||
}
|
||||
|
||||
@@ -149,6 +155,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_Plan> GetPlanListByWorkPostId(string projectId, string workPostId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var list = (from x in db.Training_Plan
|
||||
where x.ProjectId == projectId && (x.WorkPostId == null || x.WorkPostId.Contains(workPostId)) && x.CompanyTrainingItemId != null && x.IsRetakeCourse == null && Convert.ToDateTime(x.DesignerDate).Year == DateTime.Now.Year
|
||||
select x).ToList();
|
||||
@@ -161,6 +168,7 @@ namespace BLL
|
||||
/// <param name="info"></param>
|
||||
public static void RetakeCourseProducePlan(ProducePlanInfo info)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var plan = GetPlanByCheckId(info.CheckId);
|
||||
var person = PersonService.GetPersonById(info.PersonId);
|
||||
var companyTrainingItem = CompanyTrainingItemService.GetCompanyTrainingItemById(info.CompanyTrainingItemId);
|
||||
@@ -279,6 +287,7 @@ namespace BLL
|
||||
/// <param name="info"></param>
|
||||
public static void SelectCompanyTrainingItemProducePlan(ProducePlanInfo info)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var companyTrainingItem = CompanyTrainingItemService.GetCompanyTrainingItemById(info.CompanyTrainingItemId);
|
||||
var teachHour = companyTrainingItem.LearningTime / 3600;
|
||||
|
||||
@@ -407,6 +416,7 @@ namespace BLL
|
||||
/// <param name="info"></param>
|
||||
public static bool SelectPersonProducePlan(ProducePlanInfo info)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
//1、根据人员获取人员基本信息
|
||||
var person = PersonService.GetPersonById(info.PersonId);
|
||||
if (string.IsNullOrWhiteSpace(person.WorkPostId))
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public class TrainingService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据上级Id查询所有教育培训主键列的值
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainingTaskService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训任务
|
||||
@@ -20,6 +20,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Training_Task GetTaskById(string taskId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Training_Task.FirstOrDefault(e => e.TaskId == taskId);
|
||||
}
|
||||
|
||||
@@ -39,6 +40,7 @@ namespace BLL
|
||||
/// <param name="task"></param>
|
||||
public static void AddTask(Model.Training_Task task)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_Task newTask = new Model.Training_Task
|
||||
{
|
||||
TaskId = task.TaskId,
|
||||
@@ -75,6 +77,7 @@ namespace BLL
|
||||
/// <param name="taskId"></param>
|
||||
public static void DeleteTaskById(string taskId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_Task task = db.Training_Task.FirstOrDefault(e => e.TaskId == taskId);
|
||||
if (task != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class DrillRecordListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EmergencyListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急预案管理
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EmergencySupplyService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急物资管理
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EmergencyTeamAndTrainService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急队伍/培训
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EIAReportService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取环评报告
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EnvironmentalEmergencyPlanService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取环境事件应急预案
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EnvironmentalMonitoringService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取环境监测数据
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class UnexpectedEnvironmentalService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取突发环境事件
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class HSSEMainDutyService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全主体责任
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ServerSafetyInstitutionService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全制度
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class ConstructionRiskApproveService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取风险管控模板列表
|
||||
/// </summary>
|
||||
@@ -16,6 +16,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static DataTable getListData(string ConstructionRiskId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var res = from x in db.HSSE_ConstructionRiskApprove
|
||||
where x.ConstructionRiskId == ConstructionRiskId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
@@ -76,6 +77,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetSee(string ConstructionRiskId, string userId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string ConstructionRiskId, string userId)
|
||||
@@ -97,6 +99,7 @@ namespace BLL
|
||||
/// <returns>一个风险管控审批实体</returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetConstructionRiskApproveByConstructionRiskId(string ConstructionRiskId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
}
|
||||
/// <summary>
|
||||
@@ -162,6 +165,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetAudit1(string ConstructionRiskId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit1);
|
||||
}
|
||||
|
||||
@@ -172,6 +176,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetAudit2(string ConstructionRiskId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit2);
|
||||
}
|
||||
|
||||
@@ -182,11 +187,13 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetAudit3(string ConstructionRiskId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit3);
|
||||
}
|
||||
|
||||
public static Model.HSSE_ConstructionRiskApprove GetComplie(string ConstructionRiskId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Compile);
|
||||
}
|
||||
public static List<Model.HSSE_ConstructionRiskApprove> GetListDataByCodeForApi(string code)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionRiskCheckService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionRiskListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_EnvironmentalRiskItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险源明细表id得到明细信息
|
||||
@@ -136,6 +136,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Hazard_EnvironmentalRiskItem> GetEnvironmentalRiskItemByEnvironmentalId(string environmentalId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_EnvironmentalRiskItem where x.EnvironmentalId == environmentalId select x).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_EnvironmentalRiskListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_HazardListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
@@ -27,6 +27,7 @@ namespace BLL
|
||||
/// <returns>危险清单的数量</returns>
|
||||
public static int GetHazardListCountByVersionNoIsNull(string projectId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_HazardList where x.VersionNo == null && x.ProjectId == projectId select x).Count();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_HazardSelectedItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险源类别编号查询危险源类别
|
||||
@@ -17,6 +17,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getHazardSelectedItemByHazardListTypeId(string hazardListTypeId, string hazardListId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return from x in db.Hazard_HazardSelectedItem
|
||||
where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId
|
||||
select new
|
||||
@@ -51,6 +52,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getHazardSelectedItemByHazardListTypeId(string hazardListTypeId, string hazardListId, string workStage)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return from x in db.Hazard_HazardSelectedItem
|
||||
where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId && x.WorkStage == workStage
|
||||
select new
|
||||
@@ -84,6 +86,7 @@ namespace BLL
|
||||
/// <returns>危险因素明细集合</returns>
|
||||
public static List<Model.Hazard_HazardSelectedItem> GetHazardSelectedItemByHazardListTypeIdAndHazardListId(string hazardListTypeId, string hazardListId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId select x).ToList();
|
||||
}
|
||||
|
||||
@@ -93,6 +96,7 @@ namespace BLL
|
||||
/// <returns>危险因素明细集合</returns>
|
||||
public static List<Model.Hazard_HazardSelectedItem> GetPromptTimeIsNotNullHazardSelectedItemByHazardListTypeIdAndHazardListId(string hazardListTypeId, string hazardListId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId && x.PromptTime != null select x).ToList();
|
||||
}
|
||||
|
||||
@@ -103,6 +107,7 @@ namespace BLL
|
||||
/// <returns>一个危险源辨识与评价清单审批实体</returns>
|
||||
public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardId(string hazardId, string hazardListId, string workStage)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardId == hazardId && x.HazardListId == hazardListId && x.WorkStage == workStage);
|
||||
}
|
||||
|
||||
@@ -113,6 +118,7 @@ namespace BLL
|
||||
/// <returns>一个危险源辨识与评价清单审批实体</returns>
|
||||
public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardSelectedItemId(string hazardSelectedItemId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardSelectedItemId == hazardSelectedItemId);
|
||||
}
|
||||
|
||||
@@ -123,6 +129,7 @@ namespace BLL
|
||||
/// <returns>一个危险源辨识与评价清单审批实体</returns>
|
||||
public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardId(string hazardId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardId == hazardId);
|
||||
}
|
||||
|
||||
@@ -156,6 +163,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Hazard_HazardSelectedItem> GetHazardSelectedItemBySortAndListIdAndWorkStage(string hazardListTypeId, string hazardListId, string workStage)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId && x.WorkStage == workStage select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class HSSE_Hazard_HazardRegisterService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险观察登记主键获取危险观察登记信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentInItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备机具入场报批明细信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentInService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备机具入场报批
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentOutItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备机具出场报批明细
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentOutService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备机具出场报批
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentQualityInItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表ID获取明细信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentQualityInService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备审批
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class GeneralEquipmentInItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取一般设备机具入场报批明细信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class GeneralEquipmentInService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取一般设备机具入场报批
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class GeneralEquipmentOutItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取一般设备机具出场报批
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class GeneralEquipmentOutService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取一般设备机具出场报批
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionStandardIdentifyService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据标准规范辨识主键获取一个标准规范辨识信息
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionStandardSelectedItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据标准规范辨识Id获取对应所有标准规范项信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectAccidentCauseReportItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 职工伤亡事故原因分析报表明细表
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectAccidentCauseReportService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 职工伤亡事故原因分析报表
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectDrillConductedQuarterlyReportItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练开展情况季报表明细信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectDrillConductedQuarterlyReportService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练开展情况季报表
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectDrillPlanHalfYearReportItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练工作计划半年报明细信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectDrillPlanHalfYearReportService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练工作计划半年报
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectMillionsMonthlyReportService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取企业安全数据统计月报
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectSafetyQuarterlyReportService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全生产数据季报
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public class HSSEStandardsListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据id查询标准规范信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class LawRegulationListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取法律法规
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ManageRuleService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取管理规定
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class RulesRegulationsService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取生产规章制度
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class HSETechnicalService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全技术交底
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class LicenseManagerService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全许可证
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class LicensePublicService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 状态下拉框
|
||||
/// </summary>
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CompletionReportService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取完工报告
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public class HeadMonthReportBService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据安全统计主键获取安全统计信息
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentReport2Service
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故调查报告
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class AccidentSortBService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
public static Model.Manager_AccidentSortB GetAccidentSortsByMonthReportIdAndAccidentType(string monthReportId, string accidentType)
|
||||
{
|
||||
@@ -101,6 +101,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteAccidentSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_AccidentSortB where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_AccidentSortB.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class CheckSortBService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键获取所有月报告HSE检查情况信息
|
||||
@@ -75,6 +75,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteCheckSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_CheckSortB where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_CheckSortB.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
{
|
||||
public class CostStatisticService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
@@ -23,7 +23,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.TC_CostStatistic> cost = from x in db.TC_CostStatistic orderby x.CostStatisticCode descending select x;
|
||||
private static IQueryable<Model.TC_CostStatistic> cost = from x in Funs.DB.TC_CostStatistic orderby x.CostStatisticCode descending select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class IncentiveSortBService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
public static Model.Manager_IncentiveSortB GetIncentiveSortByMonthReportIdAndIncentiveType(string monthReportId, string incentiveType)
|
||||
{
|
||||
@@ -77,6 +77,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteIncentiveSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_IncentiveSortB where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_IncentiveSortB.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public class ManhoursSortBService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
@@ -16,6 +16,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return from x in db.Manager_ManhoursSortB
|
||||
where x.MonthReportId == monthReportId
|
||||
orderby x.UnitId
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class MeetingSortBService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键获取所有月报告HSE会议情况信息
|
||||
@@ -78,6 +78,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteMeetingSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_MeetingSortB where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_MeetingSortB.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class TrainSortBService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键获取所有月报告HSE培训情况信息
|
||||
@@ -75,6 +75,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteTrainSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_TrainSortB where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_TrainSortB.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class AccidentSortCService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
public static Model.Manager_AccidentSortC GetAccidentSortsByMonthReportIdAndAccidentType(string monthReportId, string accidentType)
|
||||
{
|
||||
@@ -89,6 +89,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteAccidentSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_AccidentSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_AccidentSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class ActivityDesCService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报Id获取相关所有活动情况说明信息
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class CheckDetailSortCService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键获取所有月报告HSE检查明细情况信息
|
||||
@@ -53,6 +53,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteCheckDetailSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_CheckDetailSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_CheckDetailSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class CheckSortCService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键获取所有月报告HSE检查情况信息
|
||||
@@ -77,6 +77,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteCheckSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_CheckSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_CheckSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class DrillSortCService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键获取所有月报告应急演练信息
|
||||
@@ -48,6 +48,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteDrillSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_DrillSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_DrillSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class EmergencySortCService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键获取所有月报告应急预案信息
|
||||
@@ -48,6 +48,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteEmergencySortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_EmergencySortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_EmergencySortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class HazardSortCService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键获取所有月报告危险源信息
|
||||
@@ -48,6 +48,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteHazardSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_HazardSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_HazardSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public class HseCostCService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
@@ -16,6 +16,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return from x in db.Manager_HseCostC
|
||||
where x.MonthReportId == monthReportId
|
||||
orderby x.UnitId
|
||||
@@ -77,6 +78,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteHseCostsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_HseCostC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_HseCostC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class IncentiveSortCService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
public static List<Model.Manager_IncentiveSortC> GetIncentiveSortsByMonthReportIdAndBigType(string monthReportId, string bigType)
|
||||
{
|
||||
@@ -67,6 +67,7 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteIncentiveSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Manager_IncentiveSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_IncentiveSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user