Commit f1359fdd authored by cy's avatar cy

修改方案查询专业限制

parent c7a63eb8
...@@ -214,7 +214,6 @@ ...@@ -214,7 +214,6 @@
and lowest_mark >= #{totalMin} and lowest_mark >= #{totalMin}
</if> </if>
<if test="locals != null and (locals.size)>0"> <if test="locals != null and (locals.size)>0">
and and
<foreach collection="locals" index="index" item="local" separator="or" open="(" close=")"> <foreach collection="locals" index="index" item="local" separator="or" open="(" close=")">
...@@ -222,6 +221,13 @@ ...@@ -222,6 +221,13 @@
</foreach> </foreach>
</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="professionNames != null and (professionNames.size)>0"> <if test="professionNames != null and (professionNames.size)>0">
and and
<foreach collection="professionNames" index="index" item="id" separator="or" open="(" close=")"> <foreach collection="professionNames" index="index" item="id" separator="or" open="(" close=")">
......
...@@ -17,7 +17,7 @@ public enum StudentClassEnum { ...@@ -17,7 +17,7 @@ public enum StudentClassEnum {
HISTORY_GRADE(4, "历史"), HISTORY_GRADE(4, "历史"),
GEOGRAPHY_GRADE(5, "地理"), GEOGRAPHY_GRADE(5, "地理"),
POLITICS_GRADE(6, "政治"), POLITICS_GRADE(6, "思想政治"),
UNLIMITED(7, "不限"); UNLIMITED(7, "不限");
private Integer code; private Integer code;
......
...@@ -63,4 +63,10 @@ public class SchemeVipVo implements Serializable { ...@@ -63,4 +63,10 @@ public class SchemeVipVo 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;
} }
...@@ -32,7 +32,7 @@ public interface SchemeRecordService { ...@@ -32,7 +32,7 @@ public interface SchemeRecordService {
* @param recordId 方案记录id * @param recordId 方案记录id
* @return 方案志愿列表 * @return 方案志愿列表
*/ */
R<List<Volunteer>> getVolunteerList(Integer userId,Integer recordId); R<List<Volunteer>> getVolunteerList(Integer userId,Integer recordId,String searchSource);
/** /**
* 方案pdf导出 * 方案pdf导出
...@@ -40,7 +40,7 @@ public interface SchemeRecordService { ...@@ -40,7 +40,7 @@ public interface SchemeRecordService {
* @param recordId 方案查询记录id * @param recordId 方案查询记录id
* @return 0:导出成功,1:导出失败 * @return 0:导出成功,1:导出失败
*/ */
R<Boolean> export(Integer userId, Integer recordId, HttpServletResponse response); R<Boolean> export(Integer userId, Integer recordId, HttpServletResponse response,String searchSource);
/** /**
* 方案excel导出 * 方案excel导出
...@@ -48,5 +48,5 @@ public interface SchemeRecordService { ...@@ -48,5 +48,5 @@ public interface SchemeRecordService {
* @param recordId 方案查询记录id * @param recordId 方案查询记录id
* @return 0:导出成功,1:导出失败 * @return 0:导出成功,1:导出失败
*/ */
R<Boolean> createExcel(Integer userId, Integer recordId, HttpServletResponse response); R<Boolean> createExcel(Integer userId, Integer recordId, HttpServletResponse response,String searchSource);
} }
package cn.wisenergy.service.app;
import cn.wisenergy.common.utils.R;
import cn.wisenergy.model.dto.PayPageDto;
import cn.wisenergy.model.dto.PayQueryDto;
import javax.crypto.IllegalBlockSizeException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.security.spec.InvalidKeySpecException;
/**
* @author 86187
*/
public interface WxPayService1 {
/**
* 微行支付接口
* @param payPageDto 入参
* @return
*/
R<String> wxPay(PayPageDto payPageDto) throws UnsupportedEncodingException, NoSuchAlgorithmException, SignatureException, InvalidKeySpecException, InvalidKeyException;
/**
* 微信支付-交易查询
* @param payQueryDto 入参
* @return
*/
R<String> queryWx(PayQueryDto payQueryDto) throws UnsupportedEncodingException, NoSuchAlgorithmException, SignatureException, InvalidKeySpecException, InvalidKeyException;
R<String> wx_Pay(PayPageDto payPageDto) throws IOException, NoSuchAlgorithmException, SignatureException, InvalidKeySpecException, InvalidKeyException, IllegalBlockSizeException;
}
...@@ -23,10 +23,10 @@ import com.itextpdf.text.Document; ...@@ -23,10 +23,10 @@ import com.itextpdf.text.Document;
import com.itextpdf.text.PageSize; import com.itextpdf.text.PageSize;
import com.itextpdf.text.pdf.PdfWriter; import com.itextpdf.text.pdf.PdfWriter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -97,7 +97,7 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch ...@@ -97,7 +97,7 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
} }
@Override @Override
public R<List<Volunteer>> getVolunteerList(Integer userId, Integer recordId) { public R<List<Volunteer>> getVolunteerList(Integer userId, Integer recordId,String searchSource) {
log.info("volunteer-service[]SchemeRecordServiceImpl[]getVolunteerList[]input.param.userId,recordId:" + userId); log.info("volunteer-service[]SchemeRecordServiceImpl[]getVolunteerList[]input.param.userId,recordId:" + userId);
if (null == userId || null == recordId) { if (null == userId || null == recordId) {
return R.error("入参为空!"); return R.error("入参为空!");
...@@ -123,7 +123,10 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch ...@@ -123,7 +123,10 @@ 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()); //判断是否是私人订制,不是就按照录取分数排序
if(StringUtils.isBlank(searchSource)){
result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
}
//最低位次为空,则用--代替 //最低位次为空,则用--代替
for(Volunteer info : result){ for(Volunteer info : result){
if(info.getLowestRank() == null){ if(info.getLowestRank() == null){
...@@ -141,7 +144,7 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch ...@@ -141,7 +144,7 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
* @return * @return
*/ */
@Override @Override
public R<Boolean> export(Integer userId, Integer recordId, HttpServletResponse response) { public R<Boolean> export(Integer userId, Integer recordId, HttpServletResponse response,String searchSource) {
log.info("volunteer-service[]SchemeRecordServiceImpl[]export[]input.param.userId,recordId:" + userId); log.info("volunteer-service[]SchemeRecordServiceImpl[]export[]input.param.userId,recordId:" + userId);
//查询时间 //查询时间
...@@ -180,7 +183,10 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch ...@@ -180,7 +183,10 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
info.setLowestRank("0"); info.setLowestRank("0");
} }
} }
result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed()); //判断是否是私人订制,不是就按照录取分数排序
if(StringUtils.isBlank(searchSource)){
result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
}
//调用工具生成PDF //调用工具生成PDF
try { try {
// 1.新建document对象 // 1.新建document对象
...@@ -226,7 +232,7 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch ...@@ -226,7 +232,7 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
} }
@Override @Override
public R<Boolean> createExcel(Integer userId, Integer recordId, HttpServletResponse response) { public R<Boolean> createExcel(Integer userId, Integer recordId, HttpServletResponse response,String searchSource) {
log.info("SchemeRecordServiceImpl[].createExcel[].input.param:userId,recordId" + userId, recordId); log.info("SchemeRecordServiceImpl[].createExcel[].input.param:userId,recordId" + userId, recordId);
//查询时间 //查询时间
...@@ -262,7 +268,10 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch ...@@ -262,7 +268,10 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
} }
List<Integer> ids = list.stream().map(UserVolunteer::getVolunteerId).collect(Collectors.toList()); List<Integer> ids = list.stream().map(UserVolunteer::getVolunteerId).collect(Collectors.toList());
List<Volunteer> result = volunteerMapper.getListByIds(ids); List<Volunteer> result = volunteerMapper.getListByIds(ids);
result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed()); //判断是否是私人订制,不是就按照录取分数排序
if(StringUtils.isBlank(searchSource)){
result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
}
//生成Excel //生成Excel
try { try {
......
...@@ -59,41 +59,44 @@ public class SchemeRecordController { ...@@ -59,41 +59,44 @@ public class SchemeRecordController {
@ApiOperation(value = "获取充值记录志愿列表", notes = "获取充值记录志愿列表", httpMethod = "GET") @ApiOperation(value = "获取充值记录志愿列表", notes = "获取充值记录志愿列表", httpMethod = "GET")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "int", required = true), @ApiImplicitParam(name = "userId", value = "用户id", dataType = "int", required = true),
@ApiImplicitParam(name = "recordId", value = "记录id", dataType = "int", required = true) @ApiImplicitParam(name = "recordId", value = "记录id", dataType = "int", required = true),
@ApiImplicitParam(name = "searchSource", value = "查询来源(私人订制需要传值,其他端不用传)", dataType = "String")
}) })
@GetMapping("/getVolunteerList") @GetMapping("/getVolunteerList")
public R<List<Volunteer>> getVolunteerList(Integer userId, Integer recordId) { public R<List<Volunteer>> getVolunteerList(Integer userId, Integer recordId,String searchSource) {
log.info("volunteer-service[]SchemeRecordController[]getVolunteerList[]input.param.userId:{},recordId:" + userId, recordId); log.info("volunteer-service[]SchemeRecordController[]getVolunteerList[]input.param.userId:{},recordId:" + userId, recordId);
if (null == userId || null == recordId) { if (null == userId || null == recordId) {
return R.error("入参为空!"); return R.error("入参为空!");
} }
return schemeRecordService.getVolunteerList(userId, recordId); return schemeRecordService.getVolunteerList(userId, recordId,searchSource);
} }
@ApiOperation(value = "方案导出", notes = "方案导出", httpMethod = "GET") @ApiOperation(value = "方案导出", notes = "方案导出", httpMethod = "GET")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "int", required = true), @ApiImplicitParam(name = "userId", value = "用户id", dataType = "int", required = true),
@ApiImplicitParam(name = "recordId", value = "记录id", dataType = "int", required = true) @ApiImplicitParam(name = "recordId", value = "记录id", dataType = "int", required = true),
@ApiImplicitParam(name = "searchSource", value = "查询来源(私人订制需要传值,其他端不用传)", dataType = "String")
}) })
@GetMapping("/export") @GetMapping("/export")
public R<Boolean> export(Integer userId, Integer recordId, HttpServletResponse response) { public R<Boolean> export(Integer userId, Integer recordId, HttpServletResponse response,String searchSource) {
log.info("volunteer-service[]SchemeRecordController[]getVolunteerList[]input.param.userId,recordId:" + userId, recordId); log.info("volunteer-service[]SchemeRecordController[]getVolunteerList[]input.param.userId,recordId:" + userId, recordId);
if (null == userId || null == recordId) { if (null == userId || null == recordId) {
return R.error("入参为空!"); return R.error("入参为空!");
} }
return schemeRecordService.export(userId, recordId,response); return schemeRecordService.export(userId, recordId,response,searchSource);
} }
@ApiOperation(value = "方案Excel导出",notes = "方案Excel导出",httpMethod = "GET") @ApiOperation(value = "方案Excel导出",notes = "方案Excel导出",httpMethod = "GET")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "int", required = true), @ApiImplicitParam(name = "userId", value = "用户id", dataType = "int", required = true),
@ApiImplicitParam(name = "recordId", value = "记录id", dataType = "int", required = true) @ApiImplicitParam(name = "recordId", value = "记录id", dataType = "int", required = true),
@ApiImplicitParam(name = "searchSource", value = "查询来源(私人订制需要传值,其他端不用传)", dataType = "String")
}) })
@GetMapping(value = "/createExcel") @GetMapping(value = "/createExcel")
public R<Boolean> createExcel(Integer userId, Integer recordId, HttpServletResponse response){ public R<Boolean> createExcel(Integer userId, Integer recordId, HttpServletResponse response,String searchSource){
log.info("volunteer-service[]SchemeRecordController[]createExcel[]input.param.userId,recordId:" + userId, recordId); log.info("volunteer-service[]SchemeRecordController[]createExcel[]input.param.userId,recordId:" + userId, recordId);
return schemeRecordService.createExcel(userId,recordId,response); return schemeRecordService.createExcel(userId,recordId,response,searchSource);
} }
} }
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