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
6a3715fa
Commit
6a3715fa
authored
Jul 21, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
38e99de4
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
311 additions
and
24 deletions
+311
-24
RB_Class_Check.cs
Edu.Model/Entity/Course/RB_Class_Check.cs
+1
-1
RB_Student_Makeup.cs
Edu.Model/Entity/Course/RB_Student_Makeup.cs
+1
-1
RB_Student_Makeup_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Student_Makeup_ViewModel.cs
+8
-3
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+90
-12
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+48
-0
StudentBillModule.cs
Edu.Module.Course/StudentBillModule.cs
+75
-2
RB_Class_CheckRepository.cs
Edu.Repository/Course/RB_Class_CheckRepository.cs
+4
-0
RB_OrderRepository.cs
Edu.Repository/Course/RB_OrderRepository.cs
+1
-1
RB_Student_MakeupRepository.cs
Edu.Repository/Course/RB_Student_MakeupRepository.cs
+2
-2
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+1
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+28
-2
StuController.cs
Edu.WebApi/Controllers/Course/StuController.cs
+52
-0
No files found.
Edu.Model/Entity/Course/RB_Class_Check.cs
View file @
6a3715fa
...
...
@@ -95,7 +95,7 @@ namespace Edu.Model.Entity.Course
public
int
IsAbsentHours
{
get
;
set
;
}
/// <summary>
/// 补课状态(1-正常,2-
已处理,3
-未处理)
/// 补课状态(1-正常,2-
可补课,3-不可补课, 4
-未处理)
/// </summary>
public
int
MakeUpStatus
{
get
;
set
;
}
}
...
...
Edu.Model/Entity/Course/RB_Student_Makeup.cs
View file @
6a3715fa
...
...
@@ -33,7 +33,7 @@ namespace Edu.Model.Entity.Course
public
DateTime
ClassDate
{
get
;
set
;
}
/// <summary>
/// 补课状态(1-
正常,2-已处理,3-未处理
)
/// 补课状态(1-
未处理,2-可补课,3-不可补课
)
/// </summary>
public
int
MakeUpStatus
{
get
;
set
;
}
...
...
Edu.Model/ViewModel/Course/RB_Student_Makeup_ViewModel.cs
View file @
6a3715fa
...
...
@@ -25,9 +25,9 @@ namespace Edu.Model.ViewModel.Course
string
str
=
""
;
switch
(
this
.
MakeUpStatus
)
{
case
1
:
str
=
"
正常
"
;
break
;
case
2
:
str
=
"
已处理
"
;
break
;
case
3
:
str
=
"
未处理
"
;
break
;
case
1
:
str
=
"
未处理
"
;
break
;
case
2
:
str
=
"
可补课
"
;
break
;
case
3
:
str
=
"
不可补课
"
;
break
;
}
return
str
;
...
...
@@ -101,5 +101,10 @@ namespace Edu.Model.ViewModel.Course
/// 结束时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
/// <summary>
/// 课时
/// </summary>
public
string
TimeHour
{
get
;
set
;
}
}
}
Edu.Module.Course/ClassModule.cs
View file @
6a3715fa
...
...
@@ -1535,7 +1535,7 @@ namespace Edu.Module.Course
}).
OrderByDescending
(
qitem
=>
qitem
.
ClassDate
).
ToList
();
for
(
var
i
=
0
;
i
<
checkList
.
Count
;
i
++)
{
if
((
checkList
[
i
].
CheckStatus
==
1
)
&&
(
checkList
[
i
].
MakeUpStatus
==
3
||
checkList
[
i
].
MakeUpStatus
==
1
))
if
((
checkList
[
i
].
CheckStatus
==
1
)
&&
(
checkList
[
i
].
MakeUpStatus
==
3
||
checkList
[
i
].
MakeUpStatus
==
4
||
checkList
[
i
].
MakeUpStatus
==
1
))
{
NoFinishHours
+=
checkList
[
i
].
CurrentDeductionHours
;
}
...
...
@@ -1551,7 +1551,7 @@ namespace Edu.Module.Course
{
fileds
.
Add
(
nameof
(
RB_Order_Guest_ViewModel
.
GuestState
),
5
);
checkFileds
.
Add
(
nameof
(
RB_Class_Check_ViewModel
.
IsAbsentHours
),
1
);
checkFileds
.
Add
(
nameof
(
RB_Class_Check_ViewModel
.
MakeUpStatus
),
3
);
checkFileds
.
Add
(
nameof
(
RB_Class_Check_ViewModel
.
MakeUpStatus
),
4
);
}
if
(
fileds
!=
null
&&
fileds
.
Count
>
0
&&
checkFileds
!=
null
&&
checkFileds
.
Count
>
0
)
{
...
...
@@ -1578,7 +1578,7 @@ namespace Edu.Module.Course
CreateBy
=
checkModel
.
CreateBy
,
CreateTime
=
checkModel
.
CreateTime
,
Group_Id
=
checkModel
.
Group_Id
,
MakeUpStatus
=
3
,
MakeUpStatus
=
1
,
OrderGuestId
=
checkModel
.
OrderGuestId
});
}
...
...
@@ -1597,7 +1597,9 @@ namespace Edu.Module.Course
public
virtual
bool
SetMakeUpStatusModule
(
int
Id
,
int
MakeUpStatus
,
int
ClassCheckId
,
int
GuestId
,
UserInfo
userinfo
)
{
bool
flag
=
true
;
if
(
MakeUpStatus
==
2
)
var
model
=
student_MakeupRepository
.
GetEntity
(
Id
);
if
(
model
.
MakeUpStatus
==
MakeUpStatus
)
{
return
true
;
}
if
(
model
.
MakeUpStatus
==
1
)
{
Dictionary
<
string
,
object
>
makeUpFileds
=
new
Dictionary
<
string
,
object
>()
{
...
...
@@ -1619,16 +1621,92 @@ namespace Edu.Module.Course
if
(
flag
)
{
//更新学员状态和已补课时
var
guestModel
=
order_GuestRepository
.
GetEntity
(
GuestId
);
var
checkModel
=
classCheckRepository
.
GetEntity
(
ClassCheckId
);
var
makeUpHours
=
(
guestModel
?.
MakeUpHours
??
0
)
+
(
checkModel
?.
CurrentDeductionHours
??
0
);
Dictionary
<
string
,
object
>
guestFileds
=
new
Dictionary
<
string
,
object
>()
if
(
MakeUpStatus
==
2
)
{
{
nameof
(
RB_Order_Guest_ViewModel
.
GuestState
),
1
},
{
nameof
(
RB_Order_Guest_ViewModel
.
MakeUpHours
),
makeUpHours
}
//更新学员状态和已补课时
var
guestModel
=
order_GuestRepository
.
GetEntity
(
GuestId
);
var
checkModel
=
classCheckRepository
.
GetEntity
(
ClassCheckId
);
var
makeUpHours
=
(
guestModel
?.
MakeUpHours
??
0
)
+
(
checkModel
?.
CurrentDeductionHours
??
0
);
Dictionary
<
string
,
object
>
guestFileds
=
new
Dictionary
<
string
,
object
>()
{
//{ nameof(RB_Order_Guest_ViewModel.GuestState), 1 },
{
nameof
(
RB_Order_Guest_ViewModel
.
MakeUpHours
),
makeUpHours
}
};
flag
=
order_GuestRepository
.
Update
(
guestFileds
,
new
WhereHelper
(
nameof
(
RB_Order_Guest_ViewModel
.
Id
),
GuestId
));
}
}
}
else
{
if
(
MakeUpStatus
==
2
)
{
Dictionary
<
string
,
object
>
makeUpFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Makeup_ViewModel
.
MakeUpStatus
),
MakeUpStatus
},
{
nameof
(
RB_Student_Makeup_ViewModel
.
DealBy
),
userinfo
.
Id
},
{
nameof
(
RB_Student_Makeup_ViewModel
.
DealTime
),
DateTime
.
Now
},
};
flag
=
order_GuestRepository
.
Update
(
guestFileds
,
new
WhereHelper
(
nameof
(
RB_Order_Guest_ViewModel
.
Id
),
GuestId
));
//更新补课表状态
flag
=
student_MakeupRepository
.
Update
(
makeUpFileds
,
new
WhereHelper
(
nameof
(
RB_Student_Makeup_ViewModel
.
Id
),
Id
));
if
(
flag
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Class_Check_ViewModel
.
MakeUpStatus
),
MakeUpStatus
}
};
//更新签到表状态
flag
=
classCheckRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Check_ViewModel
.
ClassCheckId
),
ClassCheckId
));
}
if
(
flag
)
{
//更新学员状态和已补课时
var
guestModel
=
order_GuestRepository
.
GetEntity
(
GuestId
);
var
checkModel
=
classCheckRepository
.
GetEntity
(
ClassCheckId
);
var
makeUpHours
=
(
guestModel
?.
MakeUpHours
??
0
)
+
(
checkModel
?.
CurrentDeductionHours
??
0
);
Dictionary
<
string
,
object
>
guestFileds
=
new
Dictionary
<
string
,
object
>()
{
//{ nameof(RB_Order_Guest_ViewModel.GuestState), 1 },
{
nameof
(
RB_Order_Guest_ViewModel
.
MakeUpHours
),
makeUpHours
}
};
flag
=
order_GuestRepository
.
Update
(
guestFileds
,
new
WhereHelper
(
nameof
(
RB_Order_Guest_ViewModel
.
Id
),
GuestId
));
}
}
else
if
(
MakeUpStatus
==
3
)
{
//由可补课 修改为 不可补课, 需要扣回
Dictionary
<
string
,
object
>
makeUpFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Makeup_ViewModel
.
MakeUpStatus
),
MakeUpStatus
},
{
nameof
(
RB_Student_Makeup_ViewModel
.
DealBy
),
userinfo
.
Id
},
{
nameof
(
RB_Student_Makeup_ViewModel
.
DealTime
),
DateTime
.
Now
},
};
//更新补课表状态
flag
=
student_MakeupRepository
.
Update
(
makeUpFileds
,
new
WhereHelper
(
nameof
(
RB_Student_Makeup_ViewModel
.
Id
),
Id
));
if
(
flag
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Class_Check_ViewModel
.
MakeUpStatus
),
MakeUpStatus
}
};
//更新签到表状态
flag
=
classCheckRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Check_ViewModel
.
ClassCheckId
),
ClassCheckId
));
}
if
(
flag
)
{
//更新学员状态和已补课时
var
guestModel
=
order_GuestRepository
.
GetEntity
(
GuestId
);
var
checkModel
=
classCheckRepository
.
GetEntity
(
ClassCheckId
);
var
makeUpHours
=
(
guestModel
?.
MakeUpHours
??
0
)
-
(
checkModel
?.
CurrentDeductionHours
??
0
);
makeUpHours
=
makeUpHours
<
0
?
0
:
makeUpHours
;
Dictionary
<
string
,
object
>
guestFileds
=
new
Dictionary
<
string
,
object
>()
{
//{ nameof(RB_Order_Guest_ViewModel.GuestState), 1 },
{
nameof
(
RB_Order_Guest_ViewModel
.
MakeUpHours
),
makeUpHours
}
};
flag
=
order_GuestRepository
.
Update
(
guestFileds
,
new
WhereHelper
(
nameof
(
RB_Order_Guest_ViewModel
.
Id
),
GuestId
));
}
}
}
return
flag
;
...
...
Edu.Module.Course/OrderModule.cs
View file @
6a3715fa
...
...
@@ -2273,6 +2273,54 @@ namespace Edu.Module.Course
{
return
orderRepository
.
GetMyOrderStatisticsRepository
(
demodel
);
}
/// <summary>
/// 修改订单关联人员
/// </summary>
/// <param name="orderId"></param>
/// <param name="helpEnterId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
string
SetOrderHelpEnterId
(
int
orderId
,
int
helpEnterId
,
UserInfo
userInfo
)
{
var
orderModel
=
orderRepository
.
GetEntity
(
orderId
);
if
(
orderModel
==
null
)
{
return
"订单不存在"
;
}
if
(
orderModel
.
OrderState
==
OrderStateEnum
.
Cancel
)
{
return
"订单已取消,无法修改"
;
}
if
(
orderModel
.
HelpEnterId
==
helpEnterId
)
{
return
""
;
}
string
OldName
=
"无"
,
NewName
=
"无"
;
if
(
orderModel
.
HelpEnterId
>
0
)
{
OldName
=
accountRepository
.
GetEmployeeInfo
(
orderModel
.
HelpEnterId
)?.
EmployeeName
??
""
;
}
if
(
helpEnterId
>
0
)
{
NewName
=
accountRepository
.
GetEmployeeInfo
(
helpEnterId
)?.
EmployeeName
??
""
;
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Order
.
HelpEnterId
),
helpEnterId
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Order
.
OrderId
),
FiledValue
=
orderId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
orderRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
//写入日志
changeLogRepository
.
Insert
(
new
Model
.
Entity
.
Log
.
RB_User_ChangeLog
()
{
Id
=
0
,
Type
=
2
,
CreateBy
=
userInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
Group_Id
=
userInfo
.
Group_Id
,
LogContent
=
$"修改订单关联教师 由【
{
OldName
}
】修改为【
{
NewName
}
】"
,
School_Id
=
userInfo
.
School_Id
,
SourceId
=
orderId
});
}
return
flag
?
""
:
"出错了,请联系管理员"
;
}
#
endregion
#
region
订单操作
...
...
Edu.Module.Course/StudentBillModule.cs
View file @
6a3715fa
...
...
@@ -294,7 +294,7 @@ namespace Edu.Module.Course
//获取当日签到数据
var
list
=
class_CheckRepository
.
GetStudentAttendanceDayStatistics
(
demodel
);
//根据班级 课次分组
var
RList
=
list
.
GroupBy
(
x
=>
new
{
x
.
ClassId
,
x
.
ClassName
,
x
.
CouseId
,
x
.
CourseName
,
x
.
ClassRoomId
,
x
.
RoomName
,
x
.
TeacherId
,
x
.
TeacherName
,
x
.
ClassDate
,
x
.
TimeBucket
}
).
Select
(
x
=>
new
var
RList
=
list
.
GroupBy
(
x
=>
new
{
x
.
ClassId
,
x
.
ClassName
,
x
.
CouseId
,
x
.
CourseName
,
x
.
ClassRoomId
,
x
.
RoomName
,
x
.
School_Id
,
x
.
TeacherId
,
x
.
TeacherName
,
x
.
ClassDate
,
x
.
TimeBucket
}).
OrderBy
(
x
=>
x
.
Key
.
ClassId
).
ThenBy
(
x
=>
x
.
Key
.
TimeBucket
).
Select
(
x
=>
new
{
x
.
Key
.
ClassId
,
x
.
Key
.
ClassName
,
...
...
@@ -302,11 +302,13 @@ namespace Edu.Module.Course
x
.
Key
.
CourseName
,
x
.
Key
.
ClassRoomId
,
x
.
Key
.
RoomName
,
x
.
Key
.
School_Id
,
x
.
Key
.
TeacherId
,
x
.
Key
.
TeacherName
,
ClassDate
=
x
.
Key
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
),
x
.
Key
.
TimeBucket
,
GuestList
=
x
.
Select
(
z
=>
new
{
GuestList
=
x
.
Select
(
z
=>
new
{
z
.
OrderGuestId
,
z
.
GuestName
,
z
.
CurrentDeductionHours
,
...
...
@@ -316,6 +318,77 @@ namespace Edu.Module.Course
return
RList
;
}
/// <summary>
/// 获取学生的当日出勤情况 Excel
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
ExcelDataSource
>
GetStudentAttendanceDayStatisticsToExcel
(
RB_Class_Check_ViewModel
demodel
)
{
List
<
ExcelDataSource
>
RDate
=
new
List
<
ExcelDataSource
>();
//获取当日签到数据
var
list
=
class_CheckRepository
.
GetStudentAttendanceDayStatistics
(
demodel
);
//根据班级 课次分组
var
glist
=
list
.
GroupBy
(
x
=>
new
{
x
.
ClassId
,
x
.
ClassName
,
x
.
CouseId
,
x
.
CourseName
,
x
.
ClassRoomId
,
x
.
RoomName
,
x
.
School_Id
,
x
.
TeacherId
,
x
.
TeacherName
,
x
.
ClassDate
,
x
.
TimeBucket
}).
OrderBy
(
x
=>
x
.
Key
.
ClassId
).
ThenBy
(
x
=>
x
.
Key
.
TimeBucket
);
foreach
(
var
qitem
in
glist
)
{
int
Count
=
qitem
.
Count
();
int
Num
=
1
;
foreach
(
var
item
in
qitem
)
{
string
CheckStatusName
=
""
;
switch
(
item
.
CheckStatus
)
{
case
0
:
CheckStatusName
=
"正常"
;
break
;
case
1
:
CheckStatusName
=
"缺席"
;
break
;
case
2
:
CheckStatusName
=
"请假"
;
break
;
}
if
(
Num
==
1
)
{
ExcelDataSource
datarow
=
new
ExcelDataSource
(
30
)
{
ExcelRows
=
new
List
<
ExcelColumn
>()
{
new
ExcelColumn
(
value
:
qitem
.
Key
.
ClassName
){
Rowspan
=
Count
},
new
ExcelColumn
(
value
:
qitem
.
Key
.
CourseName
){
Rowspan
=
Count
},
new
ExcelColumn
(
value
:
qitem
.
Key
.
TeacherName
){
Rowspan
=
Count
},
new
ExcelColumn
(
value
:
qitem
.
Key
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
)){
Rowspan
=
Count
},
new
ExcelColumn
(
value
:
qitem
.
Key
.
TimeBucket
){
Rowspan
=
Count
},
new
ExcelColumn
(
value
:
item
.
GuestName
){
},
new
ExcelColumn
(
value
:
item
.
CurrentDeductionHours
.
ToString
()){
},
new
ExcelColumn
(
value
:
CheckStatusName
){
},
}
};
RDate
.
Add
(
datarow
);
}
else
{
ExcelDataSource
datarow
=
new
ExcelDataSource
(
30
)
{
ExcelRows
=
new
List
<
ExcelColumn
>()
{
new
ExcelColumn
(
value
:
""
){
},
new
ExcelColumn
(
value
:
""
){
},
new
ExcelColumn
(
value
:
""
){
},
new
ExcelColumn
(
value
:
""
){
},
new
ExcelColumn
(
value
:
""
){
},
new
ExcelColumn
(
value
:
item
.
GuestName
){
},
new
ExcelColumn
(
value
:
item
.
CurrentDeductionHours
.
ToString
()){
},
new
ExcelColumn
(
value
:
CheckStatusName
){
},
}
};
RDate
.
Add
(
datarow
);
}
Num
++;
}
}
return
RDate
;
}
#
endregion
}
}
Edu.Repository/Course/RB_Class_CheckRepository.cs
View file @
6a3715fa
...
...
@@ -358,6 +358,10 @@ WHERE 1=1 AND A.Status=0 ");
{
builder
.
AppendFormat
(
" AND C.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
CouseId
),
query
.
CouseId
);
}
if
(
query
.
CheckStatus
>
0
)
{
builder
.
AppendFormat
(
" AND C.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
CheckStatus
),
query
.
CheckStatus
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Q_ClassIds
))
{
builder
.
AppendFormat
(
" AND A.{0} in({1}) "
,
nameof
(
RB_Class_Check_ViewModel
.
ClassId
),
query
.
Q_ClassIds
);
...
...
Edu.Repository/Course/RB_OrderRepository.cs
View file @
6a3715fa
...
...
@@ -237,7 +237,7 @@ ORDER BY {orderBy}
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
PreferPrice
)}
> (o.
{
nameof
(
RB_Order_ViewModel
.
Income
)}
- o.
{
nameof
(
RB_Order_ViewModel
.
Refund
)}
+ o.
{
nameof
(
RB_Order_ViewModel
.
PlatformTax
)}
+ o.
{
nameof
(
RB_Order_ViewModel
.
DiscountMoney
)}
) "
;
}
}
if
(
demodel
.
HelpEnterId
>
0
)
if
(
demodel
.
HelpEnterId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
HelpEnterId
)}
=
{
demodel
.
HelpEnterId
}
"
;
}
...
...
Edu.Repository/Course/RB_Student_MakeupRepository.cs
View file @
6a3715fa
...
...
@@ -27,7 +27,7 @@ namespace Edu.Repository.Course
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
SELECT A.*,C.GuestName, D.ClassName,E.CourseName,F.TeacherName,G.RoomName,C.GuestState,H.StartTime,H.EndTime
,H.TimeHour
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
...
...
@@ -92,7 +92,7 @@ WHERE 1=1
CreateBy
=
model
.
CreateBy
,
CreateTime
=
model
.
CreateTime
,
Group_Id
=
model
.
Group_Id
,
MakeUpStatus
=
3
,
MakeUpStatus
=
1
,
OrderGuestId
=
model
.
OrderGuestId
};
newModel
.
Id
=
CheckStudentMakeUpExistsRepository
(
model
);
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
6a3715fa
...
...
@@ -1138,6 +1138,7 @@ namespace Edu.WebApi.Controllers.Course
item
.
MakeUpStatusStr
,
item
.
StartTime
,
item
.
EndTime
,
item
.
TimeHour
,
DealByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
DealBy
)?.
AccountName
,
DealTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
DealTime
)
});
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
6a3715fa
...
...
@@ -1342,7 +1342,7 @@ namespace Edu.WebApi.Controllers.Course
PlatformTax
=
base
.
ParmJObj
.
GetDecimal
(
"PlatformTax"
),
EnterID
=
base
.
ParmJObj
.
GetInt
(
"EnterID"
),
HelpEnterId
=
base
.
ParmJObj
.
GetInt
(
"HelpEnterId"
,
0
),
ClassNo
=
base
.
ParmJObj
.
GetStringValue
(
"ClassNo"
)
,
ClassNo
=
base
.
ParmJObj
.
GetStringValue
(
"ClassNo"
)
};
demodel
.
Group_Id
=
userInfo
.
Group_Id
;
...
...
@@ -1533,7 +1533,9 @@ namespace Edu.WebApi.Controllers.Course
Q_OrderState
=
base
.
ParmJObj
.
GetInt
(
"Q_OrderState"
),
Q_OrderBy
=
base
.
ParmJObj
.
GetInt
(
"Q_OrderBy"
),
PlatformTax
=
base
.
ParmJObj
.
GetDecimal
(
"PlatformTax"
),
EnterID
=
base
.
ParmJObj
.
GetInt
(
"EnterID"
)
EnterID
=
base
.
ParmJObj
.
GetInt
(
"EnterID"
),
HelpEnterId
=
base
.
ParmJObj
.
GetInt
(
"HelpEnterId"
,
0
),
ClassNo
=
base
.
ParmJObj
.
GetStringValue
(
"ClassNo"
)
};
demodel
.
Group_Id
=
userInfo
.
Group_Id
;
...
...
@@ -1617,6 +1619,30 @@ namespace Edu.WebApi.Controllers.Course
}
}
/// <summary>
/// 修改订单的关联教师
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetOrderHelpEnterId
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
int
HelpEnterId
=
parms
.
GetInt
(
"HelpEnterId"
,
0
);
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递订单id"
);
}
string
msg
=
orderModule
.
SetOrderHelpEnterId
(
OrderId
,
HelpEnterId
,
userInfo
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
/// <summary>
/// 获取我的留学就业订单列表
/// </summary>
...
...
Edu.WebApi/Controllers/Course/StuController.cs
View file @
6a3715fa
...
...
@@ -210,6 +210,58 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Success
(
""
,
RObj
);
}
/// <summary>
/// 获取学生的当日出勤情况 Excel导出
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Obsolete
]
public
FileContentResult
GetStudentAttendanceDayStatisticsToExcel
()
{
List
<
ExcelDataSource
>
slist
=
new
List
<
ExcelDataSource
>();
ExcelDataSource
header
=
new
ExcelDataSource
()
{
ExcelRows
=
new
List
<
ExcelColumn
>(
30
)
{
new
ExcelColumn
(
value
:
"班级"
){
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"课程"
){
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"老师"
){
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"上课日期"
){
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"上课时间"
){
CellWidth
=
25
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"学员姓名"
){
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"学习课时"
){
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"出勤状态"
){
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
}
}
};
slist
.
Add
(
header
);
string
ExcelName
=
"学员出勤统计"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)
+
".xls"
;
var
userInfo
=
base
.
UserInfo
;
RB_Class_Check_ViewModel
demodel
=
JsonHelper
.
DeserializeObject
<
RB_Class_Check_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
demodel
.
Group_Id
=
userInfo
.
Group_Id
;
if
(
string
.
IsNullOrEmpty
(
demodel
.
StartDate
))
{
var
byteData1
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData1
,
"application/octet-stream"
,
ExcelName
);
}
try
{
List
<
ExcelDataSource
>
RDate
=
studentBillModule
.
GetStudentAttendanceDayStatisticsToExcel
(
demodel
);
slist
.
AddRange
(
RDate
);
var
byteData
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData
,
"application/octet-stream"
,
ExcelName
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"OutToExcelOrderStudentClassHoursList"
);
var
byteData1
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData1
,
"application/octet-stream"
,
ExcelName
);
}
}
#
endregion
}
}
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