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
0878328e
Commit
0878328e
authored
Jul 09, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
2999c017
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
9 deletions
+40
-9
RB_System_Holiday.cs
Edu.Model/Entity/System/RB_System_Holiday.cs
+2
-2
RB_System_HolidayRepository.cs
Edu.Repository/System/RB_System_HolidayRepository.cs
+14
-0
HolidayController.cs
Edu.WebApi/Controllers/Public/HolidayController.cs
+24
-7
No files found.
Edu.Model/Entity/System/RB_System_Holiday.cs
View file @
0878328e
...
@@ -23,14 +23,14 @@ namespace Edu.Model.Entity.System
...
@@ -23,14 +23,14 @@ namespace Edu.Model.Entity.System
/// <summary>
/// <summary>
/// 节假日开始时间
/// 节假日开始时间
/// </summary>
/// </summary>
public
DateTime
StartTime
{
get
;
set
;
}
public
DateTime
?
StartTime
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 节假日结束时间
/// 节假日结束时间
/// </summary>
/// </summary>
public
DateTime
EndTime
{
get
;
set
;
}
public
DateTime
?
EndTime
{
get
;
set
;
}
/// <summary>
/// <summary>
...
...
Edu.Repository/System/RB_System_HolidayRepository.cs
View file @
0878328e
...
@@ -34,6 +34,20 @@ namespace Edu.Repository.System
...
@@ -34,6 +34,20 @@ namespace Edu.Repository.System
sb
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_System_Holiday
.
HolidayId
),
model
.
HolidayId
);
sb
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_System_Holiday
.
HolidayId
),
model
.
HolidayId
);
}
}
if
(
model
.
Group_Id
>
0
)
{
sb
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_System_Holiday
.
Group_Id
),
model
.
Group_Id
);
}
if
(
model
.
StartTime
.
HasValue
)
{
sb
.
AppendFormat
(
" AND DATE_FORMAT(A.{0}, '%y/%m/%d') >= DATE_FORMAT('{1}', '%y/%m/%d') "
,
nameof
(
RB_System_Holiday
.
StartTime
),
model
.
StartTime
.
Value
.
ToString
(
"yyyy-MM-dd"
));
}
if
(
model
.
EndTime
.
HasValue
)
{
sb
.
AppendFormat
(
" AND DATE_FORMAT(A.{0}, '%y/%m/%d') <= DATE_FORMAT('{1}', '%y/%m/%d') "
,
nameof
(
RB_System_Holiday
.
StartTime
),
model
.
EndTime
.
Value
.
ToString
(
"yyyy-MM-dd"
));
}
if
(
model
.
Group_Id
>
0
)
if
(
model
.
Group_Id
>
0
)
{
{
sb
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_System_Holiday
.
Group_Id
),
model
.
Group_Id
);
sb
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_System_Holiday
.
Group_Id
),
model
.
Group_Id
);
...
...
Edu.WebApi/Controllers/Public/HolidayController.cs
View file @
0878328e
...
@@ -89,8 +89,8 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -89,8 +89,8 @@ namespace Edu.WebApi.Controllers.Public
var
planList
=
classModule
.
GetClassPlanList_V3
(
new
Model
.
ViewModel
.
Course
.
RB_Class_Plan_ViewModel
var
planList
=
classModule
.
GetClassPlanList_V3
(
new
Model
.
ViewModel
.
Course
.
RB_Class_Plan_ViewModel
{
{
Group_Id
=
userInfo
.
Group_Id
,
Group_Id
=
userInfo
.
Group_Id
,
StartTime
=
dmodel
.
StartTime
.
ToString
(
"yyyy-MM-dd 00:00:00"
)
,
StartTime
=
dmodel
.
StartTime
.
HasValue
?
dmodel
.
StartTime
.
Value
.
ToString
(
"yyyy-MM-dd 00:00:00"
)
:
""
,
EndTime
=
dmodel
.
EndTime
.
ToString
(
"yyyy-MM-dd 00:00:00"
)
EndTime
=
dmodel
.
EndTime
.
HasValue
?
dmodel
.
EndTime
.
Value
.
ToString
(
"yyyy-MM-dd 00:00:00"
)
:
""
});
});
if
(
planList
!=
null
&&
planList
.
Any
())
if
(
planList
!=
null
&&
planList
.
Any
())
...
@@ -98,7 +98,7 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -98,7 +98,7 @@ namespace Edu.WebApi.Controllers.Public
return
ApiResult
.
Success
(
"班级:"
+
string
.
Join
(
","
,
planList
.
Select
(
x
=>
x
.
ClassName
))
+
"存在排课"
);
return
ApiResult
.
Success
(
"班级:"
+
string
.
Join
(
","
,
planList
.
Select
(
x
=>
x
.
ClassName
))
+
"存在排课"
);
}
}
}
}
return
ApiResult
.
Success
();
return
ApiResult
.
Success
();
}
}
else
else
...
@@ -141,10 +141,27 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -141,10 +141,27 @@ namespace Edu.WebApi.Controllers.Public
{
{
UserInfo
userInfo
=
base
.
UserInfo
;
UserInfo
userInfo
=
base
.
UserInfo
;
ResultPageModel
pmodel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
ResultPageModel
pmodel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
startDate
=
base
.
ParmJObj
.
GetStringValue
(
"StartTime"
);
var
endDate
=
base
.
ParmJObj
.
GetStringValue
(
"EndTime"
);
RB_System_Holiday
dmodel
=
new
RB_System_Holiday
RB_System_Holiday
dmodel
=
new
RB_System_Holiday
{
{
DayType
=
base
.
ParmJObj
.
GetInt
(
"DayType"
,
0
)
DayType
=
base
.
ParmJObj
.
GetInt
(
"DayType"
,
0
)
};
};
try
{
if
(!
string
.
IsNullOrWhiteSpace
(
startDate
))
{
dmodel
.
StartTime
=
Convert
.
ToDateTime
(
startDate
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
endDate
))
{
dmodel
.
EndTime
=
Convert
.
ToDateTime
(
endDate
);
}
}
catch
(
Exception
ex
)
{
}
List
<
RB_System_Holiday
>
list
=
holidayModule
.
GetPageList
(
pmodel
.
PageIndex
,
pmodel
.
PageSize
,
dmodel
,
out
long
count
);
List
<
RB_System_Holiday
>
list
=
holidayModule
.
GetPageList
(
pmodel
.
PageIndex
,
pmodel
.
PageSize
,
dmodel
,
out
long
count
);
...
@@ -152,8 +169,8 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -152,8 +169,8 @@ namespace Edu.WebApi.Controllers.Public
pmodel
.
PageData
=
list
.
Select
(
x
=>
new
pmodel
.
PageData
=
list
.
Select
(
x
=>
new
{
{
x
.
HolidayId
,
x
.
HolidayId
,
StartTime
=
x
.
StartTime
.
ToString
(
"yyyy-MM-dd"
)
,
StartTime
=
x
.
StartTime
.
HasValue
?
x
.
StartTime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
EndTime
=
x
.
EndTime
.
ToString
(
"yyyy-MM-dd"
)
,
EndTime
=
x
.
EndTime
.
HasValue
?
x
.
EndTime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
x
.
DayType
x
.
DayType
});
});
return
ApiResult
.
Success
(
""
,
pmodel
);
return
ApiResult
.
Success
(
""
,
pmodel
);
...
@@ -178,8 +195,8 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -178,8 +195,8 @@ namespace Edu.WebApi.Controllers.Public
var
obj
=
new
var
obj
=
new
{
{
model
.
HolidayId
,
model
.
HolidayId
,
StartTime
=
model
.
StartTime
.
ToString
(
"yyyy-MM-dd"
)
,
StartTime
=
model
.
StartTime
.
HasValue
?
model
.
StartTime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
EndTime
=
model
.
EndTime
.
ToString
(
"yyyy-MM-dd"
)
,
EndTime
=
model
.
EndTime
.
HasValue
?
model
.
EndTime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
model
.
DayType
model
.
DayType
};
};
return
ApiResult
.
Success
(
"请求成功!"
,
obj
);
return
ApiResult
.
Success
(
"请求成功!"
,
obj
);
...
...
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