Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
V
volunteer_service
Project
Project
Details
Activity
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
licc
volunteer_service
Commits
968e413d
Commit
968e413d
authored
4 years ago
by
cy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
方案查询添加本科专科选择、方案列表进行专业、分数排序
parent
2ebaa084
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
108 deletions
+114
-108
VolunteerMapper.xml
...ergy-mapper/src/main/resources/mapper/VolunteerMapper.xml
+9
-1
GradeType.java
...del/src/main/java/cn/wisenergy/model/enums/GradeType.java
+37
-0
SchemeVo.java
...y-model/src/main/java/cn/wisenergy/model/vo/SchemeVo.java
+6
-0
SchemeRecordServiceImpl.java
...n/wisenergy/service/app/impl/SchemeRecordServiceImpl.java
+1
-1
SchemeServiceImpl.java
...java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
+61
-106
No files found.
wisenergy-mapper/src/main/resources/mapper/VolunteerMapper.xml
View file @
968e413d
...
...
@@ -116,6 +116,12 @@
<if
test=
"type != null"
>
and type =#{type}
</if>
<if
test=
"classNames != null"
>
and
<foreach
collection=
"classNames"
index=
"index"
item=
"id"
separator=
"or"
open=
"("
close=
")"
>
course_demand LIKE CONCAT('%',#{id},'%')
</foreach>
</if>
<if
test=
"volunteerIds != null and volunteerIds.size > 0 "
>
and id NOT IN
<foreach
collection=
"volunteerIds"
index=
"index"
item=
"id"
separator=
","
open=
"("
close=
")"
>
...
...
@@ -129,7 +135,8 @@
<select
id=
"getListByIds"
resultType=
"cn.wisenergy.model.app.Volunteer"
>
select
<include
refid=
"cols_all"
/>
id, type,scheme_id,substring(major_name,3) major_name,academy, course_demand,nature,year_limit,plan_num,
cast_archives_num,launch_num,lowest_mark, lowest_rank,is_delete,create_time,update_time
from
<include
refid=
"table"
/>
<where>
...
...
@@ -138,6 +145,7 @@
#{id}
</foreach>
</where>
order BY major_name , lowest_mark desc
</select>
<select
id=
"getVolunteerList"
resultType=
"cn.wisenergy.model.app.Volunteer"
>
...
...
This diff is collapsed.
Click to expand it.
wisenergy-model/src/main/java/cn/wisenergy/model/enums/GradeType.java
0 → 100644
View file @
968e413d
package
cn
.
wisenergy
.
model
.
enums
;
public
enum
GradeType
{
//本科
UNDERGRADUATE
(
0
,
"本科"
),
//专科
SPECIALTY
(
1
,
"专科"
);
private
Integer
code
;
private
String
desc
;
GradeType
(
Integer
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
String
getDescription
()
{
return
desc
;
}
public
Integer
getCode
()
{
return
code
;
}
public
static
String
getNameByCode
(
Integer
code
)
{
if
(
null
==
code
)
{
return
null
;
}
for
(
SceneType
type
:
SceneType
.
values
())
{
if
(
type
.
getCode
().
intValue
()
==
code
.
intValue
())
{
return
type
.
name
();
}
}
return
null
;
}
}
This diff is collapsed.
Click to expand it.
wisenergy-model/src/main/java/cn/wisenergy/model/vo/SchemeVo.java
View file @
968e413d
...
...
@@ -54,5 +54,11 @@ public class SchemeVo implements Serializable {
@ApiModelProperty
(
value
=
"是否展示全部 0:否 1:是"
,
name
=
"isShowAll"
)
private
Integer
isShowAll
;
/**
* 类型(专科、本科)
*/
@ApiModelProperty
(
value
=
"类型(专科、本科)"
,
name
=
"gradeType"
)
private
String
gradeType
;
}
This diff is collapsed.
Click to expand it.
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/SchemeRecordServiceImpl.java
View file @
968e413d
...
...
@@ -123,7 +123,7 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
for
(
Volunteer
volunteer
:
result
)
{
volunteer
.
setQueryTime
(
schemeQueryRecord
.
getCreateTime
());
}
result
.
sort
(
Comparator
.
comparing
(
Volunteer:
:
getLowestMark
).
reversed
());
//
result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
//最低位次为空,则用--代替
for
(
Volunteer
info
:
result
){
if
(
info
.
getLowestRank
()
==
null
){
...
...
This diff is collapsed.
Click to expand it.
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
View file @
968e413d
This diff is collapsed.
Click to expand it.
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