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
ad6d97bd
Commit
ad6d97bd
authored
Aug 20, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a3b5ebcb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
9 deletions
+79
-9
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+58
-7
RB_Examination_PaperRepository.cs
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
+13
-1
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+8
-1
No files found.
Edu.Module.Exam/PaperModule.cs
View file @
ad6d97bd
...
...
@@ -137,13 +137,66 @@ namespace Edu.Module.Exam
Reviewer
=
item
.
Reviewer
,
ReviewerName
=
item
.
Reviewer
>
0
?
(
UserReidsCache
.
GetUserLoginInfo
(
item
.
Reviewer
)?.
AccountName
??
""
)
:
""
};
model
.
ChildList
=
GetPaperChild
(
childList
,
detailsList
,
item
.
PaperId
);
//
model.ChildList = GetPaperChild(childList, detailsList, item.PaperId);
treeList
.
Add
(
model
);
}
}
return
treeList
;
}
/// <summary>
/// 获取当前节点的所有父级节点
/// </summary>
/// <param name="QPaperIds"></param>
/// <returns></returns>
public
List
<
object
>
GetExaminationPaperParentModule
(
string
QPaperIds
)
{
List
<
object
>
list
=
new
List
<
object
>();
var
dataList
=
examination_PaperRepository
.
GetExaminationPaperParentRepository
(
QPaperIds
);
if
(
dataList
!=
null
&&
dataList
.
Count
>
0
)
{
var
groupList
=
dataList
.
Where
(
qitem
=>
qitem
.
ParentId
==
0
)?.
ToList
();
if
(
groupList
!=
null
&&
groupList
.
Count
>
0
)
{
foreach
(
var
item
in
groupList
)
{
list
.
Add
(
new
{
item
.
PaperId
,
item
.
PaperName
,
});
GetFolderChild
(
list
,
dataList
,
item
.
PaperId
);
}
}
}
return
list
;
}
/// <summary>
/// 递归遍历所有下级文件夹
/// </summary>
/// <param name="sourceList">源数据</param>
/// <param name="parentId">父节点编号</param>
/// <returns></returns>
public
void
GetFolderChild
(
List
<
object
>
list
,
List
<
RB_Examination_Paper_ViewModel
>
sourceList
,
int
parentId
)
{
//获取下级节点
var
subList
=
sourceList
?.
Where
(
qItem
=>
qItem
.
ParentId
==
parentId
).
ToList
();
//如果存在下级节点
if
(
subList
!=
null
&&
subList
.
Count
>
0
)
{
foreach
(
var
childItem
in
subList
)
{
list
.
Add
(
new
{
childItem
.
PaperId
,
childItem
.
PaperName
,
});
GetFolderChild
(
list
,
sourceList
,
childItem
.
PaperId
);
}
}
}
/// <summary>
/// 递归遍历所有下级文件夹或试卷
/// </summary>
...
...
@@ -499,10 +552,10 @@ namespace Edu.Module.Exam
if
(
flag
&&
obj
.
IsOpenZuJuan
==
1
&&
model
.
IsExamine
==
1
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Examination_Paper_ViewModel
.
ExamineStatus
),
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditIng
},
{
nameof
(
RB_Examination_Paper_ViewModel
.
Reviewer
),
obj
.
ZuJuanReviewer
}
};
{
{
nameof
(
RB_Examination_Paper_ViewModel
.
ExamineStatus
),
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditIng
},
{
nameof
(
RB_Examination_Paper_ViewModel
.
Reviewer
),
obj
.
ZuJuanReviewer
}
};
flag
=
examination_PaperRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
),
model
.
PaperId
));
...
...
@@ -1046,8 +1099,6 @@ namespace Edu.Module.Exam
return
extModel
;
}
#
region
学生管理
/// <summary>
/// 获取考试学生分页列表
...
...
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
View file @
ad6d97bd
...
...
@@ -108,7 +108,6 @@ WHERE 1=1
}
/// <summary>
/// 获取试卷所有下级列表
/// </summary>
...
...
@@ -122,6 +121,19 @@ WHERE 1=1
return
Get
<
RB_Examination_Paper_ViewModel
>(
procName
,
parameters
,
commandType
:
CommandType
.
StoredProcedure
).
ToList
();
}
/// <summary>
/// 获取当前节点的所有父级节点
/// </summary>
/// <param name="QPaperIds"></param>
/// <returns></returns>
public
List
<
RB_Examination_Paper_ViewModel
>
GetExaminationPaperParentRepository
(
string
QPaperIds
)
{
var
parameters
=
new
DynamicParameters
();
string
procName
=
"proc_getparentpaper"
;
parameters
.
Add
(
"QPaperIds"
,
QPaperIds
,
direction
:
ParameterDirection
.
Input
);
return
Get
<
RB_Examination_Paper_ViewModel
>(
procName
,
parameters
,
commandType
:
CommandType
.
StoredProcedure
).
ToList
();
}
/// <summary>
/// 修改试卷发布次数
/// </summary>
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
ad6d97bd
...
...
@@ -54,6 +54,11 @@ namespace Edu.WebApi.Controllers.Exam
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
List
<
object
>
navList
=
new
List
<
object
>();
if
(
query
.
ParentId
>
0
)
{
navList
=
paperModule
.
GetExaminationPaperParentModule
(
query
.
ParentId
.
ToString
());
}
var
list
=
paperModule
.
GetExaminationPaperPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
...
...
@@ -76,9 +81,11 @@ namespace Edu.WebApi.Controllers.Exam
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
result
;
return
ApiResult
.
Success
(
data
:
pageModel
);
return
ApiResult
.
Success
(
data
:
new
{
pageModel
,
navList
}
);
}
/// <summary>
/// 添加修改试卷
/// </summary>
...
...
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