Compare commits
No commits in common. "2c2e74569e1e2d1362c60ed4d731c372a6effa19" and "0ee8b65789df1e1338ca15ea771173690c906297" have entirely different histories.
2c2e74569e
...
0ee8b65789
@ -12142,11 +12142,7 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
GetUserInfo(departFist.PARENT_ID, ref user);
|
throw new Exception("未找到整改责任人对应组织的安全员和负责人,请确认基础配置已完善");
|
||||||
}
|
|
||||||
if (user == null)
|
|
||||||
{
|
|
||||||
throw new Exception("未找到整改责任人对应组织的安全员和负责人,也未配置安全总监,请确认基础配置已完善");
|
|
||||||
}
|
}
|
||||||
notice = new T_SK_HIDDEN_DANGER_RECTIFY_NOTICE();
|
notice = new T_SK_HIDDEN_DANGER_RECTIFY_NOTICE();
|
||||||
notice.ORG_ID = entity.ORG_ID;
|
notice.ORG_ID = entity.ORG_ID;
|
||||||
@ -12264,53 +12260,8 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 向上逐级找人,部门级负责人找不到直接给安全总监
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="departmentId"></param>
|
|
||||||
/// <param name="chargeId"></param>
|
|
||||||
private void GetUserInfo(Guid? departmentId, ref T_FM_USER userInfo)
|
|
||||||
{
|
|
||||||
var department = GetEntity<T_FM_DEPARTMENT>(t => t.ID == departmentId);
|
|
||||||
if (department != null)
|
|
||||||
{
|
|
||||||
if (department.DEPARTMENT_TYPE != (int)FMDepartmentType.Company)
|
|
||||||
{
|
|
||||||
userInfo = GetEntity<T_FM_USER>(t => t.DEPARTMENT_ID == department.ID && t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全员"));
|
|
||||||
if (userInfo == null)
|
|
||||||
{
|
|
||||||
if (department.USER_ID != null)
|
|
||||||
{
|
|
||||||
userInfo = GetEntity<T_FM_USER>(t => t.ID == department.USER_ID);
|
|
||||||
}
|
|
||||||
if (userInfo == null)
|
|
||||||
{
|
|
||||||
GetUserInfo(department.PARENT_ID, ref userInfo);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
userInfo = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
userInfo = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool BackUpdate_SKHiddenDangerRectifyRecord(T_PF_APPROVE entityInt, T_PF_APPROVE modelApp, List<T_PF_APPROVE_DETAIL> listAppDetail, T_FM_NOTIFICATION_TASK taskFinish, List<T_FM_NOTIFICATION_TASK> listTaskNext, bool isLast = false, bool isApprovel = true)
|
private bool BackUpdate_SKHiddenDangerRectifyRecord(T_PF_APPROVE entityInt, T_PF_APPROVE modelApp, List<T_PF_APPROVE_DETAIL> listAppDetail, T_FM_NOTIFICATION_TASK taskFinish, List<T_FM_NOTIFICATION_TASK> listTaskNext, bool isLast = false, bool isApprovel = true)
|
||||||
{
|
{
|
||||||
#region 审批公用
|
#region 审批公用
|
||||||
@ -13217,16 +13168,11 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
userId = departs.FirstOrDefault(t => t.ID == departUser.PARENT_ID)?.USER_ID;
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
if (userId != null)
|
||||||
if (user == null)
|
|
||||||
{
|
{
|
||||||
//总经理
|
//公司负责人
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
user = users.FirstOrDefault(t => t.ID == userId);
|
||||||
}
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
userId = user.ID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13262,16 +13208,11 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
userId = departs.FirstOrDefault(t => t.ID == departUserUp.PARENT_ID)?.USER_ID;
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
if (userId != null)
|
||||||
if (user == null)
|
|
||||||
{
|
{
|
||||||
//总经理
|
//公司负责人
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
user = users.FirstOrDefault(t => t.ID == userId);
|
||||||
}
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
userId = user.ID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13315,16 +13256,11 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
userId = departs.FirstOrDefault(t => t.ID == departUserUp.PARENT_ID)?.USER_ID;
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
if (userId != null)
|
||||||
if (user == null)
|
|
||||||
{
|
{
|
||||||
//总经理
|
//公司负责人
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
user = users.FirstOrDefault(t => t.ID == userId);
|
||||||
}
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
userId = user.ID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13623,16 +13559,11 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
userId = departs.FirstOrDefault(t => t.ID == departUser.PARENT_ID)?.USER_ID;
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
if (userId != null)
|
||||||
if (user == null)
|
|
||||||
{
|
{
|
||||||
//总经理
|
//公司负责人
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
user = users.FirstOrDefault(t => t.ID == userId);
|
||||||
}
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
userId = user.ID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13667,16 +13598,11 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
userId = departs.FirstOrDefault(t => t.ID == departUser.PARENT_ID)?.USER_ID;
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
if (userId != null)
|
||||||
if (user == null)
|
|
||||||
{
|
{
|
||||||
//总经理
|
//公司负责人
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
user = users.FirstOrDefault(t => t.ID == userId);
|
||||||
}
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
userId = user.ID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13714,16 +13640,11 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
userId = departs.FirstOrDefault(t => t.ID == departUser.PARENT_ID)?.USER_ID;
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
if (userId != null)
|
||||||
if (user == null)
|
|
||||||
{
|
{
|
||||||
//总经理
|
//公司负责人
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
user = users.FirstOrDefault(t => t.ID == userId);
|
||||||
}
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
userId = user.ID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14371,16 +14292,11 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
userId = departs.FirstOrDefault(t => t.ID == departUser.PARENT_ID)?.USER_ID;
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
if (userId != null)
|
||||||
if (user == null)
|
|
||||||
{
|
{
|
||||||
//总经理
|
//公司负责人
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
user = users.FirstOrDefault(t => t.ID == userId);
|
||||||
}
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
userId = user.ID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14415,16 +14331,11 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
userId = departs.FirstOrDefault(t => t.ID == departUser.PARENT_ID)?.USER_ID;
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
if (userId != null)
|
||||||
if (user == null)
|
|
||||||
{
|
{
|
||||||
//总经理
|
//公司负责人
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
user = users.FirstOrDefault(t => t.ID == userId);
|
||||||
}
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
userId = user.ID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14464,16 +14375,11 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
userId = departs.FirstOrDefault(t => t.ID == departUser.PARENT_ID)?.USER_ID;
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
if (userId != null)
|
||||||
if (user == null)
|
|
||||||
{
|
{
|
||||||
//总经理
|
//公司负责人
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
user = users.FirstOrDefault(t => t.ID == userId);
|
||||||
}
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
userId = user.ID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1854,12 +1854,11 @@ namespace APT.PP.WebApi.Controllers.Api
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
//找公司
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
var companyInfo = departs.FirstOrDefault(t => t.ID == departUser?.PARENT_ID);
|
||||||
if (user == null)
|
if (companyInfo != null && companyInfo.USER_ID != null)
|
||||||
{
|
{
|
||||||
//找总经理
|
user = users.FirstOrDefault(t => t.ID == companyInfo.USER_ID);
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2047,12 +2046,11 @@ namespace APT.PP.WebApi.Controllers.Api
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//安全总监
|
//找公司
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("安全总监"));
|
var companyInfo = departs.FirstOrDefault(t => t.ID == parentId);
|
||||||
if(user == null)
|
if (companyInfo != null && companyInfo.USER_ID != null)
|
||||||
{
|
{
|
||||||
//找总经理
|
user = users.FirstOrDefault(t => t.ID == companyInfo.USER_ID);
|
||||||
user = users.FirstOrDefault(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME.Contains("总经理"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,9 +56,9 @@ namespace APT.SK.WebApi.Controllers.Api
|
|||||||
entity.Nav_Evaluations = null;
|
entity.Nav_Evaluations = null;
|
||||||
entity.ApplyDepartmentName = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == departId).NAME;
|
entity.ApplyDepartmentName = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == departId).NAME;
|
||||||
entity.ApplyPostName = this.GetEntity<T_FM_USER>(t => t.ID == userId, "Nav_Person.Nav_Post")?.Nav_Person?.Nav_Post?.NAME;
|
entity.ApplyPostName = this.GetEntity<T_FM_USER>(t => t.ID == userId, "Nav_Person.Nav_Post")?.Nav_Person?.Nav_Post?.NAME;
|
||||||
if (entity.START_DATE.Value.Date < DateTime.Now.AddDays(3).Date)
|
if (entity.START_DATE < DateTime.Now.AddDays(3))
|
||||||
{
|
{
|
||||||
throw new Exception("辨识开始时间必须大于"+ DateTime.Now.AddDays(3).Date.ToString("yyyy-MM-dd"));
|
throw new Exception("辨识开始时间必须大于"+ DateTime.Now.AddDays(3));
|
||||||
}
|
}
|
||||||
List<Guid> deleteUserIds = new List<Guid>();
|
List<Guid> deleteUserIds = new List<Guid>();
|
||||||
List<Guid> deleteIds = new List<Guid>();
|
List<Guid> deleteIds = new List<Guid>();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user