优化
This commit is contained in:
parent
e583d55e02
commit
ce25fafc6e
@ -13412,6 +13412,7 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var requre = this.GetEntity<T_SK_REQUEST>(t => !t.IS_DELETED);
|
var requre = this.GetEntity<T_SK_REQUEST>(t => !t.IS_DELETED);
|
||||||
|
var plan = this.GetEntity<T_SK_IDENTIFY_EVALUATION_PLAN>(t => t.ID == entity.IDENTIFY_EVALUATION_PLAN_ID);
|
||||||
var filter = new BaseFilter(entity.ORG_ID);
|
var filter = new BaseFilter(entity.ORG_ID);
|
||||||
filter.IgnoreDataRule = true;
|
filter.IgnoreDataRule = true;
|
||||||
Expression<Func<T_SK_RISK_IDENTIFY, bool>> expression = i => i.IS_DELETED == false && i.IDENTIFY_EVALUATION_PLAN_ID == entity.IDENTIFY_EVALUATION_PLAN_ID && departIds.Contains((Guid)i.APPLY_DEPARTMENT_ID);
|
Expression<Func<T_SK_RISK_IDENTIFY, bool>> expression = i => i.IS_DELETED == false && i.IDENTIFY_EVALUATION_PLAN_ID == entity.IDENTIFY_EVALUATION_PLAN_ID && departIds.Contains((Guid)i.APPLY_DEPARTMENT_ID);
|
||||||
@ -13429,8 +13430,8 @@ namespace APT.BaseData.Services.DomainServices
|
|||||||
result.YEAR = entity.YEAR;
|
result.YEAR = entity.YEAR;
|
||||||
result.ISAUTO = true;
|
result.ISAUTO = true;
|
||||||
result.CONTENTS = entity.CONTENTS;
|
result.CONTENTS = entity.CONTENTS;
|
||||||
result.START_DATE = entity.START_DATE;
|
result.START_DATE = plan?.START_DATE;
|
||||||
result.END_DATE = entity.END_DATE;
|
result.END_DATE = plan?.END_DATE;
|
||||||
result.REQUIRE_ID = entity.REQUIRE_ID != null ? entity.REQUIRE_ID : requre?.ID;
|
result.REQUIRE_ID = entity.REQUIRE_ID != null ? entity.REQUIRE_ID : requre?.ID;
|
||||||
result.ISCOMPANY = currentDepart.DEPARTMENT_TYPE == 5 ? SKIsStoreEnum.Yes : SKIsStoreEnum.No;
|
result.ISCOMPANY = currentDepart.DEPARTMENT_TYPE == 5 ? SKIsStoreEnum.Yes : SKIsStoreEnum.No;
|
||||||
var planTemp = this.GetEntity<T_SK_IDENTIFY_EVALUATION_PLAN>(t => t.ID == entity.IDENTIFY_EVALUATION_PLAN_ID, "Nav_Requires");
|
var planTemp = this.GetEntity<T_SK_IDENTIFY_EVALUATION_PLAN>(t => t.ID == entity.IDENTIFY_EVALUATION_PLAN_ID, "Nav_Requires");
|
||||||
|
|||||||
@ -2790,7 +2790,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
var departIds = departs.Select(t => t.ID).ToList();
|
var departIds = departs.Select(t => t.ID).ToList();
|
||||||
var teams = this.GetEntities_noneBase<T_FM_TEAM>(t => true);
|
var teams = this.GetEntities_noneBase<T_FM_TEAM>(t => true);
|
||||||
var teamPersons = this.GetEntities< T_FM_TEAM_PERSON> (t =>true, new BaseFilter(filter.OrgId));
|
var teamPersons = this.GetEntities< T_FM_TEAM_PERSON> (t =>true, new BaseFilter(filter.OrgId));
|
||||||
var users = this.GetEntities<T_FM_USER>(t => t.DEPARTMENT_ID != null && departIds.Contains((Guid)t.DEPARTMENT_ID),new BaseFilter(filter.OrgId));
|
var userAlls = this.GetEntities<T_FM_USER>(t => true, new BaseFilter(filter.OrgId));
|
||||||
|
var users = userAlls.Where(t => t.DEPARTMENT_ID != null && departIds.Contains((Guid)t.DEPARTMENT_ID) && t.ENABLE_STATUS == 0);
|
||||||
if (departIds != null && departIds.Any())
|
if (departIds != null && departIds.Any())
|
||||||
{
|
{
|
||||||
foreach (var item in departIds)
|
foreach (var item in departIds)
|
||||||
|
|||||||
@ -5566,8 +5566,8 @@ namespace APT.PP.WebApi.Controllers.Api
|
|||||||
}
|
}
|
||||||
if (item.CheckPost == "班组负责人")
|
if (item.CheckPost == "班组负责人")
|
||||||
{
|
{
|
||||||
//判断排班//取消人员排班判断&& teamDepartIds.Contains(t.DEPARTMENT_ID) && t.PERSON_ID != null && personIds.Contains((Guid)t.PERSON_ID)
|
//判断排班
|
||||||
userInfo = users.FirstOrDefault(t => t.DEPARTMENT_ID == item.CheckDepartId && t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == item.CheckPost);
|
userInfo = users.FirstOrDefault(t => t.DEPARTMENT_ID == item.CheckDepartId && teamDepartIds.Contains(t.DEPARTMENT_ID) && t.PERSON_ID != null && personIds.Contains((Guid)t.PERSON_ID) && t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == item.CheckPost);
|
||||||
}
|
}
|
||||||
if (userInfo == null && item.CheckDepartId != null && item.CheckPost != "班组负责人")
|
if (userInfo == null && item.CheckDepartId != null && item.CheckPost != "班组负责人")
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user