Commit f93abba3 by xuwenhao

8.7新增分班规则、班主任-查看

parent 811b18e9
......@@ -77,4 +77,13 @@ public class CurriCulaVariableController extends BaseController {
public AjaxResult selectClass(@RequestParam("grade") String grade){
return AjaxResult.success(curriculaVariableService.selectClass(grade));
}
/**
* 获取选课任务下拉框
* @return
*/
@GetMapping("/getGrade")
public AjaxResult getGrade(){
return AjaxResult.success(curriculaVariableService.getGrade());
}
}
\ No newline at end of file
......@@ -65,6 +65,17 @@ public class CurriculaStudentController extends BaseController {
}
/**
* 查看夏季二次分班列表
* @param curriculaStudentVo
* @return
*/
@GetMapping("/listXjEc")
public TableDataInfo listXjEc(CurriculaStudentVo curriculaStudentVo){
startPage();
return getDataTable(curriculaStudentService.selectCurriculaStudentListXjQm(curriculaStudentVo));
}
/**
* 查看艺体选课情况列表
* @param curriculaStudentVo
* @return
......@@ -83,22 +94,6 @@ public class CurriculaStudentController extends BaseController {
public void export(HttpServletResponse response,CurriculaStudentVo curriculaStudentVo)
{
List<CurriculaStudentVo> list = curriculaStudentService.selectCurriculaStudentList(curriculaStudentVo);
// list.forEach(curriculaStudentVo1 -> {
// if(null == curriculaStudentVo1.getSelectedMajor() || "".equals(curriculaStudentVo1.getSelectedMajor())){
//
// }else {
// String[] split = curriculaStudentVo1.getSelectedMajor().split(",");
// String selectedMajorName = "";
// for (int i=0;i<split.length;i++) {
// if (i == split.length - 1){
// selectedMajorName += sysDictDataService.selectDictLabel(split[i],"specialty") + ",";
// }else {
// selectedMajorName += sysDictDataService.selectDictLabel(split[i],"specialty");
// }
// }
// curriculaStudentVo1.setSelectedMajorName(selectedMajorName);
// }
// });
for (CurriculaStudentVo studentVo : list) {
if (null != studentVo.getSelectedMajor()){
if (studentVo.getSelectedMajor().length() > 0){
......@@ -167,6 +162,24 @@ public class CurriculaStudentController extends BaseController {
}
/**
* 导出夏季二次分班情况列表
*/
@Log(title = "夏季选课情况", businessType = BusinessType.EXPORT)
@PostMapping("/exportXjEc")
public void exportXjEc(HttpServletResponse response,CurriculaStudentVo curriculaStudentVo)
{
List<CurriculaStudentVo> curriculaStudentVoList = curriculaStudentService.selectCurriculaStudentListXjQm(curriculaStudentVo);
List<CurriculaStudentXjVo> list = new ArrayList<>();
curriculaStudentVoList.forEach(curriculaStudentVo1 -> {
CurriculaStudentXjVo curriculaStudentXjVo = new CurriculaStudentXjVo();
BeanUtils.copyProperties(curriculaStudentVo1,curriculaStudentXjVo);
list.add(curriculaStudentXjVo);
});
ExcelUtil<CurriculaStudentXjVo> util = new ExcelUtil<CurriculaStudentXjVo>(CurriculaStudentXjVo.class);
util.exportExcel(response, list, "选课情况数据");
}
/**
* 导出艺体选课情况列表
*/
@Log(title = "艺体选课情况", businessType = BusinessType.EXPORT)
......@@ -183,4 +196,43 @@ public class CurriculaStudentController extends BaseController {
ExcelUtil<CurriculaStudentYtVo> util = new ExcelUtil<CurriculaStudentYtVo>(CurriculaStudentYtVo.class);
util.exportExcel(response, list, "选课情况数据");
}
/**
* 查看选课情况列表(班主任)
* @param curriculaStudentVo
* @return
*/
@GetMapping("/listBzr")
public TableDataInfo listBzr(CurriculaStudentVo curriculaStudentVo){
startPage();
return getDataTable(curriculaStudentService.selectCurriculaStudentListBzr(curriculaStudentVo));
}
/**
* 导出选课情况列表(班主任)
*/
@Log(title = "选课情况", businessType = BusinessType.EXPORT)
@PostMapping("/exportBzr")
public void exportBzr(HttpServletResponse response,CurriculaStudentVo curriculaStudentVo)
{
List<CurriculaStudentVo> list = curriculaStudentService.selectCurriculaStudentListBzr(curriculaStudentVo);
for (CurriculaStudentVo studentVo : list) {
if (null != studentVo.getSelectedMajor()){
if (studentVo.getSelectedMajor().length() > 0){
String[] split = studentVo.getSelectedMajor().split(",");
String selectedMajorName = "";
for (int i=0;i<split.length;i++) {
if (i == split.length - 1){
selectedMajorName += sysDictDataService.selectDictLabel("specialty",split[i]);
}else {
selectedMajorName += sysDictDataService.selectDictLabel("specialty",split[i])+ ",";
}
}
studentVo.setSelectedMajorName(selectedMajorName);
}
}
}
ExcelUtil<CurriculaStudentVo> util = new ExcelUtil<CurriculaStudentVo>(CurriculaStudentVo.class);
util.exportExcel(response, list, "选课情况数据");
}
}
package yangtz.cs.liu.campus.controller.curricula;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.service.curricula.IDivisionClassesService;
import yangtz.cs.liu.campus.vo.curricula.SchoolDivisionClassesVo;
import java.util.List;
@RestController
@RequestMapping("/schoolDivision")
public class SchoolDivisionClassController extends BaseController {
@Autowired
private IDivisionClassesService divisionClassesService;
/**
* 首次分班规则
* @param list
* @return
*/
@PostMapping("/add")
public AjaxResult add(@RequestBody List<SchoolDivisionClassesVo> list){
return toAjax(divisionClassesService.insertDivisionClasses(list));
}
/**
* 获取每种课程选择人数
* @param
* @return
*/
@GetMapping("/getNumber")
public AjaxResult getNumber(@RequestParam("curriculaId") Long curriculaId){
return AjaxResult.success(divisionClassesService.getNumber(curriculaId));
}
/**
* 二次分班规则
* @param list
* @return
*/
@PostMapping("/addEc")
public AjaxResult addEc(@RequestBody List<SchoolDivisionClassesVo> list){
return toAjax(divisionClassesService.insertDivisionClassesEc(list));
}
}
package yangtz.cs.liu.campus.controller.curricula;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import yangtz.cs.liu.campus.domain.student.SchoolStudentScore;
import yangtz.cs.liu.campus.service.curricula.IStudentScoreService;
import yangtz.cs.liu.campus.vo.curricula.CurriculaStudentVo;
import yangtz.cs.liu.campus.vo.curricula.CurriculaStudentYtVo;
import yangtz.cs.liu.campus.vo.curricula.StudentScoreVo;
import yangtz.cs.liu.campus.vo.student.SchoolStudentScoreVo;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -36,6 +43,24 @@ public class StudentScoreController extends BaseController {
}
/**
* 导出成绩管理列表
*/
@Log(title = "成绩管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void exportYt(HttpServletResponse response, SchoolStudentScoreVo schoolStudentScoreVo)
{
List<SchoolStudentScoreVo> schoolStudentScoreVoList = studentScoreService.selectStudentScoreList(schoolStudentScoreVo);
List<StudentScoreVo> list = new ArrayList<>();
schoolStudentScoreVoList.forEach(schoolStudentScoreVo1 -> {
StudentScoreVo studentScoreVo = new StudentScoreVo();
BeanUtils.copyProperties(schoolStudentScoreVo1,studentScoreVo);
list.add(studentScoreVo);
});
ExcelUtil<StudentScoreVo> util = new ExcelUtil<StudentScoreVo>(StudentScoreVo.class);
util.exportExcel(response, list, "成绩管理数据");
}
/**
* 下载模板
*
* @return
......
package yangtz.cs.liu.campus.domain.curricula;
import com.core.domain.OurBaseEntity;
import lombok.Data;
@Data
public class SchoolDivisionClasses extends OurBaseEntity {
/** 选课id */
private Long curriculaId;
/** 课程 */
private String course;
/** 分班班级名称 */
private String divisionClassesName;
/** 分班规则(1平行分班,2分层分班) */
private String divisionClassesRule;
/** 分班次数(1首次分班,2二次分班) */
private String divisionClassesFrequency;
}
package yangtz.cs.liu.campus.domain.curricula;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
@Data
public class SchoolDivisionStudent {
/** 主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 分班班级主键id */
private Long divisionClassesId;
/** 学生主键id */
private Long studentId;
/** 删除状态 */
private String delFlag;
}
......@@ -25,6 +25,13 @@ public interface CurriculaStudentMapper extends BaseMapper<CurriculaStudent> {
List<CurriculaStudentVo> selectCurriculaStudentList(CurriculaStudentVo curriculaStudentVo);
/**
* 查看选课情况列表(班主任)
* @param curriculaStudentVo
* @return
*/
List<CurriculaStudentVo> selectCurriculaStudentListBzr(CurriculaStudentVo curriculaStudentVo);
/**
* 查看春季选课情况列表
* @param curriculaStudentVo
* @return
......@@ -39,6 +46,13 @@ public interface CurriculaStudentMapper extends BaseMapper<CurriculaStudent> {
List<CurriculaStudentVo> selectCurriculaStudentListXj(CurriculaStudentVo curriculaStudentVo);
/**
* 查看夏季二次分班情况列表
* @param curriculaStudentVo
* @return
*/
List<CurriculaStudentVo> selectCurriculaStudentListXjEc(CurriculaStudentVo curriculaStudentVo);
/**
* 查看艺体选课情况列表
* @param curriculaStudentVo
* @return
......
......@@ -29,4 +29,10 @@ public interface CurriculaVariableMapper extends BaseMapper<CurriculaVariable>
* @return
*/
List<Map<String,String>> selectClass(@Param("grade") String grade);
/**
* 获取选课任务下拉框
* @return
*/
List<Map<String, String>> getGrade();
}
package yangtz.cs.liu.campus.mapper.curricula;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import yangtz.cs.liu.campus.domain.curricula.SchoolDivisionClasses;
import java.util.List;
import java.util.Map;
public interface DivisionClassesMapper extends BaseMapper<SchoolDivisionClasses> {
/**
* 获取选择某种课程的总人数
* @param curriculaId
* @return
*/
List<Map<String, String>> getNumber(@Param("curriculaId") Long curriculaId);
}
package yangtz.cs.liu.campus.mapper.curricula;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.curricula.SchoolDivisionStudent;
public interface DivisionStudentMapper extends BaseMapper<SchoolDivisionStudent> {
}
......@@ -36,4 +36,18 @@ public interface ICurriculaStudentService extends IService<CurriculaStudent> {
*/
List<CurriculaStudentVo> selectCurriculaStudentListYt(CurriculaStudentVo curriculaStudentVo);
/**
* 查看夏季选课情况列表
* @param curriculaStudentVo
* @return
*/
List<CurriculaStudentVo> selectCurriculaStudentListXjQm(CurriculaStudentVo curriculaStudentVo);
/**
* 查看选课情况列表(班主任)
* @param curriculaStudentVo
* @return
*/
List<CurriculaStudentVo> selectCurriculaStudentListBzr(CurriculaStudentVo curriculaStudentVo);
}
package yangtz.cs.liu.campus.service.curricula;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import yangtz.cs.liu.campus.domain.curricula.CurriculaVariable;
import yangtz.cs.liu.campus.vo.curricula.CurriculaVariableVo;
......@@ -49,4 +48,10 @@ public interface ICurriculaVariableService extends IService<CurriculaVariable> {
* @return
*/
int updateCurriculaVariable(CurriculaVariable curriculaVariable);
/**
* 获取选课任务下拉框
* @return
*/
List<Map<String,String>> getGrade();
}
package yangtz.cs.liu.campus.service.curricula;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.curricula.SchoolDivisionClasses;
import yangtz.cs.liu.campus.vo.curricula.SchoolDivisionClassesVo;
import java.util.List;
import java.util.Map;
public interface IDivisionClassesService extends IService<SchoolDivisionClasses> {
/**
* 首次分班规则
* @param list
* @return
*/
int insertDivisionClasses(List<SchoolDivisionClassesVo> list);
/**
* 获取每种课程选择人数
* @return
*/
List<Map<String,String>> getNumber(Long curriculaId);
/**
* 二次分班规则
* @param list
* @return
*/
int insertDivisionClassesEc(List<SchoolDivisionClassesVo> list);
}
......@@ -43,7 +43,7 @@ public class CurriculaStudentServiceImpl extends ServiceImpl<CurriculaStudentMap
}
/**
* 查看夏季选课情况列表
* 查看夏季选课情况列表(一次、二次、三次)
* @param curriculaStudentVo
* @return
*/
......@@ -173,4 +173,134 @@ public class CurriculaStudentServiceImpl extends ServiceImpl<CurriculaStudentMap
List<CurriculaStudentVo> curriculaStudentVoList = curriculaStudentMapper.selectCurriculaStudentListYt(curriculaStudentVo);
return curriculaStudentVoList;
}
/**
* 查看夏季选课情况(期末)
* @param curriculaStudentVo
* @return
*/
@Override
public List<CurriculaStudentVo> selectCurriculaStudentListXjQm(CurriculaStudentVo curriculaStudentVo) {
List<CurriculaStudentVo> curriculaStudentVoList = curriculaStudentMapper.selectCurriculaStudentListXjEc(curriculaStudentVo);
curriculaStudentVoList.forEach(curriculaStudentVo1 -> {
//查询学生成绩
LambdaQueryWrapper<SchoolStudentScore> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolStudentScore::getStudentId,curriculaStudentVo1.getStudentId())
.eq(SchoolStudentScore::getExamType,"4");
SchoolStudentScore schoolStudentScore = studentScoreMapper.selectOne(wrapper);
if (StringUtils.isNotNull(schoolStudentScore)){
//物理+政治+化学
if (curriculaStudentVo1.getSelectedCourse().equals("1")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getPolitics() + schoolStudentScore.getChemistry();
curriculaStudentVo1.setCourseScore(courseScore);
}
//物理+政治+生物
if (curriculaStudentVo1.getSelectedCourse().equals("2")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getPolitics() + schoolStudentScore.getBiology();
curriculaStudentVo1.setCourseScore(courseScore);
}
//物理+政治+地理
if (curriculaStudentVo1.getSelectedCourse().equals("3")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getPolitics() + schoolStudentScore.getGeography();
curriculaStudentVo1.setCourseScore(courseScore);
}
//物理+政治+历史
if (curriculaStudentVo1.getSelectedCourse().equals("4")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getPolitics() + schoolStudentScore.getHistory();
curriculaStudentVo1.setCourseScore(courseScore);
}
//物理+历史+化学
if (curriculaStudentVo1.getSelectedCourse().equals("5")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getHistory() + schoolStudentScore.getChemistry();
curriculaStudentVo1.setCourseScore(courseScore);
}
//物理+历史+生物
if (curriculaStudentVo1.getSelectedCourse().equals("6")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getHistory() + schoolStudentScore.getBiology();
curriculaStudentVo1.setCourseScore(courseScore);
}
//物理+地理+化学
if (curriculaStudentVo1.getSelectedCourse().equals("7")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getGeography() + schoolStudentScore.getChemistry();
curriculaStudentVo1.setCourseScore(courseScore);
}
//物理+地理+生物
if (curriculaStudentVo1.getSelectedCourse().equals("8")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getGeography() + schoolStudentScore.getBiology();
curriculaStudentVo1.setCourseScore(courseScore);
}
//物理+化学+生物
if (curriculaStudentVo1.getSelectedCourse().equals("9")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getChemistry() + schoolStudentScore.getBiology();
curriculaStudentVo1.setCourseScore(courseScore);
}
//物理+历史+地理
if (curriculaStudentVo1.getSelectedCourse().equals("10")){
double courseScore = schoolStudentScore.getPhysics() + schoolStudentScore.getHistory() + schoolStudentScore.getGeography();
curriculaStudentVo1.setCourseScore(courseScore);
}
//化学+政治+地理
if (curriculaStudentVo1.getSelectedCourse().equals("11")){
double courseScore = schoolStudentScore.getChemistry() + schoolStudentScore.getPolitics() + schoolStudentScore.getGeography();
curriculaStudentVo1.setCourseScore(courseScore);
}
//化学+政治+历史
if (curriculaStudentVo1.getSelectedCourse().equals("12")){
double courseScore = schoolStudentScore.getChemistry() + schoolStudentScore.getPolitics() + schoolStudentScore.getHistory();
curriculaStudentVo1.setCourseScore(courseScore);
}
//化学+政治+生物
if (curriculaStudentVo1.getSelectedCourse().equals("13")){
double courseScore = schoolStudentScore.getChemistry() + schoolStudentScore.getPolitics() + schoolStudentScore.getBiology();
curriculaStudentVo1.setCourseScore(courseScore);
}
//化学+历史+地理
if (curriculaStudentVo1.getSelectedCourse().equals("14")){
double courseScore = schoolStudentScore.getChemistry() + schoolStudentScore.getHistory() + schoolStudentScore.getGeography();
curriculaStudentVo1.setCourseScore(courseScore);
}
//化学+历史+生物
if (curriculaStudentVo1.getSelectedCourse().equals("15")){
double courseScore = schoolStudentScore.getChemistry() + schoolStudentScore.getHistory() + schoolStudentScore.getBiology();
curriculaStudentVo1.setCourseScore(courseScore);
}
//化学+地理+生物
if (curriculaStudentVo1.getSelectedCourse().equals("16")){
double courseScore = schoolStudentScore.getChemistry() + schoolStudentScore.getGeography() + schoolStudentScore.getBiology();
curriculaStudentVo1.setCourseScore(courseScore);
}
//生物+政治+地理
if (curriculaStudentVo1.getSelectedCourse().equals("17")){
double courseScore = schoolStudentScore.getBiology() + schoolStudentScore.getPolitics() + schoolStudentScore.getGeography();
curriculaStudentVo1.setCourseScore(courseScore);
}
//生物+历史+地理
if (curriculaStudentVo1.getSelectedCourse().equals("18")){
double courseScore = schoolStudentScore.getBiology() + schoolStudentScore.getHistory() + schoolStudentScore.getGeography();
curriculaStudentVo1.setCourseScore(courseScore);
}
//生物+政治+历史
if (curriculaStudentVo1.getSelectedCourse().equals("19")){
double courseScore = schoolStudentScore.getBiology() + schoolStudentScore.getPolitics() + schoolStudentScore.getHistory();
curriculaStudentVo1.setCourseScore(courseScore);
}
//政治+历史+地理
if (curriculaStudentVo1.getSelectedCourse().equals("20")){
double courseScore = schoolStudentScore.getPolitics() + schoolStudentScore.getHistory() + schoolStudentScore.getGeography();
curriculaStudentVo1.setCourseScore(courseScore);
}
}
});
return curriculaStudentVoList;
}
/**
* 查看选课情况列表(班主任)
* @param curriculaStudentVo
* @return
*/
@Override
public List<CurriculaStudentVo> selectCurriculaStudentListBzr(CurriculaStudentVo curriculaStudentVo) {
return curriculaStudentMapper.selectCurriculaStudentListBzr(curriculaStudentVo);
}
}
......@@ -16,7 +16,6 @@ import yangtz.cs.liu.campus.mapper.curricula.CurriculaStudentMapper;
import yangtz.cs.liu.campus.mapper.curricula.CurriculaVariableMapper;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper;
import yangtz.cs.liu.campus.service.curricula.ICurriculaVariableService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.vo.curricula.CurriculaVariableVo;
import static com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotBlank;
......@@ -161,4 +160,13 @@ public class CurriculaVariableServiceImpl extends ServiceImpl<CurriculaVariableM
}
return curriculaVariableMapper.updateById(curriculaVariable);
}
/**
* 获取选课任务下拉框
* @return
*/
@Override
public List<Map<String, String>> getGrade() {
return curriculaVariableMapper.getGrade();
}
}
package yangtz.cs.liu.campus.vo.curricula;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
......@@ -16,6 +14,8 @@ public class CurriculaStudentVo {
private Long studentId;
/** 选课主键id */
private Long curriculaId;
/** 班主任id */
private Long bzrId;
/** 班级主键id */
private Long classId;
/** 班级 */
......
package yangtz.cs.liu.campus.vo.curricula;
import com.core.domain.OurBaseEntity;
import lombok.Data;
@Data
public class SchoolDivisionClassesVo extends OurBaseEntity {
/** 选课id */
private Long curriculaId;
/** 课程 */
private String course;
/** 课程名称 */
private String courseName;
/** 每种课程总人数 */
private Integer coursePeopleNumber;
/** 班级数量 */
private Integer classesNumber;
/** 每班人数 */
private Integer peopleNumber;
/** 分班班级名称 */
private String divisionClassesName;
/** 分班规则(1平行分班,2分层分班) */
private String divisionClassesRule;
/** 分班次数(1首次分班,2二次分班) */
private String divisionClassesFrequency;
}
package yangtz.cs.liu.campus.vo.curricula;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
@Data
public class StudentScoreVo {
private Long id;
/** 学生主键id */
private Long studentId;
/** 选课主键id */
private Long curriculaId;
/** 班级主键id */
private Long classId;
/** 学生姓名 */
@Excel(name = "学生姓名")
private String studentName;
/** 学号 */
@Excel(name = "学号")
private String studentNumber;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 班级 */
@Excel(name = "班级")
private String className;
/** 考试类型 */
@Excel(name = "考试类型",combo = {"一次","二次","三次","期末"},readConverterExp = "1=一次,2=二次,3=三次,4=期末")
private String examType;
/** 总成绩 */
@Excel(name = "总成绩")
private double totalScore;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer ranking;
/** 班级排名 */
private Integer classRanking;
/** 语文 */
@Excel(name = "语文")
private double language;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer ywRanking;
/** 班级排名 */
private Integer ywClassRanking;
/** 数学 */
@Excel(name = "数学")
private double math;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer sxRanking;
/** 班级排名 */
private Integer sxClassRanking;
/** 英语 */
@Excel(name = "英语")
private double english;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer yyRanking;
/** 班级排名 */
private Integer yyClassRanking;
/** 政治 */
@Excel(name = "政治")
private double politics;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer zzRanking;
/** 班级排名 */
private Integer zzClassRanking;
/** 地理 */
@Excel(name = "地理")
private double geography;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer dlRanking;
/** 班级排名 */
private Integer dlClassRanking;
/** 历史 */
@Excel(name = "历史")
private double history;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer lsRanking;
/** 班级排名 */
private Integer lsClassRanking;
/** 物理 */
@Excel(name = "物理")
private double physics;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer wlRanking;
/** 班级排名 */
private Integer wlClassRanking;
/** 化学 */
@Excel(name = "化学")
private double chemistry;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer hxRanking;
/** 班级排名 */
private Integer hxClassRanking;
/** 生物 */
@Excel(name = "生物")
private double biology;
/** 年级排名 */
@Excel(name = "年级排名")
private Integer swRanking;
/** 班级排名 */
private Integer swClassRanking;
}
......@@ -7,6 +7,7 @@
<result property="id" column="id" />
<result property="studentId" column="student_id" />
<result property="curriculaId" column="curricula_id" />
<result property="classId" column="class_id" />
<result property="className" column="class_name" />
<result property="studentName" column="student_name" />
<result property="idCard" column="id_card" />
......@@ -22,7 +23,7 @@
</resultMap>
<select id="countNum" parameterType="Long" resultType="Map">
SELECT COUNT(id) as zrs,(SELECT COUNT(id) FROM curricula_student WHERE curricula_id = #{curriculaId} and curricula_state = '2' AND del_flag = '0') as yxrs FROM curricula_student WHERE curricula_id = #{curriculaId} AND del_flag = '0'
SELECT COUNT(id) as zrs, (SELECT COUNT(id) FROM curricula_student WHERE curricula_id = #{curriculaId} and curricula_state = '2' AND del_flag = '0') as yxrs FROM curricula_student WHERE curricula_id = #{curriculaId} AND del_flag = '0'
</select>
<!--选课情况列表-->
......@@ -85,7 +86,6 @@
<if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if>
</select>
<!--夏季选课情况列表-->
<select id="selectCurriculaStudentListXj" parameterType="CurriculaStudentVo" resultMap="CurriculaStudentVoResult">
SELECT
......@@ -108,7 +108,7 @@
LEFT JOIN school_student xs ON xk.student_id = xs.id
LEFT JOIN school_class bj ON xs.class_id = bj.id
LEFT JOIN school_division_student ds ON xk.student_id = ds.student_id
LEFT JOIN school_division_classes dc ON ds.division_classes_id = dc.id
LEFT JOIN school_division_classes dc ON ds.division_classes_id = dc.id and dc.division_classes_frequency = '1'
WHERE
xk.curricula_id = #{curriculaId} and xk.course_type = '2' and xk.del_flag = '0'
<if test="classId != null">and xs.class_id = #{classId}</if>
......@@ -117,6 +117,37 @@
ORDER BY xk.selected_course ASC
</select>
<!--夏季二次分班情况列表-->
<select id="selectCurriculaStudentListXjEc" parameterType="CurriculaStudentVo" resultMap="CurriculaStudentVoResult">
SELECT
xk.id,
xk.student_id,
xk.curricula_id,
bj.class_name,
xs.student_name,
xs.id_card,
xs.school_no AS student_number,
xk.course_type,
xk.curricula_time,
xk.curricula_state,
xk.selected_course,
xk.selected_major,
xk.selected_subject,
dc.division_classes_name
FROM
curricula_student xk
LEFT JOIN school_student xs ON xk.student_id = xs.id
LEFT JOIN school_class bj ON xs.class_id = bj.id
LEFT JOIN school_division_student ds ON xk.student_id = ds.student_id
LEFT JOIN school_division_classes dc ON ds.division_classes_id = dc.id and dc.division_classes_frequency = '2'
WHERE
xk.curricula_id = #{curriculaId} and xk.course_type = '2' and xk.del_flag = '0'
<if test="classId != null">and xs.class_id = #{classId}</if>
<if test="selectedCourse != null and selectedCourse != ''">and xk.selected_course = #{selectedCourse}</if>
<if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if>
ORDER BY xk.selected_course ASC
</select>
<!--艺体选课情况列表-->
<select id="selectCurriculaStudentListYt" parameterType="CurriculaStudentVo" resultMap="CurriculaStudentVoResult">
SELECT
......@@ -148,4 +179,36 @@
ORDER BY xk.selected_subject ASC
</select>
<!--查看选课情况列表(班主任)-->
<select id="selectCurriculaStudentListBzr" parameterType="CurriculaStudentVo" resultMap="CurriculaStudentVoResult">
SELECT
xk.id,
xk.student_id,
xk.curricula_id,
xs.class_id,
bj.class_name,
xs.student_name,
xs.id_card,
xs.school_no AS student_number,
xk.course_type,
xk.curricula_time,
xk.curricula_state,
xk.selected_course,
xk.selected_major,
xk.selected_subject,
dc.division_classes_name
FROM
curricula_student xk
LEFT JOIN school_student xs ON xk.student_id = xs.id
LEFT JOIN school_class bj ON xs.class_id = bj.id
LEFT JOIN school_division_student ds ON xk.student_id = ds.student_id
LEFT JOIN school_division_classes dc ON ds.division_classes_id = dc.id
WHERE
xk.curricula_id = #{curriculaId} AND xk.del_flag = '0' AND xs.class_id IN (SELECT class_id FROM school_class_headmaster WHERE teacher_id = #{teacherId})
<if test="courseType != null and courseType != ''">and xk.course_type = #{courseType}</if>
<if test="classId != null and classId != ''">and xs.class_id = #{classId}</if>
<if test="curriculaState != null and curriculaState != ''">and xk.curricula_state = #{curriculaState}</if>
<if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if>
</select>
</mapper>
\ No newline at end of file
......@@ -63,4 +63,15 @@
<select id="selectClass" parameterType="String" resultType="Map">
SELECT id as classId,class_name as className FROM school_class WHERE grade_id = (SELECT id FROM school_grade where grade_year = #{grade} AND del_flag = '0')
</select>
<select id="getGrade" resultType="Map">
select
cv.id as curriculaId,
cv.task_name as curriculaName,
cv.grade as grade,
(SELECT COUNT(id) as yxrs FROM curricula_student WHERE curricula_id = cv.id and curricula_state = '2' AND del_flag = '0') as yxrs,
(SELECT COUNT(id) as zrs FROM curricula_student WHERE curricula_id = cv.id AND del_flag = '0') as zrs
from curricula_variable cv
where cv.del_flag = '0'
</select>
</mapper>
\ No newline at end of file
<?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="yangtz.cs.liu.campus.mapper.curricula.DivisionClassesMapper">
<select id="getNumber" parameterType="Long" resultType="Map">
SELECT cs.selected_course as selectedCourse, zd.dict_label as selectedCourseName, COUNT(cs.selected_course) as peopleNumber
FROM curricula_student cs
LEFT JOIN sys_dict_data zd ON cs.selected_course = zd.dict_value AND zd.dict_type = "section_type"
WHERE zd.dict_label IS NOT NULL AND cs.course_type = '2' AND cs.del_flag = '0' AND cs.curricula_id = #{curriculaId}
GROUP BY cs.selected_course
</select>
</mapper>
\ No newline at end of file
<?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="yangtz.cs.liu.campus.mapper.curricula.DivisionStudentMapper">
</mapper>
\ No newline at end of file
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