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
Expand all
Hide 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
This diff is collapsed.
Click to expand it.
Edu.Repository/Exam/RB_Examination_StudentRepository.cs
View file @
e0dbf832
...
...
@@ -72,6 +72,14 @@ WHERE 1=1
{
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
))
{
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
item
.
CourseId
,
item
.
PublishId
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
item
.
ExamStatus
,
};
result
.
Add
(
obj
);
}
...
...
Edu.WebApi/Controllers/Public/HolidayController.cs
View file @
e0dbf832
...
...
@@ -216,18 +216,74 @@ namespace Edu.WebApi.Controllers.Public
/// 批量新增节假日
/// </summary>
/// <returns></returns>
[
Microsoft
.
AspNetCore
.
Authorization
.
AllowAnonymous
]
public
ApiResult
InsertHoliday
()
{
string
apiResult
=
Common
.
Plugin
.
HttpHelper
.
HttpGet
(
"http://timor.tech/api/holiday/year/2021/"
);
JObject
parmsJob
=
JObject
.
Parse
(
apiResult
);
string
resultCode
=
parmsJob
.
GetStringValue
(
"code"
);
string
holidayList
=
parmsJob
.
GetStringValue
(
"holiday"
);
// JObject parmsHoliday = JObject.Parse(holidayList);
try
{
return
ApiResult
.
Success
(
""
);
}
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
(
""
);
}
catch
(
Exception
ex
)
{
return
ApiResult
.
Failed
(
"转换失败"
);
}
}
#
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