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
1788a74b
Commit
1788a74b
authored
3 years ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c018ffab
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
93 deletions
+87
-93
RB_Examination_Paper_ViewModel.cs
Edu.Model/ViewModel/Exam/RB_Examination_Paper_ViewModel.cs
+0
-4
RB_Examination_Publish_ViewModel.cs
Edu.Model/ViewModel/Exam/RB_Examination_Publish_ViewModel.cs
+0
-6
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+52
-28
AppletIndexController.cs
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
+3
-16
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+32
-39
No files found.
Edu.Model/ViewModel/Exam/RB_Examination_Paper_ViewModel.cs
View file @
1788a74b
...
...
@@ -10,10 +10,6 @@ namespace Edu.Model.ViewModel.Exam
/// </summary>
public
class
RB_Examination_Paper_ViewModel
:
RB_Examination_Paper
{
/// <summary>
/// 是否从新发起审核0-否,1-是
/// </summary>
public
int
IsExamine
{
get
;
set
;
}
/// <summary>
/// 试卷题目分组列表
/// </summary>
...
...
This diff is collapsed.
Click to expand it.
Edu.Model/ViewModel/Exam/RB_Examination_Publish_ViewModel.cs
View file @
1788a74b
...
...
@@ -25,11 +25,6 @@ namespace Edu.Model.ViewModel.Exam
/// </summary>
public
int
StudentCount
{
get
;
set
;
}
/// <summary>
/// 重新发起审核
/// </summary>
public
int
IsExamine
{
get
;
set
;
}
/// <summary>
/// 查询id
/// </summary>
...
...
@@ -49,6 +44,5 @@ namespace Edu.Model.ViewModel.Exam
/// 考试状态
/// </summary>
public
string
ExamStatusStr
{
get
;
set
;
}
}
}
This diff is collapsed.
Click to expand it.
Edu.Module.Exam/PaperModule.cs
View file @
1788a74b
...
...
@@ -951,7 +951,7 @@ namespace Edu.Module.Exam
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetExaminationPublishModule
(
RB_Examination_Publish_ViewModel
model
,
RB_Examination_Configure_ViewModel
obj
)
public
bool
SetExaminationPublishModule
(
RB_Examination_Publish_ViewModel
model
)
{
bool
flag
=
true
;
if
(
model
.
Id
>
0
)
...
...
@@ -986,36 +986,10 @@ namespace Edu.Module.Exam
{
var
newId
=
examination_PublishRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
model
.
IsExamine
=
1
;
flag
=
newId
>
0
;
examination_PaperRepository
.
UpdateExaminationPaperPublishCountRepository
(
model
.
PaperId
);
}
if
(
flag
&&
obj
.
IsOpenExamApply
==
1
&&
model
.
IsExamine
==
1
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Examination_Publish_ViewModel
.
ExamineStatus
),
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditIng
},
{
nameof
(
RB_Examination_Publish_ViewModel
.
Reviewer
),
obj
.
ZuJuanReviewer
}
};
flag
=
examination_PublishRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Examination_Publish_ViewModel
.
Id
),
model
.
Id
));
var
educationReceipt
=
new
Model
.
Entity
.
EduTask
.
RB_Education_Receipt
()
{
Id
=
0
,
Title
=
"考试申请"
,
ReceiptType
=
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
ExamApply
,
RelationId
=
model
.
Id
,
ClassId
=
0
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
CreateBy
=
model
.
CreateBy
,
CreateTime
=
model
.
CreateTime
,
UpdateBy
=
model
.
CreateBy
,
UpdateTime
=
model
.
CreateTime
,
VerifyStatus
=
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditIng
,
ReceiptFile
=
""
};
flag
=
education_ReceiptRepository
.
SetEducationReceiptRepository
(
educationReceipt
,
out
string
message
);
}
var
oldStudentList
=
examination_StudentRepository
.
GetExaminationStudentListRepository
(
new
RB_Examination_Student_ViewModel
()
{
PublishId
=
model
.
Id
});
//以前没有学员【直接新增】
if
(
oldStudentList
==
null
||
(
oldStudentList
!=
null
&&
oldStudentList
.
Count
==
0
))
...
...
@@ -1085,6 +1059,56 @@ namespace Edu.Module.Exam
return
examination_PublishRepository
.
GetGuestExaminationPublishPage
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 提交考试申请
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
SumitExamApplyModule
(
int
Id
)
{
bool
flag
=
false
;
var
model
=
GetExaminationPublishModule
(
Id
);
var
obj
=
GetExaminationConfigureModel
(
new
RB_Examination_Configure_ViewModel
()
{
Group_Id
=
model
.
Group_Id
,
});
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>();
if
(
obj
.
IsOpenExamApply
==
0
)
{
fileds
.
Add
(
nameof
(
RB_Examination_Publish_ViewModel
.
Reviewer
),
0
);
fileds
.
Add
(
nameof
(
RB_Examination_Publish_ViewModel
.
ExamineStatus
),(
int
)
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditThrough
);
}
else
{
fileds
.
Add
(
nameof
(
RB_Examination_Publish_ViewModel
.
Reviewer
),
obj
.
ExamApplyReviewer
);
fileds
.
Add
(
nameof
(
RB_Examination_Publish_ViewModel
.
ExamineStatus
),
(
int
)
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditIng
);
}
flag
=
examination_PublishRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Examination_Publish_ViewModel
.
Id
),
model
.
Id
));
if
(
flag
&&
obj
.
IsOpenExamApply
==
1
)
{
var
educationReceipt
=
new
Model
.
Entity
.
EduTask
.
RB_Education_Receipt
()
{
Id
=
0
,
Title
=
"考试申请"
,
ReceiptType
=
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
ExamApply
,
RelationId
=
model
.
Id
,
ClassId
=
0
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
CreateBy
=
model
.
CreateBy
,
CreateTime
=
model
.
CreateTime
,
UpdateBy
=
model
.
CreateBy
,
UpdateTime
=
model
.
CreateTime
,
VerifyStatus
=
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditIng
,
ReceiptFile
=
""
};
flag
=
education_ReceiptRepository
.
SetEducationReceiptRepository
(
educationReceipt
,
out
string
message
);
}
return
flag
;
}
#
region
考试配置
/// <summary>
/// 获取配置列表
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
View file @
1788a74b
...
...
@@ -26,17 +26,6 @@ namespace Edu.WebApi.Controllers.Applet
[
EnableCors
(
"AllowCors"
)]
public
class
AppletIndexController
:
AppletBaseController
{
/// <summary>
/// 账号管理处理类
/// </summary>
private
readonly
AccountModule
accountModule
=
new
AccountModule
();
/// <summary>
/// 公用处理类
/// </summary>
private
readonly
PublicModule
publicModule
=
new
PublicModule
();
/// <summary>
/// 学生管理处理类
/// </summary>
...
...
@@ -166,9 +155,8 @@ namespace Edu.WebApi.Controllers.Applet
NewPlanDateTimeStr
=
(
classModel
.
NewPlanDateTime
.
HasValue
)
?
classModel
?.
NewPlanDateTime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
TimeStr
=
(
classModel
.
NewPlanDateTime
.
HasValue
)
?
Common
.
ConvertHelper
.
GetTimeStr
(
classModel
.
NewPlanDateTime
.
Value
)
:
""
,
TimeStart
=
classModel
.
StartTime
,
TeacherName
=
classModel
.
TeacherName
,
classModel
.
TeacherName
,
TimeStatusStr
=
classModel
.
ClassStatus
,
},
paperList
=
examinationPublishList
.
Select
(
x
=>
new
{
x
.
PaperId
,
x
.
Id
,
x
.
PaperName
,
x
.
PublishPic
,
ExamStartTime
=
x
.
ExamStartTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
x
.
ExamStatus
,
x
.
ExamStatusStr
})
};
...
...
@@ -266,7 +254,7 @@ namespace Edu.WebApi.Controllers.Applet
x
.
TimeHour
,
TeacherName
=
itemGroup
.
TeacherName
??
""
,
UserIcon
=
itemGroup
.
UserIcon
??
""
,
IsCheck
=
x
.
GuestList
.
Where
(
x
=>
x
.
StudentId
==
base
.
AppletUserInfo
.
AccountId
).
FirstOrDefault
()?.
IsCheck
,
x
.
GuestList
.
Where
(
x
=>
x
.
StudentId
==
base
.
AppletUserInfo
.
AccountId
).
FirstOrDefault
()?.
IsCheck
,
OrderGuestId
=
x
.
GuestList
.
Where
(
x
=>
x
.
StudentId
==
base
.
AppletUserInfo
.
AccountId
).
FirstOrDefault
()?.
Id
,
IsLeave
=
Convert
.
ToDateTime
(
x
.
NewPlanDateTime
)
>
DateTime
.
Now
?
1
:
0
})
...
...
@@ -427,7 +415,7 @@ namespace Edu.WebApi.Controllers.Applet
{
x
.
StartTime
,
x
.
EndTime
,
IsCheck
=
x
.
GuestList
.
Where
(
x
=>
x
.
StudentId
==
base
.
AppletUserInfo
.
AccountId
).
FirstOrDefault
()?.
IsCheck
,
x
.
GuestList
.
Where
(
x
=>
x
.
StudentId
==
base
.
AppletUserInfo
.
AccountId
).
FirstOrDefault
()?.
IsCheck
,
IsLeave
=
Convert
.
ToDateTime
(
x
.
NewPlanDateTime
)
>
DateTime
.
Now
?
1
:
0
})
});
...
...
@@ -599,7 +587,6 @@ namespace Edu.WebApi.Controllers.Applet
CreateNum
=
base
.
ParmJObj
.
GetInt
(
"CreateNum"
),
PaperType
=
base
.
ParmJObj
.
GetInt
(
"PaperType"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
IsExamine
=
base
.
ParmJObj
.
GetInt
(
"IsExamine"
),
};
extModel
.
GroupList
=
new
List
<
RB_Examination_Group_ViewModel
>();
string
groups
=
base
.
ParmJObj
.
GetStringValue
(
"GroupList"
);
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
1788a74b
...
...
@@ -124,7 +124,6 @@ namespace Edu.WebApi.Controllers.Exam
CreateNum
=
base
.
ParmJObj
.
GetInt
(
"CreateNum"
),
PaperType
=
base
.
ParmJObj
.
GetInt
(
"PaperType"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
IsExamine
=
base
.
ParmJObj
.
GetInt
(
"IsExamine"
),
IsOpen
=
base
.
ParmJObj
.
GetInt
(
"IsOpen"
),
};
if
(
string
.
IsNullOrEmpty
(
extModel
.
PaperName
))
...
...
@@ -443,6 +442,32 @@ namespace Edu.WebApi.Controllers.Exam
return
ApiResult
.
Success
(
data
:
obj
);
}
/// <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
();
}
/// <summary>
/// 提交组卷审批
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SubmitApproval
()
{
int
PaperId
=
base
.
ParmJObj
.
GetInt
(
"PaperId"
);
var
flag
=
paperModule
.
SubmitApprovalModule
(
PaperId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 发布考试
/// </summary>
...
...
@@ -473,7 +498,6 @@ namespace Edu.WebApi.Controllers.Exam
FillInIsSubject
=
base
.
ParmJObj
.
GetInt
(
"FillInIsSubject"
),
FillInIsIgnore
=
base
.
ParmJObj
.
GetInt
(
"FillInIsIgnore"
),
IsHalfScore
=
base
.
ParmJObj
.
GetInt
(
"IsHalfScore"
),
IsExamine
=
base
.
ParmJObj
.
GetInt
(
"IsExamine"
),
};
var
studentStr
=
base
.
ParmJObj
.
GetStringValue
(
"StudentList"
);
if
(!
string
.
IsNullOrEmpty
(
studentStr
))
...
...
@@ -485,22 +509,7 @@ namespace Edu.WebApi.Controllers.Exam
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
School_Id
=
base
.
UserInfo
.
School_Id
;
model
.
Status
=
0
;
var
obj
=
paperModule
.
GetExaminationConfigureModel
(
new
RB_Examination_Configure_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
});
if
(
obj
.
IsOpenExamApply
==
0
)
{
model
.
Reviewer
=
0
;
model
.
ExamineStatus
=
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditThrough
;
}
else
{
model
.
Reviewer
=
obj
.
ExamApplyReviewer
;
model
.
ExamineStatus
=
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditIng
;
}
var
flag
=
paperModule
.
SetExaminationPublishModule
(
model
,
obj
);
var
flag
=
paperModule
.
SetExaminationPublishModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -556,31 +565,17 @@ namespace Edu.WebApi.Controllers.Exam
}
/// <summary>
///
批量更新试卷开放状态
///
提交考试申请
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
BatchSetIsOpen
()
public
ApiResult
SumitExamApply
()
{
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
();
}
/// <summary>
/// 提交组卷审批
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SubmitApproval
()
{
int
PaperId
=
base
.
ParmJObj
.
GetInt
(
"PaperId"
);
var
flag
=
paperModule
.
SubmitApprovalModule
(
PaperId
);
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
flag
=
paperModule
.
SumitExamApplyModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
region
考试配置
/// <summary>
/// 考试配置实体
...
...
@@ -728,7 +723,6 @@ namespace Edu.WebApi.Controllers.Exam
flowNodeViewModel
.
FlowAduitList
.
Add
(
auditModel
);
flowViewModel
.
FlowNodeList
.
Add
(
flowNodeViewModel
);
}
listFlow
.
Add
(
flowViewModel
);
}
}
...
...
@@ -756,7 +750,6 @@ namespace Edu.WebApi.Controllers.Exam
}
#
endregion
#
region
学生管理
/// <summary>
/// 获取学生管理分页列表
...
...
@@ -799,4 +792,4 @@ namespace Edu.WebApi.Controllers.Exam
}
#
endregion
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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