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
9d2c0fee
Commit
9d2c0fee
authored
Jul 07, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
acaa9d1f
8e4ebae7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
137 deletions
+17
-137
RB_Order_Guest_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Order_Guest_ViewModel.cs
+0
-2
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+9
-59
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+4
-64
UserInfoController.cs
Edu.WebApi/Controllers/User/UserInfoController.cs
+4
-12
No files found.
Edu.Model/ViewModel/Course/RB_Order_Guest_ViewModel.cs
View file @
9d2c0fee
...
...
@@ -88,8 +88,6 @@ namespace Edu.Model.ViewModel.Course
get
;
set
;
}
/// <summary>
/// 课程编号
/// </summary>
...
...
Edu.Module.Course/ClassModule.cs
View file @
9d2c0fee
...
...
@@ -207,8 +207,6 @@ namespace Edu.Module.Course
return
class_TimeRepository
.
GetClassTimeList
(
query
);
}
/// <summary>
/// 获取班级分页列表
/// </summary>
...
...
@@ -268,24 +266,6 @@ namespace Edu.Module.Course
return
classLogRepository
.
GetClassLogPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 检查班级是否存在
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
ExistsClassModule
(
RB_Class_ViewModel
model
)
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Class_ViewModel
.
ClassName
),
model
.
ClassName
.
Trim
()),
};
if
(
model
.
ClassId
>
0
)
{
wheres
.
Add
(
new
WhereHelper
(
nameof
(
RB_Class_ViewModel
.
ClassId
),
model
.
ClassId
,
OperatorEnum
.
NotEqual
));
}
return
classRepository
.
Exists
(
wheres
);
}
/// <summary>
/// 新增修改班级
/// </summary>
...
...
@@ -651,10 +631,6 @@ namespace Edu.Module.Course
if
(
model
.
ClassHours
>
0
)
{
var
srartDate
=
model
.
OpenTime
;
// var BasicMinutes = class_ConfigRepository.GetBasicMinutesRepository(model.Group_Id);
//按周排课和按月排课
if
(
model
.
ClassStyle
==
ClassStyleEnum
.
Week
||
model
.
ClassStyle
==
ClassStyleEnum
.
Month
)
{
...
...
@@ -988,8 +964,6 @@ namespace Edu.Module.Course
return
list
;
}
/// <summary>
/// 获取班级计划列表
/// </summary>
...
...
@@ -1252,7 +1226,7 @@ namespace Edu.Module.Course
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
Mobile
,
item
.
OrderId
,
ClassHours
=
classModel
?.
ClassHours
??
0
,
ClassHours
=
item
.
CompleteHours
+
"-"
+
(
classModel
?.
ClassHours
??
0
)
,
IsRenew
=
courseModel
?.
IsRenew
??
0
,
CheckStatus
=
checkStatus
,
item
.
IsChaBan
,
...
...
@@ -1438,42 +1412,19 @@ namespace Edu.Module.Course
}
/// <summary>
/// 初始化
签到
/// 初始化
缺勤数据
/// </summary>
/// <param name="Ids"></param>
/// <param name="DropOutRemark"></param>
/// <returns></returns>
public
virtual
bool
InitClassCheck
Module
()
public
bool
InitData
Module
()
{
List
<
RB_Class_Check_ViewModel
>
list
=
new
List
<
RB_Class_Check_ViewModel
>();
bool
flag
=
true
;
var
checkList
=
classCheckRepository
.
GetClassCheckListRepository
(
new
RB_Class_Check_ViewModel
());
var
planList
=
class_PlanRepository
.
GetClassPlanListExtRepository
(
new
RB_Class_Plan_ViewModel
());
if
(
checkList
!=
null
&&
checkList
.
Count
>
0
)
var
list
=
GetClassCheckListRepository
(
new
RB_Class_Check_ViewModel
());
var
tempList
=
list
?.
Where
(
qitem
=>
qitem
.
CheckStatus
>
0
)?.
ToList
();
foreach
(
var
item
in
tempList
)
{
var
groupList
=
checkList
.
GroupBy
(
qitem
=>
new
{
qitem
.
ClassId
,
qitem
.
ClassDate
,
qitem
.
OrderGuestId
})
.
Select
(
qitem
=>
new
{
qitem
.
Key
.
ClassId
,
qitem
.
Key
.
ClassDate
,
qitem
.
Key
.
OrderGuestId
});
foreach
(
var
item
in
groupList
)
{
var
tempCheckList
=
checkList
.
Where
(
qitem
=>
qitem
.
ClassId
==
item
.
ClassId
&&
qitem
.
ClassDate
==
item
.
ClassDate
&&
qitem
.
OrderGuestId
==
item
.
OrderGuestId
).
OrderBy
(
qitem
=>
qitem
.
ClassTimeId
).
ToList
();
var
tempPlanList
=
planList
.
Where
(
qitem
=>
qitem
.
ClassId
==
item
.
ClassId
&&
qitem
.
ClassDate
==
item
.
ClassDate
).
OrderBy
(
qitem
=>
qitem
.
ClassTimeId
).
ToList
();
for
(
var
i
=
0
;
i
<
tempCheckList
.
Count
;
i
++)
{
if
(
tempPlanList
!=
null
&&
tempPlanList
.
Count
>
0
)
{
var
cItem
=
tempCheckList
[
i
];
cItem
.
ClassTimeId
=
tempPlanList
[
i
].
ClassTimeId
;
if
(
flag
)
{
flag
=
classCheckRepository
.
Update
(
cItem
);
}
else
{
return
false
;
}
}
}
}
var
guestModel
=
order_GuestRepository
.
GetEntity
(
item
.
OrderGuestId
);
flag
=
CalcGuestHoursModule
(
guestModel
,
item
);
}
return
flag
;
}
...
...
@@ -1807,7 +1758,6 @@ namespace Edu.Module.Course
[
TransactionCallHandler
]
public
bool
SetClassLessPlan
(
Class_LessonPlan_ViewModel
model
)
{
bool
flag
=
false
;
if
(
model
.
LessonPlanList
!=
null
&&
model
.
LessonPlanList
.
Any
())
{
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
9d2c0fee
...
...
@@ -350,63 +350,14 @@ namespace Edu.WebApi.Controllers.Course
}
/// <summary>
///
添加修改班级
///
初始化数据
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
Init
ClassTime
()
public
ApiResult
Init
Data
()
{
bool
flag
=
false
;
var
list
=
classModule
.
GetClassListModule
(
new
RB_Class_ViewModel
());
foreach
(
var
item
in
list
)
{
List
<
ClassTimeItem
>
dateList
=
new
List
<
ClassTimeItem
>();
if
(!
string
.
IsNullOrEmpty
(
item
.
DefaultTimeJson
))
{
dateList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
ClassTimeItem
>>(
item
.
DefaultTimeJson
);
}
foreach
(
var
jItem
in
dateList
)
{
if
(
jItem
.
TimeList
!=
null
&&
jItem
.
TimeList
.
Count
>
0
)
{
foreach
(
var
sItem
in
jItem
.
TimeList
)
{
var
startDate
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
sItem
.
StartTime
+
":00"
);
var
endDate
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
sItem
.
EndTime
+
":00"
);
TimeSpan
span
=
endDate
.
Subtract
(
startDate
);
if
(
sItem
.
TimeHour
<=
0
)
{
sItem
.
TimeHour
=
Convert
.
ToDecimal
(
span
.
TotalMinutes
/
classModule
.
GetBasicMinutesModule
(
item
.
Group_Id
));
}
}
}
}
//flag = classModule.UpdateClassTimeModule(item.ClassId, Common.Plugin.JsonHelper.Serialize(dateList));
}
var
classTimeList
=
classModule
.
GetClassTimeListModule
(
new
RB_Class_Time_ViewModel
());
int
basicMintues
=
classModule
.
GetBasicMinutesModule
(
classTimeList
[
0
].
Group_Id
);
Task
.
Run
(()
=>
{
foreach
(
var
item
in
classTimeList
)
{
var
startDate
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
item
.
StartTime
+
":00"
);
var
endDate
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
item
.
EndTime
+
":00"
);
TimeSpan
span
=
endDate
.
Subtract
(
startDate
);
if
(
item
.
TimeHour
<=
0
)
{
if
(
span
.
TotalMinutes
%
basicMintues
==
0
)
{
item
.
TimeHour
=
Convert
.
ToDecimal
(
span
.
TotalMinutes
/
basicMintues
);
}
if
(
item
.
TimeHour
>
0
)
{
flag
=
classModule
.
UpdateClassPlanTimeModule
(
item
.
ClassTimeId
,
item
.
TimeHour
);
}
}
}
});
return
ApiResult
.
Success
();
bool
flag
=
classModule
.
InitDataModule
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
...
...
@@ -993,17 +944,6 @@ namespace Edu.WebApi.Controllers.Course
return
result
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
"签到失败"
);
}
/// <summary>
/// 初始化签到数据
/// </summary>
/// <returns></returns>
public
ApiResult
InitClassCheck
()
{
bool
result
=
classModule
.
InitClassCheckModule
();
return
result
?
ApiResult
.
Success
(
"初始化成功!"
)
:
ApiResult
.
Failed
(
"初始化失败!"
);
//return ApiResult.Failed("初始化失败!");
}
/// <summary>
/// 签到
/// </summary>
...
...
Edu.WebApi/Controllers/User/UserInfoController.cs
View file @
9d2c0fee
...
...
@@ -24,16 +24,6 @@ namespace Edu.WebApi.Controllers.User
[
EnableCors
(
"AllowCors"
)]
public
class
UserInfoController
:
BaseController
{
/// <summary>
/// 集团处理类对象
/// </summary>
private
readonly
GroupModule
groupModule
=
AOPHelper
.
CreateAOPObject
<
GroupModule
>();
/// <summary>
/// 学校处理类对象
/// </summary>
private
readonly
SchoolModule
schoolModule
=
AOPHelper
.
CreateAOPObject
<
SchoolModule
>();
/// <summary>
/// 账户相关处理类对象
/// </summary>
...
...
@@ -48,14 +38,16 @@ namespace Edu.WebApi.Controllers.User
/// </summary>
private
readonly
SellCommissionModule
sellCommissionModule
=
new
SellCommissionModule
();
/// <summary>
/// 教师奖励明细
/// </summary>
private
readonly
TeachingRewardsModule
teachingRewardsModule
=
new
TeachingRewardsModule
();
/// <summary>
/// 订单处理类对象
/// </summary>
private
readonly
OrderModule
orderModule
=
new
OrderModule
();
#
region
个人资料
-
密码修改
/// <summary>
/// 重置用户密码信息
...
...
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