综合导入逻辑修改
This commit is contained in:
@@ -3,21 +3,22 @@ package com.srs.comprehensive.mapper;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.srs.comprehensive.domain.SrsCeScore;
|
import com.srs.comprehensive.domain.SrsCeScore;
|
||||||
|
import com.srs.comprehensive.domain.SrsStudent;
|
||||||
import com.srs.comprehensive.domain.Vo.SrsCeScoreStudentStuYear;
|
import com.srs.comprehensive.domain.Vo.SrsCeScoreStudentStuYear;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 综合评价Mapper接口
|
* 综合评价Mapper接口
|
||||||
*
|
*
|
||||||
* @author srs
|
* @author srs
|
||||||
* @date 2023-06-28
|
* @date 2023-06-28
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SrsCeScoreMapper
|
public interface SrsCeScoreMapper {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 查询综合评价
|
* 查询综合评价
|
||||||
*
|
*
|
||||||
* @param id 综合评价主键
|
* @param id 综合评价主键
|
||||||
* @return 综合评价
|
* @return 综合评价
|
||||||
*/
|
*/
|
||||||
@@ -25,16 +26,17 @@ public interface SrsCeScoreMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询综合评价列表
|
* 查询综合评价列表
|
||||||
*
|
*
|
||||||
* @param srsCeScore 综合评价
|
* @param srsCeScore 综合评价
|
||||||
* @return 综合评价集合
|
* @return 综合评价集合
|
||||||
*/
|
*/
|
||||||
public List<SrsCeScore> selectSrsCeScoreList(SrsCeScore srsCeScore);
|
public List<SrsCeScore> selectSrsCeScoreList(SrsCeScore srsCeScore);
|
||||||
|
|
||||||
public List<SrsCeScore> selectSrsCeScoreListS(SrsCeScore srsCeScore);
|
public List<SrsCeScore> selectSrsCeScoreListS(SrsCeScore srsCeScore);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增综合评价
|
* 新增综合评价
|
||||||
*
|
*
|
||||||
* @param srsCeScore 综合评价
|
* @param srsCeScore 综合评价
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -42,15 +44,17 @@ public interface SrsCeScoreMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改综合评价
|
* 修改综合评价
|
||||||
*
|
*
|
||||||
* @param srsCeScore 综合评价
|
* @param srsCeScore 综合评价
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateSrsCeScore(SrsCeScore srsCeScore);
|
public int updateSrsCeScore(SrsCeScore srsCeScore);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除综合评价
|
* 删除综合评价
|
||||||
*
|
*
|
||||||
* @param id 综合评价主键
|
* @param id 综合评价主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -58,14 +62,15 @@ public interface SrsCeScoreMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除综合评价
|
* 批量删除综合评价
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据主键集合
|
* @param ids 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSrsCeScoreByIds(Long[] ids);
|
public int deleteSrsCeScoreByIds(Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*综合评价连表查询
|
* 综合评价连表查询
|
||||||
|
*
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<SrsCeScoreStudentStuYear> SrsCeScoreStudentStuYear(SrsCeScore srsCeScore);
|
List<SrsCeScoreStudentStuYear> SrsCeScoreStudentStuYear(SrsCeScore srsCeScore);
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ public interface SrsStudentMapper extends EasyBaseMapper<SrsStudent>
|
|||||||
|
|
||||||
public List<StuCount> countParkStu();
|
public List<StuCount> countParkStu();
|
||||||
|
|
||||||
|
// 根据多个班级ID查询学生
|
||||||
|
List<SrsStudent> selectSrsStudentByClassIds(@Param("classIds") List<Long> classIds);
|
||||||
public List<StuCount> countLakeGradeStu();
|
public List<StuCount> countLakeGradeStu();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import static com.srs.common.utils.SecurityUtils.getUsername;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 综合评价Service业务层处理
|
* 综合评价Service业务层处理
|
||||||
*
|
*
|
||||||
* @author srs
|
* @author srs
|
||||||
* @date 2023-06-28
|
* @date 2023-06-28
|
||||||
*/
|
*/
|
||||||
@@ -54,7 +54,7 @@ public class SrsCeScoreServiceImpl implements ISrsCeScoreService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询综合评价
|
* 查询综合评价
|
||||||
*
|
*
|
||||||
* @param id 综合评价主键
|
* @param id 综合评价主键
|
||||||
* @return 综合评价
|
* @return 综合评价
|
||||||
*/
|
*/
|
||||||
@@ -66,7 +66,7 @@ public class SrsCeScoreServiceImpl implements ISrsCeScoreService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询综合评价列表
|
* 查询综合评价列表
|
||||||
*
|
*
|
||||||
* @param srsCeScore 综合评价
|
* @param srsCeScore 综合评价
|
||||||
* @return 综合评价
|
* @return 综合评价
|
||||||
*/
|
*/
|
||||||
@@ -78,7 +78,7 @@ public class SrsCeScoreServiceImpl implements ISrsCeScoreService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增综合评价
|
* 新增综合评价
|
||||||
*
|
*
|
||||||
* @param srsCeScore 综合评价
|
* @param srsCeScore 综合评价
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -91,7 +91,7 @@ public class SrsCeScoreServiceImpl implements ISrsCeScoreService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改综合评价
|
* 修改综合评价
|
||||||
*
|
*
|
||||||
* @param srsCeScore 综合评价
|
* @param srsCeScore 综合评价
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -104,7 +104,7 @@ public class SrsCeScoreServiceImpl implements ISrsCeScoreService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除综合评价
|
* 批量删除综合评价
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的综合评价主键
|
* @param ids 需要删除的综合评价主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -116,7 +116,7 @@ public class SrsCeScoreServiceImpl implements ISrsCeScoreService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除综合评价信息
|
* 删除综合评价信息
|
||||||
*
|
*
|
||||||
* @param id 综合评价主键
|
* @param id 综合评价主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -147,76 +147,99 @@ public class SrsCeScoreServiceImpl implements ISrsCeScoreService
|
|||||||
student.setStuNo(student.getStuNo().trim());
|
student.setStuNo(student.getStuNo().trim());
|
||||||
return student;
|
return student;
|
||||||
})
|
})
|
||||||
.collect(Collectors.toList());//清空前后空格
|
.collect(Collectors.toList());
|
||||||
int number=0;
|
|
||||||
StringBuilder error= new StringBuilder();
|
int number = 0;
|
||||||
//查询辅导员
|
StringBuilder error = new StringBuilder();
|
||||||
|
|
||||||
|
// 查询辅导员
|
||||||
CphTeacher cphTeacher = cphTeacherMapper.searchTeacherByTno(getUsername());
|
CphTeacher cphTeacher = cphTeacherMapper.searchTeacherByTno(getUsername());
|
||||||
SysUser sysUser = sysUserMapper.selectUserByUserName(getUsername());
|
SysUser sysUser = sysUserMapper.selectUserByUserName(getUsername());
|
||||||
|
|
||||||
if (!Objects.equals(sysUser.getUserName(), "admin")) {
|
if (!Objects.equals(sysUser.getUserName(), "admin")) {
|
||||||
List<SrsStudent> srsStudentList = new ArrayList<>();//辅导员所带的学生
|
List<SrsStudent> srsStudentList = new ArrayList<>();
|
||||||
//查询班级
|
// 查询班级
|
||||||
SrsClass srsClass = new SrsClass();
|
SrsClass srsClass = new SrsClass();
|
||||||
srsClass.setTeacherId(cphTeacher.getTeacherId());
|
srsClass.setTeacherId(cphTeacher.getTeacherId());
|
||||||
List<SrsClass> srsClasses = srsClassMapper.selectSrsClassListTeacherId(srsClass);//班级
|
List<SrsClass> srsClasses = srsClassMapper.selectSrsClassListTeacherId(srsClass);
|
||||||
//查询辅导员所带的班级学生
|
|
||||||
for (SrsClass scs : srsClasses) {
|
// 查询辅导员所带的班级学生 - 优化为批量查询
|
||||||
SrsStudent srsStudent = new SrsStudent();
|
if (!srsClasses.isEmpty()) {
|
||||||
srsStudent.setClassId(scs.getClassId());
|
List<Long> classIds = srsClasses.stream()
|
||||||
// srsStudent.setStatus("01");
|
.map(SrsClass::getClassId)
|
||||||
//根据班级id查询学生
|
.collect(Collectors.toList());
|
||||||
List<SrsStudent> srsStudentList1 = srsStudentMapper.selectSrsStudentList(srsStudent);
|
srsStudentList = srsStudentMapper.selectSrsStudentByClassIds(classIds);
|
||||||
srsStudentList.addAll(srsStudentList1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 验证学生是否属于当前辅导员
|
||||||
for (SrsCeScoreStudent scss : srsCeScoreStudents) {
|
for (SrsCeScoreStudent scss : srsCeScoreStudents) {
|
||||||
if (scss.getCeScore().compareTo(new BigDecimal(100))>0){
|
if (scss.getCeScore().compareTo(new BigDecimal(100)) > 0) {
|
||||||
scss.setCeScore(new BigDecimal(100));
|
scss.setCeScore(new BigDecimal(100));
|
||||||
}
|
}
|
||||||
int i = 0;
|
|
||||||
for (SrsStudent ssd : srsStudentList) {
|
boolean isValidStudent = srsStudentList.stream()
|
||||||
if (Objects.equals(scss.getStuNo(), ssd.getStuNo())) {
|
.anyMatch(student -> Objects.equals(scss.getStuNo(), student.getStuNo()));
|
||||||
i = 1;
|
|
||||||
break;
|
if (!isValidStudent) {
|
||||||
}
|
|
||||||
}
|
|
||||||
if (i == 0) {
|
|
||||||
error.append(scss.getStuNo()).append(",");
|
error.append(scss.getStuNo()).append(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!error.toString().equals("")) {
|
if (!error.toString().equals("")) {
|
||||||
throw new RuntimeException("表中的学号:" + error + "不是所带的学生,请删除后再尝试导入!");
|
throw new RuntimeException("表中的学号:" + error + "不是所带的学生,请删除后再尝试导入!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//标记为回滚状态
|
|
||||||
for (SrsCeScoreStudent i:srsCeScoreStudents){
|
// 分批处理数据,减少事务持有时间
|
||||||
//综合评价成绩
|
int batchSize = 50; // 批处理大小
|
||||||
SrsCeScore srsCeScore1 = new SrsCeScore();//综合评价
|
for (int i = 0; i < srsCeScoreStudents.size(); i += batchSize) {
|
||||||
SrsStudent srsStudent = srsStudentMapper.selectSrsStudentByStuNo(i.getStuNo());//查询学生信息
|
int endIndex = Math.min(i + batchSize, srsCeScoreStudents.size());
|
||||||
srsCeScore1.setStuId(srsStudent.getStuId());//学生id
|
List<SrsCeScoreStudent> batch = srsCeScoreStudents.subList(i, endIndex);
|
||||||
srsCeScore1.setStuYearId(i.getStuYearId());//学年id
|
|
||||||
List<SrsCeScore> srsCeScores = srsCeScoreMapper.selectSrsCeScoreListS(srsCeScore1);//查询综合评价表重复
|
// 在新的事务中处理每批数据
|
||||||
srsCeScore1.setCeScore(i.getCeScore());
|
number += processBatch(batch);
|
||||||
srsCeScore1.setStuNo(i.getStuNo());
|
|
||||||
if (srsCeScores.size()==0){//判断综合评价表有没有重复的值
|
|
||||||
srsCeScore1.setCreateBy(getUsername());
|
|
||||||
srsCeScore1.setCreateTime(DateUtils.getNowDate());
|
|
||||||
srsCeScoreMapper.insertSrsCeScore(srsCeScore1);//没有则添加
|
|
||||||
//ifSrsAdd(srsAddRecord,srsAddRecords);
|
|
||||||
number++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
srsCeScore1.setUpdateBy(getUsername());
|
|
||||||
srsCeScore1.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
srsCeScore1.setId(srsCeScores.get(0).getId());
|
|
||||||
srsCeScoreMapper.updateSrsCeScore(srsCeScore1);//有则修改
|
|
||||||
//ifSrsAdd(srsAddRecord,srsAddRecords);
|
|
||||||
number++;
|
|
||||||
}
|
}
|
||||||
TransactionAspectSupport.currentTransactionStatus().flush();//手动提交事务
|
|
||||||
//cphTotalScoreMapper.testFor(id);
|
// 处理完成后调用测试方法
|
||||||
cphTestForService.testMethod(Math.toIntExact(srsCeScoreStudents.get(0).getStuYearId()));
|
// if (!srsCeScoreStudents.isEmpty()) {
|
||||||
|
// cphTestForService.testMethod(Math.toIntExact(srsCeScoreStudents.get(0).getStuYearId()));
|
||||||
|
// }
|
||||||
|
|
||||||
return number;
|
return number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 新增批处理方法
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int processBatch(List<SrsCeScoreStudent> batch) {
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
for (SrsCeScoreStudent i : batch) {
|
||||||
|
// 综合评价成绩
|
||||||
|
SrsCeScore srsCeScore1 = new SrsCeScore();
|
||||||
|
SrsStudent srsStudent = srsStudentMapper.selectSrsStudentByStuNo(i.getStuNo());
|
||||||
|
srsCeScore1.setStuId(srsStudent.getStuId());
|
||||||
|
srsCeScore1.setStuYearId(i.getStuYearId());
|
||||||
|
|
||||||
|
List<SrsCeScore> srsCeScores = srsCeScoreMapper.selectSrsCeScoreListS(srsCeScore1);
|
||||||
|
srsCeScore1.setCeScore(i.getCeScore());
|
||||||
|
srsCeScore1.setStuNo(i.getStuNo());
|
||||||
|
|
||||||
|
if (srsCeScores.isEmpty()) {
|
||||||
|
srsCeScore1.setCreateBy(getUsername());
|
||||||
|
srsCeScore1.setCreateTime(DateUtils.getNowDate());
|
||||||
|
srsCeScoreMapper.insertSrsCeScore(srsCeScore1);
|
||||||
|
} else {
|
||||||
|
srsCeScore1.setUpdateBy(getUsername());
|
||||||
|
srsCeScore1.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
srsCeScore1.setId(srsCeScores.get(0).getId());
|
||||||
|
srsCeScoreMapper.updateSrsCeScore(srsCeScore1);
|
||||||
|
}
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
private void ifSrsAdd(SrsAddRecord srsAddRecord, List<SrsAddRecord> srsAddRecords){
|
private void ifSrsAdd(SrsAddRecord srsAddRecord, List<SrsAddRecord> srsAddRecords){
|
||||||
if (srsAddRecords.size()==0){
|
if (srsAddRecords.size()==0){
|
||||||
//添加
|
//添加
|
||||||
|
|||||||
@@ -1,88 +1,103 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.srs.comprehensive.mapper.SrsCeScoreMapper">
|
<mapper namespace="com.srs.comprehensive.mapper.SrsCeScoreMapper">
|
||||||
|
|
||||||
<resultMap type="SrsCeScore" id="SrsCeScoreResult">
|
<resultMap type="SrsCeScore" id="SrsCeScoreResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id"/>
|
||||||
<result property="stuId" column="stu_id" />
|
<result property="stuId" column="stu_id"/>
|
||||||
<result property="stuYearId" column="stu_year_id" />
|
<result property="stuYearId" column="stu_year_id"/>
|
||||||
<result property="ceScore" column="ce_score" />
|
<result property="ceScore" column="ce_score"/>
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="stuNo" column="stu_no" />
|
<result property="stuNo" column="stu_no"/>
|
||||||
<association property="student" javaType="SrsStudent" resultMap="studentJoin" />
|
<association property="student" javaType="SrsStudent" resultMap="studentJoin"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="SrsCeScoreStudentStuYear" id="SrsCeScoreStudentStuYearS">
|
<resultMap type="SrsCeScoreStudentStuYear" id="SrsCeScoreStudentStuYearS">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id"/>
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name"/>
|
||||||
<result property="stuNo" column="stu_no" />
|
<result property="stuNo" column="stu_no"/>
|
||||||
<result property="stuYearName" column="stu_year_name" />
|
<result property="stuYearName" column="stu_year_name"/>
|
||||||
<result property="ceScore" column="ce_score" />
|
<result property="ceScore" column="ce_score"/>
|
||||||
<result property="stuId" column="stu_id" />
|
<result property="stuId" column="stu_id"/>
|
||||||
<result property="stuYearId" column="stu_year_id" />
|
<result property="stuYearId" column="stu_year_id"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap type="SrsStudent" id="studentJoin">
|
<resultMap type="SrsStudent" id="studentJoin">
|
||||||
<result property="stuId" column="stu_id" />
|
<result property="stuId" column="stu_id"/>
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name"/>
|
||||||
<result property="stuNo" column="stu_no" />
|
<result property="stuNo" column="stu_no"/>
|
||||||
<result property="gender" column="gender" />
|
<result property="gender" column="gender"/>
|
||||||
<result property="birthday" column="birthday" />
|
<result property="birthday" column="birthday"/>
|
||||||
<result property="idCard" column="id_card" />
|
<result property="idCard" column="id_card"/>
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id"/>
|
||||||
<result property="majorId" column="major_id" />
|
<result property="majorId" column="major_id"/>
|
||||||
<result property="phone" column="phone" />
|
<result property="phone" column="phone"/>
|
||||||
<result property="address" column="address" />
|
<result property="address" column="address"/>
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status"/>
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSrsCeScoreVo">
|
<sql id="selectSrsCeScoreVo">
|
||||||
select scs.id, scs.stu_id, scs.stu_year_id, scs.ce_score, scs.del_flag, scs.create_by, scs.create_time, scs.update_by,
|
select scs.id,
|
||||||
|
scs.stu_id,
|
||||||
|
scs.stu_year_id,
|
||||||
|
scs.ce_score,
|
||||||
|
scs.del_flag,
|
||||||
|
scs.create_by,
|
||||||
|
scs.create_time,
|
||||||
|
scs.update_by,
|
||||||
scs.update_time
|
scs.update_time
|
||||||
from srs_ce_score scs
|
from srs_ce_score scs
|
||||||
left join srs_student stu on stu.stu_id = scs.stu_id
|
left join srs_student stu on stu.stu_id = scs.stu_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSrsCeScoreList" parameterType="SrsCeScore" resultMap="SrsCeScoreResult">
|
<select id="selectSrsCeScoreList" parameterType="SrsCeScore" resultMap="SrsCeScoreResult">
|
||||||
<include refid="selectSrsCeScoreVo"/>
|
<include refid="selectSrsCeScoreVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="stuId != null "> and stu_id = #{stuId}</if>
|
<if test="stuId != null ">and stu_id = #{stuId}</if>
|
||||||
<if test="stuYearId != null "> and stu_year_id = #{stuYearId}</if>
|
<if test="stuYearId != null ">and stu_year_id = #{stuYearId}</if>
|
||||||
<if test="ceScore != null "> and ce_score = #{ceScore}</if>
|
<if test="ceScore != null ">and ce_score = #{ceScore}</if>
|
||||||
<if test="student.classId != null "> and stu.class_id = #{student.classId}</if>
|
<if test="student.classId != null ">and stu.class_id = #{student.classId}</if>
|
||||||
<if test="student.stuNo != null and student.stuNo!=''"> and stu.stu_no = #{student.stuNo}</if>
|
<if test="student.stuNo != null and student.stuNo!=''">and stu.stu_no = #{student.stuNo}</if>
|
||||||
<if test="student.name != null "> and stu.name like #{student.name}</if>
|
<if test="student.name != null ">and stu.name like #{student.name}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<sql id="selectSrsCeScoreVoS">
|
<sql id="selectSrsCeScoreVoS">
|
||||||
select id, stu_id, stu_year_id, ce_score, del_flag, create_by, create_time, update_by, update_time
|
select id,
|
||||||
|
stu_id,
|
||||||
|
stu_year_id,
|
||||||
|
ce_score,
|
||||||
|
del_flag,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time
|
||||||
from srs_ce_score
|
from srs_ce_score
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectSrsCeScoreListS" parameterType="SrsCeScore" resultMap="SrsCeScoreResult">
|
<select id="selectSrsCeScoreListS" parameterType="SrsCeScore" resultMap="SrsCeScoreResult">
|
||||||
<include refid="selectSrsCeScoreVoS"/>
|
<include refid="selectSrsCeScoreVoS"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="stuId != null "> and stu_id = #{stuId}</if>
|
<if test="stuId != null ">and stu_id = #{stuId}</if>
|
||||||
<if test="stuYearId != null "> and stu_year_id = #{stuYearId}</if>
|
<if test="stuYearId != null ">and stu_year_id = #{stuYearId}</if>
|
||||||
<if test="ceScore != null "> and ce_score = #{ceScore}</if>
|
<if test="ceScore != null ">and ce_score = #{ceScore}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSrsCeScoreById" parameterType="Long" resultMap="SrsCeScoreResult">
|
<select id="selectSrsCeScoreById" parameterType="Long" resultMap="SrsCeScoreResult">
|
||||||
<include refid="selectSrsCeScoreVo"/>
|
<include refid="selectSrsCeScoreVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertSrsCeScore" parameterType="SrsCeScore" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertSrsCeScore" parameterType="SrsCeScore" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into srs_ce_score
|
insert into srs_ce_score
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
@@ -95,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="stuNo != null">stu_no</if>
|
<if test="stuNo != null">stu_no</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="stuId != null">#{stuId},</if>
|
<if test="stuId != null">#{stuId},</if>
|
||||||
<if test="stuYearId != null">#{stuYearId},</if>
|
<if test="stuYearId != null">#{stuYearId},</if>
|
||||||
@@ -106,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="stuNo != null">#{stuNo}</if>
|
<if test="stuNo != null">#{stuNo}</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateSrsCeScore" parameterType="SrsCeScore">
|
<update id="updateSrsCeScore" parameterType="SrsCeScore">
|
||||||
@@ -124,12 +139,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<delete id="deleteSrsCeScoreById" parameterType="Long">
|
<delete id="deleteSrsCeScoreById" parameterType="Long">
|
||||||
delete from srs_ce_score where id = #{id}
|
delete
|
||||||
|
from srs_ce_score
|
||||||
|
where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteSrsCeScoreByIds" parameterType="String">
|
<delete id="deleteSrsCeScoreByIds" parameterType="String">
|
||||||
delete from srs_ce_score where id in
|
delete from srs_ce_score where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
@@ -137,16 +157,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<!-- 综合评价连表查询-->
|
<!-- 综合评价连表查询-->
|
||||||
<select id="SrsCeScoreStudentStuYear" parameterType="SrsCeScore" resultMap="SrsCeScoreStudentStuYearS">
|
<select id="SrsCeScoreStudentStuYear" parameterType="SrsCeScore" resultMap="SrsCeScoreStudentStuYearS">
|
||||||
select a.id,b.`name`,b.stu_no,c.stu_year_name,a.ce_score,a.stu_id,a.stu_year_id from srs_ce_score as a
|
select a.id,b.`name`,b.stu_no,c.stu_year_name,a.ce_score,a.stu_id,a.stu_year_id from srs_ce_score as a
|
||||||
left join srs_student as b on a.stu_id = b.stu_id
|
left join srs_student as b on a.stu_id = b.stu_id
|
||||||
left join srs_stu_year as c on a.stu_year_id = c.id
|
left join srs_stu_year as c on a.stu_year_id = c.id
|
||||||
<where>
|
<where>
|
||||||
<if test="delFlag != null "> and a.del_flag = #{delFlag}</if>
|
<if test="delFlag != null ">and a.del_flag = #{delFlag}</if>
|
||||||
<if test="stuId != null "> and a.stu_id = #{stuId}</if>
|
<if test="stuId != null ">and a.stu_id = #{stuId}</if>
|
||||||
<if test="stuYearId != null "> and stu_year_id = #{stuYearId}</if>
|
<if test="stuYearId != null ">and stu_year_id = #{stuYearId}</if>
|
||||||
<if test="ceScore != null "> and ce_score = #{ceScore}</if>
|
<if test="ceScore != null ">and ce_score = #{ceScore}</if>
|
||||||
<if test="student.classId != null "> and b.class_id = #{student.classId}</if>
|
<if test="student.classId != null ">and b.class_id = #{student.classId}</if>
|
||||||
<if test="student.stuNo != null and student.stuNo!=''"> and b.stu_no = #{student.stuNo}</if>
|
<if test="student.stuNo != null and student.stuNo!=''">and b.stu_no = #{student.stuNo}</if>
|
||||||
<if test="student.name != null "> and b.name like #{student.name}</if>
|
<if test="student.name != null ">and b.name like #{student.name}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,38 +1,39 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.srs.comprehensive.mapper.SrsStudentMapper">
|
<mapper namespace="com.srs.comprehensive.mapper.SrsStudentMapper">
|
||||||
|
|
||||||
<resultMap type="SrsStudent" id="SrsStudentResult">
|
<resultMap type="SrsStudent" id="SrsStudentResult">
|
||||||
<result property="stuId" column="stu_id" />
|
<result property="stuId" column="stu_id"/>
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name"/>
|
||||||
<result property="stuNo" column="stu_no" />
|
<result property="stuNo" column="stu_no"/>
|
||||||
<result property="gender" column="gender" />
|
<result property="gender" column="gender"/>
|
||||||
<result property="birthday" column="birthday" />
|
<result property="birthday" column="birthday"/>
|
||||||
<result property="idCard" column="id_card" />
|
<result property="idCard" column="id_card"/>
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id"/>
|
||||||
<result property="majorId" column="major_id" />
|
<result property="majorId" column="major_id"/>
|
||||||
<result property="classId" column="class_id" />
|
<result property="classId" column="class_id"/>
|
||||||
<result property="phone" column="phone" />
|
<result property="phone" column="phone"/>
|
||||||
<result property="address" column="address" />
|
<result property="address" column="address"/>
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status"/>
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="xhk" column="xhk" />
|
<result property="xhk" column="xhk"/>
|
||||||
<result property="bankAddr" column="bank_addr" />
|
<result property="bankAddr" column="bank_addr"/>
|
||||||
<result property="teacherId" column="teacher_id" />
|
<result property="teacherId" column="teacher_id"/>
|
||||||
<result property="cphName" column="cphName" />
|
<result property="cphName" column="cphName"/>
|
||||||
<result property="gradeName" column="grade_name" />
|
<result property="gradeName" column="grade_name"/>
|
||||||
<result property="status2" column="status2" />
|
<result property="status2" column="status2"/>
|
||||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
|
||||||
<association property="srsMajors" column="major_id" javaType="srsMajors" resultMap="SrsMajorsResult" />
|
<association property="srsMajors" column="major_id" javaType="srsMajors" resultMap="SrsMajorsResult"/>
|
||||||
<association property="srsClass" column="class_id" javaType="srsClass" resultMap="SrsClassResult" />
|
<association property="srsClass" column="class_id" javaType="srsClass" resultMap="SrsClassResult"/>
|
||||||
<association property="cphTeacher" column="teacher_id" javaType="cphTeacher" resultMap="CphTeacherResult" />
|
<association property="cphTeacher" column="teacher_id" javaType="cphTeacher" resultMap="CphTeacherResult"/>
|
||||||
<association property="cphStuExtraInfo" column="stu_no" javaType="cphStuExtraInfo" resultMap="CphStuExtraInfoResult" />
|
<association property="cphStuExtraInfo" column="stu_no" javaType="cphStuExtraInfo"
|
||||||
|
resultMap="CphStuExtraInfoResult"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="CphStuExtraInfoResult" type="CphStuExtraInfo">
|
<resultMap id="CphStuExtraInfoResult" type="CphStuExtraInfo">
|
||||||
<result property="stuNo" column="stu_no"/>
|
<result property="stuNo" column="stu_no"/>
|
||||||
@@ -46,106 +47,152 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="name" column="name"/>
|
<result property="name" column="name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap type="SrsGrade" id="SrsGradeResult">
|
<resultMap type="SrsGrade" id="SrsGradeResult">
|
||||||
<result property="gradeId" column="grade_id" />
|
<result property="gradeId" column="grade_id"/>
|
||||||
<result property="gradeName" column="grade_name" />
|
<result property="gradeName" column="grade_name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap type="SrsClass" id="SrsClassResult">
|
<resultMap type="SrsClass" id="SrsClassResult">
|
||||||
<result property="classId" column="class_id" />
|
<result property="classId" column="class_id"/>
|
||||||
<result property="majorId" column="major_id" />
|
<result property="majorId" column="major_id"/>
|
||||||
<result property="className" column="class_name" />
|
<result property="className" column="class_name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap type="SrsMajors" id="SrsMajorsResult">
|
<resultMap type="SrsMajors" id="SrsMajorsResult">
|
||||||
<result property="majorId" column="major_id" />
|
<result property="majorId" column="major_id"/>
|
||||||
<result property="majorName" column="major_name" />
|
<result property="majorName" column="major_name"/>
|
||||||
<result property="collegeId" column="college_id" />
|
<result property="collegeId" column="college_id"/>
|
||||||
<result property="majorDescription" column="major_description" />
|
<result property="majorDescription" column="major_description"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="deptResult" type="SysDept">
|
<resultMap id="deptResult" type="SysDept">
|
||||||
<id property="deptId" column="dept_id" />
|
<id property="deptId" column="dept_id"/>
|
||||||
<result property="parentId" column="parent_id" />
|
<result property="parentId" column="parent_id"/>
|
||||||
<result property="deptName" column="dept_name" />
|
<result property="deptName" column="dept_name"/>
|
||||||
<result property="ancestors" column="ancestors" />
|
<result property="ancestors" column="ancestors"/>
|
||||||
<result property="orderNum" column="order_num" />
|
<result property="orderNum" column="order_num"/>
|
||||||
<result property="leader" column="leader" />
|
<result property="leader" column="leader"/>
|
||||||
<result property="status" column="dept_status" />
|
<result property="status" column="dept_status"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="studentName" type="CascaderEntity">
|
<resultMap id="studentName" type="CascaderEntity">
|
||||||
<id property="value" column="stu_id" />
|
<id property="value" column="stu_id"/>
|
||||||
<result property="label" column="name" />
|
<result property="label" column="name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<sql id="selectSrsStudentVo">
|
<sql id="selectSrsStudentVo">
|
||||||
select s.stu_id,s.stu_no, s.name, s.gender, s.birthday, AES_DECRYPT(UNHEX(s.id_card),'zhxg') as id_card , s.dept_id, major_id, class_id, s.phone, s.address,
|
select s.stu_id,
|
||||||
s.status, s.create_by, s.create_time, s.update_by, s.update_time, s.del_flag,s.xhk,s.bank_addr
|
s.stu_no,
|
||||||
|
s.name,
|
||||||
|
s.gender,
|
||||||
|
s.birthday,
|
||||||
|
AES_DECRYPT(UNHEX(s.id_card), 'zhxg') as id_card,
|
||||||
|
s.dept_id,
|
||||||
|
major_id,
|
||||||
|
class_id,
|
||||||
|
s.phone,
|
||||||
|
s.address,
|
||||||
|
s.status,
|
||||||
|
s.create_by,
|
||||||
|
s.create_time,
|
||||||
|
s.update_by,
|
||||||
|
s.update_time,
|
||||||
|
s.del_flag,
|
||||||
|
s.xhk,
|
||||||
|
s.bank_addr
|
||||||
from srs_student s
|
from srs_student s
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="selectSrsStudentJoin">
|
<sql id="selectSrsStudentJoin">
|
||||||
select s.stu_id,s.stu_no, s.name, s.gender, s.birthday,AES_DECRYPT(UNHEX(s.id_card),'zhxg') as id_card , d.dept_id, m.major_id, c.class_id, s.phone, s.address,
|
select s.stu_id,
|
||||||
s.status, s.status as status2,s.create_by, s.create_time, s.update_by, s.update_time, s.del_flag,s.xhk,s.bank_addr,e.name as cphName,f.grade_name,
|
s.stu_no,
|
||||||
d.*,m.*,c.*,g.*
|
s.name,
|
||||||
|
s.gender,
|
||||||
|
s.birthday,
|
||||||
|
AES_DECRYPT(UNHEX(s.id_card), 'zhxg') as id_card,
|
||||||
|
d.dept_id,
|
||||||
|
m.major_id,
|
||||||
|
c.class_id,
|
||||||
|
s.phone,
|
||||||
|
s.address,
|
||||||
|
s.status,
|
||||||
|
s.status as status2,
|
||||||
|
s.create_by,
|
||||||
|
s.create_time,
|
||||||
|
s.update_by,
|
||||||
|
s.update_time,
|
||||||
|
s.del_flag,
|
||||||
|
s.xhk,
|
||||||
|
s.bank_addr,
|
||||||
|
e.name as cphName,
|
||||||
|
f.grade_name,
|
||||||
|
d.*,
|
||||||
|
m.*,
|
||||||
|
c.*,
|
||||||
|
g.*
|
||||||
from srs_student s
|
from srs_student s
|
||||||
left JOIN srs_class c ON s.class_id = c.class_id
|
left JOIN srs_class c ON s.class_id = c.class_id
|
||||||
left JOIN srs_majors m ON c.major_id = m.major_id
|
left JOIN srs_majors m ON c.major_id = m.major_id
|
||||||
left JOIN sys_dept d ON m.college_id = d.dept_id
|
left JOIN sys_dept d ON m.college_id = d.dept_id
|
||||||
left join cph_teacher as e on c.teacher_id = e.teacher_id
|
left join cph_teacher as e on c.teacher_id = e.teacher_id
|
||||||
left join srs_grade as f on f.grade_id=c.grade_id
|
left join srs_grade as f on f.grade_id = c.grade_id
|
||||||
left join cph_stu_extra_info g on g.stu_no=s.stu_no
|
left join cph_stu_extra_info g on g.stu_no = s.stu_no
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectSrsStudentList" parameterType="SrsStudent" resultMap="SrsStudentResult">
|
<select id="selectSrsStudentList" parameterType="SrsStudent" resultMap="SrsStudentResult">
|
||||||
<include refid="selectSrsStudentVo"/>
|
<include refid="selectSrsStudentVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||||
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
|
<if test="gender != null and gender != ''">and gender = #{gender}</if>
|
||||||
<if test="birthday != null "> and birthday = #{birthday}</if>
|
<if test="birthday != null ">and birthday = #{birthday}</if>
|
||||||
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
<if test="idCard != null and idCard != ''">and id_card = #{idCard}</if>
|
||||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
<if test="deptId != null ">and dept_id = #{deptId}</if>
|
||||||
<if test="majorId != null "> and major_id = #{majorId}</if>
|
<if test="majorId != null ">and major_id = #{majorId}</if>
|
||||||
<if test="classId != null "> and class_id = #{classId}</if>
|
<if test="classId != null ">and class_id = #{classId}</if>
|
||||||
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone} , '%')</if>
|
<if test="phone != null and phone != ''">and phone like concat('%', #{phone} , '%')</if>
|
||||||
<if test="address != null and address != ''"> and address like concat('%', #{address} , '%')</if>
|
<if test="address != null and address != ''">and address like concat('%', #{address} , '%')</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''">and status = #{status}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectSrsStudentNameList" parameterType="Long" resultMap="studentName">
|
<select id="selectSrsStudentNameList" parameterType="Long" resultMap="studentName">
|
||||||
select stu_id,name from srs_student where class_id = #{id}
|
select stu_id, name
|
||||||
|
from srs_student
|
||||||
|
where class_id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSrsStudentListJoin" parameterType="SrsStudent" resultMap="SrsStudentResult">
|
<select id="selectSrsStudentListJoin" parameterType="SrsStudent" resultMap="SrsStudentResult">
|
||||||
<include refid="selectSrsStudentJoin"/>
|
<include refid="selectSrsStudentJoin"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="stuNo != null and stuNo != ''"> and s.stu_no like concat('%', #{stuNo}, '%')</if>
|
<if test="stuNo != null and stuNo != ''">and s.stu_no like concat('%', #{stuNo}, '%')</if>
|
||||||
<if test="name != null and name != ''"> and s.name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''">and s.name like concat('%', #{name}, '%')</if>
|
||||||
<if test="gender != null and gender != ''"> and s.gender = #{gender}</if>
|
<if test="gender != null and gender != ''">and s.gender = #{gender}</if>
|
||||||
<if test="birthday != null "> and s.birthday = #{birthday}</if>
|
<if test="birthday != null ">and s.birthday = #{birthday}</if>
|
||||||
<if test="idCard != null and idCard != ''"> and s.id_card = #{idCard}</if>
|
<if test="idCard != null and idCard != ''">and s.id_card = #{idCard}</if>
|
||||||
<if test="deptId != null "> and d.dept_id = #{deptId}</if>
|
<if test="deptId != null ">and d.dept_id = #{deptId}</if>
|
||||||
<if test="majorId != null "> and m.major_id = #{majorId}</if>
|
<if test="majorId != null ">and m.major_id = #{majorId}</if>
|
||||||
<if test="classId != null "> and s.class_id = #{classId}</if>
|
<if test="classId != null ">and s.class_id = #{classId}</if>
|
||||||
<if test="phone != null and phone != ''"> and s.phone like concat('%', #{phone} , '%')</if>
|
<if test="phone != null and phone != ''">and s.phone like concat('%', #{phone} , '%')</if>
|
||||||
<if test="address != null and address != ''"> and s.address like concat('%', #{address} , '%')</if>
|
<if test="address != null and address != ''">and s.address like concat('%', #{address} , '%')</if>
|
||||||
<if test="status != null and status != ''"> and s.status = #{status}</if>
|
<if test="status != null and status != ''">and s.status = #{status}</if>
|
||||||
<if test="tNo != null and tNo != ''"> and e.employee_id = #{tNo}</if>
|
<if test="tNo != null and tNo != ''">and e.employee_id = #{tNo}</if>
|
||||||
<if test="gradeId != null"> and c.grade_id = #{gradeId}</if>
|
<if test="gradeId != null">and c.grade_id = #{gradeId}</if>
|
||||||
<if test="cphName != null and cphName!=''"> and e.name = #{cphName}</if>
|
<if test="cphName != null and cphName!=''">and e.name = #{cphName}</if>
|
||||||
</where>
|
</where>
|
||||||
order by s.stu_no desc
|
order by s.stu_no desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOwnClass" resultType="com.srs.comprehensive.domain.Vo.StuClass" >
|
<select id="getOwnClass" resultType="com.srs.comprehensive.domain.Vo.StuClass">
|
||||||
select a.stu_no,a.`name` as stu_name,b.class_name from srs_student as a
|
select a.stu_no, a.`name` as stu_name, b.class_name
|
||||||
left join srs_class as b on a.class_id = b.class_id
|
from srs_student as a
|
||||||
|
left join srs_class as b on a.class_id = b.class_id
|
||||||
where a.stu_no = #{stuNo}
|
where a.stu_no = #{stuNo}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listEnableStu" resultType="SrsStudent">
|
<select id="listEnableStu" resultType="SrsStudent">
|
||||||
select * from srs_student where `status` = '01'
|
select *
|
||||||
|
from srs_student
|
||||||
|
where `status` = '01'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectStuNoNameByClass" resultType="com.srs.comprehensive.domain.Vo.StuNoName">
|
<select id="selectStuNoNameByClass" resultType="com.srs.comprehensive.domain.Vo.StuNoName">
|
||||||
select stu_no,`name` as stu_name from srs_student
|
select stu_no, `name` as stu_name
|
||||||
|
from srs_student
|
||||||
where class_id = #{id}
|
where class_id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -158,7 +205,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where stu_no = #{stuNo}
|
where stu_no = #{stuNo}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectClassId" resultType="java.lang.Long">
|
<select id="selectClassId" resultType="java.lang.Long">
|
||||||
select class_id from srs_class where class_code=#{bjdm}
|
select class_id
|
||||||
|
from srs_class
|
||||||
|
where class_code = #{bjdm}
|
||||||
</select>
|
</select>
|
||||||
<insert id="insertSrsStudent" parameterType="SrsStudent" useGeneratedKeys="true" keyProperty="stuId">
|
<insert id="insertSrsStudent" parameterType="SrsStudent" useGeneratedKeys="true" keyProperty="stuId">
|
||||||
insert into srs_student
|
insert into srs_student
|
||||||
@@ -181,7 +230,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||||
<if test="roomId != null">room_id,</if>
|
<if test="roomId != null">room_id,</if>
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="name != null">#{name},</if>
|
<if test="name != null">#{name},</if>
|
||||||
<if test="stuNo != null">#{stuNo},</if>
|
<if test="stuNo != null">#{stuNo},</if>
|
||||||
@@ -200,7 +249,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||||
<if test="roomId != null">#{roomId},</if>
|
<if test="roomId != null">#{roomId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateSrsStudent" parameterType="SrsStudent">
|
<update id="updateSrsStudent" parameterType="SrsStudent">
|
||||||
@@ -228,7 +277,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteSrsStudentByStuId" parameterType="Long">
|
<delete id="deleteSrsStudentByStuId" parameterType="Long">
|
||||||
delete from srs_student where stu_id = #{stuId}
|
delete
|
||||||
|
from srs_student
|
||||||
|
where stu_id = #{stuId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteSrsStudentByStuIds" parameterType="String">
|
<delete id="deleteSrsStudentByStuIds" parameterType="String">
|
||||||
@@ -249,7 +300,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
WHERE stu_no = #{student.stuNo}
|
WHERE stu_no = #{student.stuNo}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
<!-- 批量更新代码-->
|
<!-- 批量更新代码-->
|
||||||
<update id="updateSrsStudentList" parameterType="java.util.List">
|
<update id="updateSrsStudentList" parameterType="java.util.List">
|
||||||
update srs_student
|
update srs_student
|
||||||
<trim prefix="set" suffixOverrides=",">
|
<trim prefix="set" suffixOverrides=",">
|
||||||
@@ -333,42 +384,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="countDeptGradeStu" resultType="StuCount">
|
<select id="countDeptGradeStu" resultType="StuCount">
|
||||||
select count(a.stu_no) as stu_count,
|
select count(a.stu_no) as stu_count,
|
||||||
case a.dept_name is NULL
|
case a.dept_name is NULL
|
||||||
when true then "无学院"
|
when true then "无学院"
|
||||||
else a.dept_name end as dept_name,
|
else a.dept_name end as dept_name,
|
||||||
case a.grade_name is NULL
|
case a.grade_name is NULL
|
||||||
when true then "无年级"
|
when true then "无年级"
|
||||||
else a.grade_name end as grade_name
|
else a.grade_name end as grade_name
|
||||||
from view_stu_info as a
|
from view_stu_info as a
|
||||||
where a.`status` = "01" and a.grade_name is not NULL
|
where a.`status` = "01"
|
||||||
and a.dept_name is not NULL
|
and a.grade_name is not NULL
|
||||||
GROUP BY a.dept_id,a.grade_id
|
and a.dept_name is not NULL
|
||||||
|
GROUP BY a.dept_id, a.grade_id
|
||||||
order by a.dept_id
|
order by a.dept_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countDeptStu" resultType="StuCount">
|
<select id="countDeptStu" resultType="StuCount">
|
||||||
select count(a.stu_no) as stu_count,
|
select count(a.stu_no) as stu_count,
|
||||||
case a.dept_name is null
|
case a.dept_name is null
|
||||||
when true then "无学院"
|
when true then "无学院"
|
||||||
else a.dept_name end as dept_name
|
else a.dept_name end as dept_name
|
||||||
from view_stu_info as a
|
from view_stu_info as a
|
||||||
where a.`status` = "01" and a.dept_name is not null
|
where a.`status` = "01"
|
||||||
|
and a.dept_name is not null
|
||||||
GROUP BY a.dept_id
|
GROUP BY a.dept_id
|
||||||
order by a.dept_id
|
order by a.dept_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="countGoodBiyeGradeStu" resultType="StuCount">
|
<select id="countGoodBiyeGradeStu" resultType="StuCount">
|
||||||
select count(a.stu_no) as stu_count,b.grade_name
|
select count(a.stu_no) as stu_count, b.grade_name
|
||||||
from cph_biye_apply as a
|
from cph_biye_apply as a
|
||||||
left join view_stu_info as b on a.stu_no = b.stu_no
|
left join view_stu_info as b on a.stu_no = b.stu_no
|
||||||
where a.apply_status = 6
|
where a.apply_status = 6
|
||||||
GROUP BY b.grade_id
|
GROUP BY b.grade_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countGoodGradeStu" resultType="StuCount" >
|
<select id="countGoodGradeStu" resultType="StuCount">
|
||||||
select count(a.stu_no) as stu_count,
|
select count(a.stu_no) as stu_count,
|
||||||
case b.grade_name is null
|
case b.grade_name is null
|
||||||
when true then "无年级"
|
when true then "无年级"
|
||||||
else b.grade_name end as grade_name,
|
else b.grade_name end as grade_name,
|
||||||
@@ -380,8 +433,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
order by b.grade_id
|
order by b.grade_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countLakeGradeStu" resultType="StuCount" >
|
<select id="selectSrsStudentByClassIds" parameterType="list" resultType="SrsStudent">
|
||||||
select count(a.stu_no) as stu_count,
|
SELECT * FROM srs_student
|
||||||
|
WHERE class_id IN
|
||||||
|
<foreach item="classId" collection="classIds" open="(" separator="," close=")">
|
||||||
|
#{classId}
|
||||||
|
</foreach>
|
||||||
|
AND del_flag = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="countLakeGradeStu" resultType="StuCount">
|
||||||
|
select count(a.stu_no) as stu_count,
|
||||||
case b.grade_name is null
|
case b.grade_name is null
|
||||||
when true then "无年级"
|
when true then "无年级"
|
||||||
else b.grade_name end as grade_name
|
else b.grade_name end as grade_name
|
||||||
@@ -391,120 +453,130 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
order by b.grade_id
|
order by b.grade_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countParkStu" resultType="StuCount" >
|
<select id="countParkStu" resultType="StuCount">
|
||||||
select sum(b.occupancy) as all_in,a.park_name,a.campus_name,sum(a.bed_num) as `all`,
|
select sum(b.occupancy) as all_in,
|
||||||
(
|
a.park_name,
|
||||||
select count(t1.stu_no) from view_stu_info as t1 where t1.`status` = '01'
|
a.campus_name,
|
||||||
) as stu_count
|
sum(a.bed_num) as `all`,
|
||||||
|
(select count(t1.stu_no) from view_stu_info as t1 where t1.`status` = '01') as stu_count
|
||||||
from view_dorm_info as a
|
from view_dorm_info as a
|
||||||
left join view_dorm_stu_count as b on a.id = b.dormitory_id
|
left join view_dorm_stu_count as b on a.id = b.dormitory_id
|
||||||
GROUP BY a.park_id
|
GROUP BY a.park_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDeptLeveaDataCount" resultType="com.srs.comprehensive.domain.Vo.DeptLeaveDataVo">
|
<select id="selectDeptLeveaDataCount" resultType="com.srs.comprehensive.domain.Vo.DeptLeaveDataVo">
|
||||||
SELECT
|
SELECT c.dept_id AS deptId,
|
||||||
c.dept_id AS deptId,
|
h.grade_name AS gradeName,
|
||||||
h.grade_name AS gradeName,
|
c.dept_name AS departmentName,
|
||||||
c.dept_name AS departmentName,
|
COUNT(CASE WHEN a.status = '1' THEN 1 END) leaveCount
|
||||||
COUNT(CASE WHEN a.status = '1' THEN 1 END) leaveCount
|
|
||||||
FROM rt_stu_leave_application a
|
FROM rt_stu_leave_application a
|
||||||
LEFT JOIN srs_student b ON a.stu_id=b.stu_id
|
LEFT JOIN srs_student b ON a.stu_id = b.stu_id
|
||||||
LEFT JOIN srs_class e ON b.class_id = e.class_id
|
LEFT JOIN srs_class e ON b.class_id = e.class_id
|
||||||
LEFT JOIN srs_majors d ON e.major_id = d.major_id
|
LEFT JOIN srs_majors d ON e.major_id = d.major_id
|
||||||
LEFT JOIN sys_dept c ON d.college_id = c.dept_id
|
LEFT JOIN sys_dept c ON d.college_id = c.dept_id
|
||||||
LEFT JOIN srs_grade h ON e.grade_id = h.grade_id
|
LEFT JOIN srs_grade h ON e.grade_id = h.grade_id
|
||||||
GROUP BY c.dept_id,h.grade_name,c.dept_name
|
GROUP BY c.dept_id, h.grade_name, c.dept_name
|
||||||
</select>
|
</select>
|
||||||
<select id="selectStuQuitSchoolCount" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
<select id="selectStuQuitSchoolCount" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
||||||
SELECT
|
SELECT department_Name deptName,
|
||||||
department_Name deptName,
|
COUNT(*) AS number
|
||||||
COUNT(*) AS number
|
FROM rt_stu_quit_school
|
||||||
FROM
|
WHERE apply_status = 1
|
||||||
rt_stu_quit_school
|
GROUP BY department_Name
|
||||||
WHERE
|
|
||||||
apply_status = 1
|
|
||||||
GROUP BY
|
|
||||||
department_Name
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectStuPunishCount" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
<select id="selectStuPunishCount" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
||||||
SELECT
|
SELECT department_Name AS deptName,
|
||||||
department_Name AS deptName,
|
COUNT(*) AS number
|
||||||
COUNT(*) AS number
|
FROM rt_stu_disciplinary_application
|
||||||
FROM
|
WHERE penalty_status = 0
|
||||||
rt_stu_disciplinary_application
|
GROUP BY department_Name
|
||||||
WHERE
|
|
||||||
penalty_status = 0
|
|
||||||
GROUP BY
|
|
||||||
department_Name
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectKnrdCount" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
<select id="selectKnrdCount" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
||||||
SELECT xy AS deptName, COUNT(id) AS number FROM `srs_knrd_apply`
|
SELECT xy AS deptName, COUNT(id) AS number
|
||||||
where stu_year_id in (SELECT id FROM srs_stu_year WHERE `status`=1) and step >= 5 and xsqmyj !=4 group by xy
|
FROM `srs_knrd_apply`
|
||||||
|
where stu_year_id in (SELECT id FROM srs_stu_year WHERE `status` = 1)
|
||||||
|
and step >= 5
|
||||||
|
and xsqmyj !=4
|
||||||
|
group by xy
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectZxjCount" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
<select id="selectZxjCount" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
||||||
SELECT xy AS deptName, COUNT(id) AS number FROM `srs_zxj_apply`
|
SELECT xy AS deptName, COUNT(id) AS number
|
||||||
where stu_year_id in (SELECT id FROM srs_stu_year WHERE `status`=1) and step =4 group by xy
|
FROM `srs_zxj_apply`
|
||||||
|
where stu_year_id in (SELECT id FROM srs_stu_year WHERE `status` = 1)
|
||||||
|
and step = 4
|
||||||
|
group by xy
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDeptCountByCampusLJ" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
<select id="selectDeptCountByCampusLJ" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
||||||
SELECT a.dept_name deptName,count(*) number FROM view_stu_info a
|
SELECT a.dept_name deptName, count(*) number
|
||||||
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
FROM view_stu_info a
|
||||||
WHERE b.grade_status in (1,3) AND dept_name in ('自动化工程学院','水利工程学院','电力工程学院','水利工程学院','土木建筑工程学院','机电工程学院','交通工程学院','合作分校')
|
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
||||||
|
WHERE b.grade_status in (1, 3)
|
||||||
|
AND dept_name in
|
||||||
|
('自动化工程学院', '水利工程学院', '电力工程学院', '水利工程学院', '土木建筑工程学院', '机电工程学院',
|
||||||
|
'交通工程学院', '合作分校')
|
||||||
GROUP BY dept_name
|
GROUP BY dept_name
|
||||||
</select>
|
</select>
|
||||||
<select id="selectDeptCountByCampusCG" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
<select id="selectDeptCountByCampusCG" resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
||||||
SELECT a.dept_name deptName,count(*) number FROM view_stu_info a
|
SELECT a.dept_name deptName, count(*) number
|
||||||
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
FROM view_stu_info a
|
||||||
WHERE b.grade_status in (1,3) AND dept_name in ('信息工程学院','经济管理学院')
|
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
||||||
|
WHERE b.grade_status in (1, 3)
|
||||||
|
AND dept_name in ('信息工程学院', '经济管理学院')
|
||||||
GROUP BY dept_name
|
GROUP BY dept_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectGradeCount" resultType="com.srs.comprehensive.domain.Vo.GradeStuDataVo">
|
<select id="selectGradeCount" resultType="com.srs.comprehensive.domain.Vo.GradeStuDataVo">
|
||||||
SELECT b.grade_name grade,count(*) number FROM view_stu_info a
|
SELECT b.grade_name grade, count(*) number
|
||||||
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
FROM view_stu_info a
|
||||||
WHERE b.grade_status in (1,3)
|
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
||||||
|
WHERE b.grade_status in (1, 3)
|
||||||
GROUP BY b.grade_name
|
GROUP BY b.grade_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countDeptGradeStuNew" resultType="Map">
|
<select id="countDeptGradeStuNew" resultType="Map">
|
||||||
select a.dept_name,a.grade_name,count(1) as num
|
select a.dept_name, a.grade_name, count(1) as num
|
||||||
from view_stu_info as a
|
from view_stu_info as a
|
||||||
left join srs_grade as b on b.grade_id = a.grade_id
|
left join srs_grade as b on b.grade_id = a.grade_id
|
||||||
where b.grade_status in (1,3) and dept_name is not null and a.`status` = '01'
|
where b.grade_status in (1, 3)
|
||||||
group by a.dept_name,a.grade_name
|
and dept_name is not null
|
||||||
order by dept_name,grade_name
|
and a.`status` = '01'
|
||||||
|
group by a.dept_name, a.grade_name
|
||||||
|
order by dept_name, grade_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countMajorStuByDept" resultType="Map" parameterType="CphSearch">
|
<select id="countMajorStuByDept" resultType="Map" parameterType="CphSearch">
|
||||||
select t1.*,t2.major_name,t3.dept_name
|
select t1.*, t2.major_name, t3.dept_name
|
||||||
from
|
from (select count(1) as num, a.major_code
|
||||||
(
|
from view_stu_info as a
|
||||||
select count(1) as num,a.major_code
|
where a.dept_name = #{deptName}
|
||||||
from view_stu_info as a
|
and a.`status` = '01'
|
||||||
where a.dept_name = #{deptName} and a.`status` = '01'
|
GROUP BY a.major_code) as t1
|
||||||
GROUP BY a.major_code
|
left join srs_majors as t2 on t1.major_code = t2.major_code
|
||||||
) as t1
|
left join sys_dept as t3 on t2.college_id = t3.dept_id
|
||||||
left join srs_majors as t2 on t1.major_code = t2.major_code
|
|
||||||
left join sys_dept as t3 on t2.college_id = t3.dept_id
|
|
||||||
order by t1.major_code
|
order by t1.major_code
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countDeptStuNew" resultType="Map">
|
<select id="countDeptStuNew" resultType="Map">
|
||||||
select count(1) as `value`,a.dept_name as `name`
|
select count(1) as `value`, a.dept_name as `name`
|
||||||
from view_stu_info as a
|
from view_stu_info as a
|
||||||
left join srs_grade as b on a.grade_id = b.grade_id
|
left join srs_grade as b on a.grade_id = b.grade_id
|
||||||
where a.`status` = '01' and a.dept_name is not null and grade_status in (1,3)
|
where a.`status` = '01'
|
||||||
|
and a.dept_name is not null
|
||||||
|
and grade_status in (1, 3)
|
||||||
group by a.dept_name
|
group by a.dept_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countGradeStuNew" resultType="Map">
|
<select id="countGradeStuNew" resultType="Map">
|
||||||
select count(1) as `value`,a.grade_name as `name`
|
select count(1) as `value`, a.grade_name as `name`
|
||||||
from view_stu_info as a
|
from view_stu_info as a
|
||||||
left join srs_grade as b on a.grade_id = b.grade_id
|
left join srs_grade as b on a.grade_id = b.grade_id
|
||||||
where a.`status` = '01' and a.grade_name is not null and b.grade_status in (1,3)
|
where a.`status` = '01'
|
||||||
|
and a.grade_name is not null
|
||||||
|
and b.grade_status in (1, 3)
|
||||||
group by a.grade_name
|
group by a.grade_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -516,185 +588,237 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="gradeId != null">and a.grade_id = #{gradeId}</if>
|
<if test="gradeId != null">and a.grade_id = #{gradeId}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="getRtStuQuitSchool" resultType="com.srs.comprehensive.domain.Vo.RtStuQuitSchoolVo" parameterType="stuDataSelcetDto">
|
<select id="getRtStuQuitSchool" resultType="com.srs.comprehensive.domain.Vo.RtStuQuitSchoolVo"
|
||||||
select quit_school_id,stu_no,stu_name,applicant_name,department_name,grade_name,class_name,jg,mz,quit_type,quit_category,quit_year,process_instance_id,deploy_id from rt_stu_quit_school
|
parameterType="stuDataSelcetDto">
|
||||||
|
select
|
||||||
|
quit_school_id,stu_no,stu_name,applicant_name,department_name,grade_name,class_name,jg,mz,quit_type,quit_category,quit_year,process_instance_id,deploy_id
|
||||||
|
from rt_stu_quit_school
|
||||||
<where>
|
<where>
|
||||||
apply_status = 1
|
apply_status = 1
|
||||||
<if test="departmentName != null and departmentName!= '' ">and department_name=#{departmentName} </if>
|
<if test="departmentName != null and departmentName!= '' ">and department_name=#{departmentName}</if>
|
||||||
<if test="stuNo != null and stuNo!= '' ">and stu_no=#{stuNo} </if>
|
<if test="stuNo != null and stuNo!= '' ">and stu_no=#{stuNo}</if>
|
||||||
<if test="stuName != null and stuName!= '' ">and stu_name=#{stuName} </if>
|
<if test="stuName != null and stuName!= '' ">and stu_name=#{stuName}</if>
|
||||||
</where>
|
</where>
|
||||||
order by grade_name,class_name
|
order by grade_name,class_name
|
||||||
</select>
|
</select>
|
||||||
<select id="getRtStuDisciplinaryApplication" resultType="com.srs.comprehensive.domain.Vo.RtStuDisciplinaryApplicationVo" parameterType="stuDataSelcetDto">
|
<select id="getRtStuDisciplinaryApplication"
|
||||||
select application_id,stu_no,stu_name,applicant_name,department_name,grade_name,class_name,jg,mz,penalty_type,process_instance_id,deploy_id from rt_stu_disciplinary_application
|
resultType="com.srs.comprehensive.domain.Vo.RtStuDisciplinaryApplicationVo"
|
||||||
|
parameterType="stuDataSelcetDto">
|
||||||
|
select
|
||||||
|
application_id,stu_no,stu_name,applicant_name,department_name,grade_name,class_name,jg,mz,penalty_type,process_instance_id,deploy_id
|
||||||
|
from rt_stu_disciplinary_application
|
||||||
<where>
|
<where>
|
||||||
penalty_status = 0
|
penalty_status = 0
|
||||||
<if test="departmentName != null and departmentName!= '' ">and department_name=#{departmentName} </if>
|
<if test="departmentName != null and departmentName!= '' ">and department_name=#{departmentName}</if>
|
||||||
<if test="stuNo != null and stuNo!= '' ">and stu_no=#{stuNo} </if>
|
<if test="stuNo != null and stuNo!= '' ">and stu_no=#{stuNo}</if>
|
||||||
<if test="stuName != null and stuName!= '' ">and stu_name=#{stuName} </if>
|
<if test="stuName != null and stuName!= '' ">and stu_name=#{stuName}</if>
|
||||||
</where>
|
</where>
|
||||||
order by grade_name,class_name
|
order by grade_name,class_name
|
||||||
</select>
|
</select>
|
||||||
<select id="getRtStuDropOutSchool" resultType="com.srs.comprehensive.domain.Vo.RtStuDropOutSchoolVo" parameterType="stuDataSelcetDto">
|
<select id="getRtStuDropOutSchool" resultType="com.srs.comprehensive.domain.Vo.RtStuDropOutSchoolVo"
|
||||||
select drop_out_school_id,stu_no,stu_name,applicant_name,department_name,grade_name,class_name,jg,mz,quit_year,drop_out_type,drop_out_category,process_instance_id,deploy_id from rt_stu_drop_out_school
|
parameterType="stuDataSelcetDto">
|
||||||
|
select
|
||||||
|
drop_out_school_id,stu_no,stu_name,applicant_name,department_name,grade_name,class_name,jg,mz,quit_year,drop_out_type,drop_out_category,process_instance_id,deploy_id
|
||||||
|
from rt_stu_drop_out_school
|
||||||
<where>
|
<where>
|
||||||
apply_status = 1
|
apply_status = 1
|
||||||
<if test="departmentName != null and departmentName!= '' ">and department_name=#{departmentName} </if>
|
<if test="departmentName != null and departmentName!= '' ">and department_name=#{departmentName}</if>
|
||||||
<if test="stuNo != null and stuNo!= '' ">and stu_no=#{stuNo} </if>
|
<if test="stuNo != null and stuNo!= '' ">and stu_no=#{stuNo}</if>
|
||||||
<if test="stuName != null and stuName!= '' ">and stu_name=#{stuName} </if>
|
<if test="stuName != null and stuName!= '' ">and stu_name=#{stuName}</if>
|
||||||
</where>
|
</where>
|
||||||
order by grade_name,class_name
|
order by grade_name,class_name
|
||||||
</select>
|
</select>
|
||||||
<select id="getSrsKnrdApply" resultType="com.srs.comprehensive.domain.Vo.SrsKnrdApplyVo" parameterType="stuDataSelcetDto">
|
<select id="getSrsKnrdApply" resultType="com.srs.comprehensive.domain.Vo.SrsKnrdApplyVo"
|
||||||
|
parameterType="stuDataSelcetDto">
|
||||||
select id,xh,xm,xb,mz,hjszd,bj,xy,nj,xsqmyj,apply_year from srs_knrd_apply a
|
select id,xh,xm,xb,mz,hjszd,bj,xy,nj,xsqmyj,apply_year from srs_knrd_apply a
|
||||||
where stu_year_id = (select id from srs_stu_year where status=1) and step >= 5 and xsqmyj !=4
|
where stu_year_id = (select id from srs_stu_year where status=1) and step >= 5 and xsqmyj !=4
|
||||||
<if test="departmentName != null and departmentName!= '' ">and xy=#{departmentName} </if>
|
<if test="departmentName != null and departmentName!= '' ">and xy=#{departmentName}</if>
|
||||||
<if test="stuNo != null and stuNo!= '' ">and xh=#{stuNo} </if>
|
<if test="stuNo != null and stuNo!= '' ">and xh=#{stuNo}</if>
|
||||||
<if test="stuName != null and stuName!= '' ">and xm=#{stuName} </if>
|
<if test="stuName != null and stuName!= '' ">and xm=#{stuName}</if>
|
||||||
order by NJ desc,bj desc
|
order by NJ desc,bj desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getSrsZxjApply" resultType="com.srs.comprehensive.domain.Vo.SrsZxjApplyVo" parameterType="stuDataSelcetDto">
|
<select id="getSrsZxjApply" resultType="com.srs.comprehensive.domain.Vo.SrsZxjApplyVo"
|
||||||
select id,xh,xm,xb,mz,dz,bj,xy,nj, kndj,apply_year from srs_zxj_apply
|
parameterType="stuDataSelcetDto">
|
||||||
where stu_year_id = (select id FROM srs_stu_year where status=1) and step =4
|
select id,xh,xm,xb,mz,dz,bj,xy,nj, kndj,apply_year from srs_zxj_apply
|
||||||
<if test="departmentName != null and departmentName!= '' ">and xy=#{departmentName} </if>
|
where stu_year_id = (select id FROM srs_stu_year where status=1) and step =4
|
||||||
<if test="stuNo != null and stuNo!= '' ">and xh=#{stuNo} </if>
|
<if test="departmentName != null and departmentName!= '' ">and xy=#{departmentName}</if>
|
||||||
<if test="stuName != null and stuName!= '' ">and xm=#{stuName} </if>
|
<if test="stuNo != null and stuNo!= '' ">and xh=#{stuNo}</if>
|
||||||
order by NJ desc,bj desc
|
<if test="stuName != null and stuName!= '' ">and xm=#{stuName}</if>
|
||||||
|
order by NJ desc,bj desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectStuDropOutSchoolCount"
|
<select id="selectStuDropOutSchoolCount"
|
||||||
resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
resultType="com.srs.comprehensive.domain.Vo.DeptStuQuitPunisDataVo">
|
||||||
SELECT
|
SELECT department_Name AS deptName,
|
||||||
department_Name AS deptName,
|
COUNT(*) AS number
|
||||||
COUNT(*) AS number
|
FROM rt_stu_drop_out_school
|
||||||
FROM
|
WHERE apply_status = 1
|
||||||
rt_stu_drop_out_school
|
GROUP BY department_Name
|
||||||
WHERE
|
|
||||||
apply_status = 1
|
|
||||||
GROUP BY
|
|
||||||
department_Name
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getSrsHZCount" resultType="java.util.Map">
|
<select id="getSrsHZCount" resultType="java.util.Map">
|
||||||
select hkxz ,count(1) as quantity from cph_stu_extra_info where hkxz is not null group by hkxz
|
select hkxz, count(1) as quantity
|
||||||
|
from cph_stu_extra_info
|
||||||
|
where hkxz is not null
|
||||||
|
group by hkxz
|
||||||
</select>
|
</select>
|
||||||
<select id="getSrsZZCount" resultType="java.util.Map">
|
<select id="getSrsZZCount" resultType="java.util.Map">
|
||||||
select zzmm ,count(1) as quantity from cph_stu_extra_info where zzmm is not null and zzmm in('群众','中共党员','共青团员') group by zzmm
|
select zzmm, count(1) as quantity
|
||||||
|
from cph_stu_extra_info
|
||||||
|
where zzmm is not null
|
||||||
|
and zzmm in ('群众', '中共党员', '共青团员')
|
||||||
|
group by zzmm
|
||||||
</select>
|
</select>
|
||||||
<select id="getSrsGenderCount" resultType="java.util.Map">
|
<select id="getSrsGenderCount" resultType="java.util.Map">
|
||||||
select gender,count(1) as quantity from srs_student a left join srs_class b on a.class_id=b.class_id
|
select gender, count(1) as quantity
|
||||||
left join srs_grade c on c.grade_id=b.grade_id where c.grade_status in(1,3) and gender is not null group by gender
|
from srs_student a
|
||||||
|
left join srs_class b on a.class_id = b.class_id
|
||||||
|
left join srs_grade c on c.grade_id = b.grade_id
|
||||||
|
where c.grade_status in (1, 3)
|
||||||
|
and gender is not null
|
||||||
|
group by gender
|
||||||
</select>
|
</select>
|
||||||
<select id="getSrsknrdCount" resultType="java.util.Map">
|
<select id="getSrsknrdCount" resultType="java.util.Map">
|
||||||
select (case
|
select (case
|
||||||
when xsqmyj=1 then'特别困难'
|
when xsqmyj = 1 then '特别困难'
|
||||||
when xsqmyj=2 then '比较困难'
|
when xsqmyj = 2 then '比较困难'
|
||||||
when xsqmyj=3 then '一般困难' end
|
when xsqmyj = 3 then '一般困难' end
|
||||||
) as xsqmyj,count(1) as quantity
|
) as xsqmyj,
|
||||||
from srs_knrd_apply where stu_year_id in (select id from srs_stu_year where status=1) and step >= 5 and xsqmyj !=4
|
count(1) as quantity
|
||||||
|
from srs_knrd_apply
|
||||||
|
where stu_year_id in (select id from srs_stu_year where status = 1)
|
||||||
|
and step >= 5
|
||||||
|
and xsqmyj !=4
|
||||||
group by xsqmyj
|
group by xsqmyj
|
||||||
</select>
|
</select>
|
||||||
<select id="getSrsAgeCount" resultType="java.util.Map">
|
<select id="getSrsAgeCount" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT CASE
|
||||||
CASE
|
WHEN FLOOR(YEAR(CURDATE()) - YEAR(birthday)) BETWEEN 0 AND 17 THEN '低于18岁'
|
||||||
WHEN FLOOR(YEAR(CURDATE()) - YEAR(birthday)) BETWEEN 0 AND 17 THEN '低于18岁'
|
WHEN FLOOR(YEAR(CURDATE()) - YEAR(birthday)) BETWEEN 18 AND 20 THEN '18岁-20岁'
|
||||||
WHEN FLOOR(YEAR(CURDATE()) - YEAR(birthday)) BETWEEN 18 AND 20 THEN '18岁-20岁'
|
ELSE '超过20岁'
|
||||||
ELSE '超过20岁'
|
END AS age_group,
|
||||||
END AS age_group,
|
COUNT(1) AS quantity,
|
||||||
COUNT(1) AS quantity,quantity/sum(quantity)*100 as percen
|
quantity / sum(quantity) * 100 as percen
|
||||||
FROM srs_student where birthday is not null
|
FROM srs_student
|
||||||
|
where birthday is not null
|
||||||
GROUP BY age_group
|
GROUP BY age_group
|
||||||
</select>
|
</select>
|
||||||
<select id="countStuMZ" resultType="java.util.Map">
|
<select id="countStuMZ" resultType="java.util.Map">
|
||||||
select mz ,count(1) as quantity from cph_stu_extra_info where mz is not null group by mz order by quantity desc limit 4
|
select mz, count(1) as quantity
|
||||||
|
from cph_stu_extra_info
|
||||||
|
where mz is not null
|
||||||
|
group by mz
|
||||||
|
order by quantity desc limit 4
|
||||||
</select>
|
</select>
|
||||||
<select id="getCountbyCity" resultType="java.util.Map">
|
<select id="getCountbyCity" resultType="java.util.Map">
|
||||||
select * from (select (case when b.id_card=4501 then '南宁市'
|
select *
|
||||||
when b.id_card=4502 then '柳州市'
|
from (select (case
|
||||||
when b.id_card=4503 then '桂林市'
|
when b.id_card = 4501 then '南宁市'
|
||||||
when b.id_card=4504 then '梧州市'
|
when b.id_card = 4502 then '柳州市'
|
||||||
when b.id_card=4505 then '北海市'
|
when b.id_card = 4503 then '桂林市'
|
||||||
when b.id_card=4506 then '防城港市'
|
when b.id_card = 4504 then '梧州市'
|
||||||
when b.id_card=4507 then '钦州市'
|
when b.id_card = 4505 then '北海市'
|
||||||
when b.id_card=4508 then '贵港市'
|
when b.id_card = 4506 then '防城港市'
|
||||||
when b.id_card=4509 then '玉林市'
|
when b.id_card = 4507 then '钦州市'
|
||||||
when b.id_card=4510 then '百色市'
|
when b.id_card = 4508 then '贵港市'
|
||||||
when b.id_card=4511 then '贺州市'
|
when b.id_card = 4509 then '玉林市'
|
||||||
when b.id_card=4512 then '河池市'
|
when b.id_card = 4510 then '百色市'
|
||||||
when b.id_card=4513 then '来宾市'
|
when b.id_card = 4511 then '贺州市'
|
||||||
when b.id_card=4514 then '崇左市'
|
when b.id_card = 4512 then '河池市'
|
||||||
end) as city,total_count,male_count,female_count
|
when b.id_card = 4513 then '来宾市'
|
||||||
from (select left(AES_DECRYPT(UNHEX(id_card),'zhxg'),4) as id_card,count(1) as total_count,
|
when b.id_card = 4514 then '崇左市'
|
||||||
sum(case when gender='男' then 1 else 0 end) as male_count,
|
end) as city,
|
||||||
sum(case when gender='女' then 1 else 0 end) as female_count
|
total_count,
|
||||||
from srs_student d left join srs_class e on d.class_id=e.class_id
|
male_count,
|
||||||
left join srs_grade f on f.grade_id=e.grade_id
|
female_count
|
||||||
where f.grade_status in (1,3) GROUP BY left(AES_DECRYPT(UNHEX(id_card),'zhxg'),4)) b) c where c.city is not null;
|
from (select left (AES_DECRYPT(UNHEX(id_card), 'zhxg'), 4) as id_card, count (1) as total_count, sum (case when gender='男' then 1 else 0 end) as male_count, sum (case when gender='女' then 1 else 0 end) as female_count
|
||||||
|
from srs_student d left join srs_class e
|
||||||
|
on d.class_id=e.class_id
|
||||||
|
left join srs_grade f on f.grade_id=e.grade_id
|
||||||
|
where f.grade_status in (1, 3)
|
||||||
|
GROUP BY left (AES_DECRYPT(UNHEX(id_card), 'zhxg'), 4)) b) c
|
||||||
|
where c.city is not null;
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getSchoolCountbyGrade" resultType="java.util.Map">
|
<select id="getSchoolCountbyGrade" resultType="java.util.Map">
|
||||||
select c.grade_code,count(1) as number from srs_student a
|
select c.grade_code, count(1) as number
|
||||||
left join srs_class b on a.class_id=b.class_id
|
from srs_student a
|
||||||
left join srs_grade c on c.grade_id=b.grade_id
|
left join srs_class b on a.class_id = b.class_id
|
||||||
where c.grade_status in(1,3) and gender is not null
|
left join srs_grade c on c.grade_id = b.grade_id
|
||||||
group by c.grade_code order by grade_code desc
|
where c.grade_status in (1, 3)
|
||||||
|
and gender is not null
|
||||||
|
group by c.grade_code
|
||||||
|
order by grade_code desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getSchoolTotalCount" resultType="java.util.Map">
|
<select id="getSchoolTotalCount" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT COUNT(1) AS TotalCount,
|
||||||
COUNT(1) AS TotalCount,
|
SUM(CASE WHEN gender = '男' THEN 1 ELSE 0 END) AS NaCount,
|
||||||
SUM(CASE WHEN gender = '男' THEN 1 ELSE 0 END) AS NaCount,
|
SUM(CASE WHEN gender = '女' THEN 1 ELSE 0 END) AS NvCount,
|
||||||
SUM(CASE WHEN gender = '女' THEN 1 ELSE 0 END) AS NvCount,
|
CONCAT(ROUND(SUM(CASE WHEN gender = '男' THEN 1 ELSE 0 END) / COUNT(*) * 100, 2), '%') AS NaZB,
|
||||||
CONCAT(ROUND(SUM(CASE WHEN gender = '男' THEN 1 ELSE 0 END) / COUNT(*) * 100, 2), '%') AS NaZB,
|
CONCAT(ROUND(SUM(CASE WHEN gender = '女' THEN 1 ELSE 0 END) / COUNT(*) * 100, 2), '%') AS NvZB
|
||||||
CONCAT(ROUND(SUM(CASE WHEN gender = '女' THEN 1 ELSE 0 END) / COUNT(*) * 100, 2), '%') AS NvZB
|
FROM srs_student d
|
||||||
FROM srs_student d left join srs_class e on d.class_id=e.class_id
|
left join srs_class e on d.class_id = e.class_id
|
||||||
left join srs_grade f on f.grade_id=e.grade_id where f.grade_status in (1,3) and gender is not null
|
left join srs_grade f on f.grade_id = e.grade_id
|
||||||
|
where f.grade_status in (1, 3)
|
||||||
|
and gender is not null
|
||||||
</select>
|
</select>
|
||||||
<select id="getNotSchoolTotalCount" resultType="java.util.Map">
|
<select id="getNotSchoolTotalCount" resultType="java.util.Map">
|
||||||
select sum(total_count) as number from (select (case when b.id_card=4501 then '南宁市'
|
select sum(total_count) as number
|
||||||
when b.id_card=4502 then '柳州市'
|
from (select (case
|
||||||
when b.id_card=4503 then '桂林市'
|
when b.id_card = 4501 then '南宁市'
|
||||||
when b.id_card=4504 then '梧州市'
|
when b.id_card = 4502 then '柳州市'
|
||||||
when b.id_card=4505 then '北海市'
|
when b.id_card = 4503 then '桂林市'
|
||||||
when b.id_card=4506 then '防城港市'
|
when b.id_card = 4504 then '梧州市'
|
||||||
when b.id_card=4507 then '钦州市'
|
when b.id_card = 4505 then '北海市'
|
||||||
when b.id_card=4508 then '贵港市'
|
when b.id_card = 4506 then '防城港市'
|
||||||
when b.id_card=4509 then '玉林市'
|
when b.id_card = 4507 then '钦州市'
|
||||||
when b.id_card=4510 then '百色市'
|
when b.id_card = 4508 then '贵港市'
|
||||||
when b.id_card=4511 then '贺州市'
|
when b.id_card = 4509 then '玉林市'
|
||||||
when b.id_card=4512 then '河池市'
|
when b.id_card = 4510 then '百色市'
|
||||||
when b.id_card=4513 then '来宾市'
|
when b.id_card = 4511 then '贺州市'
|
||||||
when b.id_card=4514 then '崇左市'
|
when b.id_card = 4512 then '河池市'
|
||||||
end) as city,total_count,male_count,female_count
|
when b.id_card = 4513 then '来宾市'
|
||||||
from (select left(AES_DECRYPT(UNHEX(id_card),'zhxg'),4) as id_card,count(1) as total_count,
|
when b.id_card = 4514 then '崇左市'
|
||||||
sum(case when gender='男' then 1 else 0 end) as male_count,
|
end) as city,
|
||||||
sum(case when gender='女' then 1 else 0 end) as female_count
|
total_count,
|
||||||
from srs_student d left join srs_class e on d.class_id=e.class_id
|
male_count,
|
||||||
left join srs_grade f on f.grade_id=e.grade_id
|
female_count
|
||||||
where f.grade_status in (1,3) GROUP BY left(AES_DECRYPT(UNHEX(id_card),'zhxg'),4)) b) c where c.city is null
|
from (select left (AES_DECRYPT(UNHEX(id_card), 'zhxg'), 4) as id_card, count (1) as total_count, sum (case when gender='男' then 1 else 0 end) as male_count, sum (case when gender='女' then 1 else 0 end) as female_count
|
||||||
|
from srs_student d left join srs_class e
|
||||||
|
on d.class_id=e.class_id
|
||||||
|
left join srs_grade f on f.grade_id=e.grade_id
|
||||||
|
where f.grade_status in (1, 3)
|
||||||
|
GROUP BY left (AES_DECRYPT(UNHEX(id_card), 'zhxg'), 4)) b) c
|
||||||
|
where c.city is null
|
||||||
</select>
|
</select>
|
||||||
<select id="getMajorsCount" resultType="java.util.Map">
|
<select id="getMajorsCount" resultType="java.util.Map">
|
||||||
select d.dept_name as deptName,
|
select d.dept_name as deptName,
|
||||||
count(case when year(CURDATE())-f.grade_code=1 then '大一' end) as firstCount,
|
count(case when year (CURDATE())-f.grade_code=1 then '大一' end) as firstCount,
|
||||||
count(case when year(CURDATE())-f.grade_code=2 then '大二' end) as thirdCount,
|
count(case when year (CURDATE())-f.grade_code=2 then '大二' end) as thirdCount,
|
||||||
count(case when year(CURDATE())-f.grade_code=3 then '大三' end) as secondCount from srs_student s
|
count(case when year (CURDATE())-f.grade_code=3 then '大三' end) as secondCount
|
||||||
left JOIN srs_class c ON s.class_id = c.class_id
|
from srs_student s
|
||||||
left JOIN srs_majors m ON c.major_id = m.major_id
|
left JOIN srs_class c ON s.class_id = c.class_id
|
||||||
left JOIN sys_dept d ON m.college_id = d.dept_id
|
left JOIN srs_majors m ON c.major_id = m.major_id
|
||||||
left join cph_teacher as e on c.teacher_id = e.teacher_id
|
left JOIN sys_dept d ON m.college_id = d.dept_id
|
||||||
left join srs_grade as f on f.grade_id=c.grade_id
|
left join cph_teacher as e on c.teacher_id = e.teacher_id
|
||||||
where f.grade_status in (1,3) group by d.dept_name
|
left join srs_grade as f on f.grade_id = c.grade_id
|
||||||
|
where f.grade_status in (1, 3)
|
||||||
|
group by d.dept_name
|
||||||
order by d.dept_name
|
order by d.dept_name
|
||||||
</select>
|
</select>
|
||||||
<select id="getFiveSchoolTotalCount" resultType="java.util.Map">
|
<select id="getFiveSchoolTotalCount" resultType="java.util.Map">
|
||||||
select f.grade_code as gradeCode,count(1) as number from srs_student s
|
select f.grade_code as gradeCode, count(1) as number
|
||||||
left join srs_class c on s.class_id=c.class_id
|
from srs_student s
|
||||||
left join srs_majors m on c.major_id=m.major_id
|
left join srs_class c on s.class_id = c.class_id
|
||||||
left join sys_dept d on m.college_id=d.dept_id
|
left join srs_majors m on c.major_id = m.major_id
|
||||||
left join cph_teacher as e on c.teacher_id=e.teacher_id
|
left join sys_dept d on m.college_id = d.dept_id
|
||||||
left join srs_grade as f on f.grade_id=c.grade_id
|
left join cph_teacher as e on c.teacher_id = e.teacher_id
|
||||||
where f.grade_code>=year(date_sub(curdate(),interval 5 year))
|
left join srs_grade as f on f.grade_id = c.grade_id
|
||||||
group by f.grade_code order by f.grade_code
|
where f.grade_code >= year (date_sub(curdate(), interval 5 year))
|
||||||
|
group by f.grade_code
|
||||||
|
order by f.grade_code
|
||||||
</select>
|
</select>
|
||||||
<select id="statusList" resultType="com.srs.system.domain.vo.StuStatus">
|
<select id="statusList" resultType="com.srs.system.domain.vo.StuStatus">
|
||||||
select dict_label, dict_value from sys_dict_data where dict_type='srs_stu_status'
|
select dict_label, dict_value
|
||||||
|
from sys_dict_data
|
||||||
|
where dict_type = 'srs_stu_status'
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public class SrsStaffOneStopRegistrationRecordServiceImpl extends ServiceImpl<Sr
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertSrsStaffOneStopRegistrationRecord(SrsStaffOneStopRegistrationRecord srsStaffOneStopRegistrationRecord) {
|
public int insertSrsStaffOneStopRegistrationRecord(SrsStaffOneStopRegistrationRecord srsStaffOneStopRegistrationRecord) {
|
||||||
// srsStaffOneStopRegistrationRecord.setJobNumber(SecurityUtils.getLoginUser().getUser().getUserName()); 获取的是当前登陆人信息
|
srsStaffOneStopRegistrationRecord.setJobNumber(SecurityUtils.getUsername()); //获取的是当前登陆人信息
|
||||||
String applicantJobNumber = srsStaffOneStopRegistrationRecord.getJobNumber(); // 获取申请人工号 知无涯
|
String applicantJobNumber = srsStaffOneStopRegistrationRecord.getJobNumber(); // 获取申请人工号 知无涯
|
||||||
if (applicantJobNumber == null) {
|
if (applicantJobNumber == null) {
|
||||||
throw new ServiceException("申请人工号不能为空", 500);
|
throw new ServiceException("申请人工号不能为空", 500);
|
||||||
|
|||||||
Reference in New Issue
Block a user