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
92d2c687
Commit
92d2c687
authored
Mar 19, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口修改
parent
103fb329
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
2 deletions
+87
-2
StudyAbroadModule.cs
Edu.Module.StudyAbroad/StudyAbroadModule.cs
+5
-2
RB_StudyAbroadRepository.cs
Edu.Repository/StudyAbroad/RB_StudyAbroadRepository.cs
+54
-0
StudyAbroadController.cs
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
+28
-0
No files found.
Edu.Module.StudyAbroad/StudyAbroadModule.cs
View file @
92d2c687
...
...
@@ -190,9 +190,12 @@ namespace Edu.Module.StudyAbroad
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_StudyAbroad_ViewModel
GetStudyAbroadModule
(
objec
t
Id
,
int
IsGetPrice
=
0
)
public
RB_StudyAbroad_ViewModel
GetStudyAbroadModule
(
in
t
Id
,
int
IsGetPrice
=
0
)
{
var
model
=
studyAbroadRepository
.
GetEntity
<
RB_StudyAbroad_ViewModel
>(
Id
);
var
model
=
studyAbroadRepository
.
GetStudyAbroadListExtRepository
(
new
RB_StudyAbroad_ViewModel
()
{
Id
=
Id
})?.
FirstOrDefault
();
if
(
model
!=
null
&&
IsGetPrice
==
1
)
{
model
.
PreferentialList
=
GetStudyaBroadPreferentialListModule
(
new
RB_StudyaBroad_Preferential_ViewModel
()
...
...
Edu.Repository/StudyAbroad/RB_StudyAbroadRepository.cs
View file @
92d2c687
...
...
@@ -101,5 +101,59 @@ WHERE 1=1
return
Get
<
RB_StudyAbroad_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
/// <summary>
/// 获取留学就业列表扩展
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_StudyAbroad_ViewModel
>
GetStudyAbroadListExtRepository
(
RB_StudyAbroad_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.`Name`,'') AS SupplierName
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
);
if
(
query
==
null
)
{
return
new
List
<
RB_StudyAbroad_ViewModel
>();
}
else
{
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
()
+
"%"
);
}
if
(
query
.
Type
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
Type
),
query
.
Type
);
}
if
(
query
.
AuditType
==
1
)
{
builder
.
AppendFormat
(
" AND A.SaleState=2 AND A.DirectorStatus=0 "
);
}
else
if
(
query
.
AuditType
==
2
)
{
builder
.
AppendFormat
(
" AND A.SaleState=2 AND A.DirectorId>0 AND A.DirectorStatus=1 AND A.ManagerStatus=0 "
);
}
if
(
query
.
SaleState
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
SaleState
),
(
int
)
query
.
SaleState
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
Id
),
query
.
Id
);
}
return
Get
<
RB_StudyAbroad_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
}
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
View file @
92d2c687
...
...
@@ -364,6 +364,34 @@ namespace Edu.WebApi.Controllers.StudyAbroad
{
extModel
=
new
RB_StudyAbroad_ViewModel
();
}
var
obj
=
new
{
extModel
.
Id
,
extModel
.
Type
,
extModel
.
Name
,
extModel
.
SupplierId
,
extModel
.
SupplierName
,
extModel
.
SupplierContract
,
extModel
.
SuggestPrice
,
extModel
.
SellPrice
,
extModel
.
Remark
,
extModel
.
SaleState
,
SaleStateName
=
Common
.
Plugin
.
EnumHelper
.
ToName
(
extModel
.
SaleState
),
extModel
.
CreateBy
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
extModel
.
CreateBy
)?.
AccountName
??
""
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
extModel
.
CreateTime
),
extModel
.
DirectorId
,
extModel
.
DirectorStatus
,
extModel
.
DirectorOpinion
,
DirectorAuditTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
extModel
.
DirectorAuditTime
),
DirectorName
=
UserReidsCache
.
GetUserLoginInfo
(
extModel
.
DirectorId
)?.
AccountName
??
""
,
extModel
.
ManagerId
,
extModel
.
ManagerStatus
,
extModel
.
ManagerOpinion
,
ManagerAuditTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
extModel
.
ManagerAuditTime
),
ManagerName
=
UserReidsCache
.
GetUserLoginInfo
(
extModel
.
ManagerId
)?.
AccountName
??
""
,
extModel
.
PreferentialList
,
};
return
ApiResult
.
Success
(
data
:
extModel
);
}
...
...
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