Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
84a58e03
Commit
84a58e03
authored
Mar 02, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规则名称调整
parent
5d9eb044
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
RB_OKR_KeyResult_ViewModel.cs
Edu.Model/ViewModel/OKR/RB_OKR_KeyResult_ViewModel.cs
+5
-0
RB_OKR_Rule_ViewModel.cs
Edu.Model/ViewModel/OKR/RB_OKR_Rule_ViewModel.cs
+4
-1
OKRPeriodModule.cs
Edu.Module.OKR/OKRPeriodModule.cs
+25
-1
No files found.
Edu.Model/ViewModel/OKR/RB_OKR_KeyResult_ViewModel.cs
View file @
84a58e03
...
...
@@ -38,6 +38,11 @@ namespace Edu.Model.ViewModel.OKR
/// </summary>
public
string
ScoreColor
{
get
;
set
;
}
/// <summary>
/// 规则名称
/// </summary>
public
string
RuleName
{
get
;
set
;
}
/// <summary>
/// 规则使用范围
/// </summary>
...
...
Edu.Model/ViewModel/OKR/RB_OKR_Rule_ViewModel.cs
View file @
84a58e03
...
...
@@ -9,6 +9,9 @@ namespace Edu.Model.ViewModel.OKR
[
Serializable
]
public
class
RB_OKR_Rule_ViewModel
:
Model
.
Entity
.
OKR
.
RB_OKR_Rule
{
/// <summary>
/// 规则ids
/// </summary>
public
string
RuleIds
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.OKR/OKRPeriodModule.cs
View file @
84a58e03
...
...
@@ -1335,13 +1335,21 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
string
krIds
=
string
.
Join
(
","
,
krList
.
Select
(
x
=>
x
.
Id
));
pkrList
=
oKR_PermissionRepository
.
GetList
(
new
RB_OKR_Permission_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
PermissionType
=
3
,
ObjectiveIds
=
krIds
});
}
//查询分数规则
string
scoreRuleIds
=
string
.
Join
(
","
,
list
.
Where
(
x
=>
x
.
ScoreRuleId
>
0
).
Select
(
x
=>
x
.
ScoreRuleId
));
var
ScoreRuleList
=
new
List
<
RB_OKR_ScoreDetail_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
scoreRuleIds
))
{
ScoreRuleList
=
oKR_ScoreDetailRepository
.
GetList
(
new
RB_OKR_ScoreDetail_ViewModel
()
{
ScoreIds
=
scoreRuleIds
});
}
//查询规则名称
string
ruleIds
=
string
.
Join
(
","
,
krList
.
Where
(
x
=>
x
.
RuleId
>
0
).
Select
(
x
=>
x
.
RuleId
).
Distinct
());
var
krRuleList
=
new
List
<
RB_OKR_Rule_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
ruleIds
))
{
krRuleList
=
oKR_RuleRepository
.
GetList
(
new
RB_OKR_Rule_ViewModel
()
{
RuleIds
=
ruleIds
});
}
foreach
(
var
item
in
sdqlist
)
{
item
.
KeyResultList
=
krList
.
Where
(
x
=>
x
.
ObjectiveId
==
item
.
Id
).
ToList
();
...
...
@@ -1368,6 +1376,9 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
{
qitem
.
IsLock
=
1
;
}
if
(
qitem
.
RuleId
>
0
)
{
qitem
.
RuleName
=
krRuleList
.
Where
(
x
=>
x
.
Id
==
qitem
.
RuleId
).
FirstOrDefault
()?.
RuleName
??
""
;
}
}
if
(
item
.
IsDefaultState
==
1
&&
item
.
KeyResultList
.
Any
())
{
...
...
@@ -1459,6 +1470,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
z
.
ScoreName
,
z
.
ScoreColor
,
z
.
RuleId
,
z
.
RuleName
,
RuleSTime
=
z
.
RuleSTime
.
HasValue
?
z
.
RuleSTime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
RuleETime
=
z
.
RuleETime
.
HasValue
?
z
.
RuleETime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
}),
...
...
@@ -2867,6 +2879,13 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
{
ScoreRuleList
=
oKR_ScoreDetailRepository
.
GetList
(
new
RB_OKR_ScoreDetail_ViewModel
()
{
ScoreIds
=
scoreRuleIds
});
}
//查询规则名称
string
ruleIds
=
string
.
Join
(
","
,
krList
.
Where
(
x
=>
x
.
RuleId
>
0
).
Select
(
x
=>
x
.
RuleId
).
Distinct
());
var
krRuleList
=
new
List
<
RB_OKR_Rule_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
ruleIds
))
{
krRuleList
=
oKR_RuleRepository
.
GetList
(
new
RB_OKR_Rule_ViewModel
()
{
RuleIds
=
ruleIds
});
}
foreach
(
var
item
in
sdqlist
)
{
...
...
@@ -2895,6 +2914,10 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
{
qitem
.
IsLock
=
1
;
}
if
(
qitem
.
RuleId
>
0
)
{
qitem
.
RuleName
=
krRuleList
.
Where
(
x
=>
x
.
Id
==
qitem
.
RuleId
).
FirstOrDefault
()?.
RuleName
??
""
;
}
}
if
(
item
.
IsDefaultState
==
1
&&
item
.
KeyResultList
.
Any
())
{
...
...
@@ -2987,6 +3010,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
z
.
ScoreName
,
z
.
ScoreColor
,
z
.
RuleId
,
z
.
RuleName
,
RuleSTime
=
z
.
RuleSTime
.
HasValue
?
z
.
RuleSTime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
RuleETime
=
z
.
RuleETime
.
HasValue
?
z
.
RuleETime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
}),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment