合并最新
This commit is contained in:
@@ -113,11 +113,11 @@ namespace BLL
|
||||
var q = (from x in db.Check_CheckSpecialDetail where x.CheckSpecialId == checkSpecialId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
foreach (var item in q)
|
||||
{
|
||||
////删除附件表
|
||||
BLL.CommonService.DeleteAttachFileById(item.CheckSpecialDetailId);
|
||||
}
|
||||
//foreach (var item in q)
|
||||
//{
|
||||
// ////删除附件表
|
||||
// BLL.CommonService.DeleteAttachFileById(item.CheckSpecialDetailId);
|
||||
//}
|
||||
db.Check_CheckSpecialDetail.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class EduTrain_TaskNoticeService
|
||||
{
|
||||
|
||||
public static Model.EduTrain_TaskNotice GetEduTrain_TaskNoticeById(string TaskNoticeId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(TaskNoticeId))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Funs.DB.EduTrain_TaskNotice.FirstOrDefault(e => e.TaskNoticeId == TaskNoticeId);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void AddEduTrain_TaskNotice(Model.EduTrain_TaskNotice newtable)
|
||||
{
|
||||
Model.EduTrain_TaskNotice table = new Model.EduTrain_TaskNotice();
|
||||
table.TaskNoticeId = newtable.TaskNoticeId;
|
||||
table.CycleStartDate = newtable.CycleStartDate;
|
||||
table.CycleEndDate = newtable.CycleEndDate;
|
||||
table.TrainContent = newtable.TrainContent;
|
||||
table.CreatMan = newtable.CreatMan;
|
||||
table.CreatDate = newtable.CreatDate;
|
||||
table.TrainTitle = newtable.TrainTitle;
|
||||
table.TrainType = newtable.TrainType;
|
||||
table.TeachHour = newtable.TeachHour;
|
||||
table.Units = newtable.Units;
|
||||
table.TeachAddress = newtable.TeachAddress;
|
||||
table.TeachMan = newtable.TeachMan;
|
||||
table.TrainStartDate = newtable.TrainStartDate;
|
||||
table.Cycle = newtable.Cycle;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.AheadOfTime = newtable.AheadOfTime;
|
||||
table.DayOfWeek = newtable.DayOfWeek;
|
||||
table.WeekOfMonth = newtable.WeekOfMonth;
|
||||
table.State = newtable.State;
|
||||
|
||||
Funs.DB.EduTrain_TaskNotice.InsertOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateEduTrain_TaskNotice(Model.EduTrain_TaskNotice newtable)
|
||||
{
|
||||
Model.EduTrain_TaskNotice table = Funs.DB.EduTrain_TaskNotice.FirstOrDefault(e => e.TaskNoticeId == newtable.TaskNoticeId);
|
||||
|
||||
if (table != null)
|
||||
{
|
||||
table.TaskNoticeId = newtable.TaskNoticeId;
|
||||
table.CycleStartDate = newtable.CycleStartDate;
|
||||
table.CycleEndDate = newtable.CycleEndDate;
|
||||
table.TrainContent = newtable.TrainContent;
|
||||
table.CreatMan = newtable.CreatMan;
|
||||
table.CreatDate = newtable.CreatDate;
|
||||
table.TrainTitle = newtable.TrainTitle;
|
||||
table.TrainType = newtable.TrainType;
|
||||
table.TeachHour = newtable.TeachHour;
|
||||
table.Units = newtable.Units;
|
||||
table.TeachAddress = newtable.TeachAddress;
|
||||
table.TeachMan = newtable.TeachMan;
|
||||
table.TrainStartDate = newtable.TrainStartDate;
|
||||
table.Cycle = newtable.Cycle;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.AheadOfTime = newtable.AheadOfTime;
|
||||
table.DayOfWeek = newtable.DayOfWeek;
|
||||
table.WeekOfMonth = newtable.WeekOfMonth;
|
||||
table.State = newtable.State;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteEduTrain_TaskNoticeById(string TaskNoticeId)
|
||||
{
|
||||
Model.EduTrain_TaskNotice table = Funs.DB.EduTrain_TaskNotice.FirstOrDefault(e => e.TaskNoticeId == TaskNoticeId);
|
||||
if (table != null)
|
||||
{
|
||||
Funs.DB.EduTrain_TaskNotice.DeleteOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,8 @@ namespace BLL
|
||||
TestType = TestTrainingItem.TestType,
|
||||
WorkPostIds = TestTrainingItem.WorkPostIds,
|
||||
WorkPostNames = TestTrainingItem.WorkPostNames,
|
||||
DepartIds = TestTrainingItem.DepartIds,
|
||||
DepartNames = TestTrainingItem.DepartNames,
|
||||
AItem = TestTrainingItem.AItem,
|
||||
BItem = TestTrainingItem.BItem,
|
||||
CItem = TestTrainingItem.CItem,
|
||||
@@ -68,6 +70,8 @@ namespace BLL
|
||||
newTestTrainingItem.TestType = TestTrainingItem.TestType;
|
||||
newTestTrainingItem.WorkPostIds = TestTrainingItem.WorkPostIds;
|
||||
newTestTrainingItem.WorkPostNames = TestTrainingItem.WorkPostNames;
|
||||
newTestTrainingItem.DepartIds = TestTrainingItem.DepartIds;
|
||||
newTestTrainingItem.DepartNames = TestTrainingItem.DepartNames;
|
||||
newTestTrainingItem.AItem = TestTrainingItem.AItem;
|
||||
newTestTrainingItem.BItem = TestTrainingItem.BItem;
|
||||
newTestTrainingItem.CItem = TestTrainingItem.CItem;
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace BLL
|
||||
FileContent = completionReport.FileContent,
|
||||
CompileMan = completionReport.CompileMan,
|
||||
CompileDate = completionReport.CompileDate,
|
||||
Remark = completionReport.Remark,
|
||||
States = completionReport.States
|
||||
};
|
||||
db.Manager_CompletionReport.InsertOnSubmit(newCompletionReport);
|
||||
@@ -60,6 +61,7 @@ namespace BLL
|
||||
newCompletionReport.CompileMan = completionReport.CompileMan;
|
||||
newCompletionReport.CompileDate = completionReport.CompileDate;
|
||||
newCompletionReport.States = completionReport.States;
|
||||
newCompletionReport.Remark = completionReport.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace BLL
|
||||
/// <returns>人员的数量</returns>
|
||||
public static int GetPersonCountByUnitId(string unitId, string projectId)
|
||||
{
|
||||
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.IsUsed == true select x).ToList();
|
||||
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.IsUsed == 1 select x).ToList();
|
||||
return q.Count();
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ 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 where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == 1 select x).ToList();
|
||||
return q.Count();
|
||||
}
|
||||
|
||||
@@ -519,6 +519,27 @@ namespace BLL
|
||||
return (from x in Funs.DB.SitePerson_Person where x.WorkAreaId == workAreaId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 人员离岗
|
||||
/// </summary>
|
||||
/// <param name="person"></param>
|
||||
public static void PersonOut(string personId, DateTime date)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var person = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == personId);
|
||||
if (person != null)
|
||||
{
|
||||
person.OutTime = date;
|
||||
person.IsUsed = 1;
|
||||
person.ExchangeTime = null;
|
||||
person.ExchangeTime2 = null;
|
||||
person.RealNameUpdateTime = null;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 表下拉框
|
||||
/// <summary>
|
||||
/// 表下拉框
|
||||
@@ -592,7 +613,7 @@ namespace BLL
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.SitePerson_Person> getInPersonLists = from x in db.SitePerson_Person
|
||||
where x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now)
|
||||
where x.IsUsed == 1 && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now)
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -110,6 +110,11 @@ namespace BLL
|
||||
public static void AddLargerHazardList(Model.Solution_LargerHazardList LargerHazardList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string code= CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectExpertArgumentMenuId, LargerHazardList.ProjectId, null, LargerHazardList.LargerHazardListId, LargerHazardList.RecordTime);
|
||||
if (string.IsNullOrEmpty(LargerHazardList.HazardCode))
|
||||
{
|
||||
LargerHazardList.HazardCode = code;
|
||||
}
|
||||
Model.Solution_LargerHazardList newLargerHazardList = new Model.Solution_LargerHazardList
|
||||
{
|
||||
LargerHazardListId = LargerHazardList.LargerHazardListId,
|
||||
@@ -124,7 +129,7 @@ namespace BLL
|
||||
db.Solution_LargerHazardList.InsertOnSubmit(newLargerHazardList);
|
||||
db.SubmitChanges();
|
||||
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectExpertArgumentMenuId, LargerHazardList.ProjectId, null, LargerHazardList.LargerHazardListId, LargerHazardList.RecordTime);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -163,11 +168,7 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
#region 危大工程清单明细
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static List<Model.View_Solution_LargerHazardListItem> getViewLargerHazardListItem = new List<Model.View_Solution_LargerHazardListItem>();
|
||||
#region 危大工程清单明细
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取危大工程清单明细
|
||||
|
||||
@@ -43,6 +43,19 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据方案审查Id删除一个方案审查信息
|
||||
/// </summary>
|
||||
/// <param name="constructSolutionCode">方案审查Id</param>
|
||||
public static void DeleteConstructSolutionByCQMSConstructSolutionId(string CQMSConstructSolutionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Solution_HSSEConstructSolution constructSolution = db.Solution_HSSEConstructSolution.First(e => e.CQMSConstructSolutionId == CQMSConstructSolutionId);
|
||||
|
||||
db.Solution_HSSEConstructSolution.DeleteOnSubmit(constructSolution);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加方案审查信息
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user