This commit is contained in:
zhouwentao 2024-03-12 23:41:22 +08:00
parent 63edb4b06e
commit 0e5ca78e2c
25 changed files with 1281 additions and 1 deletions

View File

@ -13,6 +13,7 @@ import java.io.Serializable;
public class ArtBaseDTO implements Serializable {
private Integer pageNum=0;
private Integer pageSize=10;
private String schoolId;
private String schoolName;
private String schoolCode;
}

View File

@ -0,0 +1,47 @@
package org.jeecg.modules.mini.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.AssertUtils;
import org.jeecg.modules.yx.entity.YxFeedback;
import org.jeecg.modules.yx.service.IYxFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Description
* @Author ZhouWenTao
* @Date 2024/3/12 23:25
*/
@Api(tags = "小程序端-问题反馈接口")
@RestController
@Slf4j
@RequestMapping("/mini/feedback")
public class MiniFeedbackController {
@Autowired
private IYxFeedbackService yxFeedbackService;
@ApiOperation(value = "用户提交反馈")
@PostMapping(value = "/userSaveFeedBack")
public Result<?> userSaveFeedBack(@RequestBody YxFeedback yxFeedback){
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (loginUser == null) {
throw new JeecgBootException("请登录");
}
AssertUtils.notNull(yxFeedback.getType(),"请选择问题类型!");
AssertUtils.notNull(yxFeedback.getContent(),"请输入问题反馈!");
/*AssertUtils.notNull(yxFeedback.getContactPerson(),"请输入联系人!");
AssertUtils.notNull(yxFeedback.getContactPersonPhone(),"请输入联系电话!");*/
yxFeedback.setStatus("1");
yxFeedback.setCreateBy(loginUser.getId());
yxFeedbackService.save(yxFeedback);
return Result.OK();
}
}

View File

@ -1,17 +1,30 @@
package org.jeecg.modules.mini.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.util.AssertUtils;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.art.vo.QueryRecommendMajorVO;
import org.jeecg.modules.mini.service.MiniSchoolService;
import org.jeecg.modules.yx.entity.YxSchoolDoubleFirstPlan;
import org.jeecg.modules.yx.entity.YxSubjectEvaluation;
import org.jeecg.modules.yx.service.IYxSchoolDoubleFirstPlanService;
import org.jeecg.modules.yx.service.IYxSchoolService;
import org.jeecg.modules.yx.service.IYxSubjectEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description 小程序端 院校接口
* @Author ZhouWenTao
@ -26,7 +39,12 @@ public class MiniSchoolController {
private IYxSchoolService yxSchoolService;
@Autowired
private MiniSchoolService miniSchoolService;
@Autowired
private IYxSchoolDoubleFirstPlanService yxSchoolDoubleFirstPlanService;
@Autowired
private IYxSubjectEvaluationService yxSubjectEvaluationService;
@Resource
private RedisUtil redisUtil;
@ApiOperation(value = "学校详情")
@GetMapping("/schoolInfo")
public Result<?> schoolInfo(QueryRecommendMajorVO queryRecommendMajorVO){
@ -40,4 +58,64 @@ public class MiniSchoolController {
return Result.OK(yxSchoolService.miniSchoolSearch(queryRecommendMajorVO));
}
@ApiOperation(value = "学校双万计划信息")
@GetMapping(value = "/doubleFirstPlan")
public Result<?> doubleFirstPlan(QueryRecommendMajorVO queryRecommendMajorVO){
String schoolId = queryRecommendMajorVO.getSchoolId();
AssertUtils.notNull(schoolId,"请选择院校");
String key = "school:doubleFirstPlan:schoolId_"+schoolId;
String json = null;
JSONObject jsonObject = null;
if (redisUtil.hasKey(key)) {
jsonObject = JSONObject.parseObject((String) redisUtil.get(key));
}else{
LambdaQueryWrapper<YxSchoolDoubleFirstPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(YxSchoolDoubleFirstPlan::getSchoolId,schoolId);
lambdaQueryWrapper.select(YxSchoolDoubleFirstPlan::getSchoolName,
YxSchoolDoubleFirstPlan::getMajorCode,
YxSchoolDoubleFirstPlan::getLevel,
YxSchoolDoubleFirstPlan::getTrack,
YxSchoolDoubleFirstPlan::getMajorName);
List<YxSchoolDoubleFirstPlan> yxSchoolDoubleFirstPlanList = yxSchoolDoubleFirstPlanService.list(lambdaQueryWrapper);
List<YxSchoolDoubleFirstPlan> gjjList = yxSchoolDoubleFirstPlanList.stream().filter(l -> "国家级".equals(l.getLevel())).collect(Collectors.toList());
List<YxSchoolDoubleFirstPlan> sjList = yxSchoolDoubleFirstPlanList.stream().filter(l -> "省级".equals(l.getLevel())).collect(Collectors.toList());
jsonObject = new JSONObject();
jsonObject.put("gjjList",gjjList);
jsonObject.put("sjList",sjList);
json = jsonObject.toJSONString();
redisUtil.set(key,json,300);
}
return Result.OK(jsonObject);
}
@ApiOperation(value = "学校第四轮学科评估")
@GetMapping(value = "/subjectEvaluation")
public Result<?> subjectEvaluation(QueryRecommendMajorVO queryRecommendMajorVO){
String schoolId = queryRecommendMajorVO.getSchoolId();
AssertUtils.notNull(schoolId,"请选择院校");
String key = "school:subjectEvaluation:schoolId_"+schoolId;
String json = null;
List<YxSubjectEvaluation> list = null;
try {
if (redisUtil.hasKey(key)) {
list = JSONArray.parseArray((String) redisUtil.get(key),YxSubjectEvaluation.class);
}else{
LambdaQueryWrapper<YxSubjectEvaluation> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(YxSubjectEvaluation::getSchoolId,schoolId);
lambdaQueryWrapper.select(YxSubjectEvaluation::getSchoolName,
YxSubjectEvaluation::getSubjectCode,
YxSubjectEvaluation::getSubjectName,
YxSubjectEvaluation::getEvaluationResult,
YxSubjectEvaluation::getEvaluationType);
list = yxSubjectEvaluationService.list(lambdaQueryWrapper);
json = JSONArray.toJSONString(list);
redisUtil.set(key,json,300);
}
}catch (Exception e){
log.error(e.getMessage());
return Result.error("异常,请联系管理员");
}
return Result.OK(list);
}
}

View File

@ -0,0 +1,178 @@
package org.jeecg.modules.yx.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.yx.entity.YxFeedback;
import org.jeecg.modules.yx.service.IYxFeedbackService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: 问题反馈表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
@Api(tags="问题反馈表")
@RestController
@RequestMapping("/yx/yxFeedback")
@Slf4j
public class YxFeedbackController extends JeecgController<YxFeedback, IYxFeedbackService> {
@Autowired
private IYxFeedbackService yxFeedbackService;
/**
* 分页列表查询
*
* @param yxFeedback
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "问题反馈表-分页列表查询")
@ApiOperation(value="问题反馈表-分页列表查询", notes="问题反馈表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<YxFeedback>> queryPageList(YxFeedback yxFeedback,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<YxFeedback> queryWrapper = QueryGenerator.initQueryWrapper(yxFeedback, req.getParameterMap());
Page<YxFeedback> page = new Page<YxFeedback>(pageNo, pageSize);
IPage<YxFeedback> pageList = yxFeedbackService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param yxFeedback
* @return
*/
@AutoLog(value = "问题反馈表-添加")
@ApiOperation(value="问题反馈表-添加", notes="问题反馈表-添加")
@RequiresPermissions("yx:yx_feedback:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody YxFeedback yxFeedback) {
yxFeedbackService.save(yxFeedback);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param yxFeedback
* @return
*/
@AutoLog(value = "问题反馈表-编辑")
@ApiOperation(value="问题反馈表-编辑", notes="问题反馈表-编辑")
@RequiresPermissions("yx:yx_feedback:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody YxFeedback yxFeedback) {
yxFeedbackService.updateById(yxFeedback);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "问题反馈表-通过id删除")
@ApiOperation(value="问题反馈表-通过id删除", notes="问题反馈表-通过id删除")
@RequiresPermissions("yx:yx_feedback:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
yxFeedbackService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "问题反馈表-批量删除")
@ApiOperation(value="问题反馈表-批量删除", notes="问题反馈表-批量删除")
@RequiresPermissions("yx:yx_feedback:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.yxFeedbackService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "问题反馈表-通过id查询")
@ApiOperation(value="问题反馈表-通过id查询", notes="问题反馈表-通过id查询")
@GetMapping(value = "/queryById")
public Result<YxFeedback> queryById(@RequestParam(name="id",required=true) String id) {
YxFeedback yxFeedback = yxFeedbackService.getById(id);
if(yxFeedback==null) {
return Result.error("未找到对应数据");
}
return Result.OK(yxFeedback);
}
/**
* 导出excel
*
* @param request
* @param yxFeedback
*/
@RequiresPermissions("yx:yx_feedback:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, YxFeedback yxFeedback) {
return super.exportXls(request, yxFeedback, YxFeedback.class, "问题反馈表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("yx:yx_feedback:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, YxFeedback.class);
}
}

View File

@ -0,0 +1,260 @@
package org.jeecg.modules.yx.controller;
import java.io.*;
import java.util.*;
import java.util.stream.Collectors;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.AssertUtils;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.yx.entity.*;
import org.jeecg.modules.yx.service.IYxMajorService;
import org.jeecg.modules.yx.service.IYxSchoolDoubleFirstPlanService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.yx.service.IYxSchoolService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: 学校专业双万计划表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
@Api(tags="学校专业双万计划表")
@RestController
@RequestMapping("/yx/yxSchoolDoubleFirstPlan")
@Slf4j
public class YxSchoolDoubleFirstPlanController extends JeecgController<YxSchoolDoubleFirstPlan, IYxSchoolDoubleFirstPlanService> {
@Autowired
private IYxSchoolDoubleFirstPlanService yxSchoolDoubleFirstPlanService;
@Autowired
private IYxSchoolService yxSchoolService;
@Autowired
private IYxMajorService yxMajorService;
/**
* 分页列表查询
*
* @param yxSchoolDoubleFirstPlan
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "学校专业双万计划表-分页列表查询")
@ApiOperation(value="学校专业双万计划表-分页列表查询", notes="学校专业双万计划表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<YxSchoolDoubleFirstPlan>> queryPageList(YxSchoolDoubleFirstPlan yxSchoolDoubleFirstPlan,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<YxSchoolDoubleFirstPlan> queryWrapper = QueryGenerator.initQueryWrapper(yxSchoolDoubleFirstPlan, req.getParameterMap());
Page<YxSchoolDoubleFirstPlan> page = new Page<YxSchoolDoubleFirstPlan>(pageNo, pageSize);
IPage<YxSchoolDoubleFirstPlan> pageList = yxSchoolDoubleFirstPlanService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param yxSchoolDoubleFirstPlan
* @return
*/
@AutoLog(value = "学校专业双万计划表-添加")
@ApiOperation(value="学校专业双万计划表-添加", notes="学校专业双万计划表-添加")
@RequiresPermissions("yx:yx_school_double_first_plan:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody YxSchoolDoubleFirstPlan yxSchoolDoubleFirstPlan) {
yxSchoolDoubleFirstPlanService.save(yxSchoolDoubleFirstPlan);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param yxSchoolDoubleFirstPlan
* @return
*/
@AutoLog(value = "学校专业双万计划表-编辑")
@ApiOperation(value="学校专业双万计划表-编辑", notes="学校专业双万计划表-编辑")
@RequiresPermissions("yx:yx_school_double_first_plan:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody YxSchoolDoubleFirstPlan yxSchoolDoubleFirstPlan) {
yxSchoolDoubleFirstPlanService.updateById(yxSchoolDoubleFirstPlan);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "学校专业双万计划表-通过id删除")
@ApiOperation(value="学校专业双万计划表-通过id删除", notes="学校专业双万计划表-通过id删除")
@RequiresPermissions("yx:yx_school_double_first_plan:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
yxSchoolDoubleFirstPlanService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "学校专业双万计划表-批量删除")
@ApiOperation(value="学校专业双万计划表-批量删除", notes="学校专业双万计划表-批量删除")
@RequiresPermissions("yx:yx_school_double_first_plan:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.yxSchoolDoubleFirstPlanService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "学校专业双万计划表-通过id查询")
@ApiOperation(value="学校专业双万计划表-通过id查询", notes="学校专业双万计划表-通过id查询")
@GetMapping(value = "/queryById")
public Result<YxSchoolDoubleFirstPlan> queryById(@RequestParam(name="id",required=true) String id) {
YxSchoolDoubleFirstPlan yxSchoolDoubleFirstPlan = yxSchoolDoubleFirstPlanService.getById(id);
if(yxSchoolDoubleFirstPlan==null) {
return Result.error("未找到对应数据");
}
return Result.OK(yxSchoolDoubleFirstPlan);
}
/**
* 导出excel
*
* @param request
* @param yxSchoolDoubleFirstPlan
*/
@RequiresPermissions("yx:yx_school_double_first_plan:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, YxSchoolDoubleFirstPlan yxSchoolDoubleFirstPlan) {
return super.exportXls(request, yxSchoolDoubleFirstPlan, YxSchoolDoubleFirstPlan.class, "学校专业双万计划表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("yx:yx_school_double_first_plan:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
// 获取上传文件对象
MultipartFile file = entity.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
long start = System.currentTimeMillis();
List<YxSchoolDoubleFirstPlan> list = ExcelImportUtil.importExcel(file.getInputStream(), YxSchoolDoubleFirstPlan.class, params);
if (CollectionUtils.isNotEmpty(list)) {
//查出以前的数据判断是否重复
List<YxSchoolDoubleFirstPlan> oldAllList = service.list();
Set<String> schoolNameMajorNameSet = oldAllList.stream().map(o -> o.getSchoolName() + "_" + o.getMajorName()).collect(Collectors.toSet());
Map<String, YxSchool> schoolMap = yxSchoolService.mapsForSchoolName();
Map<String,YxMajor> majorMap = yxMajorService.mapsForMajorName();
String schoolName = null;
String majorName = null;
String key = null;
YxSchool yxSchool = null;
YxMajor yxMajor = null;
YxSchoolDoubleFirstPlan yxSchoolDoubleFirstPlan = null;
for (YxSchoolDoubleFirstPlan l : list) {
schoolName = l.getSchoolName();
majorName = l.getMajorName();
key = schoolName + "_" + majorName;
if (schoolNameMajorNameSet.contains(key)) {
return Result.error(String.format("文件导入失败:院校-%s-专业-%s-已存在!", l.getSchoolName(),l.getMajorName()));
}
schoolNameMajorNameSet.add(key);
if (StringUtils.isBlank(schoolName)) {
return Result.error("文件导入失败:有院校名称为空!");
}
schoolName = schoolName.replace(" ","").replace("(","").replace(")","");
yxSchool = schoolMap.get(schoolName);
if (yxSchool == null) {
yxSchool = schoolMap.get(schoolName.replace("学院","大学"));
if (yxSchool == null) {
return Result.error(String.format("文件导入失败:院校-%s-关联失败,未在数据库中找到该院校名称!",schoolName));
}
}
yxMajor = majorMap.get(majorName);
if (yxMajor == null) {
return Result.error(String.format("文件导入失败:专业-%s-关联失败,未在数据库中找到该专业名称!",majorName));
}
l.setSchoolId(yxSchool.getId());
l.setMajorCode(yxMajor.getMajorCode());
}
service.saveBatch(list);
}
//update-begin-author:taoyan date:20190528 for:批量插入数据
log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
return Result.ok("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
String msg = e.getMessage();
log.error(msg, e);
if (msg != null && msg.indexOf("Duplicate entry") >= 0) {
return Result.error("文件导入失败:有重复数据!");
} else {
return Result.error("文件导入失败:" + e.getMessage());
}
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return Result.error("文件导入失败!");
}
}

View File

@ -0,0 +1,252 @@
package org.jeecg.modules.yx.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.yx.entity.YxMajor;
import org.jeecg.modules.yx.entity.YxSchool;
import org.jeecg.modules.yx.entity.YxSchoolDoubleFirstPlan;
import org.jeecg.modules.yx.entity.YxSubjectEvaluation;
import org.jeecg.modules.yx.service.IYxSchoolService;
import org.jeecg.modules.yx.service.IYxSubjectEvaluationService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: 第四轮学科评估
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
@Api(tags="第四轮学科评估")
@RestController
@RequestMapping("/yx/yxSubjectEvaluation")
@Slf4j
public class YxSubjectEvaluationController extends JeecgController<YxSubjectEvaluation, IYxSubjectEvaluationService> {
@Autowired
private IYxSubjectEvaluationService yxSubjectEvaluationService;
@Autowired
private IYxSchoolService yxSchoolService;
/**
* 分页列表查询
*
* @param yxSubjectEvaluation
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "第四轮学科评估-分页列表查询")
@ApiOperation(value="第四轮学科评估-分页列表查询", notes="第四轮学科评估-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<YxSubjectEvaluation>> queryPageList(YxSubjectEvaluation yxSubjectEvaluation,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<YxSubjectEvaluation> queryWrapper = QueryGenerator.initQueryWrapper(yxSubjectEvaluation, req.getParameterMap());
Page<YxSubjectEvaluation> page = new Page<YxSubjectEvaluation>(pageNo, pageSize);
IPage<YxSubjectEvaluation> pageList = yxSubjectEvaluationService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param yxSubjectEvaluation
* @return
*/
@AutoLog(value = "第四轮学科评估-添加")
@ApiOperation(value="第四轮学科评估-添加", notes="第四轮学科评估-添加")
@RequiresPermissions("yx:yx_subject_evaluation:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody YxSubjectEvaluation yxSubjectEvaluation) {
yxSubjectEvaluationService.save(yxSubjectEvaluation);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param yxSubjectEvaluation
* @return
*/
@AutoLog(value = "第四轮学科评估-编辑")
@ApiOperation(value="第四轮学科评估-编辑", notes="第四轮学科评估-编辑")
@RequiresPermissions("yx:yx_subject_evaluation:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody YxSubjectEvaluation yxSubjectEvaluation) {
yxSubjectEvaluationService.updateById(yxSubjectEvaluation);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "第四轮学科评估-通过id删除")
@ApiOperation(value="第四轮学科评估-通过id删除", notes="第四轮学科评估-通过id删除")
@RequiresPermissions("yx:yx_subject_evaluation:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
yxSubjectEvaluationService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "第四轮学科评估-批量删除")
@ApiOperation(value="第四轮学科评估-批量删除", notes="第四轮学科评估-批量删除")
@RequiresPermissions("yx:yx_subject_evaluation:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.yxSubjectEvaluationService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "第四轮学科评估-通过id查询")
@ApiOperation(value="第四轮学科评估-通过id查询", notes="第四轮学科评估-通过id查询")
@GetMapping(value = "/queryById")
public Result<YxSubjectEvaluation> queryById(@RequestParam(name="id",required=true) String id) {
YxSubjectEvaluation yxSubjectEvaluation = yxSubjectEvaluationService.getById(id);
if(yxSubjectEvaluation==null) {
return Result.error("未找到对应数据");
}
return Result.OK(yxSubjectEvaluation);
}
/**
* 导出excel
*
* @param request
* @param yxSubjectEvaluation
*/
@RequiresPermissions("yx:yx_subject_evaluation:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, YxSubjectEvaluation yxSubjectEvaluation) {
return super.exportXls(request, yxSubjectEvaluation, YxSubjectEvaluation.class, "第四轮学科评估");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("yx:yx_subject_evaluation:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
// 获取上传文件对象
MultipartFile file = entity.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
long start = System.currentTimeMillis();
List<YxSubjectEvaluation> list = ExcelImportUtil.importExcel(file.getInputStream(), YxSubjectEvaluation.class, params);
if (CollectionUtils.isNotEmpty(list)) {
//查出以前的数据判断是否重复
List<YxSubjectEvaluation> oldAllList = service.list();
Set<String> schoolNameMajorNameSet = oldAllList.stream().map(o -> o.getSchoolName() + "_" + o.getSubjectName()).collect(Collectors.toSet());
Map<String, YxSchool> schoolMap = yxSchoolService.mapsForSchoolName();
String schoolName = null;
String subjectName = null;
String key = null;
YxSchool yxSchool = null;
YxMajor yxMajor = null;
YxSubjectEvaluation yxSubjectEvaluation = null;
for (YxSubjectEvaluation l : list) {
schoolName = l.getSchoolName();
subjectName = l.getSubjectName();
key = schoolName + "_" + subjectName;
if (schoolNameMajorNameSet.contains(key)) {
return Result.error(String.format("文件导入失败:院校-%s-学科-%s-已存在!", l.getSchoolName(),subjectName));
}
schoolNameMajorNameSet.add(key);
if (StringUtils.isBlank(schoolName)) {
return Result.error("文件导入失败:有院校名称为空!");
}
schoolName = schoolName.replace(" ","").replace("(","").replace(")","");
yxSchool = schoolMap.get(schoolName);
if (yxSchool == null) {
yxSchool = schoolMap.get(schoolName.replace("学院","大学"));
if (yxSchool == null) {
return Result.error(String.format("文件导入失败:院校-%s-关联失败,未在数据库中找到该院校名称!",schoolName));
}
}
l.setSchoolId(yxSchool.getId());
}
service.saveBatch(list);
}
//update-begin-author:taoyan date:20190528 for:批量插入数据
log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
return Result.ok("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
String msg = e.getMessage();
log.error(msg, e);
if (msg != null && msg.indexOf("Duplicate entry") >= 0) {
return Result.error("文件导入失败:有重复数据!");
} else {
return Result.error("文件导入失败:" + e.getMessage());
}
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return Result.error("文件导入失败!");
}
}

View File

@ -0,0 +1,82 @@
package org.jeecg.modules.yx.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 问题反馈表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
@Data
@TableName("yx_feedback")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="yx_feedback对象", description="问题反馈表")
public class YxFeedback implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**类型(1.使用疑问,2.功能故障,3.数据错误,4.注销账号,5.投诉,6.提建议)*/
@Excel(name = "类型(1.使用疑问,2.功能故障,3.数据错误,4.注销账号,5.投诉,6.提建议)", width = 15)
@ApiModelProperty(value = "类型(1.使用疑问,2.功能故障,3.数据错误,4.注销账号,5.投诉,6.提建议)")
private java.lang.String type;
/**问题内容*/
@Excel(name = "问题内容", width = 15)
@ApiModelProperty(value = "问题内容")
private java.lang.String content;
/**问题附件*/
@Excel(name = "问题附件", width = 15)
@ApiModelProperty(value = "问题附件")
private java.lang.String attachment;
/**问题状态(1.待解决,2.已回复,3.已解决)*/
@Excel(name = "问题状态(1.待解决,2.已回复,3.已解决)", width = 15)
@ApiModelProperty(value = "问题状态(1.待解决,2.已回复,3.已解决)")
private java.lang.String status;
/**联系人*/
@Excel(name = "联系人", width = 15)
@ApiModelProperty(value = "联系人")
private java.lang.String contactPerson;
/**联系电话*/
@Excel(name = "联系电话", width = 15)
@ApiModelProperty(value = "联系电话")
private java.lang.String contactPersonPhone;
}

View File

@ -0,0 +1,90 @@
package org.jeecg.modules.yx.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 学校专业双万计划表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
@Data
@TableName("yx_school_double_first_plan")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="yx_school_double_first_plan对象", description="学校专业双万计划表")
public class YxSchoolDoubleFirstPlan implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**院校id*/
@Excel(name = "院校id", width = 15)
@ApiModelProperty(value = "院校id")
private java.lang.String schoolId;
/**院校名称*/
@Excel(name = "院校名称", width = 15)
@ApiModelProperty(value = "院校名称")
private java.lang.String schoolName;
/**专业编码*/
@Excel(name = "专业编码", width = 15)
@ApiModelProperty(value = "专业编码")
private java.lang.String majorCode;
/**专业名称*/
@Excel(name = "专业名称", width = 15)
@ApiModelProperty(value = "专业名称")
private java.lang.String majorName;
/**赛道*/
@Excel(name = "赛道", width = 15)
@ApiModelProperty(value = "赛道")
private java.lang.String track;
/**级别*/
@Excel(name = "级别", width = 15)
@ApiModelProperty(value = "级别")
private java.lang.String level;
/**年份*/
@Excel(name = "年份", width = 15)
@ApiModelProperty(value = "年份")
private java.lang.String year;
/**省份*/
@Excel(name = "省份", width = 15)
@ApiModelProperty(value = "省份")
private java.lang.String province;
}

View File

@ -0,0 +1,86 @@
package org.jeecg.modules.yx.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 第四轮学科评估
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
@Data
@TableName("yx_subject_evaluation")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="yx_subject_evaluation对象", description="第四轮学科评估")
public class YxSubjectEvaluation implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**院校id*/
@Excel(name = "院校id", width = 15)
@ApiModelProperty(value = "院校id")
private java.lang.String schoolId;
/**院校编码*/
@Excel(name = "院校编码", width = 15)
@ApiModelProperty(value = "院校编码")
private java.lang.String schoolCode;
/**院校名称*/
@Excel(name = "院校名称", width = 15)
@ApiModelProperty(value = "院校名称")
private java.lang.String schoolName;
/**学科代码*/
@Excel(name = "学科代码", width = 15)
@ApiModelProperty(value = "学科代码")
private java.lang.String subjectCode;
/**学科名称*/
@Excel(name = "学科名称", width = 15)
@ApiModelProperty(value = "学科名称")
private java.lang.String subjectName;
/**评估结果*/
@Excel(name = "评估结果", width = 15)
@ApiModelProperty(value = "评估结果")
private java.lang.String evaluationResult;
/**评估类型*/
@Excel(name = "评估类型", width = 15)
@ApiModelProperty(value = "评估类型")
private java.lang.String evaluationType;
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.yx.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.yx.entity.YxFeedback;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 问题反馈表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
public interface YxFeedbackMapper extends BaseMapper<YxFeedback> {
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.yx.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.yx.entity.YxSchoolDoubleFirstPlan;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 学校专业双万计划表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
public interface YxSchoolDoubleFirstPlanMapper extends BaseMapper<YxSchoolDoubleFirstPlan> {
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.yx.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.yx.entity.YxSubjectEvaluation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 第四轮学科评估
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
public interface YxSubjectEvaluationMapper extends BaseMapper<YxSubjectEvaluation> {
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.yx.mapper.YxFeedbackMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.yx.mapper.YxSchoolDoubleFirstPlanMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.yx.mapper.YxSubjectEvaluationMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.yx.service;
import org.jeecg.modules.yx.entity.YxFeedback;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 问题反馈表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
public interface IYxFeedbackService extends IService<YxFeedback> {
}

View File

@ -7,6 +7,7 @@ import org.jeecg.modules.yx.entity.YxMajor;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import java.util.Map;
/**
* @Description: 专业信息表
@ -16,6 +17,10 @@ import java.util.List;
*/
public interface IYxMajorService extends IService<YxMajor> {
Map<String,YxMajor> mapsForMajorName();
Map<String,YxMajor> mapsForMajorCode();
YxMajor findByMajorCode(String majorCode);
List<ArtMiniMajorDTO> miniMajorList(QueryRecommendMajorVO queryRecommendMajorVO);

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.yx.service;
import org.jeecg.modules.yx.entity.YxSchoolDoubleFirstPlan;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 学校专业双万计划表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
public interface IYxSchoolDoubleFirstPlanService extends IService<YxSchoolDoubleFirstPlan> {
}

View File

@ -10,6 +10,7 @@ import org.jeecg.modules.yx.entity.YxSchool;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import java.util.Map;
/**
* @Description: 学校信息表
@ -18,6 +19,7 @@ import java.util.List;
* @Version: V1.0
*/
public interface IYxSchoolService extends IService<YxSchool> {
Map<String,YxSchool> mapsForSchoolName();
YxSchoolDTO getBySchoolName(String schoolName);
List<YxSchool> oldList();

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.yx.service;
import org.jeecg.modules.yx.entity.YxSubjectEvaluation;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 第四轮学科评估
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
public interface IYxSubjectEvaluationService extends IService<YxSubjectEvaluation> {
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.yx.service.impl;
import org.jeecg.modules.yx.entity.YxFeedback;
import org.jeecg.modules.yx.mapper.YxFeedbackMapper;
import org.jeecg.modules.yx.service.IYxFeedbackService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 问题反馈表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
@Service
public class YxFeedbackServiceImpl extends ServiceImpl<YxFeedbackMapper, YxFeedback> implements IYxFeedbackService {
}

View File

@ -48,6 +48,29 @@ public class YxMajorServiceImpl extends ServiceImpl<YxMajorMapper, YxMajor> impl
private IYxHistoryMajorEnrollService yxHistoryMajorEnrollService;
@Resource
private RedisUtil redisUtil;
@Override
public Map<String, YxMajor> mapsForMajorName() {
LambdaQueryWrapper<YxMajor> yxMajorLambdaQueryWrapper = new LambdaQueryWrapper<>();
yxMajorLambdaQueryWrapper.select(YxMajor::getMajorCode,YxMajor::getMajorName);
Map<String,YxMajor> maps = new LinkedHashMap<>();
for (YxMajor yxMajor : list(yxMajorLambdaQueryWrapper)) {
maps.put(yxMajor.getMajorName(),yxMajor);
}
return maps;
}
@Override
public Map<String, YxMajor> mapsForMajorCode() {
LambdaQueryWrapper<YxMajor> yxMajorLambdaQueryWrapper = new LambdaQueryWrapper<>();
yxMajorLambdaQueryWrapper.select(YxMajor::getMajorCode,YxMajor::getMajorName);
Map<String,YxMajor> maps = new LinkedHashMap<>();
for (YxMajor yxMajor : list(yxMajorLambdaQueryWrapper)) {
maps.put(yxMajor.getMajorCode(),yxMajor);
}
return maps;
}
@Override
public YxMajor findByMajorCode(String majorCode) {
YxMajor yxMajor = new YxMajor();

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.yx.service.impl;
import org.jeecg.modules.yx.entity.YxSchoolDoubleFirstPlan;
import org.jeecg.modules.yx.mapper.YxSchoolDoubleFirstPlanMapper;
import org.jeecg.modules.yx.service.IYxSchoolDoubleFirstPlanService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 学校专业双万计划表
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
@Service
public class YxSchoolDoubleFirstPlanServiceImpl extends ServiceImpl<YxSchoolDoubleFirstPlanMapper, YxSchoolDoubleFirstPlan> implements IYxSchoolDoubleFirstPlanService {
}

View File

@ -253,6 +253,17 @@ public class YxSchoolServiceImpl extends ServiceImpl<YxSchoolMapper, YxSchool> i
}
@Override
public Map<String, YxSchool> mapsForSchoolName() {
LambdaQueryWrapper<YxSchool> yxSchoolLambdaQueryWrapper = new LambdaQueryWrapper<>();
yxSchoolLambdaQueryWrapper.select(YxSchool::getSchoolName,YxSchool::getId);
Map<String,YxSchool> maps = new LinkedHashMap<>();
for (YxSchool yxSchool : list(yxSchoolLambdaQueryWrapper)) {
maps.put(yxSchool.getSchoolName(),yxSchool);
}
return maps;
}
@Override
public YxSchoolDTO getBySchoolName(String schoolName) {
return baseMapper.getBySchoolName(schoolName);

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.yx.service.impl;
import org.jeecg.modules.yx.entity.YxSubjectEvaluation;
import org.jeecg.modules.yx.mapper.YxSubjectEvaluationMapper;
import org.jeecg.modules.yx.service.IYxSubjectEvaluationService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 第四轮学科评估
* @Author: jeecg-boot
* @Date: 2024-03-12
* @Version: V1.0
*/
@Service
public class YxSubjectEvaluationServiceImpl extends ServiceImpl<YxSubjectEvaluationMapper, YxSubjectEvaluation> implements IYxSubjectEvaluationService {
}