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
b9c5c82f
Commit
b9c5c82f
authored
Jun 30, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
9e37b603
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
4 deletions
+47
-4
RB_Plan_Appointment_Details_ViewModel.cs
...ViewModel/Scroll/RB_Plan_Appointment_Details_ViewModel.cs
+5
-0
PlanAppoimentModule.cs
Edu.Module.Course/PlanAppoimentModule.cs
+1
-0
RB_Plan_Appointment_DetailsRepository.cs
...epository/Scroll/RB_Plan_Appointment_DetailsRepository.cs
+7
-3
PlanAppoimentController.cs
Edu.WebApi/Controllers/Course/PlanAppoimentController.cs
+34
-1
No files found.
Edu.Model/ViewModel/Scroll/RB_Plan_Appointment_Details_ViewModel.cs
View file @
b9c5c82f
...
...
@@ -49,5 +49,10 @@ namespace Edu.Model.ViewModel.Scroll
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学生姓名
/// </summary>
public
string
StuName
{
get
;
set
;
}
}
}
Edu.Module.Course/PlanAppoimentModule.cs
View file @
b9c5c82f
...
...
@@ -305,6 +305,7 @@ namespace Edu.Module.Course
var
obj
=
new
{
DateStr
=
Common
.
ConvertHelper
.
FormatDate
(
newDate
),
WeekStr
=
Common
.
ConvertHelper
.
GetWeekDay
(
newDate
),
TimeList
=
subTimeList
};
list
.
Add
(
obj
);
...
...
Edu.Repository/Scroll/RB_Plan_Appointment_DetailsRepository.cs
View file @
b9c5c82f
...
...
@@ -56,10 +56,10 @@ WHERE 1=1
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,B.Date,B.StartTime,B.EndTime
SELECT A.*,B.Date,B.StartTime,B.EndTime
,IFNULL(C.StuName,'') StuName
FROM RB_Plan_Appointment_Details AS A INNER JOIN RB_Plan_Appointment AS B ON A.PlanAppointmentId=B.Id
WHERE 1=1
"
);
LEFT JOIN rb_student AS C ON A.StuId=C.StuId
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
...
...
@@ -79,6 +79,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Plan_Appointment_Details_ViewModel
.
Account_Id
),
query
.
Account_Id
);
}
if
(
query
.
PlanAppointmentId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Plan_Appointment_Details_ViewModel
.
PlanAppointmentId
),
query
.
PlanAppointmentId
);
}
}
var
list
=
Get
<
RB_Plan_Appointment_Details_ViewModel
>(
builder
.
ToString
()).
ToList
();
return
list
;
...
...
Edu.WebApi/Controllers/Course/PlanAppoimentController.cs
View file @
b9c5c82f
...
...
@@ -81,7 +81,6 @@ namespace Edu.WebApi.Controllers.Course
{
startDate
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
);
}
if
(
string
.
IsNullOrEmpty
(
endDate
))
{
endDate
=
Common
.
ConvertHelper
.
FormatDate
(
Convert
.
ToDateTime
(
startDate
).
AddMonths
(
1
));
...
...
@@ -89,5 +88,39 @@ namespace Edu.WebApi.Controllers.Course
var
data
=
planAppoiment
.
GetPlanAppointmentStaticModule
(
startDate
,
endDate
,
base
.
UserInfo
.
Group_Id
);
return
ApiResult
.
Success
(
data
:
data
);
}
/// <summary>
/// 获取预约详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetPlanAppointmentDetail
()
{
int
PlanAppointmentId
=
base
.
ParmJObj
.
GetInt
(
"PlanAppointmentId"
);
if
(
PlanAppointmentId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
message
:
"请选择要查看预约信息!"
);
}
List
<
object
>
list
=
new
List
<
object
>();
var
dataList
=
planAppoiment
.
GetPlanAppointmentStatic
(
new
Model
.
ViewModel
.
Scroll
.
RB_Plan_Appointment_Details_ViewModel
()
{
PlanAppointmentId
=
PlanAppointmentId
});
foreach
(
var
item
in
dataList
)
{
list
.
Add
(
new
{
item
.
StuId
,
item
.
StuName
,
item
.
StartTime
,
item
.
EndTime
,
DateStr
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
),
CreateTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
Status
,
StatusStr
=
item
.
Status
==
0
?
"正常"
:
"取消"
});
}
return
ApiResult
.
Success
(
data
:
list
);
}
}
}
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