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
ef2cc1d2
Commit
ef2cc1d2
authored
Oct 21, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d5381513
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
5 deletions
+87
-5
ConvertHelper.cs
Edu.Common/Plugin/ConvertHelper.cs
+1
-1
RB_Student_ViewModel.cs
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
+16
-0
DestinationModule.cs
Edu.Module.System/DestinationModule.cs
+12
-1
StudentModule.cs
Edu.Module.User/StudentModule.cs
+45
-2
PublicController.cs
Edu.WebApi/Controllers/Public/PublicController.cs
+13
-1
No files found.
Edu.Common/Plugin/ConvertHelper.cs
View file @
ef2cc1d2
...
@@ -39,7 +39,7 @@ namespace Edu.Common
...
@@ -39,7 +39,7 @@ namespace Edu.Common
/// </summary>
/// </summary>
/// <param name="time"></param>
/// <param name="time"></param>
/// <returns></returns>
/// <returns></returns>
public
static
string
FormatDate
(
object
time
)
public
static
string
FormatDate
(
this
object
time
)
{
{
string
timeStr
=
""
;
string
timeStr
=
""
;
if
(
time
!=
null
)
if
(
time
!=
null
)
...
...
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
View file @
ef2cc1d2
...
@@ -29,6 +29,17 @@ namespace Edu.Model.ViewModel.User
...
@@ -29,6 +29,17 @@ namespace Edu.Model.ViewModel.User
/// </summary>
/// </summary>
public
string
UpdateTimeStr
{
get
{
return
this
.
UpdateTime
.
FormatTime
();
}
}
public
string
UpdateTimeStr
{
get
{
return
this
.
UpdateTime
.
FormatTime
();
}
}
/// <summary>
/// 出生日期字符串
/// </summary>
public
string
StuBirthStr
{
get
{
return
this
.
StuBirth
.
FormatDate
();
}
}
/// <summary>
/// <summary>
/// 禁用、启用字符串
/// 禁用、启用字符串
/// </summary>
/// </summary>
...
@@ -49,5 +60,10 @@ namespace Edu.Model.ViewModel.User
...
@@ -49,5 +60,10 @@ namespace Edu.Model.ViewModel.User
/// 所属校区
/// 所属校区
/// </summary>
/// </summary>
public
string
SName
{
get
;
set
;
}
public
string
SName
{
get
;
set
;
}
/// <summary>
/// 地区名称【省/市/区县】
/// </summary>
public
string
AreaName
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
Edu.Module.System/DestinationModule.cs
View file @
ef2cc1d2
...
@@ -19,7 +19,7 @@ namespace Edu.Module.System
...
@@ -19,7 +19,7 @@ namespace Edu.Module.System
/// 省市区树形列表
/// 省市区树形列表
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
List
<
AreaTree_ViewModel
>
GetAreaTree
()
public
List
<
AreaTree_ViewModel
>
GetAreaTree
Module
()
{
{
List
<
AreaTree_ViewModel
>
treeList
=
new
List
<
AreaTree_ViewModel
>();
List
<
AreaTree_ViewModel
>
treeList
=
new
List
<
AreaTree_ViewModel
>();
var
list
=
destinationRepository
.
GetDestinationListRepository
(
new
RB_Destination_ViewModel
()
{
});
var
list
=
destinationRepository
.
GetDestinationListRepository
(
new
RB_Destination_ViewModel
()
{
});
...
@@ -72,5 +72,16 @@ namespace Edu.Module.System
...
@@ -72,5 +72,16 @@ namespace Edu.Module.System
}
}
return
treeList
;
return
treeList
;
}
}
/// <summary>
/// 根据查询条件获取地区列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Destination_ViewModel
>
GetAreaListModule
(
RB_Destination_ViewModel
query
)
{
var
list
=
destinationRepository
.
GetDestinationListRepository
(
query
);
return
list
;
}
}
}
}
}
\ No newline at end of file
Edu.Module.User/StudentModule.cs
View file @
ef2cc1d2
using
Edu.Common.Enum
;
using
Edu.Common.Enum
;
using
Edu.Model.ViewModel.User
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.System
;
using
Edu.Repository.User
;
using
Edu.Repository.User
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
VT.FW.DB
;
using
VT.FW.DB
;
namespace
Edu.Module.User
namespace
Edu.Module.User
...
@@ -16,6 +18,11 @@ namespace Edu.Module.User
...
@@ -16,6 +18,11 @@ namespace Edu.Module.User
/// </summary>
/// </summary>
private
readonly
RB_StudentRepository
studentRepository
=
new
RB_StudentRepository
();
private
readonly
RB_StudentRepository
studentRepository
=
new
RB_StudentRepository
();
/// <summary>
/// 地区仓储层对象
/// </summary>
private
readonly
RB_DestinationRepository
destinationRepository
=
new
RB_DestinationRepository
();
/// <summary>
/// <summary>
/// 获取学生列表
/// 获取学生列表
/// </summary>
/// </summary>
...
@@ -36,7 +43,43 @@ namespace Edu.Module.User
...
@@ -36,7 +43,43 @@ namespace Edu.Module.User
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Student_ViewModel
>
GetStudentPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_ViewModel
query
)
public
List
<
RB_Student_ViewModel
>
GetStudentPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_ViewModel
query
)
{
{
return
studentRepository
.
GetStudentPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
studentRepository
.
GetStudentPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
var
provideList
=
list
.
Where
(
qitem
=>
qitem
.
ProviceId
>
0
).
Select
(
qitem
=>
qitem
.
ProviceId
).
ToList
();
var
cityList
=
list
.
Where
(
qitem
=>
qitem
.
CityId
>
0
).
Select
(
qitem
=>
qitem
.
CityId
).
ToList
();
var
areaList
=
list
.
Where
(
qitem
=>
qitem
.
AreaId
>
0
).
Select
(
qitem
=>
qitem
.
AreaId
).
ToList
();
List
<
int
>
ids
=
new
List
<
int
>();
if
(
provideList
!=
null
&&
provideList
.
Count
>
0
)
{
ids
.
AddRange
(
provideList
);
}
if
(
cityList
!=
null
&&
cityList
.
Count
>
0
)
{
ids
.
AddRange
(
cityList
);
}
if
(
areaList
!=
null
&&
areaList
.
Count
>
0
)
{
ids
.
AddRange
(
areaList
);
}
string
qIds
=
""
;
if
(
ids
!=
null
&&
ids
.
Count
>
0
)
{
qIds
=
string
.
Join
(
","
,
ids
);
}
else
{
qIds
=
"0"
;
}
var
destinationList
=
destinationRepository
.
GetDestinationListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Destination_ViewModel
()
{
Ids
=
qIds
});
foreach
(
var
item
in
list
)
{
item
.
AreaName
=
(
destinationList
?.
FirstOrDefault
(
qitem
=>
qitem
.
ID
==
item
.
ProviceId
)?.
Name
??
""
)
+
"/"
+
(
destinationList
?.
FirstOrDefault
(
qitem
=>
qitem
.
ID
==
item
.
CityId
)?.
Name
??
""
)
+
"/"
+
(
destinationList
?.
FirstOrDefault
(
qitem
=>
qitem
.
ID
==
item
.
AreaId
)?.
Name
??
""
);
}
}
return
list
;
}
}
/// <summary>
/// <summary>
...
@@ -103,7 +146,7 @@ namespace Edu.Module.User
...
@@ -103,7 +146,7 @@ namespace Edu.Module.User
/// <param name="StuId"></param>
/// <param name="StuId"></param>
/// <param name="IsDisable">0-禁用,1-启用</param>
/// <param name="IsDisable">0-禁用,1-启用</param>
/// <returns></returns>
/// <returns></returns>
public
bool
UpdateStudentIsDisableModule
(
object
StuId
,
int
IsDisable
)
public
bool
UpdateStudentIsDisableModule
(
object
StuId
,
int
IsDisable
)
{
{
bool
flag
;
bool
flag
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
...
Edu.WebApi/Controllers/Public/PublicController.cs
View file @
ef2cc1d2
...
@@ -43,7 +43,19 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -43,7 +43,19 @@ namespace Edu.WebApi.Controllers.Public
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetAreaTree
()
public
ApiResult
GetAreaTree
()
{
{
var
list
=
destinationModule
.
GetAreaTree
();
var
list
=
destinationModule
.
GetAreaTreeModule
();
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取省市区列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAreaList
()
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Destination_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
list
=
destinationModule
.
GetAreaListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
return
ApiResult
.
Success
(
data
:
list
);
}
}
...
...
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