Commit 968e413d authored by cy's avatar cy

方案查询添加本科专科选择、方案列表进行专业、分数排序

parent 2ebaa084
...@@ -116,6 +116,12 @@ ...@@ -116,6 +116,12 @@
<if test="type != null"> <if test="type != null">
and type =#{type} and type =#{type}
</if> </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 "> <if test="volunteerIds != null and volunteerIds.size > 0 ">
and id NOT IN and id NOT IN
<foreach collection="volunteerIds" index="index" item="id" separator="," open="(" close=")"> <foreach collection="volunteerIds" index="index" item="id" separator="," open="(" close=")">
...@@ -129,7 +135,8 @@ ...@@ -129,7 +135,8 @@
<select id="getListByIds" resultType="cn.wisenergy.model.app.Volunteer"> <select id="getListByIds" resultType="cn.wisenergy.model.app.Volunteer">
select 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 from
<include refid="table"/> <include refid="table"/>
<where> <where>
...@@ -138,6 +145,7 @@ ...@@ -138,6 +145,7 @@
#{id} #{id}
</foreach> </foreach>
</where> </where>
order BY major_name , lowest_mark desc
</select> </select>
<select id="getVolunteerList" resultType="cn.wisenergy.model.app.Volunteer"> <select id="getVolunteerList" resultType="cn.wisenergy.model.app.Volunteer">
......
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;
}
}
...@@ -54,5 +54,11 @@ public class SchemeVo implements Serializable { ...@@ -54,5 +54,11 @@ public class SchemeVo implements Serializable {
@ApiModelProperty(value = "是否展示全部 0:否 1:是", name = "isShowAll") @ApiModelProperty(value = "是否展示全部 0:否 1:是", name = "isShowAll")
private Integer isShowAll; private Integer isShowAll;
/**
* 类型(专科、本科)
*/
@ApiModelProperty(value = "类型(专科、本科)",name = "gradeType")
private String gradeType;
} }
...@@ -123,7 +123,7 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch ...@@ -123,7 +123,7 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
for (Volunteer volunteer : result) { for (Volunteer volunteer : result) {
volunteer.setQueryTime(schemeQueryRecord.getCreateTime()); volunteer.setQueryTime(schemeQueryRecord.getCreateTime());
} }
result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed()); //result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
//最低位次为空,则用--代替 //最低位次为空,则用--代替
for(Volunteer info : result){ for(Volunteer info : result){
if(info.getLowestRank() == null){ if(info.getLowestRank() == null){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment