Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe
This commit is contained in:
commit
62f93d3ed6
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -221,35 +221,30 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_FO_CHANGE_SHIFT_RECORD> OrderPaged([FromBody] KeywordPageFilter pageFilter)
|
||||
{
|
||||
var result = new PagedActionResult<T_FO_CHANGE_SHIFT_RECORD>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var users = this.GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == 0,new BaseFilter(pageFilter.OrgId), "Nav_ApproveRole");
|
||||
var admiId = users.FirstOrDefault(t => t.CODE.Contains("admin") && t.ENABLE_STATUS == 0)?.ID;
|
||||
var currDep = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID.Value;
|
||||
var tempDeps = GetEntities<T_FM_DEPARTMENT>(t=>t.ENABLE_STATUS == 0,new BaseFilter(pageFilter.OrgId));
|
||||
var tempDep = tempDeps.FirstOrDefault(t=>t.ID == currDep);
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
pageFilter.Include.Add("Nav_PreUsers");
|
||||
pageFilter.Include.Add("Nav_AfterUsers");
|
||||
pageFilter.Include.Add("Nav_Team");
|
||||
pageFilter.Limit = 10;
|
||||
if (tempDep!=null&& tempDep.DEPARTMENT_TYPE == (int)FMDepartmentType.Class)
|
||||
{
|
||||
currDep = (Guid)tempDep.PARENT_ID;
|
||||
}
|
||||
var AHDepartment = users.FirstOrDefault(t => t.Nav_ApproveRole != null && (t.Nav_ApproveRole.NAME == "安环部负责人" || t.Nav_ApproveRole.NAME == "安环部安全员")).DEPARTMENT_ID;
|
||||
if (loginUserId == null || loginUserId == admiId || currDep == AHDepartment)
|
||||
var users = this.GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == 0, new BaseFilter(pageFilter.OrgId), "Nav_ApproveRole");
|
||||
var tempDeps = GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0, new BaseFilter(pageFilter.OrgId));
|
||||
var departStatus = tempDeps.FirstOrDefault(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CHANGE_SHIFT_RECORD>(null, pageFilter);
|
||||
}
|
||||
else if (tempDep != null && (tempDep.NAME.Contains("安环科") || tempDep.NAME.Contains("安全环保")) && tempDep.PARENT_ID != null)
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>();
|
||||
departmentId.Add((Guid)tempDep.PARENT_ID);
|
||||
List<Guid> departmentIds = new List<Guid>() { (Guid)tempDep.PARENT_ID };
|
||||
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())
|
||||
{
|
||||
@ -258,20 +253,6 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var loginDepartmentId = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
|
||||
List<Guid> departmentId = new List<Guid>();
|
||||
departmentId.Add((Guid)loginDepartmentId);
|
||||
List<Guid> departmentIds = new List<Guid>() { (Guid)loginDepartmentId };
|
||||
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)
|
||||
@ -279,12 +260,12 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
if (entity.Nav_PreUsers != null && entity.Nav_PreUsers.Any())
|
||||
{
|
||||
var userTemp = entity.Nav_PreUsers.Select(t => t.USER_ID).ToList();
|
||||
var userList = users.Where(t => userTemp.Contains(t.ID)).Select(m=>m.NAME).ToList();
|
||||
var userList = users.Where(t => userTemp.Contains(t.ID)).Select(m => m.NAME).ToList();
|
||||
entity.CURRENT_USER = string.Join(",", userList);
|
||||
}
|
||||
if (entity.Nav_AfterUsers != null && entity.Nav_AfterUsers.Any())
|
||||
{
|
||||
var user = users.FirstOrDefault(t=>t.ID == entity.Nav_AfterUsers.FirstOrDefault().USER_ID);
|
||||
var user = users.FirstOrDefault(t => t.ID == entity.Nav_AfterUsers.FirstOrDefault().USER_ID);
|
||||
if (user != null)
|
||||
{
|
||||
entity.CHANGE_DEPART = tempDeps.FirstOrDefault(t => t.ID == user.DEPARTMENT_ID)?.NAME;
|
||||
|
||||
@ -1756,11 +1756,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
if (filter != null && !string.IsNullOrEmpty(filter.Value.ToString()))
|
||||
pageFilter.FilterGroup.Rules.Remove(filter);
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
//安环部负责人departmentID
|
||||
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)
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -1061,11 +1061,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
if (filter != null && !string.IsNullOrEmpty(filter.Value.ToString()))
|
||||
pageFilter.FilterGroup.Rules.Remove(filter);
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
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)
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -612,46 +612,32 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_FO_CURRENT_CLASS_RECORD> OrderPaged([FromBody] KeywordPageFilter pageFilter)
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
{
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
pageFilter.Include.Add("Nav_Team");
|
||||
var result = new PagedActionResult<T_FO_CURRENT_CLASS_RECORD>();
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var admiId = this.GetEntity<T_FM_USER>(t => t.CODE.Contains("admin") && t.ENABLE_STATUS == 0)?.ID;
|
||||
var currDep = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID.Value;
|
||||
var AHDepartment = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole!=null && (t.Nav_ApproveRole.NAME == "安环部负责人" || t.Nav_ApproveRole.NAME == "安环部安全员")).DEPARTMENT_ID;
|
||||
var departInfo = GetEntity<T_FM_DEPARTMENT>(t => t.ID == currDep && t.ENABLE_STATUS == 0);
|
||||
if (loginUserId == null || loginUserId == admiId || currDep == AHDepartment)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CURRENT_CLASS_RECORD>(null, pageFilter);
|
||||
}
|
||||
else if (departInfo != null && (departInfo.NAME.Contains("安环科") || departInfo.NAME.Contains("安全环保")) && departInfo.PARENT_ID != null)
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>();
|
||||
departmentId.Add((Guid)departInfo.PARENT_ID);
|
||||
List<Guid> departmentIds = new List<Guid>() { (Guid)departInfo.PARENT_ID };
|
||||
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;
|
||||
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;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_CURRENT_CLASS_RECORD>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
var loginDepartmentId = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
|
||||
List<Guid> departmentId = new List<Guid>();
|
||||
departmentId.Add((Guid)loginDepartmentId);
|
||||
List<Guid> departmentIds = new List<Guid>() { (Guid)loginDepartmentId };
|
||||
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
|
||||
{
|
||||
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;
|
||||
|
||||
@ -791,10 +791,11 @@ namespace APT.FO.WebApi.Controllers
|
||||
pageFilter.FilterGroup.Rules.Remove(filter);
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
//安环部负责人departmentID
|
||||
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)
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_JOB_ACTIVITY_RECORD>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -750,14 +750,21 @@ namespace APT.FO.WebApi.Controllers
|
||||
var filter = pageFilter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "PARENT_NAME");
|
||||
if (filter != null && !string.IsNullOrEmpty(filter.Value.ToString()))
|
||||
pageFilter.FilterGroup.Rules.Remove(filter);
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
//安环部负责人departmentID
|
||||
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)
|
||||
pageFilter.Include.Add("Nav_CreateUser");
|
||||
pageFilter.Include.Add("Nav_JobEventPerson");
|
||||
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;
|
||||
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;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_JOB_EVENT_RECORD>(null, pageFilter, "Nav_CreateUser", "Nav_JobEventPerson.Nav_User");
|
||||
result = this.GetOrderPageEntities<T_FO_JOB_EVENT_RECORD>(null, pageFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -766,7 +773,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
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, "Nav_CreateUser", "Nav_JobEventPerson.Nav_User");//|| dataIds.Contains(t.ID)
|
||||
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;
|
||||
@ -774,6 +781,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
if (result.Data.Any())
|
||||
{
|
||||
var departments = this.GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0, new BaseFilter(pageFilter.OrgId)).ToList();
|
||||
//var users = this.GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == 0, new BaseFilter(pageFilter.OrgId)).ToList();
|
||||
result.Data.ForEach(t =>
|
||||
{
|
||||
if (t.Nav_CreateUser != null && t.Nav_CreateUser.DEPARTMENT_ID != null)
|
||||
@ -782,8 +790,8 @@ namespace APT.FO.WebApi.Controllers
|
||||
t.PARENT_NAME = depart?.NAME;
|
||||
}
|
||||
if (t.Nav_JobEventPerson != null && t.Nav_JobEventPerson.Any())
|
||||
{
|
||||
var names = t.Nav_JobEventPerson.Select(m => m.Nav_User?.NAME).ToList();
|
||||
{
|
||||
var names = t.Nav_JobEventPerson.Where(t => t.USER_ID!=null).Select(m => m.Nav_User?.NAME).Distinct().ToList();
|
||||
t.USER_NAME = string.Join(", ", names);
|
||||
}
|
||||
});
|
||||
|
||||
@ -9,6 +9,7 @@ using APT.MS.Domain.Entities.FO;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -280,10 +281,11 @@ namespace APT.FM.WebApi.Controllers.Api.FO
|
||||
var result = new PagedActionResult<T_FO_PRE_OPER_SCH>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
//安环部负责人departmentID
|
||||
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)
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_PRE_OPER_SCH>(null, pageFilter);
|
||||
}
|
||||
|
||||
@ -780,61 +780,41 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_FO_PRE_SHIFT_MEETING_RECORD> OrderPaged([FromBody] KeywordPageFilter pageFilter)
|
||||
{
|
||||
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>();
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var admiId = this.GetEntity<T_FM_USER>(t => t.CODE.Contains("admin") && t.ENABLE_STATUS == 0)?.ID;
|
||||
var currDep = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID.Value;
|
||||
var AH = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && (t.Nav_ApproveRole.NAME == "安环部负责人" || t.Nav_ApproveRole.NAME == "安环部安全员"));
|
||||
Guid? AHDepartment = Guid.Empty;
|
||||
var departInfo = GetEntity<T_FM_DEPARTMENT>(t => t.ID == currDep && t.ENABLE_STATUS == 0);
|
||||
Expression<Func<T_FO_PRE_SHIFT_MEETING_RECORD, bool>> express = t => t.IS_DELETED==false;
|
||||
if (!string.IsNullOrEmpty(pageFilter.Parameter1))
|
||||
{
|
||||
express = express.And(t => t.Nav_Users.Any(i =>i.Nav_User!=null && i.Nav_User.NAME.Contains(pageFilter.Parameter1)));
|
||||
}
|
||||
if (AH != null)
|
||||
{
|
||||
AHDepartment = AH.DEPARTMENT_ID;
|
||||
}
|
||||
if (loginUserId == null || loginUserId == admiId || currDep == AHDepartment)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_PRE_SHIFT_MEETING_RECORD>(express, pageFilter);
|
||||
}
|
||||
else if (departInfo!=null && (departInfo.NAME.Contains("安环科")|| departInfo.NAME.Contains("安全环保")) && departInfo.PARENT_ID!=null)
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>();
|
||||
departmentId.Add((Guid)departInfo.PARENT_ID);
|
||||
List<Guid> departmentIds = new List<Guid>() { (Guid)departInfo.PARENT_ID };
|
||||
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
|
||||
{
|
||||
var loginDepartmentId = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
|
||||
List<Guid> departmentId = new List<Guid>();
|
||||
departmentId.Add((Guid)loginDepartmentId);
|
||||
List<Guid> departmentIds = new List<Guid>() { (Guid)loginDepartmentId };
|
||||
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;
|
||||
public PagedActionResult<T_FO_PRE_SHIFT_MEETING_RECORD> OrderPaged([FromBody] KeywordPageFilter pageFilter)
|
||||
{
|
||||
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>();
|
||||
Expression<Func<T_FO_PRE_SHIFT_MEETING_RECORD, bool>> express = t => t.IS_DELETED == false;
|
||||
if (!string.IsNullOrEmpty(pageFilter.Parameter1))
|
||||
{
|
||||
express = express.And(t => t.Nav_Users.Any(i => i.Nav_User != null && i.Nav_User.NAME.Contains(pageFilter.Parameter1)));
|
||||
}
|
||||
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;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -257,20 +257,20 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
pageFilter.IgnoreDataRule = true;
|
||||
pageFilter.Include.Add("Nav_Taem");
|
||||
var result = new PagedActionResult<T_FO_TEAM_ACTIVITY>();
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var admiId = this.GetEntity<T_FM_USER>(t => t.CODE.Contains("admin") && t.ENABLE_STATUS == 0)?.ID;
|
||||
var currDep = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID.Value;
|
||||
var AHDepartment = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole!=null &&(t.Nav_ApproveRole.NAME == "安环部负责人" || t.Nav_ApproveRole.NAME == "安环部安全员")).DEPARTMENT_ID;
|
||||
var departInfo = GetEntity<T_FM_DEPARTMENT>(t => t.ID == currDep && t.ENABLE_STATUS == 0);
|
||||
if (loginUserId == null || loginUserId == admiId || currDep == AHDepartment)
|
||||
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;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_TEAM_ACTIVITY>(null, pageFilter);
|
||||
}
|
||||
else if (departInfo != null && (departInfo.NAME.Contains("安环科") || departInfo.NAME.Contains("安全环保")) && departInfo.PARENT_ID != null)
|
||||
else
|
||||
{
|
||||
List<Guid> departmentId = new List<Guid>();
|
||||
departmentId.Add((Guid)departInfo.PARENT_ID);
|
||||
List<Guid> departmentIds = new List<Guid>() { (Guid)departInfo.PARENT_ID };
|
||||
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())
|
||||
{
|
||||
@ -279,20 +279,6 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
else
|
||||
result.Data = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var loginDepartmentId = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.DEPARTMENT_ID;
|
||||
List<Guid> departmentId = new List<Guid>();
|
||||
departmentId.Add((Guid)loginDepartmentId);
|
||||
List<Guid> departmentIds = new List<Guid>() { (Guid)loginDepartmentId };
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -786,10 +786,11 @@ namespace APT.FO.WebApi.Controllers
|
||||
var result = new PagedActionResult<T_FO_TECH_DISCLOSURE_FROM>();
|
||||
var loginDepartmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var loginUserCode = APT.Infrastructure.Api.AppContext.CurrentSession.UserCode;
|
||||
//安环部负责人departmentID
|
||||
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)
|
||||
var loginUserCode = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId && t.ENABLE_STATUS == 0)?.CODE;
|
||||
//安环部负责人departmentID
|
||||
var departStatus = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == loginDepartmentId && t.ENABLE_STATUS == 0)?.DEPARTMENT_STATUS;
|
||||
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)
|
||||
{
|
||||
result = this.GetOrderPageEntities<T_FO_TECH_DISCLOSURE_FROM>(null, pageFilter);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,136 +1,145 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.LG.WebApi.Controllers.Api
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.LG.WebApi.Controllers.Api
|
||||
{
|
||||
using APT.BaseData.Domain.Entities.LG;
|
||||
|
||||
#region Oprate-表单操作日志表
|
||||
/// <summary>
|
||||
/// 表单操作日志表
|
||||
/// </summary>
|
||||
[Route("api/LG/Oprate")]
|
||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_LG_OPRATE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_LG_OPRATE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
#region Oprate-表单操作日志表
|
||||
/// <summary>
|
||||
/// 表单操作日志表
|
||||
/// </summary>
|
||||
[Route("api/LG/Oprate")]
|
||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_LG_OPRATE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_LG_OPRATE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -1,368 +1,382 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.NW.WebApi.Controllers.Api
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.NW.WebApi.Controllers.Api
|
||||
{
|
||||
using APT.BaseData.Domain.Entities.NW;
|
||||
|
||||
#region Enterprise-子企业表
|
||||
/// <summary>
|
||||
/// 子企业表
|
||||
/// </summary>
|
||||
[Route("api/NW/Enterprise")]
|
||||
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ENTERPRISE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得树形实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("TreeData")]
|
||||
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitTreeOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RoleDataPerm-子企业数据权限表
|
||||
/// <summary>
|
||||
/// 子企业数据权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleDataPerm")]
|
||||
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_DATA_PERM entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RoleMenu-子企业权限表
|
||||
/// <summary>
|
||||
/// 子企业权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleMenu")]
|
||||
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_MENU entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
#region Enterprise-子企业表
|
||||
/// <summary>
|
||||
/// 子企业表
|
||||
/// </summary>
|
||||
[Route("api/NW/Enterprise")]
|
||||
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ENTERPRISE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获得树形实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("TreeData")]
|
||||
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitTreeOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region RoleDataPerm-子企业数据权限表
|
||||
/// <summary>
|
||||
/// 子企业数据权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleDataPerm")]
|
||||
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_DATA_PERM entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region RoleMenu-子企业权限表
|
||||
/// <summary>
|
||||
/// 子企业权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleMenu")]
|
||||
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_MENU entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -5425,8 +5425,8 @@ namespace APT.PP.WebApi.Controllers.Api
|
||||
var shiftClassAll = this.GetEntities<T_FM_DEPARTMENT_SCHEDULING>(s => s.DATE_TIME.Date == dt.Date && s.Nav_Team.ENABLE_STATUS == 0 && s.TEAM_ID != null, new BaseFilter(filter.OrgId), "Nav_DepartmentSchedulingDetail.Nav_Person").ToList();
|
||||
var shiftClassList = shiftClassAll.Where(s => s.START_TIME >= minTime && s.START_TIME <= maxTime && s.START_TIME != s.END_TIME).ToList();
|
||||
var teamIds = shiftClassList.Select(t => t.TEAM_ID).Distinct().ToList();
|
||||
var teamInfos = this.GetEntities<T_FM_TEAM>(t => teamIds.Contains(t.ID), new BaseFilter(filter.OrgId));
|
||||
var teamDepartIds = teamInfos.Select(m => m.DEPARTMENT_ID).Distinct().ToList();
|
||||
var teamInfos = this.GetEntities<T_FM_TEAM>(t =>t.ENABLE_STATUS == 0 , new BaseFilter(filter.OrgId));
|
||||
var teamDepartIds = teamInfos.Where(t=>teamIds.Contains(t.ID)).Select(m => m.DEPARTMENT_ID).Distinct().ToList();
|
||||
var personIds = new List<Guid>();
|
||||
if (shiftClassList != null && shiftClassList.Any())
|
||||
{
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -8,6 +13,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
@ -21,4 +27,5 @@ using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.PP.WebApi.Controllers.Api
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -55,8 +55,13 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
public List<RiskTypeRate> riskTypeRate { get; set; }
|
||||
//当日工作票排名前三
|
||||
public List<JobTodayTop3> jobTodayTop3 { get; set; }
|
||||
//当日工作票统计数量
|
||||
public List<JobTodayQty> jobTodayQty { get; set; }
|
||||
//隐患整改率
|
||||
public HiddenRectify hiddenRectify { get; set; }
|
||||
|
||||
//隐患统计数据
|
||||
public HiddenSummary hiddenSummary { get; set; }
|
||||
//各事项排名前三
|
||||
public List<TaskTop3> taskTop3 { get; set; }
|
||||
//作业现场完成情况统计
|
||||
@ -95,6 +100,16 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
public int qty { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 当日工作票统计数量
|
||||
/// </summary>
|
||||
public class JobTodayQty
|
||||
{
|
||||
public int qty { get; set; }
|
||||
public Guid workTypeId { get; set; }
|
||||
|
||||
public string name { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 隐患整改率
|
||||
/// </summary>
|
||||
public class HiddenRectify
|
||||
@ -107,6 +122,22 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
public string rate { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 隐患统计数据
|
||||
/// </summary>
|
||||
public class HiddenSummary
|
||||
{
|
||||
public int majorQty { get; set; }
|
||||
|
||||
public int generalQty { get; set; }
|
||||
public int unfinishQty { get; set; }
|
||||
|
||||
public int monthMajorQty { get; set; }
|
||||
|
||||
public int unfinishMonthMajorQty { get; set; }
|
||||
public int monthGeneralQty { get; set; }
|
||||
public int unfinishMonthGeneralQty { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 各事项排名前三
|
||||
/// </summary>
|
||||
public class TaskTopTemp
|
||||
@ -268,45 +299,57 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
riskData.Fill(tableRisk);
|
||||
result.Data.riskTypeRate = RiskTypeRateData(tableRisk);
|
||||
//当日工作票排名前三
|
||||
string sqlJob = "select * from vhome_jobtop3_today ";
|
||||
//string sqlJob = "select * from vhome_jobtop3_today ";
|
||||
//SqlCommand comJob = new SqlCommand(sqlJob, connection);
|
||||
//SqlDataAdapter jobData = new SqlDataAdapter(comJob);
|
||||
//jobData.Fill(tableJob);
|
||||
//string sqlJobGroup = "select* from vhome_jobdata_today_group";
|
||||
//SqlCommand comJobGroup = new SqlCommand(sqlJobGroup, connection);
|
||||
//SqlDataAdapter jobGroupData = new SqlDataAdapter(comJobGroup);
|
||||
//jobGroupData.Fill(tableJobGroup);
|
||||
//result.Data.jobTodayTop3 = JobTodayTopData(filter.OrgId.Value, tableJob, tableJobGroup);
|
||||
//当日工作票的统计数量
|
||||
string sqlJob = "select * from vhome_jobToday ORDER BY NUM";
|
||||
SqlCommand comJob = new SqlCommand(sqlJob, connection);
|
||||
SqlDataAdapter jobData = new SqlDataAdapter(comJob);
|
||||
jobData.Fill(tableJob);
|
||||
string sqlJobGroup = "select* from vhome_jobdata_today_group";
|
||||
SqlCommand comJobGroup = new SqlCommand(sqlJobGroup, connection);
|
||||
SqlDataAdapter jobGroupData = new SqlDataAdapter(comJobGroup);
|
||||
jobGroupData.Fill(tableJobGroup);
|
||||
result.Data.jobTodayTop3 = JobTodayTopData(filter.OrgId.Value, tableJob, tableJobGroup);
|
||||
//隐患整改率
|
||||
string sqlHidden = "select * from vhome_hidden_data_result ";
|
||||
result.Data.jobTodayQty = JobTodayQtyData(tableJob);
|
||||
//隐患统计数据
|
||||
string sqlHidden = "select * from vhome_hiddenSummary";
|
||||
SqlCommand comHidden = new SqlCommand(sqlHidden, connection);
|
||||
SqlDataAdapter hiddenData = new SqlDataAdapter(comHidden);
|
||||
hiddenData.Fill(tableHidden);
|
||||
result.Data.hiddenRectify = HiddenRectifyData(tableHidden);
|
||||
result.Data.hiddenSummary = HiddenSummaryData(tableHidden);
|
||||
//隐患整改率
|
||||
//string sqlHidden = "select * from vhome_hidden_data_result ";
|
||||
//SqlCommand comHidden = new SqlCommand(sqlHidden, connection);
|
||||
//SqlDataAdapter hiddenData = new SqlDataAdapter(comHidden);
|
||||
//hiddenData.Fill(tableHidden);
|
||||
//result.Data.hiddenRectify = HiddenRectifyData(tableHidden);
|
||||
//各事项排名前三
|
||||
string sqlTask = "select * from vhome_task_data_result ";
|
||||
SqlCommand comTask = new SqlCommand(sqlTask, connection);
|
||||
SqlDataAdapter taskData = new SqlDataAdapter(comTask);
|
||||
taskData.Fill(tableTask);
|
||||
result.Data.taskTop3 = TaskTopData(tableTask);
|
||||
//string sqlTask = "select * from vhome_task_data_result ";
|
||||
//SqlCommand comTask = new SqlCommand(sqlTask, connection);
|
||||
//SqlDataAdapter taskData = new SqlDataAdapter(comTask);
|
||||
//taskData.Fill(tableTask);
|
||||
//result.Data.taskTop3 = TaskTopData(tableTask);
|
||||
//作业现场完成情况统计
|
||||
string sqlJobRate = "select * from vhome_jobrecord_data ";
|
||||
SqlCommand comJobRate = new SqlCommand(sqlJobRate, connection);
|
||||
SqlDataAdapter jobRateData = new SqlDataAdapter(comJobRate);
|
||||
jobRateData.Fill(tableJobRate);
|
||||
result.Data.jobFinishRate = jobFinishRateData(tableJobRate);
|
||||
//string sqlJobRate = "select * from vhome_jobrecord_data ";
|
||||
//SqlCommand comJobRate = new SqlCommand(sqlJobRate, connection);
|
||||
//SqlDataAdapter jobRateData = new SqlDataAdapter(comJobRate);
|
||||
//jobRateData.Fill(tableJobRate);
|
||||
//result.Data.jobFinishRate = jobFinishRateData(tableJobRate);
|
||||
//各公司安全检查统计
|
||||
string sqlSafecCheck = "select * from vhome_check_total ";
|
||||
SqlCommand comSafecCheck = new SqlCommand(sqlSafecCheck, connection);
|
||||
SqlDataAdapter safecCheckData = new SqlDataAdapter(comSafecCheck);
|
||||
safecCheckData.Fill(tableSafeCheck);
|
||||
result.Data.safeCheckSum = safeCheckSumData(tableSafeCheck);
|
||||
//string sqlSafecCheck = "select * from vhome_check_total ";
|
||||
//SqlCommand comSafecCheck = new SqlCommand(sqlSafecCheck, connection);
|
||||
//SqlDataAdapter safecCheckData = new SqlDataAdapter(comSafecCheck);
|
||||
//safecCheckData.Fill(tableSafeCheck);
|
||||
//result.Data.safeCheckSum = safeCheckSumData(tableSafeCheck);
|
||||
//各公司危险分类统计
|
||||
string sqlLink = "select * from vhome_operationLink_data ";
|
||||
SqlCommand comLink = new SqlCommand(sqlLink, connection);
|
||||
SqlDataAdapter linkData = new SqlDataAdapter(comLink);
|
||||
linkData.Fill(tableLink);
|
||||
result.Data.linkSum = linkSumData(tableLink);
|
||||
//string sqlLink = "select * from vhome_operationLink_data ";
|
||||
//SqlCommand comLink = new SqlCommand(sqlLink, connection);
|
||||
//SqlDataAdapter linkData = new SqlDataAdapter(comLink);
|
||||
//linkData.Fill(tableLink);
|
||||
//result.Data.linkSum = linkSumData(tableLink);
|
||||
|
||||
connection.Close();
|
||||
}
|
||||
@ -434,7 +477,28 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当日工作票统计数量
|
||||
/// </summary>
|
||||
/// <param name="filter">参数</param>
|
||||
/// <returns></returns>
|
||||
public List<JobTodayQty> JobTodayQtyData(DataTable Table)
|
||||
{
|
||||
List<JobTodayQty> result = new List<JobTodayQty>();
|
||||
if (Table != null && Table.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow item in Table.Rows)
|
||||
{
|
||||
result.Add(new JobTodayQty()
|
||||
{
|
||||
qty = int.Parse(Table.Rows[0]["QTY"].ToString()) != 0 ? int.Parse(Table.Rows[0]["QTY"].ToString()) : 0,
|
||||
workTypeId = Guid.Parse(Table.Rows[0]["WORK_PERMIT_TYPE_ID"].ToString()),
|
||||
name = Table.Rows[0]["NAME"] != null ? Table.Rows[0]["NAME"].ToString() : null
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 隐患整改率
|
||||
/// </summary>
|
||||
@ -452,7 +516,26 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐患统计数据
|
||||
/// </summary>
|
||||
/// <param name="filter">参数</param>
|
||||
/// <returns></returns>
|
||||
public HiddenSummary HiddenSummaryData(DataTable Table)
|
||||
{
|
||||
HiddenSummary result = new HiddenSummary();
|
||||
if (Table != null && Table.Rows.Count > 0)
|
||||
{
|
||||
result.majorQty = int.Parse(Table.Rows[0]["majorQty"].ToString()) != 0 ? int.Parse(Table.Rows[0]["majorQty"].ToString()) : 0;
|
||||
result.generalQty = int.Parse(Table.Rows[0]["generalQty"].ToString()) != 0 ? int.Parse(Table.Rows[0]["generalQty"].ToString()) : 0;
|
||||
result.unfinishQty = int.Parse(Table.Rows[0]["unfinishQty"].ToString()) != 0 ? int.Parse(Table.Rows[0]["unfinishQty"].ToString()) : 0;
|
||||
result.monthMajorQty = int.Parse(Table.Rows[0]["monthMajorQty"].ToString()) != 0 ? int.Parse(Table.Rows[0]["monthMajorQty"].ToString()) : 0;
|
||||
result.unfinishMonthMajorQty = int.Parse(Table.Rows[0]["unfinishMonthMajorQty"].ToString()) != 0 ? int.Parse(Table.Rows[0]["unfinishMonthMajorQty"].ToString()) : 0;
|
||||
result.monthGeneralQty = int.Parse(Table.Rows[0]["monthGeneralQty"].ToString()) != 0 ? int.Parse(Table.Rows[0]["monthGeneralQty"].ToString()) : 0;
|
||||
result.unfinishMonthGeneralQty = int.Parse(Table.Rows[0]["unfinishMonthGeneralQty"].ToString()) != 0 ? int.Parse(Table.Rows[0]["unfinishMonthGeneralQty"].ToString()) : 0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 各事项排名前三
|
||||
/// </summary>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -115,7 +115,7 @@ namespace APT.SK.WebApi.Controllers.Api
|
||||
}
|
||||
}
|
||||
//发消息
|
||||
var titleName = "隐患确认单(" + depart?.NAME + DateTime.Now.Month.PadLeft(2,'0') + DateTime.Now.Day.PadLeft(2, '0');
|
||||
var titleName = "隐患确认单(" + depart?.NAME + DateTime.Now.Month.PadLeft(2,'0') + DateTime.Now.Day.PadLeft(2, '0')+")";
|
||||
if (orgId.ToString() == "d9871ba8-0eec-9e4a-bb87-7d5a540d8913")
|
||||
{
|
||||
titleName = "手动隐患上报完善";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user