This commit is contained in:
wjn 2024-04-10 14:41:50 +08:00
commit 20b2de466f
9 changed files with 26 additions and 20 deletions

View File

@ -1899,7 +1899,7 @@ namespace APT.BaseData.Services.DomainServices
}); });
} }
var user = this.GetEntity<T_FM_USER>(t => t.ENABLE_STATUS == (int)FMEnableStatusEnum. && t.ID == tech.DISCLOSURE_PERSON_ID); var user = this.GetEntity<T_FM_USER>(t => t.ENABLE_STATUS == (int)FMEnableStatusEnum. && t.ID == entity.APPLY_USER_ID);
//发消息 //发消息
DateTime dtEnd = NotificationTaskService.GetTaskEndTime(FMTASKTYPE.JobSite, entity.ORG_ID.Value, DateTime.Now, null, null); DateTime dtEnd = NotificationTaskService.GetTaskEndTime(FMTASKTYPE.JobSite, entity.ORG_ID.Value, DateTime.Now, null, null);
notices.Add(NotificationTaskService.InsertUserNoticeTaskModel("安全技术交底表(外包)", tech.ID, entity.ORG_ID, user.ID, user.NAME, DateTime.Now, notices.Add(NotificationTaskService.InsertUserNoticeTaskModel("安全技术交底表(外包)", tech.ID, entity.ORG_ID, user.ID, user.NAME, DateTime.Now,
@ -2213,15 +2213,15 @@ namespace APT.BaseData.Services.DomainServices
tech.IS_AUTO = (int)ISImportantEnum.; tech.IS_AUTO = (int)ISImportantEnum.;
tech.IS_OUTSOURCE = true; tech.IS_OUTSOURCE = true;
tech.RELATED_ID = entity.RELATED_ID; tech.RELATED_ID = entity.RELATED_ID;
if (entity.MONITOR_USER_ID != null) //if (entity.MONITOR_USER_ID != null)
{ //{
T_FO_TECH_DISCLOSURE_PERSON person = new T_FO_TECH_DISCLOSURE_PERSON(); // T_FO_TECH_DISCLOSURE_PERSON person = new T_FO_TECH_DISCLOSURE_PERSON();
person.ORG_ID = entity.ORG_ID; // person.ORG_ID = entity.ORG_ID;
person.USER_ID = entity.MONITOR_USER_ID; // person.USER_ID = entity.MONITOR_USER_ID;
person.TECH_DISCLOSURE_FROM_ID = tech.ID; // person.TECH_DISCLOSURE_FROM_ID = tech.ID;
person.CREATER_ID = entity.CREATER_ID; // person.CREATER_ID = entity.CREATER_ID;
techUsers.Add(person); // techUsers.Add(person);
} //}
if (entity.Nav_CrucialLicensePerson != null && entity.Nav_CrucialLicensePerson.Any()) if (entity.Nav_CrucialLicensePerson != null && entity.Nav_CrucialLicensePerson.Any())
{ {
entity.Nav_CrucialLicensePerson.ForEach(t => entity.Nav_CrucialLicensePerson.ForEach(t =>

View File

@ -5613,7 +5613,6 @@ namespace APT.BS.WebApi.Controllers.Api
var files = entity.Nav_Files; var files = entity.Nav_Files;
entity.Nav_Files = null; entity.Nav_Files = null;
//entity.RiskContentState 5 10 需要处理 //entity.RiskContentState 5 10 需要处理
#region #region
if (entity.RiskContentState == 10) if (entity.RiskContentState == 10)

View File

@ -1543,6 +1543,7 @@ namespace APT.FO.WebApi.Controllers
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode; var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
pageFilter.IgnoreDataRule = true;
//安环部负责人departmentID //安环部负责人departmentID
var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID; var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
if (loginUserCode == "admin" || loginDepartmentId == manageDepartId) if (loginUserCode == "admin" || loginDepartmentId == manageDepartId)

View File

@ -323,7 +323,7 @@ namespace APT.FO.WebApi.Controllers
var curentApprove = appdetails.FirstOrDefault(i => i.APPROVE_USER_ID == applyUserId); var curentApprove = appdetails.FirstOrDefault(i => i.APPROVE_USER_ID == applyUserId);
if (curentApprove != null) if (curentApprove != null)
{ {
var removeApprove = appdetails.Where(i => i.NUM < curentApprove.NUM && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing); var removeApprove = appdetails.Where(i => i.NUM < curentApprove.NUM && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).ToList();
if (removeApprove != null && removeApprove.Any()) if (removeApprove != null && removeApprove.Any())
{ {
foreach (var item in removeApprove) foreach (var item in removeApprove)
@ -338,14 +338,14 @@ namespace APT.FO.WebApi.Controllers
appdetails.Where(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID != applyUserId && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).ForEach(i => i.IS_CURRENT = true); appdetails.Where(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID != applyUserId && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).ForEach(i => i.IS_CURRENT = true);
sendUserIds = appdetails.Where(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID != applyUserId).Select(t => (Guid)t.APPROVE_USER_ID).ToList(); sendUserIds = appdetails.Where(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID != applyUserId).Select(t => (Guid)t.APPROVE_USER_ID).ToList();
} }
//else else
//{ {
// var appdetailsAll = appdetails; var appdetailsAll = appdetails;
// var removeTemps = appdetailsAll.FirstOrDefault(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID == applyUserId); var removeTemps = appdetailsAll.FirstOrDefault(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID == applyUserId);
// appdetailsAll.Remove(removeTemps); appdetailsAll.Remove(removeTemps);
// appdetails.Where(i => i.NUM == appdetailsAll.Min(x => x.NUM) && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).ForEach(i => i.IS_CURRENT = true); appdetails.Where(i => i.NUM == appdetailsAll.Min(x => x.NUM) && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).ForEach(i => i.IS_CURRENT = true);
// sendUserIds = appdetails.Where(i => i.NUM == appdetailsAll.Min(x => x.NUM) && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).Select(t => (Guid)t.APPROVE_USER_ID).ToList(); sendUserIds = appdetails.Where(i => i.NUM == appdetailsAll.Min(x => x.NUM) && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).Select(t => (Guid)t.APPROVE_USER_ID).ToList();
//} }
if (sendUserIds != null && sendUserIds.Any()) if (sendUserIds != null && sendUserIds.Any())
{ {
var sendUserNames = new List<string>(); var sendUserNames = new List<string>();
@ -637,6 +637,7 @@ namespace APT.FO.WebApi.Controllers
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode; var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
pageFilter.IgnoreDataRule = true;
//安环部负责人departmentID //安环部负责人departmentID
var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID; var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
if (loginUserCode == "admin" || loginDepartmentId == manageDepartId) if (loginUserCode == "admin" || loginDepartmentId == manageDepartId)

View File

@ -535,6 +535,7 @@ namespace APT.HM.WebApi.Controllers.Api
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode; var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
pageFilter.IgnoreDataRule = true;
//安环部负责人departmentID //安环部负责人departmentID
var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID; var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
if (loginUserCode == "admin" || loginDepartmentId == manageDepartId) if (loginUserCode == "admin" || loginDepartmentId == manageDepartId)

View File

@ -830,6 +830,7 @@ namespace APT.HM.WebApi.Controllers.Api
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode; var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
pageFilter.IgnoreDataRule = true;
//安环部负责人departmentID //安环部负责人departmentID
var manageDepartId = this.GetEntity<T_FM_USER>(t=>t.Nav_ApproveRole!=null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID; var manageDepartId = this.GetEntity<T_FM_USER>(t=>t.Nav_ApproveRole!=null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
if (loginUserCode == "admin" || loginDepartmentId == manageDepartId) if (loginUserCode == "admin" || loginDepartmentId == manageDepartId)

View File

@ -663,6 +663,7 @@ namespace APT.HM.WebApi.Controllers.Api
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode; var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
pageFilter.IgnoreDataRule = true;
//安环部负责人departmentID //安环部负责人departmentID
var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID; var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
if (loginUserCode == "admin" || loginDepartmentId == manageDepartId) if (loginUserCode == "admin" || loginDepartmentId == manageDepartId)

View File

@ -903,6 +903,7 @@ namespace APT.HM.WebApi.Controllers.Api
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode; var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
pageFilter.IgnoreDataRule = true;
//安环部负责人departmentID //安环部负责人departmentID
var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID; var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
if (loginUserCode == "admin" || loginDepartmentId == manageDepartId) if (loginUserCode == "admin" || loginDepartmentId == manageDepartId)

View File

@ -660,6 +660,7 @@ namespace APT.HM.WebApi.Controllers.Api
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode; var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
pageFilter.IgnoreDataRule = true;
//安环部负责人departmentID //安环部负责人departmentID
var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID; var manageDepartId = this.GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部负责人" && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
if (loginUserCode == "admin" || loginDepartmentId == manageDepartId) if (loginUserCode == "admin" || loginDepartmentId == manageDepartId)