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
c543a200
Commit
c543a200
authored
Jul 06, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
7262b9b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+1
-1
RB_Student_MakeupRepository.cs
Edu.Repository/Course/RB_Student_MakeupRepository.cs
+46
-0
No files found.
Edu.Module.Course/ClassModule.cs
View file @
c543a200
...
...
@@ -1526,7 +1526,7 @@ namespace Edu.Module.Course
if
(
flag
)
{
flag
=
student_MakeupRepository
.
Insert
(
new
RB_Student_Makeup
()
flag
=
student_MakeupRepository
.
SetStudentMakeUpRepository
(
new
RB_Student_Makeup
()
{
Id
=
0
,
ClassCheckId
=
checkModel
.
ClassCheckId
,
...
...
Edu.Repository/Course/RB_Student_MakeupRepository.cs
View file @
c543a200
...
...
@@ -4,6 +4,7 @@ using System;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
...
...
@@ -73,5 +74,50 @@ WHERE 1=1
builder
.
Append
(
" ORDER BY A.ClassId,A.ClassDate,A.OrderGuestId "
);
return
GetPage
<
RB_Student_Makeup_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 新增修改学员补课信息
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetStudentMakeUpRepository
(
RB_Student_Makeup
model
)
{
bool
flag
=
false
;
var
newModel
=
new
RB_Student_Makeup
()
{
Id
=
0
,
ClassCheckId
=
model
.
ClassCheckId
,
ClassDate
=
model
.
ClassDate
,
ClassId
=
model
.
ClassId
,
CreateBy
=
model
.
CreateBy
,
CreateTime
=
model
.
CreateTime
,
Group_Id
=
model
.
Group_Id
,
MakeUpStatus
=
3
,
OrderGuestId
=
model
.
OrderGuestId
};
newModel
.
Id
=
CheckStudentMakeUpExistsRepository
(
model
);
if
(
newModel
.
Id
>
0
)
{
flag
=
base
.
Insert
(
newModel
)
>
0
;
}
else
{
flag
=
base
.
Update
(
newModel
);
}
return
flag
;
}
/// <summary>
/// 检查数据是否存在
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
int
CheckStudentMakeUpExistsRepository
(
RB_Student_Makeup
model
)
{
List
<
WhereHelper
>
whereHelpers
=
new
List
<
WhereHelper
>();
whereHelpers
.
Add
(
new
WhereHelper
(
nameof
(
RB_Student_Makeup
.
ClassCheckId
),
model
.
ClassCheckId
));
whereHelpers
.
Add
(
new
WhereHelper
(
nameof
(
RB_Student_Makeup
.
OrderGuestId
),
model
.
OrderGuestId
));
return
base
.
Exists
(
"Id"
,
whereHelpers
);
}
}
}
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