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
a9706783
Commit
a9706783
authored
Jun 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
c3330d57
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
377 additions
and
197 deletions
+377
-197
RB_Student_Makeup.cs
Edu.Model/Entity/Course/RB_Student_Makeup.cs
+70
-0
GuestFinishMinute_ViewModel.cs
Edu.Model/ViewModel/Course/GuestFinishMinute_ViewModel.cs
+5
-0
RB_Student_Makeup_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Student_Makeup_ViewModel.cs
+102
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+78
-58
RB_Class_CheckRepository.cs
Edu.Repository/Course/RB_Class_CheckRepository.cs
+17
-112
RB_Student_MakeupRepository.cs
Edu.Repository/Course/RB_Student_MakeupRepository.cs
+77
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+28
-27
No files found.
Edu.Model/Entity/Course/RB_Student_Makeup.cs
0 → 100644
View file @
a9706783
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 学员补课表实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_Makeup
{
/// <summary>
/// 主键
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
public
int
OrderGuestId
{
get
;
set
;
}
/// <summary>
/// 班级编号
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 上课日期
/// </summary>
public
DateTime
ClassDate
{
get
;
set
;
}
/// <summary>
/// 补课状态(1-正常,2-已处理,3-未处理)
/// </summary>
public
int
MakeUpStatus
{
get
;
set
;
}
/// <summary>
/// 签到编号
/// </summary>
public
int
ClassCheckId
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 处理人
/// </summary>
public
int
DealBy
{
get
;
set
;
}
/// <summary>
/// 处理时间
/// </summary>
public
DateTime
DealTime
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/GuestFinishMinute_ViewModel.cs
View file @
a9706783
...
@@ -23,5 +23,10 @@ namespace Edu.Model.ViewModel.Course
...
@@ -23,5 +23,10 @@ namespace Edu.Model.ViewModel.Course
/// 完成分钟数
/// 完成分钟数
/// </summary>
/// </summary>
public
decimal
FinishMinutes
{
get
;
set
;
}
public
decimal
FinishMinutes
{
get
;
set
;
}
/// <summary>
/// 完成课时数
/// </summary>
public
decimal
FinishClassHours
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Course/RB_Student_Makeup_ViewModel.cs
0 → 100644
View file @
a9706783
using
Edu.Model.Entity.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 学员补课表扩展实体类
/// </summary>
public
class
RB_Student_Makeup_ViewModel
:
RB_Student_Makeup
{
/// <summary>
/// 学员状态
/// </summary>
public
int
GuestState
{
get
;
set
;
}
/// <summary>
/// 处理状态字符串
/// </summary>
public
string
MakeUpStatusStr
{
get
{
string
str
=
""
;
switch
(
this
.
MakeUpStatus
)
{
case
1
:
str
=
"正常"
;
break
;
case
2
:
str
=
"已处理"
;
break
;
case
3
:
str
=
"未处理"
;
break
;
}
return
str
;
}
}
/// <summary>
/// 学员状态
/// </summary>
public
string
GuestStateStr
{
get
{
string
str
=
""
;
switch
(
this
.
GuestState
)
{
case
1
:
str
=
"正常"
;
break
;
case
2
:
str
=
"退学"
;
break
;
case
3
:
str
=
"申请退学中"
;
break
;
case
4
:
str
=
"驳回申请"
;
break
;
case
5
:
str
=
"停课"
;
break
;
}
return
str
;
}
}
/// <summary>
/// 学员姓名
/// </summary>
public
string
GuestName
{
get
;
set
;
}
/// <summary>
/// 班级名称
/// </summary>
public
string
ClassName
{
get
;
set
;
}
/// <summary>
/// 课程名称
/// </summary>
public
string
CourseName
{
get
;
set
;
}
/// <summary>
/// 教师名称
/// </summary>
public
string
TeacherName
{
get
;
set
;
}
/// <summary>
/// 教室名称
/// </summary>
public
string
RoomName
{
get
;
set
;
}
/// <summary>
/// 开始时间
/// </summary>
public
string
StartDate
{
get
;
set
;
}
/// <summary>
/// 结束时间
/// </summary>
public
string
EndDate
{
get
;
set
;
}
/// <summary>
/// 开始时间
/// </summary>
public
string
StartTime
{
get
;
set
;
}
/// <summary>
/// 结束时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
}
}
Edu.Module.Course/ClassModule.cs
View file @
a9706783
This diff is collapsed.
Click to expand it.
Edu.Repository/Course/RB_Class_CheckRepository.cs
View file @
a9706783
...
@@ -64,100 +64,6 @@ WHERE 1=1 AND A.Status=0 ");
...
@@ -64,100 +64,6 @@ WHERE 1=1 AND A.Status=0 ");
return
Get
<
RB_Class_Check_ViewModel
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_Class_Check_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
/// <summary>
/// 获取签到记录分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Class_Check_ViewModel
>
GetClassCheckPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Class_Check_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,IFNULL(B.GuestState,0) AS GuestState,IFNULL(C.ClassName,'') AS ClassName
,IFNULL(D.CourseName,'') AS CourseName,IFNULL(E.RoomName,'') AS RoomName,IFNULL(F.TeacherName,'') AS TeacherName
FROM RB_Class_Check AS A LEFT JOIN rb_order_guest AS B ON A.OrderGuestId=B.Id
LEFT JOIN rb_class AS C ON A.ClassId=C.ClassId
LEFT JOIN rb_course AS D ON C.CouseId=D.CourseId
LEFT JOIN rb_class_room AS E ON A.ClassRoomId=E.RoomId
LEFT JOIN rb_teacher AS F ON A.TeacherId=F.TId
WHERE 1=1 AND A.Status=0 "
);
builder
.
AppendFormat
(
" AND A.{0} IN(2,3) "
,
nameof
(
RB_Class_Check_ViewModel
.
MakeUpStatus
));
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
School_Id
>
0
)
{
//builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Check_ViewModel.School_Id), query.School_Id);
}
if
(
query
.
ClassId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
ClassId
),
query
.
ClassId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Q_ClassIds
))
{
builder
.
AppendFormat
(
" AND A.{0} in({1}) "
,
nameof
(
RB_Class_Check_ViewModel
.
ClassId
),
query
.
Q_ClassIds
);
}
if
(
query
.
OrderGuestId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
OrderGuestId
),
query
.
OrderGuestId
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StartDate
))
{
builder
.
AppendFormat
(
" AND DATE_FORMAT(A.{0},'%Y-%m-%d')>=DATE_FORMAT('{1}','%Y-%m-%d') "
,
nameof
(
RB_Class_Check_ViewModel
.
ClassDate
),
query
.
StartDate
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
EndDate
))
{
builder
.
AppendFormat
(
" AND DATE_FORMAT(A.{0},'%Y-%m-%d')<=DATE_FORMAT('{1}','%Y-%m-%d') "
,
nameof
(
RB_Class_Check_ViewModel
.
ClassDate
),
query
.
EndDate
);
}
if
(
query
.
CheckStatus
>
-
1
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
CheckStatus
),
query
.
CheckStatus
);
}
if
(
query
.
IsAbsentHours
>
-
1
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
IsAbsentHours
),
query
.
IsAbsentHours
);
}
if
(
query
.
MakeUpStatus
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
MakeUpStatus
),
query
.
MakeUpStatus
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
GuestName
))
{
builder
.
AppendFormat
(
" AND B.{0} LIKE @GuestName "
,
nameof
(
RB_Order_Guest
.
GuestName
));
parameters
.
Add
(
"GuestName"
,
"%"
+
query
.
GuestName
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
ClassName
))
{
builder
.
AppendFormat
(
" AND C.{0} LIKE @ClassName "
,
nameof
(
RB_Class
.
ClassName
));
parameters
.
Add
(
"ClassName"
,
"%"
+
query
.
ClassName
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
CourseName
))
{
builder
.
AppendFormat
(
" AND D.{0} LIKE @CourseName "
,
nameof
(
RB_Course
.
CourseName
));
parameters
.
Add
(
"CourseName"
,
"%"
+
query
.
CourseName
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
TeacherName
))
{
builder
.
AppendFormat
(
" AND F.{0} LIKE @TeacherName "
,
nameof
(
RB_Teacher
.
TeacherName
));
parameters
.
Add
(
"TeacherName"
,
"%"
+
query
.
TeacherName
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
RoomName
))
{
builder
.
AppendFormat
(
" AND E.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room
.
RoomName
));
parameters
.
Add
(
"RoomName"
,
"%"
+
query
.
RoomName
.
Trim
()
+
"%"
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Class_Check_ViewModel
.
ClassDate
));
return
GetPage
<
RB_Class_Check_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// <summary>
/// 获取签到列表
/// 获取签到列表
/// </summary>
/// </summary>
...
@@ -166,7 +72,10 @@ WHERE 1=1 AND A.Status=0 ");
...
@@ -166,7 +72,10 @@ WHERE 1=1 AND A.Status=0 ");
public
List
<
RB_Class_Check_ViewModel
>
GetClassCheckStatistics
(
RB_Class_Check_ViewModel
query
)
public
List
<
RB_Class_Check_ViewModel
>
GetClassCheckStatistics
(
RB_Class_Check_ViewModel
query
)
{
{
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT A.ClassId,A.ClassDate,COUNT(0) AS CheckNum FROM RB_Class_Check AS A WHERE 1=1 AND `Status` =0 and CheckStatus =0 "
);
builder
.
AppendFormat
(
@"
SELECT A.ClassId,A.ClassDate,COUNT(0) AS CheckNum
FROM RB_Class_Check AS A
WHERE 1=1 AND `Status` =0 and CheckStatus =0 "
);
if
(
query
!=
null
)
if
(
query
!=
null
)
{
{
if
(
query
.
Group_Id
>
0
)
if
(
query
.
Group_Id
>
0
)
...
@@ -240,19 +149,22 @@ WHERE 1=1 AND A.Status=0 ");
...
@@ -240,19 +149,22 @@ WHERE 1=1 AND A.Status=0 ");
/// </summary>
/// </summary>
/// <param name="guestIds">学员编号</param>
/// <param name="guestIds">学员编号</param>
/// <returns></returns>
/// <returns></returns>
public
List
<
GuestFinishMinute_ViewModel
>
GetGuestFinishMinutesRepository
(
string
guestIds
)
public
List
<
GuestFinishMinute_ViewModel
>
GetGuestFinishMinutesRepository
(
string
guestIds
,
int
ClassCheckId
=
0
)
{
{
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
builder
.
AppendFormat
(
@"
SELECT B.OrderGuestId AS GuestId,SUM(IFNULL(B.FinishMinutes,0)) AS FinishMinutes
SELECT A.OrderGuestId AS GuestId,SUM(A.StudyNum) AS FinishMinutes,SUM(A.CurrentDeductionHours) AS FinishClassHours
FROM
FROM rb_class_check AS A
(
WHERE A.CheckStatus=0 "
);
SELECT A.OrderGuestId, SUM(A.StudyNum) AS FinishMinutes
if
(!
string
.
IsNullOrEmpty
(
guestIds
))
FROM rb_class_check AS A
{
WHERE A.CheckStatus=0 AND A.OrderGuestId IN({0})
builder
.
AppendFormat
(
" AND A.OrderGuestId IN({0})"
,
guestIds
);
) AS B
}
GROUP BY B.OrderGuestId
if
(
ClassCheckId
>
0
)
"
,
guestIds
);
{
builder
.
AppendFormat
(
" AND A.ClassCheckId<>{0} "
,
ClassCheckId
);
}
builder
.
AppendFormat
(
" GROUP BY A.OrderGuestId "
);
return
Get
<
GuestFinishMinute_ViewModel
>(
builder
.
ToString
()).
ToList
();
return
Get
<
GuestFinishMinute_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
...
@@ -431,12 +343,5 @@ WHERE g.Group_Id ={groupId} and g.`Status`=0 and g.GuestState <>2 and c.`Status`
...
@@ -431,12 +343,5 @@ WHERE g.Group_Id ={groupId} and g.`Status`=0 and g.GuestState <>2 and c.`Status`
group by g.OrderId,DATE_FORMAT(c.ClassDate,'%Y-%m');"
;
group by g.OrderId,DATE_FORMAT(c.ClassDate,'%Y-%m');"
;
return
Get
<
RB_Class_Check_ViewModel
>(
sql
).
ToList
();
return
Get
<
RB_Class_Check_ViewModel
>(
sql
).
ToList
();
}
}
public
bool
ClearCheck
()
{
string
sql
=
" TRUNCATE TABLE rb_class_check "
;
base
.
ExecuteScalar
(
sql
);
return
true
;
}
}
}
}
}
Edu.Repository/Course/RB_Student_MakeupRepository.cs
0 → 100644
View file @
a9706783
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 学员补课仓储层
/// </summary>
public
class
RB_Student_MakeupRepository
:
BaseRepository
<
RB_Student_Makeup
>
{
/// <summary>
/// 获取学员补课列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Makeup_ViewModel
>
GetStudentMakeupPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Makeup_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,C.GuestName, D.ClassName,E.CourseName,F.TeacherName,G.RoomName,C.GuestState,H.StartTime,H.EndTime
FROM RB_Student_Makeup AS A LEFT JOIN rb_class_check AS B ON A.ClassCheckId=B.ClassCheckId
LEFT JOIN rb_order_guest AS C ON A.OrderGuestId=C.Id
LEFT JOIN rb_class AS D ON A.ClassId=D.ClassId
LEFT JOIN rb_course AS E ON D.CouseId=E.CourseId
LEFT JOIN rb_teacher AS F ON B.TeacherId=F.TId
LEFT JOIN rb_class_room AS G ON B.ClassRoomId=G.RoomId
LEFT JOIN rb_class_time AS H ON B.ClassTimeId=H.ClassTimeId
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Makeup_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
GuestName
))
{
builder
.
AppendFormat
(
" AND C.{0} LIKE @GuestName "
,
nameof
(
RB_Student_Makeup_ViewModel
.
GuestName
));
parameters
.
Add
(
"GuestName"
,
"%"
+
query
.
GuestName
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
ClassName
))
{
builder
.
AppendFormat
(
" AND D.{0} LIKE @ClassName "
,
nameof
(
RB_Student_Makeup_ViewModel
.
ClassName
));
parameters
.
Add
(
"ClassName"
,
"%"
+
query
.
ClassName
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
CourseName
))
{
builder
.
AppendFormat
(
" AND E.{0} LIKE @CourseName "
,
nameof
(
RB_Student_Makeup_ViewModel
.
CourseName
));
parameters
.
Add
(
"CourseName"
,
"%"
+
query
.
CourseName
.
Trim
()
+
"%"
);
}
if
(
query
.
MakeUpStatus
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Makeup_ViewModel
.
MakeUpStatus
),
query
.
MakeUpStatus
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StartDate
))
{
builder
.
AppendFormat
(
" AND A.{0}>='{1}' "
,
nameof
(
RB_Student_Makeup_ViewModel
.
ClassDate
),
query
.
StartDate
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
EndDate
))
{
builder
.
AppendFormat
(
" AND A.{0}<='{1} 23:59:59' "
,
nameof
(
RB_Student_Makeup_ViewModel
.
ClassDate
),
query
.
EndDate
);
}
}
builder
.
Append
(
" ORDER BY A.ClassId,A.ClassDate,A.OrderGuestId "
);
return
GetPage
<
RB_Student_Makeup_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
a9706783
...
@@ -122,7 +122,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -122,7 +122,7 @@ namespace Edu.WebApi.Controllers.Course
var
query
=
new
RB_Class_ViewModel
()
var
query
=
new
RB_Class_ViewModel
()
{
{
CouseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
),
CouseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
),
IsQuerySurplus
=
base
.
ParmJObj
.
GetInt
(
"IsQuerySurplus"
),
IsQuerySurplus
=
base
.
ParmJObj
.
GetInt
(
"IsQuerySurplus"
),
};
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
...
@@ -425,7 +425,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -425,7 +425,7 @@ namespace Edu.WebApi.Controllers.Course
CommissionType
=
extModel
?.
CommissionType
??
1
,
CommissionType
=
extModel
?.
CommissionType
??
1
,
CommissionValue
=
extModel
?.
CommissionValue
??
0
,
CommissionValue
=
extModel
?.
CommissionValue
??
0
,
CouseId
=
extModel
?.
CouseId
??
0
,
CouseId
=
extModel
?.
CouseId
??
0
,
CourseName
=
extModel
?.
CourseName
??
""
,
CourseName
=
extModel
?.
CourseName
??
""
,
DateJson
=
extModel
?.
DateJson
??
""
,
DateJson
=
extModel
?.
DateJson
??
""
,
DefaultTimeJson
=
extModel
?.
DefaultTimeJson
??
""
,
DefaultTimeJson
=
extModel
?.
DefaultTimeJson
??
""
,
DefaultPlanTimeList
=
extModel
?.
DefaultTimeList
??
new
List
<
ClassTimeItem
>(),
DefaultPlanTimeList
=
extModel
?.
DefaultTimeList
??
new
List
<
ClassTimeItem
>(),
...
@@ -443,7 +443,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -443,7 +443,7 @@ namespace Edu.WebApi.Controllers.Course
OutRemark
=
extModel
?.
OutRemark
??
""
,
OutRemark
=
extModel
?.
OutRemark
??
""
,
SellPrice
=
extModel
?.
SellPrice
??
0
,
SellPrice
=
extModel
?.
SellPrice
??
0
,
Teacher_Id
=
extModel
?.
Teacher_Id
??
0
,
Teacher_Id
=
extModel
?.
Teacher_Id
??
0
,
TeacherName
=
extModel
?.
TeacherName
??
""
,
TeacherName
=
extModel
?.
TeacherName
??
""
,
School_Id
=
extModel
?.
School_Id
??
0
,
School_Id
=
extModel
?.
School_Id
??
0
,
ClassStepPriceList
=
extModel
?.
ClassStepPriceList
??
new
List
<
RB_Class_StepPrice_ViewModel
>(),
ClassStepPriceList
=
extModel
?.
ClassStepPriceList
??
new
List
<
RB_Class_StepPrice_ViewModel
>(),
WeekDayList
=
extModel
?.
WeekDayList
??
new
List
<
string
>(),
WeekDayList
=
extModel
?.
WeekDayList
??
new
List
<
string
>(),
...
@@ -715,7 +715,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -715,7 +715,7 @@ namespace Edu.WebApi.Controllers.Course
var
schoolId
=
0
;
var
schoolId
=
0
;
int
QEffectStatus
=
base
.
ParmJObj
.
GetInt
(
"QEffectStatus"
);
int
QEffectStatus
=
base
.
ParmJObj
.
GetInt
(
"QEffectStatus"
);
//var schoolId = base.ParmJObj.GetInt("School_Id");
//var schoolId = base.ParmJObj.GetInt("School_Id");
var
data
=
classModule
.
GetClassStudentListModule
(
classId
,
schoolId
,
base
.
UserInfo
.
Group_Id
,
0
,
QEffectStatus
:
QEffectStatus
);
var
data
=
classModule
.
GetClassStudentListModule
(
classId
,
schoolId
,
base
.
UserInfo
.
Group_Id
,
0
,
QEffectStatus
:
QEffectStatus
);
return
ApiResult
.
Success
(
data
:
data
);
return
ApiResult
.
Success
(
data
:
data
);
}
}
...
@@ -747,7 +747,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -747,7 +747,7 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Failed
(
"数据不存在"
);
return
ApiResult
.
Failed
(
"数据不存在"
);
}
}
double
totalMinutes
=
0
;
double
totalMinutes
=
0
;
var
planTimeList
=
classModule
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
{
ClassId
=
classId
,
ClassPlanId
=
classPlanId
,
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
schoolId
,
ClassTimeId
=
ClassTimeId
});
var
planTimeList
=
classModule
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
{
ClassId
=
classId
,
ClassPlanId
=
classPlanId
,
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
schoolId
,
ClassTimeId
=
ClassTimeId
});
if
(
planTimeList
!=
null
&&
planTimeList
.
Any
())
if
(
planTimeList
!=
null
&&
planTimeList
.
Any
())
{
{
foreach
(
var
item
in
planTimeList
)
foreach
(
var
item
in
planTimeList
)
...
@@ -759,7 +759,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -759,7 +759,7 @@ namespace Edu.WebApi.Controllers.Course
}
}
}
}
}
}
var
orderGuestList
=
classModule
.
GetOrderGuestListModule
(
new
RB_Order_Guest_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
0
,
ClassId
=
data
.
ClassId
,
QEffectStatus
=
1
});
var
orderGuestList
=
classModule
.
GetOrderGuestListModule
(
new
RB_Order_Guest_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
0
,
ClassId
=
data
.
ClassId
,
QEffectStatus
=
1
});
var
checkLogList
=
classModule
.
GetClassCheckList
(
new
RB_Class_Check_ViewModel
var
checkLogList
=
classModule
.
GetClassCheckList
(
new
RB_Class_Check_ViewModel
{
{
Group_Id
=
data
.
Group_Id
,
Group_Id
=
data
.
Group_Id
,
...
@@ -767,7 +767,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -767,7 +767,7 @@ namespace Edu.WebApi.Controllers.Course
ClassId
=
data
.
ClassId
,
ClassId
=
data
.
ClassId
,
StartDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
StartDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
EndDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
EndDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
ClassTimeId
=
ClassTimeId
,
ClassTimeId
=
ClassTimeId
,
});
});
List
<
object
>
guestList
=
new
List
<
object
>();
List
<
object
>
guestList
=
new
List
<
object
>();
foreach
(
var
item
in
orderGuestList
.
Where
(
x
=>
x
.
GuestState
==
1
))
foreach
(
var
item
in
orderGuestList
.
Where
(
x
=>
x
.
GuestState
==
1
))
...
@@ -903,16 +903,16 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -903,16 +903,16 @@ namespace Edu.WebApi.Controllers.Course
StudyNum
=
obj
.
GetInt
(
"StudyNum"
),
StudyNum
=
obj
.
GetInt
(
"StudyNum"
),
TeacherId
=
obj
.
GetInt
(
"TeacherId"
),
TeacherId
=
obj
.
GetInt
(
"TeacherId"
),
ClassId
=
obj
.
GetInt
(
"classId"
),
ClassId
=
obj
.
GetInt
(
"classId"
),
ClassTimeId
=
obj
.
GetInt
(
"ClassTimeId"
),
ClassTimeId
=
obj
.
GetInt
(
"ClassTimeId"
),
});
});
}
}
}
}
if
(
list
==
null
||
!
list
.
Any
())
if
(
list
==
null
||
!
list
.
Any
())
{
{
return
ApiResult
.
ParamIsNull
(
message
:
"请选择签到学员!"
);
return
ApiResult
.
ParamIsNull
(
message
:
"请选择签到学员!"
);
}
}
//获取班级的学员信息
//获取班级的学员信息
var
orderGuestList
=
classModule
.
GetOrderGuestListModule
(
new
RB_Order_Guest_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
list
.
FirstOrDefault
().
ClassId
,
QEffectStatus
=
1
});
var
orderGuestList
=
classModule
.
GetOrderGuestListModule
(
new
RB_Order_Guest_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
list
.
FirstOrDefault
().
ClassId
,
QEffectStatus
=
1
});
if
(
list
.
Count
()
!=
orderGuestList
.
Where
(
x
=>
x
.
GuestState
==
1
).
Count
())
if
(
list
.
Count
()
!=
orderGuestList
.
Where
(
x
=>
x
.
GuestState
==
1
).
Count
())
{
{
// return ApiResult.Failed("签到总人数错误,请先检查信息");
// return ApiResult.Failed("签到总人数错误,请先检查信息");
...
@@ -937,7 +937,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -937,7 +937,7 @@ namespace Edu.WebApi.Controllers.Course
ClassId
=
list
.
FirstOrDefault
().
ClassId
,
ClassId
=
list
.
FirstOrDefault
().
ClassId
,
StartDate
=
list
.
FirstOrDefault
().
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
StartDate
=
list
.
FirstOrDefault
().
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
EndDate
=
list
.
FirstOrDefault
().
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
EndDate
=
list
.
FirstOrDefault
().
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
ClassTimeId
=
list
.
FirstOrDefault
().
ClassTimeId
,
ClassTimeId
=
list
.
FirstOrDefault
().
ClassTimeId
,
});
});
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
...
@@ -973,9 +973,9 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -973,9 +973,9 @@ namespace Edu.WebApi.Controllers.Course
/// <returns></returns>
/// <returns></returns>
public
ApiResult
InitClassCheck
()
public
ApiResult
InitClassCheck
()
{
{
//
bool result = classModule.InitClassCheckModule();
bool
result
=
classModule
.
InitClassCheckModule
();
//
return result ? ApiResult.Success("初始化成功!") : ApiResult.Failed("初始化失败!");
return
result
?
ApiResult
.
Success
(
"初始化成功!"
)
:
ApiResult
.
Failed
(
"初始化失败!"
);
return
ApiResult
.
Failed
(
"初始化失败!"
);
//
return ApiResult.Failed("初始化失败!");
}
}
/// <summary>
/// <summary>
...
@@ -1064,10 +1064,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1064,10 +1064,8 @@ namespace Edu.WebApi.Controllers.Course
public
ApiResult
GetAbsentPage
()
public
ApiResult
GetAbsentPage
()
{
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_
Class_Check
_ViewModel
()
var
query
=
new
RB_
Student_Makeup
_ViewModel
()
{
{
CheckStatus
=
1
,
IsAbsentHours
=
1
,
MakeUpStatus
=
base
.
ParmJObj
.
GetInt
(
"MakeUpStatus"
),
MakeUpStatus
=
base
.
ParmJObj
.
GetInt
(
"MakeUpStatus"
),
GuestName
=
base
.
ParmJObj
.
GetStringValue
(
"GuestName"
),
GuestName
=
base
.
ParmJObj
.
GetStringValue
(
"GuestName"
),
ClassName
=
base
.
ParmJObj
.
GetStringValue
(
"ClassName"
),
ClassName
=
base
.
ParmJObj
.
GetStringValue
(
"ClassName"
),
...
@@ -1079,11 +1077,12 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1079,11 +1077,12 @@ namespace Edu.WebApi.Controllers.Course
};
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
classModule
.
Get
ClassCheck
PageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
var
list
=
classModule
.
Get
StudentMakeup
PageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
result
.
Add
(
new
result
.
Add
(
new
{
{
item
.
Id
,
item
.
ClassCheckId
,
item
.
ClassCheckId
,
item
.
OrderGuestId
,
item
.
OrderGuestId
,
item
.
GuestName
,
item
.
GuestName
,
...
@@ -1092,14 +1091,15 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1092,14 +1091,15 @@ namespace Edu.WebApi.Controllers.Course
item
.
ClassId
,
item
.
ClassId
,
item
.
ClassName
,
item
.
ClassName
,
item
.
CourseName
,
item
.
CourseName
,
item
.
School_Id
,
item
.
TeacherId
,
item
.
TeacherName
,
item
.
TeacherName
,
item
.
ClassRoomId
,
item
.
RoomName
,
item
.
RoomName
,
ClassDate
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
),
ClassDate
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
),
item
.
MakeUpStatus
,
item
.
MakeUpStatus
,
item
.
MakeUpStatusStr
item
.
MakeUpStatusStr
,
item
.
StartTime
,
item
.
EndTime
,
DealByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
DealBy
)?.
AccountName
,
DealTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
DealTime
)
});
});
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
Count
=
rowsCount
;
...
@@ -1113,10 +1113,11 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1113,10 +1113,11 @@ namespace Edu.WebApi.Controllers.Course
/// <returns></returns>
/// <returns></returns>
public
ApiResult
SetMakeUpStatus
()
public
ApiResult
SetMakeUpStatus
()
{
{
int
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
int
MakeUpStatus
=
base
.
ParmJObj
.
GetInt
(
"MakeUpStatus"
);
int
MakeUpStatus
=
base
.
ParmJObj
.
GetInt
(
"MakeUpStatus"
);
int
ClassCheckId
=
base
.
ParmJObj
.
GetInt
(
"ClassCheckId"
);
int
ClassCheckId
=
base
.
ParmJObj
.
GetInt
(
"ClassCheckId"
);
int
GuestId
=
base
.
ParmJObj
.
GetInt
(
"GuestId"
);
int
GuestId
=
base
.
ParmJObj
.
GetInt
(
"GuestId"
);
bool
flag
=
classModule
.
SetMakeUpStatusModule
(
MakeUpStatus
,
ClassCheckId
,
GuestId
);
bool
flag
=
classModule
.
SetMakeUpStatusModule
(
Id
,
MakeUpStatus
,
ClassCheckId
,
GuestId
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
...
@@ -1954,7 +1955,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1954,7 +1955,7 @@ namespace Edu.WebApi.Controllers.Course
};
};
//课程类型(0-全部,1-正常,2-试听课)
//课程类型(0-全部,1-正常,2-试听课)
int
ClassType
=
base
.
ParmJObj
.
GetInt
(
"ClassType"
);
int
ClassType
=
base
.
ParmJObj
.
GetInt
(
"ClassType"
);
var
obj
=
classModule
.
GetClassPlanStatisticalModule
(
query
,
ClassType
:
ClassType
);
var
obj
=
classModule
.
GetClassPlanStatisticalModule
(
query
,
ClassType
:
ClassType
);
return
ApiResult
.
Success
(
data
:
obj
);
return
ApiResult
.
Success
(
data
:
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