Commit 63248a44 authored by liudong1993's avatar liudong1993

OKR权限调整

parent 00ebecb4
...@@ -1355,6 +1355,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1355,6 +1355,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -1400,6 +1411,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1400,6 +1411,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
} }
foreach (var item in xdqlist) foreach (var item in xdqlist)
...@@ -1448,6 +1470,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1448,6 +1470,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -1493,6 +1526,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1493,6 +1526,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
} }
foreach (var item in list) foreach (var item in list)
...@@ -1664,6 +1708,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1664,6 +1708,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
List<int> MyUnderlingList = GetMyUnderlingUserIdList(userInfo); List<int> MyUnderlingList = GetMyUnderlingUserIdList(userInfo);
if (!MyUnderlingList.Contains(userId)) if (!MyUnderlingList.Contains(userId))
{ {
var pplist = oKR_PeriodPermissionRepository.GetList(new Model.Entity.OKR.RB_OKR_PeriodPermission() { Group_Id = userInfo.Group_Id, PeriodId = PeriodId, CreateBy = userId });
//查询是否有权限 //查询是否有权限
var zpList = oKR_PermissionRepository.GetList(new RB_OKR_Permission_ViewModel() { Group_Id = userInfo.Group_Id, PermissionType = 1, TargetId = PeriodId, CreateBy = userId }); var zpList = oKR_PermissionRepository.GetList(new RB_OKR_Permission_ViewModel() { Group_Id = userInfo.Group_Id, PermissionType = 1, TargetId = PeriodId, CreateBy = userId });
if (zpList.Any()) if (zpList.Any())
...@@ -1698,7 +1743,6 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1698,7 +1743,6 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
}; };
} }
} }
var pplist = oKR_PeriodPermissionRepository.GetList(new Model.Entity.OKR.RB_OKR_PeriodPermission() { Group_Id = userInfo.Group_Id, PeriodId = PeriodId, CreateBy = userId });
if (LookList.Any() && pplist.Any()) if (LookList.Any() && pplist.Any())
{ {
if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any() if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()
...@@ -1717,6 +1761,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1717,6 +1761,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (pplist.Any())
{
return new
{
Status = 2,
Msg = "没有权限查询"
};
}
}
} }
var list = oKR_ObjectiveRepository.GetList(new RB_OKR_Objective_ViewModel() { Group_Id = userInfo.Group_Id, PeriodId = PeriodId, CreateBy = userId, Status = 2 }); var list = oKR_ObjectiveRepository.GetList(new RB_OKR_Objective_ViewModel() { Group_Id = userInfo.Group_Id, PeriodId = PeriodId, CreateBy = userId, Status = 2 });
if (list.Any()) if (list.Any())
...@@ -1800,6 +1855,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1800,6 +1855,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -1845,6 +1911,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1845,6 +1911,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
} }
foreach (var item in xdqlist) foreach (var item in xdqlist)
...@@ -1893,6 +1970,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1893,6 +1970,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -1938,6 +2026,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1938,6 +2026,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
} }
foreach (var item in list) foreach (var item in list)
...@@ -1986,6 +2085,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -1986,6 +2085,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -2031,6 +2141,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2031,6 +2141,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
if (item.IsDefaultState == 1 && item.KeyResultList.Any()) if (item.IsDefaultState == 1 && item.KeyResultList.Any())
{ {
...@@ -2183,6 +2304,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2183,6 +2304,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
List<int> MyUnderlingList = GetMyUnderlingUserIdList(userInfo); List<int> MyUnderlingList = GetMyUnderlingUserIdList(userInfo);
if (!MyUnderlingList.Contains(userId)) if (!MyUnderlingList.Contains(userId))
{ {
var pplist = oKR_PeriodPermissionRepository.GetList(new Model.Entity.OKR.RB_OKR_PeriodPermission() { Group_Id = userInfo.Group_Id, PeriodId = PeriodId, CreateBy = userId });
//查询是否有权限 //查询是否有权限
var zpList = oKR_PermissionRepository.GetList(new RB_OKR_Permission_ViewModel() { Group_Id = userInfo.Group_Id, PermissionType = 1, TargetId = PeriodId, CreateBy = userId }); var zpList = oKR_PermissionRepository.GetList(new RB_OKR_Permission_ViewModel() { Group_Id = userInfo.Group_Id, PermissionType = 1, TargetId = PeriodId, CreateBy = userId });
if (zpList.Any()) if (zpList.Any())
...@@ -2217,7 +2339,6 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2217,7 +2339,6 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
}; };
} }
} }
var pplist = oKR_PeriodPermissionRepository.GetList(new Model.Entity.OKR.RB_OKR_PeriodPermission() { Group_Id = userInfo.Group_Id, PeriodId = PeriodId, CreateBy = userId });
if (LookList.Any() && pplist.Any()) if (LookList.Any() && pplist.Any())
{ {
if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any() if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()
...@@ -2236,6 +2357,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2236,6 +2357,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (pplist.Any())
{
return new
{
Status = 2,
Msg = "没有权限查询"
};
}
}
} }
var list = oKR_ObjectiveRepository.GetList(new RB_OKR_Objective_ViewModel() { Group_Id = userInfo.Group_Id, Id = objectiveId, PeriodId = PeriodId, CreateBy = userId, Status = 2 }); var list = oKR_ObjectiveRepository.GetList(new RB_OKR_Objective_ViewModel() { Group_Id = userInfo.Group_Id, Id = objectiveId, PeriodId = PeriodId, CreateBy = userId, Status = 2 });
if (list.Any()) if (list.Any())
...@@ -2319,6 +2451,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2319,6 +2451,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -2364,6 +2507,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2364,6 +2507,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
} }
foreach (var item in xdqlist) foreach (var item in xdqlist)
...@@ -2412,6 +2566,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2412,6 +2566,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -2457,6 +2622,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2457,6 +2622,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
} }
foreach (var item in list) foreach (var item in list)
...@@ -2505,6 +2681,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2505,6 +2681,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -2550,6 +2737,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2550,6 +2737,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
if (item.IsDefaultState == 1 && item.KeyResultList.Any()) if (item.IsDefaultState == 1 && item.KeyResultList.Any())
{ {
...@@ -2925,6 +3123,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2925,6 +3123,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
List<int> MyUnderlingList = GetMyUnderlingUserIdList(userInfo); List<int> MyUnderlingList = GetMyUnderlingUserIdList(userInfo);
if (!MyUnderlingList.Contains(userId)) if (!MyUnderlingList.Contains(userId))
{ {
var pplist = oKR_PeriodPermissionRepository.GetList(new Model.Entity.OKR.RB_OKR_PeriodPermission() { Group_Id = userInfo.Group_Id, PeriodId = periodId, CreateBy = userId });
//查询是否有权限 //查询是否有权限
var zpList = oKR_PermissionRepository.GetList(new RB_OKR_Permission_ViewModel() { Group_Id = userInfo.Group_Id, PermissionType = 1, TargetId = periodId, CreateBy = userId }); var zpList = oKR_PermissionRepository.GetList(new RB_OKR_Permission_ViewModel() { Group_Id = userInfo.Group_Id, PermissionType = 1, TargetId = periodId, CreateBy = userId });
if (zpList.Any()) if (zpList.Any())
...@@ -2959,7 +3158,6 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2959,7 +3158,6 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
}; };
} }
} }
var pplist = oKR_PeriodPermissionRepository.GetList(new Model.Entity.OKR.RB_OKR_PeriodPermission() { Group_Id = userInfo.Group_Id, PeriodId = periodId, CreateBy = userId });
if (LookList.Any() && pplist.Any()) if (LookList.Any() && pplist.Any())
{ {
if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any() if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()
...@@ -2978,6 +3176,15 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -2978,6 +3176,15 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else {
if (pplist.Any()) {
return new
{
Status = 2,
Msg = "没有权限查询"
};
}
}
} }
var list = oKR_ObjectiveRepository.GetList(new RB_OKR_Objective_ViewModel() { Group_Id = userInfo.Group_Id, PeriodId = periodId, CreateBy = userId, Status = 2 }); var list = oKR_ObjectiveRepository.GetList(new RB_OKR_Objective_ViewModel() { Group_Id = userInfo.Group_Id, PeriodId = periodId, CreateBy = userId, Status = 2 });
if (list.Any()) if (list.Any())
...@@ -3043,6 +3250,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -3043,6 +3250,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -3088,6 +3306,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -3088,6 +3306,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
if (item.IsDefaultState == 1 && item.KeyResultList.Any()) if (item.IsDefaultState == 1 && item.KeyResultList.Any())
{ {
...@@ -3223,6 +3452,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -3223,6 +3452,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -3268,6 +3508,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -3268,6 +3508,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
} }
foreach (var item in xdqlist) foreach (var item in xdqlist)
...@@ -3316,6 +3567,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -3316,6 +3567,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
foreach (var qitem in item.KeyResultList) foreach (var qitem in item.KeyResultList)
{ {
qitem.IsLock = 2; qitem.IsLock = 2;
...@@ -3361,6 +3623,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -3361,6 +3623,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (qitem.IsDefaultPermission == 2)
{
qitem.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
qitem.IsNotLook = 1;
}
}
}
} }
} }
foreach (var item in list) foreach (var item in list)
...@@ -4874,7 +5147,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -4874,7 +5147,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
var postList = new List<Model.ViewModel.User.RB_Post_ViewModel>(); var postList = new List<Model.ViewModel.User.RB_Post_ViewModel>();
if (!string.IsNullOrEmpty(gids)) if (!string.IsNullOrEmpty(gids))
{ {
postRepository.GetPostListRepository(new Model.ViewModel.User.RB_Post_ViewModel() { QPostIds = gids }); postList = postRepository.GetPostListRepository(new Model.ViewModel.User.RB_Post_ViewModel() { QPostIds = gids });
} }
foreach (var item in list) foreach (var item in list)
...@@ -6231,34 +6504,42 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -6231,34 +6504,42 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
foreach (var UserId in DQUserId) foreach (var UserId in DQUserId)
{ {
int IsLook = 2; int IsLook = 2;
var NotLookList = zpList.Where(x => x.CreateBy == UserId && x.State == 2).ToList(); if (zpList.Where(x => x.CreateBy == UserId).Any())
var LookList = zpList.Where(x => x.CreateBy == UserId && x.State == 1).ToList();
if (NotLookList.Any())
{ {
//有不可看的 var NotLookList = zpList.Where(x => x.CreateBy == UserId && x.State == 2).ToList();
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()) var LookList = zpList.Where(x => x.CreateBy == UserId && x.State == 1).ToList();
{ if (NotLookList.Any())
IsLook = 1;
}
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any())
{ {
IsLook = 1; //有不可看的
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any())
{
IsLook = 1;
}
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any())
{
IsLook = 1;
}
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any())
{
IsLook = 1;
}
} }
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any()) if (LookList.Any() && pplist.Where(x => x.CreateBy == UserId).Any())
{ {
IsLook = 1; if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any())
{
//OK
}
else
{
IsLook = 1;
}
} }
} }
if (LookList.Any() && pplist.Where(x => x.CreateBy == UserId).Any()) else {
{ if (pplist.Where(x => x.CreateBy == UserId).Any()) {
if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any())
{
//OK
}
else
{
IsLook = 1; IsLook = 1;
} }
} }
...@@ -6329,6 +6610,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -6329,6 +6610,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
} }
foreach (var item in xdqlist) foreach (var item in xdqlist)
{ {
...@@ -6389,6 +6681,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -6389,6 +6681,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
} }
foreach (var item in list) foreach (var item in list)
...@@ -6500,34 +6803,42 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -6500,34 +6803,42 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
foreach (var UserId in DQUserId) foreach (var UserId in DQUserId)
{ {
int IsLook = 2; int IsLook = 2;
var NotLookList = zpList.Where(x => x.CreateBy == UserId && x.State == 2).ToList(); if (zpList.Where(x => x.CreateBy == UserId).Any())
var LookList = zpList.Where(x => x.CreateBy == UserId && x.State == 1).ToList();
if (NotLookList.Any())
{ {
//有不可看的 var NotLookList = zpList.Where(x => x.CreateBy == UserId && x.State == 2).ToList();
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()) var LookList = zpList.Where(x => x.CreateBy == UserId && x.State == 1).ToList();
{ if (NotLookList.Any())
IsLook = 1;
}
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any())
{ {
IsLook = 1; //有不可看的
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any())
{
IsLook = 1;
}
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any())
{
IsLook = 1;
}
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any())
{
IsLook = 1;
}
} }
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any()) if (LookList.Any() && pplist.Where(x => x.CreateBy == UserId).Any())
{ {
IsLook = 1; if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any())
{
//OK
}
else
{
IsLook = 1;
}
} }
} }
if (LookList.Any() && pplist.Where(x => x.CreateBy == UserId).Any()) else {
{ if (pplist.Where(x => x.CreateBy == UserId).Any()) {
if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any())
{
//OK
}
else
{
IsLook = 1; IsLook = 1;
} }
} }
...@@ -6598,6 +6909,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -6598,6 +6909,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
} }
return sdqlist.Select(y => new return sdqlist.Select(y => new
...@@ -6659,34 +6981,42 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -6659,34 +6981,42 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
foreach (var UserId in DQUserId) foreach (var UserId in DQUserId)
{ {
int IsLook = 2; int IsLook = 2;
var NotLookList = zpList.Where(x => x.CreateBy == UserId && x.State == 2).ToList(); if (zpList.Where(x => x.CreateBy == UserId).Any())
var LookList = zpList.Where(x => x.CreateBy == UserId && x.State == 1).ToList();
if (NotLookList.Any())
{ {
//有不可看的 var NotLookList = zpList.Where(x => x.CreateBy == UserId && x.State == 2).ToList();
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()) var LookList = zpList.Where(x => x.CreateBy == UserId && x.State == 1).ToList();
{ if (NotLookList.Any())
IsLook = 1;
}
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any())
{ {
IsLook = 1; //有不可看的
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any())
{
IsLook = 1;
}
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any())
{
IsLook = 1;
}
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any())
{
IsLook = 1;
}
} }
if (NotLookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any()) if (LookList.Any() && pplist.Where(x => x.CreateBy == UserId).Any())
{ {
IsLook = 1; if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any())
{
//OK
}
else
{
IsLook = 1;
}
} }
} }
if (LookList.Any() && pplist.Where(x => x.CreateBy == UserId).Any()) else {
{ if (pplist.Where(x => x.CreateBy == UserId).Any()) {
if (LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Employee && x.SourceId == userInfo.Id).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Post && x.SourceId == userInfo.PostId).Any()
|| LookList.Where(x => x.Type == Common.Enum.OKR.PermissionTypeEnum.Department && x.SourceId == userInfo.DeptId).Any())
{
//OK
}
else
{
IsLook = 1; IsLook = 1;
} }
} }
...@@ -6757,6 +7087,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru ...@@ -6757,6 +7087,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
} }
} }
} }
else
{
if (item.IsDefaultPermission == 2)
{
item.IsLock = 1;
if (!MyUnderlingList.Contains(item.CreateBy))
{
item.IsNotLook = 1;
}
}
}
} }
return xdqlist.Select(y => new return xdqlist.Select(y => new
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment