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
e0dbf832
Commit
e0dbf832
authored
Sep 08, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
4a220d26
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
39 deletions
+111
-39
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+44
-37
RB_Examination_StudentRepository.cs
Edu.Repository/Exam/RB_Examination_StudentRepository.cs
+8
-0
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+1
-0
HolidayController.cs
Edu.WebApi/Controllers/Public/HolidayController.cs
+58
-2
No files found.
Edu.Module.Exam/PaperModule.cs
View file @
e0dbf832
...
@@ -132,7 +132,7 @@ namespace Edu.Module.Exam
...
@@ -132,7 +132,7 @@ namespace Edu.Module.Exam
QuestionBandIds
=
item
.
QuestionBandIds
,
QuestionBandIds
=
item
.
QuestionBandIds
,
DifficultyTypeName
=
item
.
DifficultyType
.
ToName
(),
DifficultyTypeName
=
item
.
DifficultyType
.
ToName
(),
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
CreateBy
=
item
.
CreateBy
,
CreateBy
=
item
.
CreateBy
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
PublishCount
=
item
.
PublishCount
,
PublishCount
=
item
.
PublishCount
,
GenerateType
=
item
.
GenerateType
,
GenerateType
=
item
.
GenerateType
,
...
@@ -143,8 +143,8 @@ namespace Edu.Module.Exam
...
@@ -143,8 +143,8 @@ 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
,
IsOpen
=
item
.
IsOpen
,
ExamineRemark
=
item
.
ExamineRemark
,
ExamineRemark
=
item
.
ExamineRemark
,
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);
...
@@ -421,7 +421,7 @@ namespace Edu.Module.Exam
...
@@ -421,7 +421,7 @@ namespace Edu.Module.Exam
CreateNum
=
model
.
TemplateNum
,
CreateNum
=
model
.
TemplateNum
,
PaperType
=
1
,
PaperType
=
1
,
ParentId
=
model
.
ParentId
,
ParentId
=
model
.
ParentId
,
IsOpen
=
model
.
IsOpen
,
IsOpen
=
model
.
IsOpen
,
};
};
var
newPaperId
=
examination_PaperRepository
.
Insert
(
paperModel
);
var
newPaperId
=
examination_PaperRepository
.
Insert
(
paperModel
);
paperModel
.
PaperId
=
newPaperId
;
paperModel
.
PaperId
=
newPaperId
;
...
@@ -445,13 +445,13 @@ namespace Edu.Module.Exam
...
@@ -445,13 +445,13 @@ namespace Edu.Module.Exam
CreateNum
=
model
.
TemplateNum
,
CreateNum
=
model
.
TemplateNum
,
PaperType
=
2
,
PaperType
=
2
,
ParentId
=
newPaperId
,
ParentId
=
newPaperId
,
IsOpen
=
model
.
IsOpen
,
IsOpen
=
model
.
IsOpen
,
};
};
var
newSubPaperId
=
examination_PaperRepository
.
Insert
(
subModel
);
var
newSubPaperId
=
examination_PaperRepository
.
Insert
(
subModel
);
subModel
.
PaperId
=
newSubPaperId
;
subModel
.
PaperId
=
newSubPaperId
;
flag
=
newSubPaperId
>
0
;
flag
=
newSubPaperId
>
0
;
if
(
flag
&&
model
.
TempDataList
!=
null
&&
model
.
TempDataList
.
Count
>
0
)
if
(
flag
&&
model
.
TempDataList
!=
null
&&
model
.
TempDataList
.
Count
>
0
)
{
{
int
G_Sort
=
1
;
int
G_Sort
=
1
;
foreach
(
var
item
in
model
.
TempDataList
)
foreach
(
var
item
in
model
.
TempDataList
)
...
@@ -616,7 +616,7 @@ namespace Edu.Module.Exam
...
@@ -616,7 +616,7 @@ namespace Edu.Module.Exam
{
{
Id
=
0
,
Id
=
0
,
Title
=
"组卷审批"
,
Title
=
"组卷审批"
,
ReceiptType
=
ReceiptTypeEnum
.
ZuJuan
,
ReceiptType
=
ReceiptTypeEnum
.
ZuJuan
,
RelationId
=
model
.
PaperId
,
RelationId
=
model
.
PaperId
,
ClassId
=
0
,
ClassId
=
0
,
Group_Id
=
model
.
Group_Id
,
Group_Id
=
model
.
Group_Id
,
...
@@ -836,7 +836,7 @@ namespace Edu.Module.Exam
...
@@ -836,7 +836,7 @@ namespace Edu.Module.Exam
/// <param name="ParentId">父节点编号</param>
/// <param name="ParentId">父节点编号</param>
/// <param name="PaperIds">试卷编号</param>
/// <param name="PaperIds">试卷编号</param>
/// <returns></returns>
/// <returns></returns>
public
bool
MoveExamnationPaperModule
(
int
ParentId
,
List
<
int
>
PaperIds
)
public
bool
MoveExamnationPaperModule
(
int
ParentId
,
List
<
int
>
PaperIds
)
{
{
var
flag
=
true
;
var
flag
=
true
;
flag
=
examination_PaperRepository
.
BatchMovePaperRepository
(
ParentId
,
PaperIds
)
>
0
;
flag
=
examination_PaperRepository
.
BatchMovePaperRepository
(
ParentId
,
PaperIds
)
>
0
;
...
@@ -1098,7 +1098,7 @@ namespace Edu.Module.Exam
...
@@ -1098,7 +1098,7 @@ namespace Edu.Module.Exam
if
(
obj
.
IsOpenExamApply
==
0
)
if
(
obj
.
IsOpenExamApply
==
0
)
{
{
fileds
.
Add
(
nameof
(
RB_Examination_Publish_ViewModel
.
Reviewer
),
0
);
fileds
.
Add
(
nameof
(
RB_Examination_Publish_ViewModel
.
Reviewer
),
0
);
fileds
.
Add
(
nameof
(
RB_Examination_Publish_ViewModel
.
ExamineStatus
),
(
int
)
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditThrough
);
fileds
.
Add
(
nameof
(
RB_Examination_Publish_ViewModel
.
ExamineStatus
),
(
int
)
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditThrough
);
}
}
else
else
{
{
...
@@ -1106,7 +1106,7 @@ namespace Edu.Module.Exam
...
@@ -1106,7 +1106,7 @@ namespace Edu.Module.Exam
fileds
.
Add
(
nameof
(
RB_Examination_Publish_ViewModel
.
ExamineStatus
),
(
int
)
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
AuditIng
);
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
));
flag
=
examination_PublishRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Examination_Publish_ViewModel
.
Id
),
model
.
Id
));
if
(
flag
&&
obj
.
IsOpenExamApply
==
1
)
if
(
flag
&&
obj
.
IsOpenExamApply
==
1
)
{
{
var
educationReceipt
=
new
Model
.
Entity
.
EduTask
.
RB_Education_Receipt
()
var
educationReceipt
=
new
Model
.
Entity
.
EduTask
.
RB_Education_Receipt
()
{
{
...
@@ -1234,11 +1234,14 @@ namespace Edu.Module.Exam
...
@@ -1234,11 +1234,14 @@ namespace Edu.Module.Exam
var
examPublish
=
GetExaminationPublishModule
(
PublishId
);
var
examPublish
=
GetExaminationPublishModule
(
PublishId
);
var
extModel
=
GetExaminationPaperModule
(
PaperId
);
var
extModel
=
GetExaminationPaperModule
(
PaperId
);
var
paperObj
=
new
object
();
var
paperObj
=
new
object
();
RB_Examination_Student_ViewModel
examinationStudentModel
=
new
RB_Examination_Student_ViewModel
();
if
(
extModel
!=
null
&&
extModel
.
PaperId
>
0
)
if
(
extModel
!=
null
&&
extModel
.
PaperId
>
0
)
{
{
List
<
RB_Examination_StudentDetails_ViewModel
>
studentDetailsList
=
new
List
<
RB_Examination_StudentDetails_ViewModel
>();
List
<
RB_Examination_StudentDetails_ViewModel
>
studentDetailsList
=
new
List
<
RB_Examination_StudentDetails_ViewModel
>();
if
(
GuestId
>
0
&&
PublishId
>
0
)
if
(
GuestId
>
0
&&
PublishId
>
0
)
{
{
examinationStudentModel
=
examination_StudentRepository
.
GetExaminationStudentListRepository
(
new
RB_Examination_Student_ViewModel
{
PaperId
=
extModel
.
PaperId
,
PublishId
=
PublishId
,
GuestId
=
GuestId
}).
FirstOrDefault
();
studentDetailsList
=
examination_StudentDetailsRepository
.
GetExaminationStudentListRepository
(
new
RB_Examination_StudentDetails_ViewModel
{
PaperId
=
extModel
.
PaperId
,
PublishId
=
PublishId
,
GuestId
=
GuestId
});
studentDetailsList
=
examination_StudentDetailsRepository
.
GetExaminationStudentListRepository
(
new
RB_Examination_StudentDetails_ViewModel
{
PaperId
=
extModel
.
PaperId
,
PublishId
=
PublishId
,
GuestId
=
GuestId
});
}
}
List
<
object
>
paperTypeList
=
new
List
<
object
>();
List
<
object
>
paperTypeList
=
new
List
<
object
>();
...
@@ -1290,7 +1293,7 @@ namespace Edu.Module.Exam
...
@@ -1290,7 +1293,7 @@ namespace Edu.Module.Exam
}
}
else
if
(
questionModel
.
QuestionTypeKey
==
"reading-comprehensio"
||
questionModel
.
QuestionTypeKey
==
"listening"
)
else
if
(
questionModel
.
QuestionTypeKey
==
"reading-comprehensio"
||
questionModel
.
QuestionTypeKey
==
"listening"
)
{
{
var
qList
=
JsonHelper
.
DeserializeObject
<
List
<
matchingItem
>>(
sItem
.
StundetAnswer
.
ToString
());
var
qList
=
JsonHelper
.
DeserializeObject
<
List
<
matchingItem
>>(
sItem
.
StundetAnswer
.
ToString
());
foreach
(
var
mItem
in
qList
)
foreach
(
var
mItem
in
qList
)
{
{
answerList
.
Add
(
new
{
mItem
.
Name
,
mItem
.
Content
});
answerList
.
Add
(
new
{
mItem
.
Name
,
mItem
.
Content
});
...
@@ -1311,7 +1314,7 @@ namespace Edu.Module.Exam
...
@@ -1311,7 +1314,7 @@ namespace Edu.Module.Exam
questionModel
.
Score
,
questionModel
.
Score
,
Answer
=
isShowAnswer
?
questionModel
.
Answer
:
sItem
.
StundetAnswer
,
Answer
=
isShowAnswer
?
questionModel
.
Answer
:
sItem
.
StundetAnswer
,
sItem
.
StundetAnswer
,
sItem
.
StundetAnswer
,
AnswerList
=
isShowAnswer
?
answerList
:
new
List
<
object
>
(),
AnswerList
=
isShowAnswer
?
answerList
:
new
List
<
object
>(),
questionModel
.
AnswerParse
,
questionModel
.
AnswerParse
,
sItem
.
StundetScore
,
sItem
.
StundetScore
,
sItem
.
IsMarking
sItem
.
IsMarking
...
@@ -1337,8 +1340,8 @@ namespace Edu.Module.Exam
...
@@ -1337,8 +1340,8 @@ namespace Edu.Module.Exam
sItem
.
QuestionContentObj
=
analysisQuestion
.
ParsingQuestion
(
sItem
.
QuestionTypeKey
,
sItem
.
QuestionContent
,
isNoAnswer
:
true
,
isOptionRandom
:
examPublish
.
IsOptionRandom
);
sItem
.
QuestionContentObj
=
analysisQuestion
.
ParsingQuestion
(
sItem
.
QuestionTypeKey
,
sItem
.
QuestionContent
,
isNoAnswer
:
true
,
isOptionRandom
:
examPublish
.
IsOptionRandom
);
var
qObj
=
new
var
qObj
=
new
{
{
PaperDetailsId
=
sItem
.
Id
,
//试卷问题编号
PaperDetailsId
=
sItem
.
Id
,
//试卷问题编号
StundetDetailsId
=
0
,
//考生答题编号
StundetDetailsId
=
0
,
//考生答题编号
sItem
.
PaperId
,
sItem
.
PaperId
,
sItem
.
Title
,
sItem
.
Title
,
sItem
.
ShowTitle
,
sItem
.
ShowTitle
,
...
@@ -1351,7 +1354,7 @@ namespace Edu.Module.Exam
...
@@ -1351,7 +1354,7 @@ namespace Edu.Module.Exam
StundetAnswer
=
""
,
StundetAnswer
=
""
,
AnswerParse
=
""
,
AnswerParse
=
""
,
StundetScore
=
0
,
StundetScore
=
0
,
IsMarking
=
0
,
IsMarking
=
0
,
};
};
questionList
.
Add
(
qObj
);
questionList
.
Add
(
qObj
);
}
}
...
@@ -1400,6 +1403,9 @@ namespace Edu.Module.Exam
...
@@ -1400,6 +1403,9 @@ namespace Edu.Module.Exam
examPublish
.
ExamNotice
,
examPublish
.
ExamNotice
,
examPublish
.
IsAutoSubmit
examPublish
.
IsAutoSubmit
},
},
TotalScore
=
examinationStudentModel
?.
TotalScore
??
0
,
StuComment
=
examinationStudentModel
?.
StuComment
??
""
,
ExamStatus
=
examinationStudentModel
?.
ExamStatus
??
0
,
Paper
=
paperObj
Paper
=
paperObj
};
};
}
}
...
@@ -1415,7 +1421,7 @@ namespace Edu.Module.Exam
...
@@ -1415,7 +1421,7 @@ namespace Edu.Module.Exam
/// <param name="list">学生题目数据</param>
/// <param name="list">学生题目数据</param>
/// <returns></returns>
/// <returns></returns>
[
TransactionCallHandler
]
[
TransactionCallHandler
]
public
virtual
bool
SetStuExamPaperDetailsModule
(
int
PublishId
,
int
GuestId
,
int
PaperId
,
int
UserGroupId
,
List
<
RB_Examination_Details_ViewModel
>
list
)
public
virtual
bool
SetStuExamPaperDetailsModule
(
int
PublishId
,
int
GuestId
,
int
PaperId
,
int
UserGroupId
,
List
<
RB_Examination_Details_ViewModel
>
list
)
{
{
bool
flag
=
false
;
bool
flag
=
false
;
var
modelPublish
=
GetExaminationPublishModule
(
PublishId
);
var
modelPublish
=
GetExaminationPublishModule
(
PublishId
);
...
@@ -1438,7 +1444,7 @@ namespace Edu.Module.Exam
...
@@ -1438,7 +1444,7 @@ namespace Edu.Module.Exam
StundetScore
=
0
,
StundetScore
=
0
,
IsMarking
=
0
,
IsMarking
=
0
,
StudentContent
=
item
.
QuestionContent
,
StudentContent
=
item
.
QuestionContent
,
StuPaperGroupId
=
item
.
StuPaperGroupId
,
StuPaperGroupId
=
item
.
StuPaperGroupId
,
};
};
if
(
model
.
Id
>
0
)
if
(
model
.
Id
>
0
)
{
{
...
@@ -1472,8 +1478,9 @@ namespace Edu.Module.Exam
...
@@ -1472,8 +1478,9 @@ namespace Edu.Module.Exam
};
};
flag
=
examination_StudentRepository
.
Update
(
fileds
,
wheres
);
flag
=
examination_StudentRepository
.
Update
(
fileds
,
wheres
);
}
}
var
config
=
GetExaminationConfigureModel
(
new
RB_Examination_Configure_ViewModel
()
{
var
config
=
GetExaminationConfigureModel
(
new
RB_Examination_Configure_ViewModel
()
Group_Id
=
UserGroupId
{
Group_Id
=
UserGroupId
});
});
//自动阅卷
//自动阅卷
if
(
config
.
IsOpenAutoMarking
==
1
)
if
(
config
.
IsOpenAutoMarking
==
1
)
...
@@ -1494,7 +1501,7 @@ namespace Edu.Module.Exam
...
@@ -1494,7 +1501,7 @@ namespace Edu.Module.Exam
/// <param name="list">学生题目数据</param>
/// <param name="list">学生题目数据</param>
/// <returns></returns>
/// <returns></returns>
[
TransactionCallHandler
]
[
TransactionCallHandler
]
public
virtual
bool
SetTeacherScoringModule
(
int
PublishId
,
int
GuestId
,
int
PaperId
,
string
StuComment
,
List
<
RB_Examination_Details_ViewModel
>
list
)
public
virtual
bool
SetTeacherScoringModule
(
int
PublishId
,
int
GuestId
,
int
PaperId
,
string
StuComment
,
List
<
RB_Examination_Details_ViewModel
>
list
)
{
{
bool
flag
=
false
;
bool
flag
=
false
;
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
!=
null
&&
list
.
Any
())
...
@@ -1506,7 +1513,7 @@ namespace Edu.Module.Exam
...
@@ -1506,7 +1513,7 @@ namespace Edu.Module.Exam
RB_Examination_StudentDetails_ViewModel
model
=
new
RB_Examination_StudentDetails_ViewModel
()
RB_Examination_StudentDetails_ViewModel
model
=
new
RB_Examination_StudentDetails_ViewModel
()
{
{
Id
=
item
.
StundetDetailsId
,
Id
=
item
.
StundetDetailsId
,
StundetScore
=
item
.
StundetScore
,
StundetScore
=
item
.
StundetScore
,
};
};
if
(
model
.
Id
>
0
)
if
(
model
.
Id
>
0
)
{
{
...
@@ -1551,13 +1558,13 @@ namespace Edu.Module.Exam
...
@@ -1551,13 +1558,13 @@ namespace Edu.Module.Exam
string
str
=
"草稿"
;
string
str
=
"草稿"
;
switch
(
status
)
switch
(
status
)
{
{
case
EduTaskRrocessStatus
.
NotAudit
:
str
=
"草稿"
;
break
;
case
EduTaskRrocessStatus
.
NotAudit
:
str
=
"草稿"
;
break
;
case
EduTaskRrocessStatus
.
AuditIng
:
str
=
"审核中"
;
break
;
case
EduTaskRrocessStatus
.
AuditIng
:
str
=
"审核中"
;
break
;
case
EduTaskRrocessStatus
.
AuditThrough
:
str
=
"正常"
;
break
;
case
EduTaskRrocessStatus
.
AuditThrough
:
str
=
"正常"
;
break
;
case
EduTaskRrocessStatus
.
AuditNotThrough
:
str
=
"驳回"
;
break
;
case
EduTaskRrocessStatus
.
AuditNotThrough
:
str
=
"驳回"
;
break
;
case
EduTaskRrocessStatus
.
Rejected
:
str
=
"驳回"
;
break
;
case
EduTaskRrocessStatus
.
Rejected
:
str
=
"驳回"
;
break
;
case
EduTaskRrocessStatus
.
OtherHaveAudit
:
str
=
"正常"
;
break
;
case
EduTaskRrocessStatus
.
OtherHaveAudit
:
str
=
"正常"
;
break
;
case
EduTaskRrocessStatus
.
Invalid
:
str
=
"作废"
;
break
;
case
EduTaskRrocessStatus
.
Invalid
:
str
=
"作废"
;
break
;
}
}
return
str
;
return
str
;
}
}
...
@@ -1578,11 +1585,11 @@ namespace Edu.Module.Exam
...
@@ -1578,11 +1585,11 @@ namespace Edu.Module.Exam
if
(!
string
.
IsNullOrEmpty
(
ids
))
if
(!
string
.
IsNullOrEmpty
(
ids
))
{
{
//查询待审核的考试审批信息
//查询待审核的考试审批信息
receiptList
=
education_ReceiptRepository
.
GetEducationReceiptListRepository
(
new
EducationReceiptQuery
()
receiptList
=
education_ReceiptRepository
.
GetEducationReceiptListRepository
(
new
EducationReceiptQuery
()
{
{
ReceiptType
=(
int
)
ReceiptTypeEnum
.
ExamApply
,
ReceiptType
=
(
int
)
ReceiptTypeEnum
.
ExamApply
,
QRelationIds
=
ids
,
QRelationIds
=
ids
,
VerifyStatus
=
1
VerifyStatus
=
1
});
});
}
}
if
(
receiptList
!=
null
&&
receiptList
.
Count
>
0
)
if
(
receiptList
!=
null
&&
receiptList
.
Count
>
0
)
...
...
Edu.Repository/Exam/RB_Examination_StudentRepository.cs
View file @
e0dbf832
...
@@ -72,6 +72,14 @@ WHERE 1=1
...
@@ -72,6 +72,14 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Examination_Student_ViewModel
.
PublishId
),
query
.
PublishId
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Examination_Student_ViewModel
.
PublishId
),
query
.
PublishId
);
}
}
if
(
query
.
PaperId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Examination_Student_ViewModel
.
PaperId
),
query
.
PaperId
);
}
if
(
query
.
GuestId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Examination_Student_ViewModel
.
GuestId
),
query
.
GuestId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QPublishIds
))
if
(!
string
.
IsNullOrEmpty
(
query
.
QPublishIds
))
{
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Examination_Student_ViewModel
.
PublishId
),
query
.
QPublishIds
);
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Examination_Student_ViewModel
.
PublishId
),
query
.
QPublishIds
);
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
e0dbf832
...
@@ -814,6 +814,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -814,6 +814,7 @@ namespace Edu.WebApi.Controllers.Exam
item
.
CourseId
,
item
.
CourseId
,
item
.
PublishId
,
item
.
PublishId
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
item
.
ExamStatus
,
};
};
result
.
Add
(
obj
);
result
.
Add
(
obj
);
}
}
...
...
Edu.WebApi/Controllers/Public/HolidayController.cs
View file @
e0dbf832
...
@@ -216,18 +216,74 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -216,18 +216,74 @@ namespace Edu.WebApi.Controllers.Public
/// 批量新增节假日
/// 批量新增节假日
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
Microsoft
.
AspNetCore
.
Authorization
.
AllowAnonymous
]
public
ApiResult
InsertHoliday
()
public
ApiResult
InsertHoliday
()
{
{
string
apiResult
=
Common
.
Plugin
.
HttpHelper
.
HttpGet
(
"http://timor.tech/api/holiday/year/2021/"
);
string
apiResult
=
Common
.
Plugin
.
HttpHelper
.
HttpGet
(
"http://timor.tech/api/holiday/year/2021/"
);
JObject
parmsJob
=
JObject
.
Parse
(
apiResult
);
JObject
parmsJob
=
JObject
.
Parse
(
apiResult
);
string
resultCode
=
parmsJob
.
GetStringValue
(
"code"
);
string
resultCode
=
parmsJob
.
GetStringValue
(
"code"
);
string
holidayList
=
parmsJob
.
GetStringValue
(
"holiday"
);
string
holidayList
=
parmsJob
.
GetStringValue
(
"holiday"
);
// JObject parmsHoliday = JObject.Parse(holidayList);
try
{
JObject
jsonObject
=
JObject
.
Parse
(
holidayList
);
foreach
(
var
item
in
jsonObject
.
Children
())
{
var
test1
=
item
.
Children
();
// JsonConvert.DeserializeObject<test>();
foreach
(
var
item1
in
test1
)
{
var
test
=
item1
.
ToObject
<
test
>();
RB_System_Holiday
dmodel
=
new
RB_System_Holiday
{
StartTime
=
Convert
.
ToDateTime
(
test
.
date
),
EndTime
=
Convert
.
ToDateTime
(
test
.
date
)
};
if
(
test
.
holiday
)
//节假日
{
dmodel
.
DayType
=
1
;
}
else
{
dmodel
.
DayType
=
2
;
}
dmodel
.
CreateDate
=
System
.
DateTime
.
Now
;
dmodel
.
Status
=
0
;
dmodel
.
Group_Id
=
100000
;
dmodel
.
School_Id
=
0
;
bool
flag
=
holidayModule
.
SetHoliday
(
dmodel
);
}
}
return
ApiResult
.
Success
(
""
);
return
ApiResult
.
Success
(
""
);
}
}
catch
(
Exception
ex
)
{
return
ApiResult
.
Failed
(
"转换失败"
);
}
}
#
endregion
#
endregion
}
}
public
class
holiday
{
// public string info { get; set; }
public
test
info
{
get
;
set
;
}
}
public
class
test
{
public
bool
holiday
{
get
;
set
;
}
public
string
date
{
get
;
set
;
}
}
}
}
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