安全意识调查 删除数据做判断
人员导入 操作角色列删除,默认添加【App用户】
This commit is contained in:
parent
c203e8f708
commit
2ab088b4c0
@ -789,7 +789,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
Msg = "未获取到导入数据";
|
Msg = "未获取到导入数据";
|
||||||
throw new Exception(Msg);
|
throw new Exception(Msg);
|
||||||
}
|
}
|
||||||
List<int> listNotEmpty = new List<int>() { 0, 7, 8, 9, 12, 16 };
|
List<int> listNotEmpty = new List<int>() { 0, 7, 8, 9, 12 };//, 16
|
||||||
|
|
||||||
//使用组织 T_FM_DEPARTMENT
|
//使用组织 T_FM_DEPARTMENT
|
||||||
//物料类型 T_TI_SAFE_PDT_COST_RECORD_TYPE T_TI_COST_TYPE
|
//物料类型 T_TI_SAFE_PDT_COST_RECORD_TYPE T_TI_COST_TYPE
|
||||||
@ -907,9 +907,9 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
List<int> listApproveRoleIndex = new List<int>();
|
List<int> listApproveRoleIndex = new List<int>();
|
||||||
|
|
||||||
//操作角色 16
|
//操作角色 16
|
||||||
string strRole = string.Empty;
|
//string strRole = string.Empty;
|
||||||
char[] charSplit = new char[] { ';', ';' };
|
char[] charSplit = new char[] { ';', ';' };
|
||||||
List<string> listStrRole = new List<string>();
|
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>();
|
||||||
@ -988,7 +988,7 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
#region 不能为空
|
#region 不能为空
|
||||||
|
|
||||||
List<string> listi = null;
|
List<string> listi = null;
|
||||||
for (int j = 0; j < 17; j++)
|
for (int j = 0; j < 16; j++)//17
|
||||||
{
|
{
|
||||||
if (!listNotEmpty.Contains(j))
|
if (!listNotEmpty.Contains(j))
|
||||||
continue;
|
continue;
|
||||||
@ -1299,16 +1299,16 @@ namespace APT.BS.WebApi.Controllers.Api
|
|||||||
|
|
||||||
#region 操作角色 16
|
#region 操作角色 16
|
||||||
|
|
||||||
strRole = dtSource.Rows[i][16].ToString().Trim();
|
//strRole = dtSource.Rows[i][16].ToString().Trim();
|
||||||
if (!string.IsNullOrEmpty(strRole))
|
//if (!string.IsNullOrEmpty(strRole))
|
||||||
{
|
//{
|
||||||
listStrRole = strRole.Split(charSplit, StringSplitOptions.RemoveEmptyEntries).ToList();
|
// listStrRole = strRole.Split(charSplit, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
listRoleItem = listRole.FindAll(e => listStrRole.Contains(e.NAME)).ToList();
|
listRoleItem = listRole.FindAll(e => listStrRole.Contains(e.NAME)).ToList();
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
listRoleItem = null;
|
// listRoleItem = null;
|
||||||
}
|
//}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -83,12 +83,12 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
List<T_SE_TRAIN_SURVEY_LIST_DEMAND> Nav_Demands = null;
|
List<T_SE_TRAIN_SURVEY_LIST_DEMAND> Nav_Demands = null;
|
||||||
List<T_FM_NOTIFICATION_TASK> noticeTask = null;
|
List<T_FM_NOTIFICATION_TASK> noticeTask = null;
|
||||||
|
|
||||||
var listUserID = Demands.Where(e => e.USER_ID.HasValue).Select(e => e.USER_ID.Value);
|
var listUserID = Demands.Where(e => !e.IS_DELETED && e.USER_ID.HasValue).Select(e => e.USER_ID.Value);
|
||||||
var listUserIDCheck = listUserID.Distinct();
|
var listUserIDCheck = listUserID.Distinct();
|
||||||
var ccCheck = listUserID.Count() - listUserIDCheck.Count();
|
var ccCheck = listUserID.Count() - listUserIDCheck.Count();
|
||||||
if (ccCheck > 0)
|
if (ccCheck > 0)
|
||||||
{
|
{
|
||||||
throw new Exception("调查人员不能重复("+ ccCheck + "人)!");
|
throw new Exception("调查人员不能重复(" + ccCheck + "人)!");
|
||||||
}
|
}
|
||||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user