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
0d4ee57f
Commit
0d4ee57f
authored
Mar 25, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
cdda6138
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
167 additions
and
28 deletions
+167
-28
StudyAbroadModule.cs
Edu.Module.StudyAbroad/StudyAbroadModule.cs
+31
-0
RB_StudyAbroadRepository.cs
Edu.Repository/StudyAbroad/RB_StudyAbroadRepository.cs
+61
-27
StudyAbroadController.cs
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
+75
-1
No files found.
Edu.Module.StudyAbroad/StudyAbroadModule.cs
View file @
0d4ee57f
...
...
@@ -56,6 +56,37 @@ namespace Edu.Module.StudyAbroad
return
list
;
}
/// <summary>
/// 获取留学就业审核分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_StudyAbroad_ViewModel
>
GetStudyAbroadAuditPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_StudyAbroad_ViewModel
query
)
{
var
list
=
studyAbroadRepository
.
GetStudyAbroadAuditPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
Id
));
List
<
RB_StudyaBroad_Preferential_ViewModel
>
preferentialList
=
new
List
<
RB_StudyaBroad_Preferential_ViewModel
>();
if
(
query
.
IsQPrice
==
1
)
{
preferentialList
=
GetStudyaBroadPreferentialListModule
(
new
RB_StudyaBroad_Preferential_ViewModel
()
{
QStudyabroadIds
=
ids
});
}
foreach
(
var
item
in
list
)
{
item
.
PreferentialList
=
preferentialList
?.
Where
(
qitem
=>
qitem
.
StudyabroadId
==
item
.
Id
)?.
ToList
()
??
new
List
<
RB_StudyaBroad_Preferential_ViewModel
>();
}
}
return
list
;
}
/// <summary>
/// 获取留学就业列表
/// </summary>
...
...
Edu.Repository/StudyAbroad/RB_StudyAbroadRepository.cs
View file @
0d4ee57f
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Sale
;
using
Edu.Model.Entity.StudyAbroad
;
using
Edu.Model.ViewModel.StudyAbroad
;
using
System
;
...
...
@@ -52,37 +53,70 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
Type
),
query
.
Type
);
}
//部门主管审核
if
(
query
.
AuditType
==
1
)
if
(
query
.
SaleState
>
0
)
{
//待审核
if
(
query
.
AuditState
==
1
)
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
SaleState
),(
int
)
query
.
SaleState
);
}
return
GetPage
<
RB_StudyAbroad_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
/// <summary>
/// 获取留学就业审核分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_StudyAbroad_ViewModel
>
GetStudyAbroadAuditPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_StudyAbroad_ViewModel
query
)
{
builder
.
AppendFormat
(
" AND A.SaleState=2 AND A.DirectorStatus=0 AND A.DirectorId={0} "
,
query
.
AuditManId
);
rowsCount
=
0
;
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.`Name`,'') AS SupplierName,IFNULL(B.ContractUrl,'') AS ContractUrl
FROM RB_StudyAbroad AS A LEFT JOIN rb_supplier AS B ON A.SupplierId=B.Id
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
builder
.
AppendFormat
(
" AND A.{0}>{1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
SaleState
),
(
int
)
SaleStateEnum
.
NoPerfect
);
if
(
query
==
null
)
{
return
new
List
<
RB_StudyAbroad_ViewModel
>();
}
//已审核
else
{
builder
.
AppendFormat
(
" AND A.DirectorStatus>0 AND A.DirectorId={0} "
,
query
.
AuditManId
);
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_StudyAbroad_ViewModel
.
Name
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
//部门负责人审核
else
if
(
query
.
AuditType
==
2
)
if
(
query
.
Type
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
Type
),
query
.
Type
);
}
//待审核
if
(
query
.
AuditState
==
1
)
{
builder
.
AppendFormat
(
" AND A.SaleState=2 AND A.DirectorId>0 AND A.DirectorStatus=1 AND A.ManagerStatus=0 AND A.ManagerId={0} "
,
query
.
AuditManId
);
builder
.
AppendFormat
(
@" AND (
(A.SaleState=2 AND A.DirectorId>0 AND A.DirectorStatus=1 AND A.ManagerStatus=0 AND A.ManagerId={0})
OR (A.SaleState=2 AND A.DirectorStatus=0 AND A.DirectorId={0})
) "
,
query
.
AuditManId
);
}
//已审核
else
{
builder
.
AppendFormat
(
" AND A.ManagerStatus>0 AND A.ManagerId={0} "
,
query
.
AuditManId
);
}
}
if
(
query
.
SaleState
>
0
)
else
if
(
query
.
AuditState
==
2
)
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
SaleState
),(
int
)
query
.
SaleState
);
builder
.
AppendFormat
(
@" AND (
(A.ManagerStatus>0 AND A.ManagerId={0})
OR (A.DirectorStatus>0 AND A.DirectorId={0})
)"
,
query
.
AuditManId
);
}
return
GetPage
<
RB_StudyAbroad_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
View file @
0d4ee57f
...
...
@@ -217,7 +217,6 @@ namespace Edu.WebApi.Controllers.StudyAbroad
SaleState
=(
SaleStateEnum
)
base
.
ParmJObj
.
GetInt
(
"SaleState"
),
AuditState
=
base
.
ParmJObj
.
GetInt
(
"AuditState"
),
};
query
.
AuditManId
=
base
.
UserInfo
.
Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
studyAbroadModule
.
GetStudyAbroadPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
...
...
@@ -274,6 +273,81 @@ namespace Edu.WebApi.Controllers.StudyAbroad
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取留学就业审核分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudyAbroadAuditPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_StudyAbroad_ViewModel
()
{
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
SupplierId
=
base
.
ParmJObj
.
GetInt
(
"SupplierId"
),
IsQPrice
=
base
.
ParmJObj
.
GetInt
(
"IsQPrice"
),
AuditType
=
base
.
ParmJObj
.
GetInt
(
"AuditType"
),
AuditState
=
base
.
ParmJObj
.
GetInt
(
"AuditState"
),
};
query
.
AuditManId
=
base
.
UserInfo
.
Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
studyAbroadModule
.
GetStudyAbroadAuditPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
if
(
item
.
CreateBy
>
0
)
{
item
.
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
;
}
if
(
item
.
UpdateBy
>
0
)
{
item
.
UpdateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
UpdateBy
)?.
AccountName
??
""
;
}
if
(
item
.
DirectorId
>
0
)
{
item
.
DirectorName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
DirectorId
)?.
AccountName
??
""
;
}
if
(
item
.
ManagerId
>
0
)
{
item
.
ManagerName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
ManagerId
)?.
AccountName
??
""
;
}
result
.
Add
(
new
{
item
.
Id
,
item
.
Type
,
item
.
Name
,
item
.
SupplierId
,
item
.
SupplierName
,
SupplierContract
=
item
.
ContractUrl
,
item
.
SuggestPrice
,
item
.
SellPrice
,
item
.
Remark
,
item
.
SaleState
,
SaleStateName
=
Common
.
Plugin
.
EnumHelper
.
ToName
(
item
.
SaleState
),
item
.
CreateByName
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
UpdateByName
,
UpdateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
UpdateTime
),
item
.
PreferentialList
,
item
.
DirectorName
,
item
.
DirectorId
,
item
.
DirectorStatus
,
item
.
DirectorOpinion
,
DirectorAuditTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
DirectorAuditTime
),
item
.
ManagerName
,
item
.
ManagerId
,
item
.
ManagerStatus
,
item
.
ManagerOpinion
,
ManagerAuditTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ManagerAuditTime
),
});
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
result
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取留学就业列表
/// </summary>
...
...
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