diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mini/controller/MiniUserController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mini/controller/MiniUserController.java index 26d4b60..f0d788c 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mini/controller/MiniUserController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mini/controller/MiniUserController.java @@ -112,7 +112,7 @@ public class MiniUserController { String token = JwtUtil.sign(sysUser.getUsername(), syspassword); // 设置token缓存有效时间 redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME * 2 / 1000); + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, 3600 * 2); JSONObject obj = new JSONObject(); LoginUser loginUser = new LoginUser(); BeanUtils.copyProperties(sysUser, loginUser); @@ -174,7 +174,7 @@ public class MiniUserController { String token = JwtUtil.sign(username, syspassword); // 设置token缓存有效时间 redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME * 2 / 1000); + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, 3600 * 2); JSONObject obj = new JSONObject(); LoginUser loginUser = new LoginUser(); BeanUtils.copyProperties(user, loginUser); diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/yx/controller/YxHistoryMajorEnrollController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/yx/controller/YxHistoryMajorEnrollController.java index 8f4860c..28281da 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/yx/controller/YxHistoryMajorEnrollController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/yx/controller/YxHistoryMajorEnrollController.java @@ -17,6 +17,7 @@ import org.jeecg.common.api.vo.Result; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.util.AssertUtils; +import org.jeecg.modules.yx.constant.YxConstant; import org.jeecg.modules.yx.dto.LiNianShuJuBenDTO; import org.jeecg.modules.yx.dto.LiNianShuJuDTO; import org.jeecg.modules.yx.dto.LiNianShuJuZhuanDTO; @@ -32,6 +33,7 @@ import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.modules.yx.service.IYxHistoryScoreControlLineService; import org.jeecg.modules.yx.service.IYxMajorService; import org.jeecg.modules.yx.service.IYxSchoolService; +import org.jeecg.modules.yx.util.ScoreUtil; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.entity.ImportParams; import org.springframework.beans.factory.annotation.Autowired; @@ -245,11 +247,14 @@ public class YxHistoryMajorEnrollController extends JeecgController historyScoreControlLineMap = yxHistoryScoreControlLineService.allMaps(); + Map majorMap = yxMajorService.mapsForMajorName(); //Map schoolNameMap = yxSchoolService.mapsForSchoolName(); //Collection schoolCodeList = schoolNameMap.values(); String schoolCode = null; String schoolName = null; - String majorName = null; + String majorName = null, mn = null, key = null; String majorType = null; String batch = null; String enrollmentCode = null; @@ -258,9 +263,18 @@ public class YxHistoryMajorEnrollController extends JeecgController yxHistoryMajorEnrollLambdaQueryWrapper = new LambdaQueryWrapper<>(); + List updateList = new ArrayList<>(); List list = ExcelImportUtil.importExcel(file.getInputStream(), YxHistoryMajorEnroll.class, params); for (YxHistoryMajorEnroll yxHistoryMajorEnroll : list) { index++; @@ -268,6 +282,7 @@ public class YxHistoryMajorEnrollController extends JeecgController */ Map mapsBatchByProfessionalCategoryOfYear(int year,String professionalCategory,String category); + + /** + * 全部省控线 + */ + Map allMaps(); } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/yx/service/impl/YxHistoryScoreControlLineServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/yx/service/impl/YxHistoryScoreControlLineServiceImpl.java index 7f3868e..77cc010 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/yx/service/impl/YxHistoryScoreControlLineServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/yx/service/impl/YxHistoryScoreControlLineServiceImpl.java @@ -14,6 +14,7 @@ import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import java.util.ArrayList; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -21,7 +22,7 @@ import java.util.stream.Collectors; /** * @Description: 历年各专业省控分数线 * @Author: jeecg-boot - * @Date: 2023-12-02 + * @Date: 2023-12-02 * @Version: V1.0 */ @Service @@ -32,11 +33,11 @@ public class YxHistoryScoreControlLineServiceImpl extends ServiceImpl yxHistoryScoreControlLineIPage = baseMapper.pageList(page, yxHistoryScoreControlLine); List newRecords = new ArrayList<>(); List records = yxHistoryScoreControlLineIPage.getRecords(); - YxHistoryScoreControlLine historyScoreControlLine=null; + YxHistoryScoreControlLine historyScoreControlLine = null; for (YxHistoryScoreControlLine record : records) { if ("本科A段".equals(record.getBatch())) { historyScoreControlLine = new YxHistoryScoreControlLine(); - BeanUtils.copyProperties(record,historyScoreControlLine); + BeanUtils.copyProperties(record, historyScoreControlLine); historyScoreControlLine.setBatch("提前批"); newRecords.add(historyScoreControlLine); } @@ -49,10 +50,10 @@ public class YxHistoryScoreControlLineServiceImpl extends ServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getYear,year); - lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getProfessionalCategory,professionalCategory); - lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getCategory,category); - lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getBatch,batch); + lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getYear, year); + lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getProfessionalCategory, professionalCategory); + lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getCategory, category); + lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getBatch, batch); lambdaQueryWrapper.last("limit 1"); return this.getOne(lambdaQueryWrapper); } @@ -60,9 +61,9 @@ public class YxHistoryScoreControlLineServiceImpl extends ServiceImpl listByProfessionalCategoryOfYear(int year, String professionalCategory, String category) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getYear,year); - lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getProfessionalCategory,professionalCategory); - lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getCategory,category); + lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getYear, year); + lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getProfessionalCategory, professionalCategory); + lambdaQueryWrapper.eq(YxHistoryScoreControlLine::getCategory, category); lambdaQueryWrapper.orderByDesc(YxHistoryScoreControlLine::getBatch); List newList = new ArrayList<>(); List list = this.list(lambdaQueryWrapper); @@ -70,7 +71,7 @@ public class YxHistoryScoreControlLineServiceImpl extends ServiceImpl yxHistoryScoreControlLines = this.listByProfessionalCategoryOfYear(year, professionalCategory, category); return yxHistoryScoreControlLines.stream().collect(Collectors.toMap(y -> y.getBatch(), y -> y)); } + + @Override + public Map allMaps() { + List list = this.list(); + Map maps = new LinkedHashMap<>(); + String key = null; + for (YxHistoryScoreControlLine record : list) { + //文科_本科A段_美术与设计_2023 + key = record.getCategory() + "_" + record.getBatch() + "_" + record.getProfessionalCategory() + "_" + record.getYear(); + maps.put(key,record); + if (record.getBatch().equals("本科A段")) { + key = record.getCategory() + "_提前批_" + record.getProfessionalCategory() + "_" + record.getYear(); + maps.put(key,record); + } + } + return maps; + } }