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
694e001b
Commit
694e001b
authored
Aug 29, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签到处理
parent
0d6652db
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
564 deletions
+144
-564
ScrollClassCommonModule.cs
Edu.Module.Course/ScrollClassCommonModule.cs
+1
-113
ScrollClassModule.cs
Edu.Module.Course/ScrollClassModule.cs
+5
-283
RB_Class_CheckRepository.cs
Edu.Repository/Grade/RB_Class_CheckRepository.cs
+138
-147
ScrollController.cs
Edu.WebApi/Controllers/Course/ScrollController.cs
+0
-21
No files found.
Edu.Module.Course/ScrollClassCommonModule.cs
View file @
694e001b
...
...
@@ -672,119 +672,7 @@ namespace Edu.Module.Course
var
list
=
scroll_AppointmentRepository
.
GetList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
groupId
,
CourseEndTimeStr
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
State
=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitCourse
});
if
(
list
.
Any
())
{
//查询所有的上课计划
string
planIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
ClassPlanId
).
Distinct
());
//再查询上课时间
var
timeList
=
class_TimeRepository
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
()
{
Group_Id
=
groupId
,
QClassPlanIds
=
planIds
});
string
Date
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
string
orderGuestIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
GuestId
).
Distinct
());
var
oldCheck
=
class_CheckRepository
.
GetClassCheckList
(
new
RB_Class_Check_ViewModel
()
{
Group_Id
=
groupId
,
StartDate
=
Date
,
EndDate
=
Date
,
QOrderGuestIds
=
orderGuestIds
});
foreach
(
var
item
in
list
)
{
//更新约课为已上课
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
State
),
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Coursed
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_Appointment_ViewModel
.
Id
),
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
scroll_AppointmentRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
var
clist
=
JsonHelper
.
DeserializeObject
<
List
<
CourseTimeModel
>>(
item
.
CourseTime
);
//更新 order_guest 表 上课章节 请假也暂时先算完成课时(请假应该是有补课的)
var
gmodel
=
order_GuestRepository
.
GetEntity
(
item
.
GuestId
);
if
(
gmodel
!=
null
)
{
//ld 2022-03-08 修改为学员上课最大课时
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>();
if
(
item
.
CreateTime
<=
new
DateTime
(
2022
,
7
,
8
))
{
if
(
gmodel
.
CourseChapterNo
<
item
.
ChapterNo
)
{
keyValues1
.
Add
(
nameof
(
Model
.
ViewModel
.
Sell
.
RB_Order_Guest_ViewModel
.
CourseChapterNo
),
item
.
ChapterNo
);
keyValues1
.
Add
(
nameof
(
Model
.
ViewModel
.
Sell
.
RB_Order_Guest_ViewModel
.
CompleteHours
),
item
.
ChapterNo
*
clist
.
Sum
(
x
=>
x
.
ClassHours
));
if
(
gmodel
.
TotalChapterNo
<=
item
.
ChapterNo
)
{
//章节已上完了 修改为 毕业
keyValues1
.
Add
(
nameof
(
Model
.
ViewModel
.
Sell
.
RB_Order_Guest_ViewModel
.
GuestState
),
Common
.
Enum
.
Course
.
GuestStateEnum
.
Graduate
);
}
}
}
//HK 2022-07-08修改
else
{
if
(
gmodel
.
CourseChapterNo
<
item
.
CourseGradeNo
)
{
keyValues1
.
Add
(
nameof
(
Model
.
ViewModel
.
Sell
.
RB_Order_Guest_ViewModel
.
CourseChapterNo
),
item
.
CourseGradeNo
);
keyValues1
.
Add
(
nameof
(
Model
.
ViewModel
.
Sell
.
RB_Order_Guest_ViewModel
.
CompleteHours
),
item
.
CourseGradeNo
*
clist
.
Sum
(
x
=>
x
.
ClassHours
));
if
(
gmodel
.
TotalChapterNo
<=
item
.
CourseGradeNo
)
{
//章节已上完了 修改为 毕业
keyValues1
.
Add
(
nameof
(
Model
.
ViewModel
.
Sell
.
RB_Order_Guest_ViewModel
.
GuestState
),
Common
.
Enum
.
Course
.
GuestStateEnum
.
Graduate
);
}
}
}
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
Model
.
ViewModel
.
Sell
.
RB_Order_Guest_ViewModel
.
Id
),
FiledValue
=
gmodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
if
(
keyValues1
!=
null
&&
keyValues1
.
Count
>
0
)
{
order_GuestRepository
.
Update
(
keyValues1
,
wheres1
);
}
}
if
(
item
.
AppointType
!=
3
)
{
//写入签到数据表 (非重复上课的 才写入签到数据)
var
tlist
=
timeList
.
Where
(
x
=>
x
.
ClassPlanId
==
item
.
ClassPlanId
).
ToList
();
foreach
(
var
qitem
in
tlist
)
{
var
ccModel
=
clist
.
Where
(
x
=>
x
.
StartTime
==
qitem
.
StartTime
).
FirstOrDefault
();
if
(
ccModel
!=
null
&&
!
oldCheck
.
Where
(
x
=>
x
.
OrderGuestId
==
item
.
GuestId
&&
x
.
ClassTimeId
==
qitem
.
ClassTimeId
).
Any
())
{
//没有数据的插入 (有数据情况 =》 请假数据)
class_CheckRepository
.
Insert
(
new
RB_Class_Check
()
{
ClassCheckId
=
0
,
ClassId
=
0
,
ClassDate
=
item
.
Date
,
Status
=
0
,
ClassRoomId
=
item
.
RoomId
,
Group_Id
=
item
.
Group_Id
,
School_Id
=
qitem
.
School_Id
,
TeacherId
=
item
.
TeacherId
,
OrderGuestId
=
item
.
GuestId
,
CheckStatus
=
0
,
CreateBy
=
0
,
CreateTime
=
DateTime
.
Now
,
StudyNum
=
ccModel
.
Minutes
,
MakeUpStatus
=
1
,
CurrentDeductionHours
=
ccModel
.
ClassHours
,
IsAbsentHours
=
0
,
ClassTimeId
=
qitem
.
ClassTimeId
});
}
}
}
}
}
class_CheckRepository
.
AppointStuCheckRepository
(
list
);
}
}
#
endregion
...
...
Edu.Module.Course/ScrollClassModule.cs
View file @
694e001b
This diff is collapsed.
Click to expand it.
Edu.Repository/Grade/RB_Class_CheckRepository.cs
View file @
694e001b
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Course/ScrollController.cs
View file @
694e001b
...
...
@@ -1131,27 +1131,6 @@ namespace Edu.WebApi.Controllers.Course
#
endregion
#
region
初始化约课数据
/// <summary>
/// 初始化约课数据
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
InitializeAppointmentData
()
{
var
userInfo
=
base
.
UserInfo
;
string
msg
=
scrollClassModule
.
InitializeAppointmentData
(
userInfo
.
Group_Id
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
#
endregion
#
region
学员管理
...
...
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