Compare commits
No commits in common. "c3fbb4e6f6f2a5fe58b4e554515d5accb63a0616" and "061cb55e0672d34412589f8d43857193c9ad3e29" have entirely different histories.
c3fbb4e6f6
...
061cb55e06
@ -11,15 +11,14 @@ namespace APT.BaseData.Domain.Entities.FM
|
|||||||
/// 角色
|
/// 角色
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Redis("")]
|
[Redis("")]
|
||||||
[IgnoreT4]
|
[IgnoreT4] public partial class T_FM_ROLE : MesEntityBase
|
||||||
public partial class T_FM_ROLE : MesEntityBase
|
{
|
||||||
{
|
public T_FM_ROLE()
|
||||||
public T_FM_ROLE()
|
{
|
||||||
{
|
this.ROLE_TYPE = 0;
|
||||||
this.ROLE_TYPE = 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Description("编码")]
|
[Description("编码")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 编码
|
/// 编码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -43,22 +42,22 @@ namespace APT.BaseData.Domain.Entities.FM
|
|||||||
[Description("平台类型")]
|
[Description("平台类型")]
|
||||||
public int PLATFORM_TYPE { get; set; }
|
public int PLATFORM_TYPE { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 角色类型
|
/// 角色类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EnumName("FMRoleTypeEnum")]
|
[EnumName("FMRoleTypeEnum")]
|
||||||
[Description("角色类型")]
|
[Description("角色类型")]
|
||||||
public int? ROLE_TYPE { get; set; }
|
public int? ROLE_TYPE { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// FMEnableStatusEnum
|
/// FMEnableStatusEnum
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("启用标志")]
|
[Description("启用标志")]
|
||||||
[EnumName("FMEnableStatusEnum")]
|
[EnumName("FMEnableStatusEnum")]
|
||||||
public int ENABLE_STATUS { get; set; }
|
public int ENABLE_STATUS { get; set; }
|
||||||
|
|
||||||
[Description("备注")]
|
[Description("备注")]
|
||||||
public string REMARK { get; set; }
|
public string REMARK { get; set; }
|
||||||
|
|
||||||
[Description("授权数据")]
|
[Description("授权数据")]
|
||||||
[DataFieldIngore]
|
[DataFieldIngore]
|
||||||
@ -93,11 +92,8 @@ namespace APT.BaseData.Domain.Entities.FM
|
|||||||
[DataFieldIngore]
|
[DataFieldIngore]
|
||||||
public List<OrgRuleDeptCheck> DepartmentCheckedKeys { get; set; }
|
public List<OrgRuleDeptCheck> DepartmentCheckedKeys { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否默认角色
|
|
||||||
/// </summary>
|
|
||||||
[Description("是否默认角色")]
|
|
||||||
public bool ISDEFAULT { get; set; } = false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,24 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace APT.Data.Migrations.Migrations
|
|
||||||
{
|
|
||||||
public partial class wyw2026041601 : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "ISDEFAULT",
|
|
||||||
table: "T_FM_ROLE",
|
|
||||||
type: "bit",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ISDEFAULT",
|
|
||||||
table: "T_FM_ROLE");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -5405,9 +5405,6 @@ namespace APT.Data.Migrations.Migrations
|
|||||||
b.Property<Guid?>("FORM_ID")
|
b.Property<Guid?>("FORM_ID")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<bool>("ISDEFAULT")
|
|
||||||
.HasColumnType("bit");
|
|
||||||
|
|
||||||
b.Property<bool>("IS_CHECK_MESSAGE")
|
b.Property<bool>("IS_CHECK_MESSAGE")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
|||||||
@ -808,7 +808,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
List<T_FM_USER_POST> listUserPost = GetEntities<T_FM_USER_POST>(e => e.STATUS == ((int)FMPostStatusType.启用), null).ToList();
|
List<T_FM_USER_POST> listUserPost = GetEntities<T_FM_USER_POST>(e => e.STATUS == ((int)FMPostStatusType.启用), null).ToList();
|
||||||
List<T_PF_APPROVAL_ROLE> listApproveRole = GetEntities<T_PF_APPROVAL_ROLE>(null, null).ToList();//导入自动添加
|
List<T_PF_APPROVAL_ROLE> listApproveRole = GetEntities<T_PF_APPROVAL_ROLE>(null, null).ToList();//导入自动添加
|
||||||
List<T_FM_USER_BELONG_ROLE> listUserRole = GetEntities<T_FM_USER_BELONG_ROLE>(null, null).ToList();
|
List<T_FM_USER_BELONG_ROLE> listUserRole = GetEntities<T_FM_USER_BELONG_ROLE>(null, null).ToList();
|
||||||
List<T_FM_ROLE> listRole = GetEntities<T_FM_ROLE>(e => !e.IS_DELETED && e.ENABLE_STATUS == 0 && e.ISDEFAULT, null).ToList();//不做添加 平台类型前端不好改
|
List<T_FM_ROLE> listRole = GetEntities<T_FM_ROLE>(null, null).ToList();//不做添加 平台类型前端不好改
|
||||||
List<T_OP_ALLUSER> listAll = new List<T_OP_ALLUSER>();
|
List<T_OP_ALLUSER> listAll = new List<T_OP_ALLUSER>();
|
||||||
|
|
||||||
List<T_FM_DEPARTMENT> listDepAdd = new List<T_FM_DEPARTMENT>();//需要新增的组织
|
List<T_FM_DEPARTMENT> listDepAdd = new List<T_FM_DEPARTMENT>();//需要新增的组织
|
||||||
@ -909,11 +909,10 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
//操作角色 16
|
//操作角色 16
|
||||||
//string strRole = string.Empty;
|
//string strRole = string.Empty;
|
||||||
char[] charSplit = new char[] { ';', ';' };
|
char[] charSplit = new char[] { ';', ';' };
|
||||||
|
List<string> listStrRole = new List<string>() { "App用户" };//操作角色列删除 配置默认角色 “App用户”
|
||||||
//List<string> listStrRole = new List<string>() { "App用户" };//操作角色列删除 配置默认角色 “App用户”
|
List<T_FM_ROLE> listRoleItem = new List<T_FM_ROLE>();
|
||||||
//List<T_FM_ROLE> listRoleItem = new List<T_FM_ROLE>();
|
List<string> listRoleName = new List<string>();
|
||||||
//List<string> listRoleName = new List<string>();
|
List<int> listRoleIndex = new List<int>();
|
||||||
//List<int> listRoleIndex = new List<int>();
|
|
||||||
T_FM_USER_BELONG_ROLE modelUserRole = null;
|
T_FM_USER_BELONG_ROLE modelUserRole = null;
|
||||||
|
|
||||||
//0:公司名称* 1:部门名称 2:部门编号 3:车间名称 4:车间编号 5:班组名称 6:班组编号
|
//0:公司名称* 1:部门名称 2:部门编号 3:车间名称 4:车间编号 5:班组名称 6:班组编号
|
||||||
@ -1311,14 +1310,14 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
//if (!string.IsNullOrEmpty(strRole))
|
//if (!string.IsNullOrEmpty(strRole))
|
||||||
//{
|
//{
|
||||||
// listStrRole = strRole.Split(charSplit, StringSplitOptions.RemoveEmptyEntries).ToList();
|
// listStrRole = strRole.Split(charSplit, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
//try
|
try
|
||||||
//{
|
{
|
||||||
// listRoleItem = listRole.FindAll(e => listStrRole.Contains(e.NAME)).ToList();
|
listRoleItem = listRole.FindAll(e => listStrRole.Contains(e.NAME)).ToList();
|
||||||
//}
|
}
|
||||||
//catch
|
catch
|
||||||
//{
|
{
|
||||||
// listRoleItem = null;
|
listRoleItem = null;
|
||||||
//}
|
}
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
@ -1406,25 +1405,23 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
listPerson.Add(modelPerson);
|
listPerson.Add(modelPerson);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (listRole != null && listRole.Count > 0)
|
if (listRoleItem != null && listRoleItem.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var item in listRole)
|
foreach (var item in listRoleItem)
|
||||||
{
|
{
|
||||||
if (!isAddUser)
|
if (!isAddUser)
|
||||||
{
|
{
|
||||||
modelUserRole = listUserRole.FirstOrDefault(e => e.USER_ID == modelUser.ID && e.BELONG_ROLE_ID == item.ID);
|
modelUserRole = listUserRole.FirstOrDefault(e => e.USER_ID == modelUser.ID && e.BELONG_ROLE_ID == item.ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modelUserRole == null)
|
if (modelUserRole == null)
|
||||||
{
|
modelUserRole = new T_FM_USER_BELONG_ROLE();
|
||||||
modelUserRole = new T_FM_USER_BELONG_ROLE();
|
|
||||||
modelUserRole.ID = Guid.NewGuid();
|
modelUserRole.ID = Guid.NewGuid();
|
||||||
modelUserRole.CREATE_TIME = dtNow;
|
|
||||||
}
|
|
||||||
modelUserRole.ORG_ID = OrgID;
|
modelUserRole.ORG_ID = OrgID;
|
||||||
modelUserRole.USER_ID = modelUser.ID;
|
modelUserRole.USER_ID = modelUser.ID;
|
||||||
modelUserRole.BELONG_ROLE_ID = item.ID;
|
modelUserRole.BELONG_ROLE_ID = item.ID;
|
||||||
modelUserRole.MODIFY_TIME = dtNow;
|
modelUserRole.CREATE_TIME = dtNow;
|
||||||
|
|
||||||
listUserRoleAdd.Add(modelUserRole);
|
listUserRoleAdd.Add(modelUserRole);
|
||||||
listUserRole.Add(modelUserRole);
|
listUserRole.Add(modelUserRole);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user