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
8a64722a
Commit
8a64722a
authored
Aug 04, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
654fd0b0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
33 deletions
+101
-33
RB_BackClass_Protocol.cs
Edu.Model/Entity/Contract/RB_BackClass_Protocol.cs
+10
-0
RB_BackClass_Protocol_ViewModel.cs
...del/ViewModel/Contract/RB_BackClass_Protocol_ViewModel.cs
+42
-0
RB_BackClass_ProtocolRepository.cs
Edu.Repository/Contract/RB_BackClass_ProtocolRepository.cs
+26
-6
EducationContractController.cs
Edu.WebApi/Controllers/Course/EducationContractController.cs
+23
-27
No files found.
Edu.Model/Entity/Contract/RB_BackClass_Protocol.cs
View file @
8a64722a
...
...
@@ -154,5 +154,15 @@ namespace Edu.Model.Entity.Contract
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 是否盖章(1-是)
/// </summary>
public
int
IsCompanySeal
{
get
;
set
;
}
/// <summary>
/// 是否销售确认(1-是)
/// </summary>
public
int
IsSure
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Contract/RB_BackClass_Protocol_ViewModel.cs
View file @
8a64722a
...
...
@@ -10,5 +10,47 @@ namespace Edu.Model.ViewModel.Contract
/// </summary>
public
class
RB_BackClass_Protocol_ViewModel
:
RB_BackClass_Protocol
{
/// <summary>
/// 是否查询所有(1-是)
/// </summary>
public
int
IsQueryAll
{
get
;
set
;
}
/// <summary>
/// 订单编号
/// </summary>
public
int
QOrderId
{
get
;
set
;
}
/// <summary>
/// 退课申请单号
/// </summary>
public
int
ReceiptId
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
string
CreateByName
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
string
CreateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
CreateTime
);
}
}
/// <summary>
/// 审核状态字符串
/// </summary>
public
string
AuditStatusStr
{
get
{
string
str
=
"审核中"
;
switch
(
this
.
AuditStatus
)
{
case
1
:
str
=
"审核中"
;
break
;
case
2
:
str
=
"审核通过"
;
break
;
case
3
:
str
=
"驳回"
;
break
;
}
return
str
;
}
}
}
}
Edu.Repository/Contract/RB_BackClass_ProtocolRepository.cs
View file @
8a64722a
using
Edu.Model.Entity.Contract
;
using
Edu.Model.ViewModel.BackClass
;
using
Edu.Model.ViewModel.Contract
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Contract
{
...
...
@@ -41,10 +43,12 @@ WHERE 1=1
/// <returns></returns>
public
List
<
RB_BackClass_Protocol_ViewModel
>
GetBackClassProtocolPageRepository
(
int
pageIndex
,
int
pageSize
,
RB_BackClass_Protocol_ViewModel
query
,
out
long
rowsCount
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_BackClass_Protocol AS A
SELECT A.*,IFNULL(C.Id,0) AS ReceiptId
FROM RB_BackClass_Protocol AS A LEFT JOIN rb_student_backclass AS B ON A.BackId=B.BackId
LEFT JOIN rb_education_receipt AS C ON B.BackId=C.RelationId AND C.ReceiptType=2
WHERE 1=1
"
);
if
(
query
!=
null
)
...
...
@@ -57,10 +61,26 @@ WHERE 1=1
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_BackClass_Protocol_ViewModel
.
CreateBy
),
query
.
CreateBy
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
PartyAName
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @PartyAName "
,
nameof
(
RB_BackClass_Protocol_ViewModel
.
PartyAName
));
parameters
.
Add
(
"PartyAName"
,
"%"
+
query
.
PartyAName
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
ProtocolNum
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @ProtocolNum "
,
nameof
(
RB_BackClass_Protocol_ViewModel
.
ProtocolNum
));
parameters
.
Add
(
"ProtocolNum"
,
"%"
+
query
.
ProtocolNum
.
Trim
()
+
"%"
);
}
if
(
query
.
QOrderId
>
0
)
{
builder
.
AppendFormat
(
@" AND B.{0} IN({1}) "
,
nameof
(
RB_Student_BackClass_ViewModel
.
OrderId
),
query
.
QOrderId
);
}
if
(
query
.
AuditStatus
>
-
1
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_BackClass_Protocol_ViewModel
.
AuditStatus
),
query
.
AuditStatus
);
}
}
return
GetPage
<
RB_BackClass_Protocol_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
return
GetPage
<
RB_BackClass_Protocol_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()
,
parameters
).
ToList
();
}
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/Course/EducationContractController.cs
View file @
8a64722a
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Edu.Cache.User
;
using
Edu.Common
;
using
Edu.Common.API
;
using
Edu.Common.Enum.Course
;
...
...
@@ -443,39 +444,34 @@ namespace Edu.WebApi.Controllers.Course
{
var
userInfo
=
base
.
UserInfo
;
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
new
RB_BackClass_Protocol_ViewModel
()
var
query
=
new
RB_BackClass_Protocol_ViewModel
()
{
PartyAName
=
base
.
ParmJObj
.
GetStringValue
(
"PartyAName"
),
AuditStatus
=
base
.
ParmJObj
.
GetInt
(
"AuditStatus"
),
QOrderId
=
base
.
ParmJObj
.
GetInt
(
"QOrderId"
),
ProtocolNum
=
base
.
ParmJObj
.
GetStringValue
(
"ProtocolNum"
),
IsQueryAll
=
base
.
ParmJObj
.
GetInt
(
"IsQueryAll"
),
};
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
dmodel
.
CreateBy
=
userInfo
.
Id
;
var
list
=
educationContractModule
.
GetBackClassProtocolPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
dmodel
,
out
long
count
);
query
.
Group_Id
=
userInfo
.
Group_Id
;
if
(
query
.
IsQueryAll
==
0
)
{
query
.
CreateBy
=
userInfo
.
Id
;
}
var
list
=
educationContractModule
.
GetBackClassProtocolPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
query
,
out
long
count
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
//x.CType,
//CTypeName = x.CType.ToName(),
//IsStuSign = !string.IsNullOrEmpty(x.Sign) ? 1 : 0,
//x.OrderId,
//x.GuestId,
//x.ContractNo,
//x.StudentName,
//x.SchoolName,
//x.CourseName,
//x.CNYCaps,
//x.Money,
//x.Exam,
//x.Sign,
//x.Status,
//x.StatusStr,
//x.IsCompanySeal,
//x.CreateBy,
//x.CreateByName,
//x.CreateByPhoto,
//CreateTime = x.CreateTime.ToString("yyyy-MM-dd HH:mm"),
//x.SchoolStatusStr,
//x.AdminStatusStr
x
.
ProtocolNum
,
x
.
PartyAName
,
x
.
OldCourseName
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CreateBy
),
x
.
CreateTimeStr
,
x
.
AuditStatusStr
,
x
.
AuditStatus
,
IsStuSign
=
!
string
.
IsNullOrEmpty
(
x
.
PartyASign
)
?
1
:
0
,
x
.
IsCompanySeal
,
x
.
IsSure
,
});
return
ApiResult
.
Success
(
""
,
pageModel
);
}
...
...
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