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
0f4f367d
Commit
0f4f367d
authored
Aug 23, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
48ef0d6c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
11 deletions
+63
-11
RB_Examination_Paper.cs
Edu.Model/Entity/Exam/RB_Examination_Paper.cs
+4
-1
ExaminationPaperTreeModel.cs
Edu.Model/ViewModel/Exam/ExaminationPaperTreeModel.cs
+4
-1
RB_Examination_Template_ViewModel.cs
...Model/ViewModel/Exam/RB_Examination_Template_ViewModel.cs
+5
-0
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+16
-5
RB_Examination_PaperRepository.cs
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
+14
-0
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+20
-4
No files found.
Edu.Model/Entity/Exam/RB_Examination_Paper.cs
View file @
0f4f367d
...
@@ -92,7 +92,10 @@ namespace Edu.Model.Entity.Exam
...
@@ -92,7 +92,10 @@ namespace Edu.Model.Entity.Exam
/// 审核人
/// 审核人
/// </summary>
/// </summary>
public
int
Reviewer
{
get
;
set
;
}
public
int
Reviewer
{
get
;
set
;
}
/// <summary>
/// 是否开放(1-私有,2-公开)
/// </summary>
public
int
IsOpen
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Exam/ExaminationPaperTreeModel.cs
View file @
0f4f367d
...
@@ -95,6 +95,9 @@ namespace Edu.Model.ViewModel.Exam
...
@@ -95,6 +95,9 @@ namespace Edu.Model.ViewModel.Exam
/// </summary>
/// </summary>
public
string
ReviewerName
{
get
;
set
;
}
public
string
ReviewerName
{
get
;
set
;
}
/// <summary>
/// 是否开发(1-私有,2-公开)
/// </summary>
public
int
IsOpen
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Exam/RB_Examination_Template_ViewModel.cs
View file @
0f4f367d
...
@@ -24,5 +24,10 @@ namespace Edu.Model.ViewModel.Exam
...
@@ -24,5 +24,10 @@ namespace Edu.Model.ViewModel.Exam
/// 父节点编号
/// 父节点编号
/// </summary>
/// </summary>
public
int
ParentId
{
get
;
set
;
}
public
int
ParentId
{
get
;
set
;
}
/// <summary>
/// 是否开放(1-私有,2-公开)
/// </summary>
public
int
IsOpen
{
get
;
set
;
}
}
}
}
}
Edu.Module.Exam/PaperModule.cs
View file @
0f4f367d
...
@@ -137,6 +137,7 @@ namespace Edu.Module.Exam
...
@@ -137,6 +137,7 @@ namespace Edu.Module.Exam
ChildList
=
new
List
<
ExaminationPaperTreeModel
>(),
ChildList
=
new
List
<
ExaminationPaperTreeModel
>(),
ExamineStatus
=
item
.
ExamineStatus
,
ExamineStatus
=
item
.
ExamineStatus
,
Reviewer
=
item
.
Reviewer
,
Reviewer
=
item
.
Reviewer
,
IsOpen
=
item
.
IsOpen
,
ReviewerName
=
item
.
Reviewer
>
0
?
(
UserReidsCache
.
GetUserLoginInfo
(
item
.
Reviewer
)?.
AccountName
??
""
)
:
""
ReviewerName
=
item
.
Reviewer
>
0
?
(
UserReidsCache
.
GetUserLoginInfo
(
item
.
Reviewer
)?.
AccountName
??
""
)
:
""
};
};
//model.ChildList = GetPaperChild(childList, detailsList, item.PaperId);
//model.ChildList = GetPaperChild(childList, detailsList, item.PaperId);
...
@@ -406,19 +407,16 @@ namespace Edu.Module.Exam
...
@@ -406,19 +407,16 @@ namespace Edu.Module.Exam
CreateNum
=
model
.
TemplateNum
,
CreateNum
=
model
.
TemplateNum
,
PaperType
=
1
,
PaperType
=
1
,
ParentId
=
model
.
ParentId
,
ParentId
=
model
.
ParentId
,
IsOpen
=
model
.
IsOpen
,
};
};
var
newPaperId
=
examination_PaperRepository
.
Insert
(
paperModel
);
var
newPaperId
=
examination_PaperRepository
.
Insert
(
paperModel
);
paperModel
.
PaperId
=
newPaperId
;
paperModel
.
PaperId
=
newPaperId
;
flag
=
newPaperId
>
0
;
flag
=
newPaperId
>
0
;
var
configureModel
=
new
RB_Examination_Configure_ViewModel
()
var
configureModel
=
new
RB_Examination_Configure_ViewModel
()
{
{
Group_Id
=
model
.
Group_Id
,
Group_Id
=
model
.
Group_Id
,
};
};
var
obj
=
GetExaminationConfigureModel
(
configureModel
);
var
obj
=
GetExaminationConfigureModel
(
configureModel
);
if
(
paperModel
.
CreateNum
>
0
)
if
(
paperModel
.
CreateNum
>
0
)
{
{
for
(
var
i
=
0
;
i
<
paperModel
.
CreateNum
;
i
++)
for
(
var
i
=
0
;
i
<
paperModel
.
CreateNum
;
i
++)
...
@@ -438,6 +436,7 @@ namespace Edu.Module.Exam
...
@@ -438,6 +436,7 @@ namespace Edu.Module.Exam
CreateNum
=
model
.
TemplateNum
,
CreateNum
=
model
.
TemplateNum
,
PaperType
=
2
,
PaperType
=
2
,
ParentId
=
newPaperId
,
ParentId
=
newPaperId
,
IsOpen
=
model
.
IsOpen
,
};
};
if
(
obj
.
IsOpenZuJuan
==
0
)
if
(
obj
.
IsOpenZuJuan
==
0
)
{
{
...
@@ -587,7 +586,8 @@ namespace Edu.Module.Exam
...
@@ -587,7 +586,8 @@ namespace Edu.Module.Exam
{
nameof
(
RB_Examination_Paper_ViewModel
.
CreateNum
),
model
.
CreateNum
},
{
nameof
(
RB_Examination_Paper_ViewModel
.
CreateNum
),
model
.
CreateNum
},
{
nameof
(
RB_Examination_Paper_ViewModel
.
PaperType
),
model
.
PaperType
},
{
nameof
(
RB_Examination_Paper_ViewModel
.
PaperType
),
model
.
PaperType
},
{
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
model
.
ParentId
},
{
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
model
.
ParentId
},
{
nameof
(
RB_Examination_Paper_ViewModel
.
ExamineStatus
),
model
.
ExamineStatus
}
{
nameof
(
RB_Examination_Paper_ViewModel
.
ExamineStatus
),
model
.
ExamineStatus
},
{
nameof
(
RB_Examination_Paper_ViewModel
.
IsOpen
),
model
.
IsOpen
}
};
};
flag
=
examination_PaperRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
),
model
.
PaperId
));
flag
=
examination_PaperRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
),
model
.
PaperId
));
}
}
...
@@ -1178,6 +1178,17 @@ namespace Edu.Module.Exam
...
@@ -1178,6 +1178,17 @@ namespace Edu.Module.Exam
return
extModel
;
return
extModel
;
}
}
/// <summary>
/// 批量更新是否开放
/// </summary>
/// <param name="paperIds"></param>
/// <param name="IsOpen"></param>
/// <returns></returns>
public
bool
BatchSetIsOpenModule
(
List
<
int
>
paperIds
,
int
IsOpen
)
{
return
examination_PaperRepository
.
BatchSetIsOpenRepository
(
paperIds
,
IsOpen
)>
0
;
}
#
region
学生管理
#
region
学生管理
/// <summary>
/// <summary>
/// 获取考试学生分页列表
/// 获取考试学生分页列表
...
...
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
View file @
0f4f367d
...
@@ -149,5 +149,19 @@ WHERE 1=1
...
@@ -149,5 +149,19 @@ WHERE 1=1
builder
.
AppendFormat
(
" UPDATE RB_Examination_Paper SET PublishCount=PublishCount+1 WHERE PaperId={0} "
,
PaperId
);
builder
.
AppendFormat
(
" UPDATE RB_Examination_Paper SET PublishCount=PublishCount+1 WHERE PaperId={0} "
,
PaperId
);
return
base
.
Execute
(
builder
.
ToString
());
return
base
.
Execute
(
builder
.
ToString
());
}
}
/// <summary>
/// 批量修改试卷【开放/私有】状态
/// </summary>
/// <param name="paperIds"></param>
/// <param name="IsOpen"></param>
/// <returns></returns>
public
int
BatchSetIsOpenRepository
(
List
<
int
>
paperIds
,
int
IsOpen
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
" UPDATE RB_Examination_Paper SET IsOpen={0} WHERE PaperId IN({1}) "
,
IsOpen
,
string
.
Join
(
","
,
paperIds
));
return
base
.
Execute
(
builder
.
ToString
());
}
}
}
}
}
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
0f4f367d
...
@@ -76,16 +76,16 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -76,16 +76,16 @@ namespace Edu.WebApi.Controllers.Exam
item
.
ChildList
,
item
.
ChildList
,
item
.
ReviewerName
,
item
.
ReviewerName
,
item
.
Reviewer
,
item
.
Reviewer
,
item
.
IsOpen
,
OpenStr
=
item
.
IsOpen
==
1
?
"私有"
:
"公开"
,
ExamineStatusStr
=
item
.
PaperType
==
2
?
EnumHelper
.
ToName
(
item
.
ExamineStatus
)
:
""
ExamineStatusStr
=
item
.
PaperType
==
2
?
EnumHelper
.
ToName
(
item
.
ExamineStatus
)
:
""
});
});
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
result
;
pageModel
.
PageData
=
result
;
return
ApiResult
.
Success
(
data
:
new
{
pageModel
,
navList
});
return
ApiResult
.
Success
(
data
:
new
{
pageModel
,
navList
});
}
}
/// <summary>
/// <summary>
/// 添加修改试卷
/// 添加修改试卷
/// </summary>
/// </summary>
...
@@ -107,6 +107,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -107,6 +107,7 @@ namespace Edu.WebApi.Controllers.Exam
PaperType
=
base
.
ParmJObj
.
GetInt
(
"PaperType"
),
PaperType
=
base
.
ParmJObj
.
GetInt
(
"PaperType"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
IsExamine
=
base
.
ParmJObj
.
GetInt
(
"IsExamine"
),
IsExamine
=
base
.
ParmJObj
.
GetInt
(
"IsExamine"
),
IsOpen
=
base
.
ParmJObj
.
GetInt
(
"IsOpen"
),
};
};
extModel
.
GroupList
=
new
List
<
RB_Examination_Group_ViewModel
>();
extModel
.
GroupList
=
new
List
<
RB_Examination_Group_ViewModel
>();
string
groups
=
base
.
ParmJObj
.
GetStringValue
(
"GroupList"
);
string
groups
=
base
.
ParmJObj
.
GetStringValue
(
"GroupList"
);
...
@@ -213,7 +214,8 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -213,7 +214,8 @@ namespace Edu.WebApi.Controllers.Exam
School_Id
=
base
.
UserInfo
.
School_Id
,
School_Id
=
base
.
UserInfo
.
School_Id
,
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
,
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
,
IsSaveTemplate
=
base
.
ParmJObj
.
GetBoolValue
(
"IsSaveTemplate"
),
IsSaveTemplate
=
base
.
ParmJObj
.
GetBoolValue
(
"IsSaveTemplate"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
IsOpen
=
base
.
ParmJObj
.
GetInt
(
"IsOpen"
),
};
};
string
TemplateData
=
base
.
ParmJObj
.
GetStringValue
(
"TemplateData"
);
string
TemplateData
=
base
.
ParmJObj
.
GetStringValue
(
"TemplateData"
);
if
(!
string
.
IsNullOrEmpty
(
TemplateData
))
if
(!
string
.
IsNullOrEmpty
(
TemplateData
))
...
@@ -242,6 +244,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -242,6 +244,7 @@ namespace Edu.WebApi.Controllers.Exam
TemplateName
=
base
.
ParmJObj
.
GetStringValue
(
"TemplateName"
),
TemplateName
=
base
.
ParmJObj
.
GetStringValue
(
"TemplateName"
),
CreateBy
=
base
.
UserInfo
.
Id
,
CreateBy
=
base
.
UserInfo
.
Id
,
};
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
paperModule
.
GetExaminationTemplatePageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
var
list
=
paperModule
.
GetExaminationTemplatePageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
...
@@ -538,6 +541,19 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -538,6 +541,19 @@ namespace Edu.WebApi.Controllers.Exam
return
ApiResult
.
Success
(
data
:
pageModel
);
return
ApiResult
.
Success
(
data
:
pageModel
);
}
}
/// <summary>
/// 批量更新试卷开放状态
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
BatchSetIsOpen
()
{
int
IsOpen
=
base
.
ParmJObj
.
GetInt
(
"IsOpen"
);
List
<
int
>
paperIds
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
base
.
ParmJObj
.
GetStringValue
(
"PaperIds"
));
var
flag
=
paperModule
.
BatchSetIsOpenModule
(
paperIds
,
IsOpen
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
region
考试配置
#
region
考试配置
/// <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