Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe
This commit is contained in:
commit
3a9f49ee5c
@ -13,7 +13,7 @@ using System.Text;
|
||||
namespace APT.MS.Domain.Entities.FO
|
||||
{
|
||||
[Description("关键许可工作表")]
|
||||
[DataRuleField("DEPARTMENT_ID")]
|
||||
[DataRuleField("Nav_ApplyUser.DEPARTMENT_ID")]
|
||||
public class T_FO_CRUCIAL_LICENSE_JOB : MesEntityBase
|
||||
{
|
||||
[Description("编号")]
|
||||
|
||||
@ -13,7 +13,7 @@ using System.Text;
|
||||
namespace APT.MS.Domain.Entities.FO
|
||||
{
|
||||
[Description("关键许可工作表")]
|
||||
[DataRuleField("DEPARTMENT_ID")]
|
||||
[DataRuleField("Nav_ApplyUser.DEPARTMENT_ID")]
|
||||
public class T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE : MesEntityBase
|
||||
{
|
||||
[Description("编号")]
|
||||
|
||||
@ -10,7 +10,7 @@ using System.Text;
|
||||
namespace APT.MS.Domain.Entities.FO
|
||||
{
|
||||
[Description("作业活动记录表")]
|
||||
[DataRuleField("DEPARTMENT_ID")]
|
||||
[DataRuleField("Nav_CreateUser.DEPARTMENT_ID")]
|
||||
public class T_FO_JOB_EVENT_RECORD : MesEntityBase
|
||||
{
|
||||
[Description("编号")]
|
||||
|
||||
@ -11,7 +11,7 @@ using System.Text;
|
||||
namespace APT.MS.Domain.Entities.FO
|
||||
{
|
||||
[Description("技术交底表")]
|
||||
[DataRuleField("DEPARTMENT_ID")]
|
||||
[DataRuleField("Nav_DisclosurePerson.DEPARTMENT_ID")]
|
||||
public class T_FO_TECH_DISCLOSURE_FROM : MesEntityBase
|
||||
{
|
||||
[Description("编号")]
|
||||
|
||||
@ -228,7 +228,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
//pageFilter.IgnoreDataRule = true;
|
||||
pageFilter.Include.Add("Nav_PreUsers");
|
||||
pageFilter.Include.Add("Nav_AfterUsers");
|
||||
pageFilter.Include.Add("Nav_Team");
|
||||
@ -239,20 +239,25 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageFilter.IgnoreDataRule = false;
|
||||
}
|
||||
result = this.GetOrderPageEntities<T_FO_CHANGE_SHIFT_RECORD>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
if (departmentIds != null && departmentIds.Any())
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CHANGE_SHIFT_RECORD>(t => t.Nav_Team != null && departmentIds.Contains((Guid)t.Nav_Team.DEPARTMENT_ID), pageFilter);
|
||||
}
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
// List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
// DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
// if (departmentIds != null && departmentIds.Any())
|
||||
// {
|
||||
// result = this.GetOrderPageEntities<T_FO_CHANGE_SHIFT_RECORD>(t => t.Nav_Team != null && departmentIds.Contains((Guid)t.Nav_Team.DEPARTMENT_ID), pageFilter);
|
||||
// }
|
||||
// else
|
||||
// result.Data = null;
|
||||
//}
|
||||
if (result.Data.Any())
|
||||
{
|
||||
foreach (var entity in result.Data)
|
||||
|
||||
@ -1763,20 +1763,25 @@ namespace APT.FO.WebApi.Controllers
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageFilter.IgnoreDataRule = false;
|
||||
}
|
||||
result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
if (departmentIds != null && departmentIds.Any())
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB>(t => t.Nav_ApplyUser.DEPARTMENT_ID != null && departmentIds.Contains(t.Nav_ApplyUser.DEPARTMENT_ID.Value), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
}
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
// List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
// DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
// if (departmentIds != null && departmentIds.Any())
|
||||
// {
|
||||
// result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB>(t => t.Nav_ApplyUser.DEPARTMENT_ID != null && departmentIds.Contains(t.Nav_ApplyUser.DEPARTMENT_ID.Value), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
// }
|
||||
// else
|
||||
// result.Data = null;
|
||||
//}
|
||||
if (result.Data.Any())
|
||||
{
|
||||
var departments = this.GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0, new BaseFilter(pageFilter.OrgId)).ToList();
|
||||
|
||||
@ -1068,20 +1068,25 @@ namespace APT.FO.WebApi.Controllers
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageFilter.IgnoreDataRule = false;
|
||||
}
|
||||
result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
if (departmentIds != null && departmentIds.Any())
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE>(t => t.Nav_ApplyUser.DEPARTMENT_ID != null && departmentIds.Contains(t.Nav_ApplyUser.DEPARTMENT_ID.Value), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
}
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
// List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
// DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
// if (departmentIds != null && departmentIds.Any())
|
||||
// {
|
||||
// result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE>(t => t.Nav_ApplyUser.DEPARTMENT_ID != null && departmentIds.Contains(t.Nav_ApplyUser.DEPARTMENT_ID.Value), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
// }
|
||||
// else
|
||||
// result.Data = null;
|
||||
//}
|
||||
if (result.Data.Any())
|
||||
{
|
||||
var departments = this.GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0, new BaseFilter(pageFilter.OrgId)).ToList();
|
||||
|
||||
@ -615,7 +615,6 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_FO_CURRENT_CLASS_RECORD> OrderPaged([FromBody] KeywordPageFilter pageFilter)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
pageFilter.Include.Add("Nav_Team");
|
||||
var result = new PagedActionResult<T_FO_CURRENT_CLASS_RECORD>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
@ -626,20 +625,25 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageFilter.IgnoreDataRule = false;
|
||||
}
|
||||
result = this.GetOrderPageEntities<T_FO_CURRENT_CLASS_RECORD>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
if (departmentIds != null && departmentIds.Any())
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CURRENT_CLASS_RECORD>(t => (t.Nav_Team != null && departmentIds.Contains((Guid)t.Nav_Team.DEPARTMENT_ID)), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
}
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
// List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
// DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
// if (departmentIds != null && departmentIds.Any())
|
||||
// {
|
||||
// result = this.GetOrderPageEntities<T_FO_CURRENT_CLASS_RECORD>(t => (t.Nav_Team != null && departmentIds.Contains((Guid)t.Nav_Team.DEPARTMENT_ID)), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
// }
|
||||
// else
|
||||
// result.Data = null;
|
||||
//}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -797,20 +797,25 @@ namespace APT.FO.WebApi.Controllers
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageFilter.IgnoreDataRule = false;
|
||||
}
|
||||
result = this.GetOrderPageEntities<T_FO_JOB_ACTIVITY_RECORD>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
if (departmentIds != null && departmentIds.Any())
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_JOB_ACTIVITY_RECORD>(t => t.Nav_CreateUser.DEPARTMENT_ID != null && departmentIds.Contains(t.Nav_CreateUser.DEPARTMENT_ID.Value), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
}
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
// List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
// DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
// if (departmentIds != null && departmentIds.Any())
|
||||
// {
|
||||
// result = this.GetOrderPageEntities<T_FO_JOB_ACTIVITY_RECORD>(t => t.Nav_CreateUser.DEPARTMENT_ID != null && departmentIds.Contains(t.Nav_CreateUser.DEPARTMENT_ID.Value), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
// }
|
||||
// else
|
||||
// result.Data = null;
|
||||
//}
|
||||
if (result.Data.Any())
|
||||
{
|
||||
var departments = this.GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0, new BaseFilter(pageFilter.OrgId)).ToList();
|
||||
|
||||
@ -755,7 +755,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
pageFilter.Include.Add("Nav_JobEventPerson.Nav_User");
|
||||
pageFilter.SelectField.Add("Nav_JobEventPerson.USER_ID");
|
||||
pageFilter.SelectField.Add("Nav_JobEventPerson.Nav_User.NAME");
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
//pageFilter.IgnoreDataRule = true;
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
@ -764,20 +764,25 @@ namespace APT.FO.WebApi.Controllers
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageFilter.IgnoreDataRule = false;
|
||||
}
|
||||
result = this.GetOrderPageEntities<T_FO_JOB_EVENT_RECORD>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
if (departmentIds != null && departmentIds.Any())
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_JOB_EVENT_RECORD>(t => t.Nav_CreateUser.DEPARTMENT_ID != null && departmentIds.Contains(t.Nav_CreateUser.DEPARTMENT_ID.Value), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
}
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
// List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
// DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
// if (departmentIds != null && departmentIds.Any())
|
||||
// {
|
||||
// result = this.GetOrderPageEntities<T_FO_JOB_EVENT_RECORD>(t => t.Nav_CreateUser.DEPARTMENT_ID != null && departmentIds.Contains(t.Nav_CreateUser.DEPARTMENT_ID.Value), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
// }
|
||||
// else
|
||||
// result.Data = null;
|
||||
//}
|
||||
if (result.Data.Any())
|
||||
{
|
||||
var departments = this.GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0, new BaseFilter(pageFilter.OrgId)).ToList();
|
||||
|
||||
@ -872,7 +872,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_FO_PRE_SHIFT_MEETING_RECORD> OrderPaged([FromBody] KeywordPageFilter pageFilter)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
//pageFilter.IgnoreDataRule = true;
|
||||
pageFilter.Include.Add("Nav_Team");
|
||||
pageFilter.Include.Add("Nav_Users.Nav_User");
|
||||
var result = new PagedActionResult<T_FO_PRE_SHIFT_MEETING_RECORD>();
|
||||
@ -889,21 +889,26 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageFilter.IgnoreDataRule = false;
|
||||
}
|
||||
result = this.GetOrderPageEntities<T_FO_PRE_SHIFT_MEETING_RECORD>(express, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
if (departmentIds != null && departmentIds.Any())
|
||||
{
|
||||
express = express.And(t => t.Nav_Team != null && departmentIds.Contains((Guid)t.Nav_Team.DEPARTMENT_ID));
|
||||
result = this.GetOrderPageEntities<T_FO_PRE_SHIFT_MEETING_RECORD>(express, pageFilter);//|| dataIds.Contains(t.ID)
|
||||
}
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
// List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
// DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
// if (departmentIds != null && departmentIds.Any())
|
||||
// {
|
||||
// express = express.And(t => t.Nav_Team != null && departmentIds.Contains((Guid)t.Nav_Team.DEPARTMENT_ID));
|
||||
// result = this.GetOrderPageEntities<T_FO_PRE_SHIFT_MEETING_RECORD>(express, pageFilter);//|| dataIds.Contains(t.ID)
|
||||
// }
|
||||
// else
|
||||
// result.Data = null;
|
||||
//}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_FO_TEAM_ACTIVITY> OrderPaged([FromBody] KeywordPageFilter pageFilter)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
|
||||
pageFilter.Include.Add("Nav_Taem");
|
||||
var result = new PagedActionResult<T_FO_TEAM_ACTIVITY>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
@ -266,20 +266,25 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageFilter.IgnoreDataRule = false;
|
||||
}
|
||||
result = this.GetOrderPageEntities<T_FO_TEAM_ACTIVITY>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
if (departmentIds != null && departmentIds.Any())
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_TEAM_ACTIVITY>(t => t.Nav_Taem != null && departmentIds.Contains((Guid)t.Nav_Taem.DEPARTMENT_ID), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
}
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
// List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
// DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
// if (departmentIds != null && departmentIds.Any())
|
||||
// {
|
||||
// result = this.GetOrderPageEntities<T_FO_TEAM_ACTIVITY>(t => t.Nav_Taem != null && departmentIds.Contains((Guid)t.Nav_Taem.DEPARTMENT_ID), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
// }
|
||||
// else
|
||||
// result.Data = null;
|
||||
//}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -416,6 +416,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
record.CREATER_ID = tech.Nav_JobName.MONITOR_USER_ID;
|
||||
var userInfo = this.GetEntity<T_FM_USER>(t => t.ENABLE_STATUS == (int)FMEnableStatusEnum.启用 && t.ID == tech.Nav_JobName.MONITOR_USER_ID);
|
||||
record.DEPARTMENT_ID = userInfo.DEPARTMENT_ID;
|
||||
//发消息
|
||||
DateTime dtEnd = NotificationTaskService.GetTaskEndTime(FMTASKTYPE.JobSite, tech.ORG_ID.Value, DateTime.Now, null, null);
|
||||
notices.Add(NotificationTaskService.InsertUserNoticeTaskModel("关键/许可作业活动记录表单(" + tech?.Nav_JobName?.JOB_DATE.Value.ToShortDateString().Replace("/", "") + ")", record.ID, record.ORG_ID, userInfo.ID, userInfo.NAME, DateTime.Now,
|
||||
@ -652,6 +653,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
record.CREATER_ID = tech.Nav_JobName.MONITOR_USER_ID;
|
||||
var userInfo = this.GetEntity<T_FM_USER>(t => t.ENABLE_STATUS == (int)FMEnableStatusEnum.启用 && t.ID == tech.Nav_JobName.MONITOR_USER_ID);
|
||||
record.DEPARTMENT_ID = userInfo.DEPARTMENT_ID;
|
||||
//发消息
|
||||
DateTime dtEnd = NotificationTaskService.GetTaskEndTime(FMTASKTYPE.JobSite, orgId.Value, DateTime.Now, null, null);
|
||||
notices.Add(NotificationTaskService.InsertUserNoticeTaskModel("作业活动记录表单(关键/许可作业)", record.ID, record.ORG_ID, userInfo.ID, userInfo.NAME, DateTime.Now,
|
||||
@ -723,6 +725,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
record.CREATER_ID = tech.Nav_JobNameOut.MONITOR_USER_ID;
|
||||
var userInfo = this.GetEntity<T_FM_USER>(t => t.ENABLE_STATUS == (int)FMEnableStatusEnum.启用 && t.ID == tech.Nav_JobNameOut.MONITOR_USER_ID);
|
||||
record.DEPARTMENT_ID = userInfo.DEPARTMENT_ID;
|
||||
//发消息
|
||||
DateTime dtEnd = NotificationTaskService.GetTaskEndTime(FMTASKTYPE.JobSite, orgId.Value, DateTime.Now, null, null);
|
||||
notices.Add(NotificationTaskService.InsertUserNoticeTaskModel("作业活动记录表单外包(关键/许可作业)", record.ID, record.ORG_ID, userInfo.ID, userInfo.NAME, DateTime.Now,
|
||||
@ -792,20 +795,25 @@ namespace APT.FO.WebApi.Controllers
|
||||
var ahRole = this.GetEntity<T_FM_USER_BELONG_ROLE>(t => t.Nav_BelongRole != null && t.Nav_BelongRole.NAME.Contains("安环") && t.USER_ID == loginUserId);
|
||||
if ((!string.IsNullOrEmpty(loginUserCode) && loginUserCode.Contains("admin")) || departStatus != (int)FMDepartmentStatus.生产部门 || ahRole != null)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageFilter.IgnoreDataRule = false;
|
||||
}
|
||||
result = this.GetOrderPageEntities<T_FO_TECH_DISCLOSURE_FROM>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
if (departmentIds != null && departmentIds.Any())
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_TECH_DISCLOSURE_FROM>(t => (t.Nav_DisclosurePerson != null && departmentIds.Contains(t.Nav_DisclosurePerson.DEPARTMENT_ID.Value)), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
}
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// List<Guid> departmentId = new List<Guid>() { loginDepartmentId.Value };
|
||||
// List<Guid> departmentIds = new List<Guid>() { loginDepartmentId.Value };
|
||||
// DepartmentService.GetDepartmentIds(pageFilter.OrgId.Value, departmentId, ref departmentIds);
|
||||
// if (departmentIds != null && departmentIds.Any())
|
||||
// {
|
||||
// result = this.GetOrderPageEntities<T_FO_TECH_DISCLOSURE_FROM>(t => (t.Nav_DisclosurePerson != null && departmentIds.Contains(t.Nav_DisclosurePerson.DEPARTMENT_ID.Value)), pageFilter);//|| dataIds.Contains(t.ID)
|
||||
// }
|
||||
// else
|
||||
// result.Data = null;
|
||||
//}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,6 +136,7 @@ namespace APT.SK.WebApi.Controllers.Api
|
||||
de.SCOREL_ID = item.SCOREL_ID;
|
||||
de.SCOREE_ID = item.SCOREE_ID;
|
||||
de.SCOREC_ID = item.SCOREC_ID;
|
||||
de.EVALUATE_SCORE = item.EVALUATE_SCORE;
|
||||
if (item.SCOREL_ID == null || item.SCOREE_ID == null || item.SCOREC_ID == null)
|
||||
{
|
||||
throw new Exception("第" + item.NUM + "行,LEC都不能为空");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user