升级
This commit is contained in:
@@ -40,7 +40,9 @@ namespace BLL
|
||||
Remark = carManager.Remark,
|
||||
CompileMan = carManager.CompileMan,
|
||||
CompileDate = carManager.CompileDate,
|
||||
States = carManager.States
|
||||
States = carManager.States,
|
||||
InOutState = carManager.InOutState,
|
||||
|
||||
};
|
||||
Funs.DB.Administrative_CarManager.InsertOnSubmit(newCarManager);
|
||||
Funs.DB.SubmitChanges();
|
||||
@@ -67,6 +69,7 @@ namespace BLL
|
||||
newCarManager.CompileMan = carManager.CompileMan;
|
||||
newCarManager.CompileDate = carManager.CompileDate;
|
||||
newCarManager.States = carManager.States;
|
||||
newCarManager.InOutState = carManager.InOutState;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ namespace BLL
|
||||
newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
|
||||
newHazardRegister.Requirements = hazardRegister.Requirements;
|
||||
newHazardRegister.ControlId = hazardRegister.ControlId;
|
||||
newHazardRegister.PunishPerson = hazardRegister.PunishPerson;
|
||||
|
||||
newHazardRegister.CheckItemDetailId = hazardRegister.CheckItemDetailId;
|
||||
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newHazardRegister);
|
||||
@@ -118,6 +119,8 @@ namespace BLL
|
||||
newHazardRegister.RegisterTypesId = hazardRegister.RegisterTypesId;
|
||||
newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
|
||||
newHazardRegister.Requirements = hazardRegister.Requirements;
|
||||
newHazardRegister.PunishPerson = hazardRegister.PunishPerson;
|
||||
|
||||
newHazardRegister.IsUpdate = null;
|
||||
//把附件表的路径复制过来
|
||||
Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId);
|
||||
@@ -222,5 +225,28 @@ namespace BLL
|
||||
{
|
||||
return (from x in Funs.DB.HSSE_Hazard_HazardRegister where x.CheckTime >= startTime && x.CheckTime < endTime && x.ProjectId == projectId select x).Count();
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据危险观察登记主键删除一个危险观察登记信息
|
||||
/// </summary>
|
||||
/// <param name="hazardRegisterId">危险观察登记主键</param>
|
||||
public static void DeleteHazardRegisterByCheckSpecialId(string checkSpecialId)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
List<Model.HSSE_Hazard_HazardRegister> hazardRegisters = db.HSSE_Hazard_HazardRegister.Where(e => e.CheckSpecialId == checkSpecialId).ToList();
|
||||
if (hazardRegisters.Count > 0)
|
||||
{
|
||||
foreach (var hazardRegister in hazardRegisters)
|
||||
{
|
||||
if (hazardRegister.IsUpdate != true)
|
||||
{
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, hazardRegister.ImageUrl);//删除整改前图片
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, hazardRegister.RectificationImageUrl);//删除整改后图片
|
||||
db.HSSE_Hazard_HazardRegister.DeleteOnSubmit(hazardRegister);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,9 @@ namespace BLL
|
||||
AttachUrl = promotionalActivities.AttachUrl,
|
||||
CompileMan = promotionalActivities.CompileMan,
|
||||
CompileDate = System.DateTime.Now,
|
||||
States = promotionalActivities.States
|
||||
States = promotionalActivities.States,
|
||||
ActivityTypeId = promotionalActivities.ActivityTypeId,
|
||||
|
||||
};
|
||||
Funs.DB.InformationProject_PromotionalActivities.InsertOnSubmit(newPromotionalActivities);
|
||||
Funs.DB.SubmitChanges();
|
||||
@@ -93,6 +95,8 @@ namespace BLL
|
||||
newPromotionalActivities.CompileMan = promotionalActivities.CompileMan;
|
||||
newPromotionalActivities.CompileDate = promotionalActivities.CompileDate;
|
||||
newPromotionalActivities.States = promotionalActivities.States;
|
||||
newPromotionalActivities.ActivityTypeId = promotionalActivities.ActivityTypeId;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,6 +592,8 @@ namespace BLL
|
||||
Languages = person.Languages,
|
||||
PersonStates = person.PersonStates,
|
||||
IsUsedType = person.IsUsedType,
|
||||
IsTrain = person.IsTrain,
|
||||
|
||||
};
|
||||
|
||||
if (person.InTime.HasValue)
|
||||
@@ -694,6 +696,8 @@ namespace BLL
|
||||
newPerson.Major = person.Major;
|
||||
newPerson.Languages = person.Languages;
|
||||
newPerson.PersonStates = person.PersonStates;
|
||||
newPerson.IsTrain = person.IsTrain;
|
||||
|
||||
db.SubmitChanges();
|
||||
|
||||
//Project_HSSEData_HSSEService.StatisticalData(newPerson.ProjectId, Project_HSSEData_HSSEService.HSSEDateType.ProjectInformation);
|
||||
@@ -1330,5 +1334,25 @@ namespace BLL
|
||||
return personId;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static void UpdatePersonTypeByProjectIdAndIdentityCard(string projectId,string identityCard)
|
||||
{
|
||||
|
||||
var persons = Funs.DB.SitePerson_Person.Where(x => x.IdentityCard == identityCard).ToList();
|
||||
|
||||
foreach (var item in persons)
|
||||
{
|
||||
if (item.ProjectId != projectId && item.IsUsed == true)
|
||||
{
|
||||
item.IsUsed = false;
|
||||
item.OutTime = DateTime.Now;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,9 @@ namespace BLL
|
||||
TrainPersonNum = largerHazard.TrainPersonNum,
|
||||
IsSuperLargerHazard = largerHazard.IsSuperLargerHazard,
|
||||
Descriptions = largerHazard.Descriptions,
|
||||
OperativesNum = largerHazard.OperativesNum
|
||||
OperativesNum = largerHazard.OperativesNum,
|
||||
ApprovalState = largerHazard.ApprovalState,
|
||||
|
||||
};
|
||||
|
||||
db.Solution_LargerHazard.InsertOnSubmit(newLargerHazard);
|
||||
@@ -78,6 +80,8 @@ namespace BLL
|
||||
newLargerHazard.Descriptions = largerHazard.Descriptions;
|
||||
newLargerHazard.IsUpdate = null;
|
||||
newLargerHazard.OperativesNum = largerHazard.OperativesNum;
|
||||
newLargerHazard.ApprovalState = largerHazard.ApprovalState;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user