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
9d4b991f
Commit
9d4b991f
authored
Jul 27, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
b6b01656
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
183 additions
and
6 deletions
+183
-6
RB_Course.cs
Edu.Model/Entity/Course/RB_Course.cs
+1
-1
EducationContractModule.cs
Edu.Module.Course/EducationContractModule.cs
+98
-2
RB_Education_ContractRepository.cs
Edu.Repository/Course/RB_Education_ContractRepository.cs
+83
-2
EducationContractController.cs
Edu.WebApi/Controllers/Course/EducationContractController.cs
+1
-1
No files found.
Edu.Model/Entity/Course/RB_Course.cs
View file @
9d4b991f
...
...
@@ -117,7 +117,7 @@ namespace Edu.Model.Entity.Course
public
decimal
RenewSlPrice
{
get
;
set
;
}
/// <summary>
/// 上架端口(1-内部销售,2-学员App,3-网课端)
/// 上架端口(1-内部销售,2-学员App,3-网课端
,4-小程序
)
/// </summary>
public
string
Saleplat
{
get
;
set
;
}
...
...
Edu.Module.Course/EducationContractModule.cs
View file @
9d4b991f
...
...
@@ -157,7 +157,13 @@ namespace Edu.Module.Course
var
amodel
=
alist
.
Where
(
x
=>
x
.
Id
==
item
.
CreateBy
).
FirstOrDefault
();
item
.
CreateByName
=
amodel
?.
AccountName
??
""
;
item
.
CreateByPhoto
=
amodel
?.
UserIcon
??
""
;
if
(
item
.
Status
==
1
)
if
(
item
.
Status
==
0
)
{
item
.
SchoolStatusStr
=
"草稿"
;
item
.
AdminStatusStr
=
"草稿"
;
}
else
if
(
item
.
Status
==
1
)
{
item
.
SchoolStatusStr
=
"待审核"
;
item
.
AdminStatusStr
=
"待审核"
;
...
...
@@ -218,6 +224,91 @@ namespace Edu.Module.Course
}
/// <summary>
/// 获取合同分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Education_Contract_ViewModel
>
GetEducationContractPageListModule_V3
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Education_Contract_ViewModel
dmodel
)
{
var
list
=
education_ContractRepository
.
GetEducationContractPageListRepository
(
pageIndex
,
pageSize
,
out
count
,
dmodel
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
var
userIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
CreateBy
).
Distinct
());
var
alist
=
accountRepository
.
GetAccountListExtRepository
(
new
Model
.
ViewModel
.
User
.
RB_Account_ViewModel
()
{
QIds
=
userIds
});
foreach
(
var
item
in
list
)
{
var
amodel
=
alist
.
Where
(
x
=>
x
.
Id
==
item
.
CreateBy
).
FirstOrDefault
();
item
.
CreateByName
=
amodel
?.
AccountName
??
""
;
item
.
CreateByPhoto
=
amodel
?.
UserIcon
??
""
;
if
(
item
.
Status
==
0
)
{
item
.
SchoolStatusStr
=
"草稿"
;
item
.
AdminStatusStr
=
"草稿"
;
}
else
if
(
item
.
Status
==
1
)
{
item
.
SchoolStatusStr
=
"待审核"
;
item
.
AdminStatusStr
=
"待审核"
;
}
else
if
(
item
.
Status
==
2
)
{
item
.
SchoolStatusStr
=
"审核通过"
;
item
.
AdminStatusStr
=
"审核通过"
;
}
else
if
(
item
.
Status
==
3
)
{
if
(
item
.
AuditEmpId
>
0
&&
item
.
SchoolManageEmpId
>
0
)
{
if
(
item
.
SchoolManageAuditDate
.
HasValue
)
{
item
.
SchoolStatusStr
=
"审核通过"
;
item
.
AdminStatusStr
=
"驳回"
;
}
else
{
if
(
item
.
AuditDate
>
item
.
SchoolManageAuditDate
)
{
item
.
SchoolStatusStr
=
"审核通过"
;
item
.
AdminStatusStr
=
"驳回"
;
}
else
{
item
.
SchoolStatusStr
=
"驳回"
;
item
.
AdminStatusStr
=
""
;
}
}
}
else
if
(
item
.
SchoolManageEmpId
>
0
)
{
item
.
SchoolStatusStr
=
"驳回"
;
item
.
AdminStatusStr
=
""
;
}
else
{
item
.
SchoolStatusStr
=
""
;
item
.
AdminStatusStr
=
"驳回"
;
}
}
else
if
(
item
.
Status
==
4
)
{
item
.
SchoolStatusStr
=
"合同已取消"
;
item
.
AdminStatusStr
=
"合同已取消"
;
}
else
if
(
item
.
Status
==
5
)
{
item
.
SchoolStatusStr
=
"审核通过"
;
item
.
AdminStatusStr
=
"待审核"
;
}
}
}
return
list
;
}
/// <summary>
/// 获取分页列表
...
...
@@ -240,7 +331,12 @@ namespace Edu.Module.Course
var
amodel
=
alist
.
Where
(
x
=>
x
.
Id
==
item
.
CreateBy
).
FirstOrDefault
();
item
.
CreateByName
=
amodel
?.
AccountName
??
""
;
item
.
CreateByPhoto
=
amodel
?.
UserIcon
??
""
;
if
(
item
.
Status
==
1
)
if
(
item
.
Status
==
0
)
{
item
.
SchoolStatusStr
=
"草稿"
;
item
.
AdminStatusStr
=
"草稿"
;
}
else
if
(
item
.
Status
==
1
)
{
item
.
SchoolStatusStr
=
"待审核"
;
item
.
AdminStatusStr
=
"待审核"
;
...
...
Edu.Repository/Course/RB_Education_ContractRepository.cs
View file @
9d4b991f
...
...
@@ -97,7 +97,14 @@ namespace Edu.Repository.Course
}
if
(
demodel
.
Status
>=
0
)
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
if
(
demodel
.
Status
==
5
)
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
in(2,5)"
;
}
else
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
}
}
}
string
sql
=
$@" SELECT * FROM RB_Education_Contract WHERE
{
where
}
ORDER BY Id DESC "
;
...
...
@@ -322,7 +329,8 @@ left join {datebaseStr}.rb_tradeway t on f.FrID = t.FinanceId
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
in(
{
demodel
.
SelectEexamineStatus
}
)"
;
}
else
{
else
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
NOT IN(0,4) "
;
}
//if (demodel.IsAduit == 0)
...
...
@@ -351,6 +359,79 @@ left join {datebaseStr}.rb_tradeway t on f.FrID = t.FinanceId
return
GetPage
<
RB_Education_Contract_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
sql
,
parameters
).
ToList
();
}
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <param name="orderIds"></param>
/// <returns></returns>
public
List
<
RB_Education_Contract_ViewModel
>
GetEducationContractPageListRepository_V3
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Education_Contract_ViewModel
demodel
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
string
where
=
$@" 1=1"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
School_Id
>
0
)
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
if
(
demodel
.
OrderId
>
0
)
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
}
if
(
demodel
.
CType
>
0
)
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
CType
)}
=
{(
int
)
demodel
.
CType
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ContractNo
))
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
ContractNo
)}
LIKE @ContractNo "
;
parameters
.
Add
(
"ContractNo"
,
"%"
+
demodel
.
ContractNo
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
StudentName
))
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
StudentName
)}
LIKE @StudentName "
;
parameters
.
Add
(
"StudentName"
,
"%"
+
demodel
.
StudentName
.
Trim
()
+
"%"
);
}
if
(
demodel
.
IsAduit
==
1
)
{
if
(
demodel
.
Status
>=
0
)
{
if
(
demodel
.
Status
==
5
)
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
in( 5,2)"
;
}
else
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
}
}
else
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
NOT IN(0,4) "
;
}
}
else
{
if
(
demodel
.
CreateBy
>
0
)
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
CreateBy
)}
=
{
demodel
.
CreateBy
}
"
;
}
if
(
demodel
.
Status
>=
0
)
{
where
+=
$@" AND
{
nameof
(
RB_Education_Contract_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
}
}
string
sql
=
$@" SELECT * FROM RB_Education_Contract WHERE
{
where
}
ORDER BY Id DESC "
;
return
GetPage
<
RB_Education_Contract_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
sql
,
parameters
).
ToList
();
}
}
}
Edu.WebApi/Controllers/Course/EducationContractController.cs
View file @
9d4b991f
...
...
@@ -110,7 +110,7 @@ namespace Edu.WebApi.Controllers.Course
};
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
dmodel
.
CreateBy
=
userInfo
.
Id
;
var
list
=
educationContractModule
.
GetEducationContractPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
dmodel
);
var
list
=
educationContractModule
.
GetEducationContractPageListModule
_V3
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
dmodel
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
...
...
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