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
b550cb1f
Commit
b550cb1f
authored
Aug 23, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
7af27cce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
10 deletions
+41
-10
ExaminationPaperTreeModel.cs
Edu.Model/ViewModel/Exam/ExaminationPaperTreeModel.cs
+5
-0
RB_Examination_Paper_ViewModel.cs
Edu.Model/ViewModel/Exam/RB_Examination_Paper_ViewModel.cs
+5
-0
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+1
-0
RB_Examination_PaperRepository.cs
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
+22
-7
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+8
-3
No files found.
Edu.Model/ViewModel/Exam/ExaminationPaperTreeModel.cs
View file @
b550cb1f
...
...
@@ -104,5 +104,10 @@ namespace Edu.Model.ViewModel.Exam
/// 是否开发(1-私有,2-公开)
/// </summary>
public
int
IsOpen
{
get
;
set
;
}
/// <summary>
/// 审核备注
/// </summary>
public
string
ExamineRemark
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Exam/RB_Examination_Paper_ViewModel.cs
View file @
b550cb1f
...
...
@@ -43,5 +43,10 @@ namespace Edu.Model.ViewModel.Exam
/// 学生id
/// </summary>
public
int
GuestId
{
get
;
set
;
}
/// <summary>
/// 是否是试卷管理员
/// </summary>
public
int
IsPaperManager
{
get
;
set
;
}
}
}
Edu.Module.Exam/PaperModule.cs
View file @
b550cb1f
...
...
@@ -138,6 +138,7 @@ namespace Edu.Module.Exam
ExamineStatus
=
item
.
ExamineStatus
,
Reviewer
=
item
.
Reviewer
,
IsOpen
=
item
.
IsOpen
,
ExamineRemark
=
item
.
ExamineRemark
,
ReviewerName
=
item
.
Reviewer
>
0
?
(
UserReidsCache
.
GetUserLoginInfo
(
item
.
Reviewer
)?.
AccountName
??
""
)
:
""
};
//model.ChildList = GetPaperChild(childList, detailsList, item.PaperId);
...
...
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
View file @
b550cb1f
...
...
@@ -43,10 +43,6 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND A.{0} LIKE @PaperName "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperName
));
parameters
.
Add
(
"PaperName"
,
"%"
+
query
.
PaperName
.
Trim
()
+
"%"
);
}
if
(
query
.
ParentId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
query
.
ParentId
);
}
if
(
query
.
PaperId
>
0
)
{
...
...
@@ -56,13 +52,32 @@ WHERE 1=1
{
builder
.
AppendFormat
(
@" AND A.{0} IN({1}) "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
),
query
.
QPaperIds
);
}
if
(
query
.
CreateBy
>
0
)
//试卷管理员
if
(
query
.
IsPaperManager
==
1
)
{
builder
.
AppendFormat
(
@" AND (A.{0}={1} OR A.IsOpen=2) "
,
nameof
(
RB_Examination_Paper_ViewModel
.
CreateBy
),
query
.
CreateBy
);
if
(
query
.
ParentId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
query
.
ParentId
);
}
else
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
0
);
}
}
else
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
0
);
if
(
query
.
CreateBy
>
0
)
{
builder
.
AppendFormat
(
@" AND (A.{0}={1} OR A.IsOpen=2) "
,
nameof
(
RB_Examination_Paper_ViewModel
.
CreateBy
),
query
.
CreateBy
);
}
if
(
query
.
ParentId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
query
.
ParentId
);
}
//else
//{
// builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Examination_Paper_ViewModel.ParentId), 0);
//}
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
));
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
b550cb1f
...
...
@@ -62,8 +62,12 @@ namespace Edu.WebApi.Controllers.Exam
//不是试卷管理员
if
(!
base
.
CheckUserActionAuth
(
"Paper_Manager"
))
{
query
.
IsPaperManager
=
0
;
query
.
CreateBy
=
base
.
UserInfo
.
Id
;
}
else
{
query
.
IsPaperManager
=
1
;
}
List
<
object
>
result
=
new
List
<
object
>();
List
<
object
>
navList
=
new
List
<
object
>();
if
(
query
.
ParentId
>
0
)
...
...
@@ -90,7 +94,8 @@ namespace Edu.WebApi.Controllers.Exam
item
.
Reviewer
,
item
.
IsOpen
,
OpenStr
=
item
.
IsOpen
==
1
?
"私有"
:
"公开"
,
ExamineStatusStr
=
item
.
PaperType
==
2
?
EnumHelper
.
ToName
(
item
.
ExamineStatus
)
:
""
ExamineStatusStr
=
item
.
PaperType
==
2
?
EnumHelper
.
ToName
(
item
.
ExamineStatus
)
:
""
,
item
.
ExamineRemark
,
});
}
pageModel
.
Count
=
rowsCount
;
...
...
@@ -415,7 +420,7 @@ namespace Edu.WebApi.Controllers.Exam
{
PaperIds
.
Add
(
PaperId
);
}
var
tempList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
int
>>
(
base
.
ParmJObj
.
GetStringValue
(
"PaperIds"
));
var
tempList
=
Common
.
ConvertHelper
.
StringToList
(
base
.
ParmJObj
.
GetStringValue
(
"PaperIds"
));
if
(
tempList
!=
null
&&
tempList
.
Count
>
0
)
{
PaperIds
.
AddRange
(
tempList
);
...
...
@@ -443,7 +448,7 @@ namespace Edu.WebApi.Controllers.Exam
[
HttpPost
]
public
ApiResult
MovePaper
()
{
var
PaperIds
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
int
>>
(
base
.
ParmJObj
.
GetStringValue
(
"PaperIds"
));
var
PaperIds
=
Common
.
ConvertHelper
.
StringToList
(
base
.
ParmJObj
.
GetStringValue
(
"PaperIds"
));
var
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
);
var
flag
=
paperModule
.
MoveExamnationPaperModule
(
ParentId
,
PaperIds
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
...
...
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