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
99b8e8c2
Commit
99b8e8c2
authored
Sep 09, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布考试新增后台验证
parent
c64d17fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
RB_Examination_Paper.cs
Edu.Model/Entity/Exam/RB_Examination_Paper.cs
+1
-1
RB_Examination_PaperRepository.cs
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
+2
-1
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+17
-4
No files found.
Edu.Model/Entity/Exam/RB_Examination_Paper.cs
View file @
99b8e8c2
...
...
@@ -61,7 +61,7 @@ namespace Edu.Model.Entity.Exam
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
public
Common
.
Enum
.
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 组卷类型(1-智能组卷,2-手动组卷,3-智能导入)
...
...
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
View file @
99b8e8c2
...
...
@@ -121,7 +121,8 @@ WHERE 1=1
SELECT A.*
FROM RB_Examination_Paper AS A
WHERE 1=1
"
);
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
Status
),
(
int
)
Common
.
Enum
.
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
99b8e8c2
...
...
@@ -509,15 +509,28 @@ namespace Edu.WebApi.Controllers.Exam
IsHalfScore
=
base
.
ParmJObj
.
GetInt
(
"IsHalfScore"
),
PublishPic
=
base
.
ParmJObj
.
GetStringValue
(
"PublishPic"
),
};
if
(
model
.
ExamStartTime
>
model
.
ExamEndTime
)
{
return
ApiResult
.
ParamIsNull
(
"考试开始时间不能大于结束时间!"
);
}
var
studentStr
=
base
.
ParmJObj
.
GetStringValue
(
"StudentList"
);
if
(!
string
.
IsNullOrEmpty
(
studentStr
))
{
model
.
StudentList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Examination_Student_ViewModel
>>(
studentStr
);
}
if
(
model
.
StudentList
==
null
||
(
model
.
StudentList
!=
null
&&
model
.
StudentList
.
Count
==
0
))
{
return
ApiResult
.
ParamIsNull
(
"请选择考试学员!"
);
}
if
(
string
.
IsNullOrEmpty
(
base
.
ParmJObj
.
GetStringValue
(
"ExamStartTime"
)))
{
return
ApiResult
.
ParamIsNull
(
"请选择考试开始时间!"
);
}
if
(
string
.
IsNullOrEmpty
(
base
.
ParmJObj
.
GetStringValue
(
"ExamEndTime"
)))
{
return
ApiResult
.
ParamIsNull
(
"请选择考试结束时间!"
);
}
if
(
model
.
ExamStartTime
>
model
.
ExamEndTime
)
{
return
ApiResult
.
ParamIsNull
(
"考试开始时间不能大于结束时间!"
);
}
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
...
...
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