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
7b4116b9
Commit
7b4116b9
authored
Dec 16, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
4251e0aa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
6 deletions
+82
-6
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+65
-5
RB_Class_CheckRepository.cs
Edu.Repository/Course/RB_Class_CheckRepository.cs
+1
-1
RB_Student_BackClassRepository.cs
Edu.Repository/Course/RB_Student_BackClassRepository.cs
+16
-0
No files found.
Edu.Module.Course/OrderModule2.cs
View file @
7b4116b9
...
@@ -2,9 +2,11 @@
...
@@ -2,9 +2,11 @@
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Repository.Course
;
using
Edu.Repository.Course
;
using
Edu.Repository.Flow
;
using
Edu.Repository.Flow
;
using
Edu.Repository.User
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Text
;
using
System.Linq
;
namespace
Edu.Module.Course
namespace
Edu.Module.Course
{
{
...
@@ -33,6 +35,8 @@ namespace Edu.Module.Course
...
@@ -33,6 +35,8 @@ namespace Edu.Module.Course
/// </summary>
/// </summary>
private
readonly
RB_FlowRepository
flowRepository
=
new
RB_FlowRepository
();
private
readonly
RB_FlowRepository
flowRepository
=
new
RB_FlowRepository
();
/// <summary>
/// <summary>
/// 创建退课流程
/// 创建退课流程
/// </summary>
/// </summary>
...
@@ -58,20 +62,76 @@ namespace Edu.Module.Course
...
@@ -58,20 +62,76 @@ namespace Edu.Module.Course
message
=
"订单信息不正确!"
;
message
=
"订单信息不正确!"
;
return
false
;
return
false
;
}
}
//班级实体类
var
classModel
=
classRepository
.
GetEntity
(
orderModel
.
ClassId
);
if
(
classModel
==
null
)
{
message
=
"未找到对应的班级信息!"
;
return
false
;
}
//获取退课流程
//获取退课流程
var
backClassFlow
=
flowRepository
.
GetFlowRepository
(
Common
.
Config
.
BackClassFlowId
);
var
flowModel
=
flowRepository
.
GetFlowRepository
(
Common
.
Config
.
BackClassFlowId
);
if
(
backClassFlow
==
null
)
if
(
flowModel
==
null
)
{
{
message
=
"未配置退课流程!"
;
message
=
"未配置退课流程!"
;
return
false
;
return
false
;
}
}
//获取教师实体信息
var
teacherModel
=
accountRepository
.
GetAccountListExtRepository
(
new
Model
.
ViewModel
.
User
.
RB_Account_ViewModel
()
{
AccountId
=
classModel
.
Teacher_Id
,
AccountType
=
Common
.
Enum
.
User
.
AccountTypeEnum
.
Teacher
})?.
FirstOrDefault
();
var
totalBackCount
=
student_BackClassRepository
.
GetStudentBackClassNumRepository
();
string
backNum
=
""
;
if
(
totalBackCount
<
10000
)
{
backNum
=
String
.
Format
(
"{0:00000}"
,
totalBackCount
);
}
else
{
backNum
=
totalBackCount
.
ToString
();
}
var
teacherId
=
teacherModel
?.
Id
??
0
;
var
backClassModel
=
new
RB_Student_BackClass_ViewModel
()
var
backClassModel
=
new
RB_Student_BackClass_ViewModel
()
{
{
BackId
=
0
,
BackId
=
0
,
//AuditStatus=
AuditStatus
=
Common
.
Enum
.
Course
.
BackClassAuditStatusEnum
.
InReview
,
BackMoney
=
0
,
BackNum
=
"T"
+
backNum
,
ClassId
=
orderModel
.
ClassId
,
CreateBy
=
userinfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
FinishHours
=
0
,
Group_Id
=
userinfo
.
Group_Id
,
GuestId
=
GuestId
,
SchoolId
=
guestModel
.
School_Id
,
StudentId
=
0
,
TeacherId
=
teacherId
};
};
var
newBackId
=
student_BackClassRepository
.
Insert
(
backClassModel
);
backClassModel
.
BackId
=
newBackId
;
flag
=
newBackId
>
0
;
foreach
(
var
item
in
flowModel
.
FlowNodeList
)
{
if
(
item
.
FlowAduitList
!=
null
&&
item
.
FlowAduitList
.
Count
>
0
)
{
foreach
(
var
subItem
in
item
.
FlowAduitList
)
{
//指定人员
if
(
subItem
.
AuditType
==
1
)
{
}
//指定角色
else
if
(
subItem
.
AuditType
==
2
)
{
}
}
}
}
return
flag
;
return
flag
;
...
...
Edu.Repository/Course/RB_Class_CheckRepository.cs
View file @
7b4116b9
...
@@ -43,7 +43,7 @@ namespace Edu.Repository.Course
...
@@ -43,7 +43,7 @@ namespace Edu.Repository.Course
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
EndDate
))
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
.
CreateTime
),
query
.
EndDate
);
builder
.
AppendFormat
(
" AND DATE_FORMAT(A.{0},'%Y-%m-%d')
<
=DATE_FORMAT('{1}','%Y-%m-%d') "
,
nameof
(
RB_Class_Check_ViewModel
.
CreateTime
),
query
.
EndDate
);
}
}
}
}
...
...
Edu.Repository/Course/RB_Student_BackClassRepository.cs
View file @
7b4116b9
...
@@ -34,5 +34,21 @@ WHERE 1=1
...
@@ -34,5 +34,21 @@ WHERE 1=1
}
}
return
GetPage
<
RB_Student_BackClass_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
return
GetPage
<
RB_Student_BackClass_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
/// <summary>
/// 获取总退课条数
/// </summary>
/// <returns></returns>
public
int
GetStudentBackClassNumRepository
()
{
int
result
=
0
;
string
sql
=
"SELECT COUNT(1) FROM RB_Student_BackClass "
;
var
obj
=
base
.
ExecuteScalar
(
sql
);
if
(
obj
!=
null
)
{
Int32
.
TryParse
(
obj
.
ToString
(),
out
result
);
}
return
result
+
1
;
}
}
}
}
}
\ No newline at end of file
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