Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe
This commit is contained in:
commit
28579f8037
@ -61,20 +61,20 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
var ListPlanDetail = entity.Nav_ListPlanDetail;
|
||||
entity.Nav_ListPlanDetail = null;
|
||||
List<T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT> ListDetailDepartment = new List<T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT>();
|
||||
Expression<Func<T_SE_TRAIN_PLAN, bool>> expression = e => e.ID != entity.ID && e.YEAR == entity.YEAR && !e.IS_DELETED;
|
||||
if (entity.TYPE == MS.Domain.Enums.PlanType.Company)
|
||||
{
|
||||
expression = expression.And(e => e.TYPE == entity.TYPE);
|
||||
}
|
||||
else
|
||||
{
|
||||
expression = expression.And(e => e.DEPARTMENT_ID == APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID);
|
||||
}
|
||||
var check = GetEntity(expression);
|
||||
if (check != null)
|
||||
{
|
||||
throw new Exception("您所在层级/组织当年度已经制定过培训计划,请勿多次提交!");
|
||||
}
|
||||
//Expression<Func<T_SE_TRAIN_PLAN, bool>> expression = e => e.ID != entity.ID && e.YEAR == entity.YEAR && !e.IS_DELETED;
|
||||
//if (entity.TYPE == MS.Domain.Enums.PlanType.Company)
|
||||
//{
|
||||
// expression = expression.And(e => e.TYPE == entity.TYPE);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// expression = expression.And(e => e.DEPARTMENT_ID == APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID);
|
||||
//}
|
||||
//var check = GetEntity(expression);
|
||||
//if (check != null)
|
||||
//{
|
||||
// throw new Exception("您所在层级/组织当年度已经制定过培训计划,请勿多次提交!");
|
||||
//}
|
||||
if (ListPlanDetail != null && ListPlanDetail.Count() > 0)
|
||||
{
|
||||
foreach (var item in ListPlanDetail)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user