Compare commits
12 Commits
77d6bc824c
...
main
Author | SHA1 | Date | |
---|---|---|---|
643f2f7979 | |||
853bc0b92b | |||
4524fbce9d | |||
0fa1bca0b5 | |||
8915e04768 | |||
653bb3b0f7 | |||
8090f9c807 | |||
6c3046bfbd | |||
fd78383f1a | |||
a522a20021 | |||
fff3d3c151 | |||
df68fc4f41 |
@@ -843,6 +843,13 @@ public class ISrsDormitoryStudentServiceImpl extends ServiceImpl<SrsDormitoryStu
|
|||||||
public AjaxResult assignDormitoryByTeacher(String teacherEmployeeId) {
|
public AjaxResult assignDormitoryByTeacher(String teacherEmployeeId) {
|
||||||
try {
|
try {
|
||||||
List<SrsStuReg> stuList = srsDormitoryStudentMapper.listSmokeEarly(teacherEmployeeId);
|
List<SrsStuReg> stuList = srsDormitoryStudentMapper.listSmokeEarly(teacherEmployeeId);
|
||||||
|
|
||||||
|
List<String> kshList = stuList.stream().map(SrsStuReg::getKSH).collect(Collectors.toList());
|
||||||
|
|
||||||
|
QueryWrapper<DmsNewReg> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.in("ksh",kshList);
|
||||||
|
_newRegMapper.delete(queryWrapper);
|
||||||
|
|
||||||
List<DmsDormitoryClass> dormList = srsDormitoryStudentMapper.listFdyCanDorm(teacherEmployeeId);
|
List<DmsDormitoryClass> dormList = srsDormitoryStudentMapper.listFdyCanDorm(teacherEmployeeId);
|
||||||
|
|
||||||
// 查询所有已分配的ksh,避免重复插入
|
// 查询所有已分配的ksh,避免重复插入
|
||||||
|
@@ -108,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="dormitoryId != null">and a.dormitory_id = #{dormitoryId}</if>
|
<if test="dormitoryId != null">and a.dormitory_id = #{dormitoryId}</if>
|
||||||
<if test="classCode != null">and b.BJDM = #{classCode}</if>
|
<if test="classCode != null">and b.BJDM = #{classCode}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by a.ksh asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getStuDorm" resultType="DomInfo" parameterType="DmsSearch">
|
<select id="getStuDorm" resultType="DomInfo" parameterType="DmsSearch">
|
||||||
|
@@ -14,6 +14,7 @@ import com.srs.comprehensive.domain.Vo.CphSearch;
|
|||||||
import com.srs.comprehensive.domain.Vo.DataScreen;
|
import com.srs.comprehensive.domain.Vo.DataScreen;
|
||||||
import com.srs.comprehensive.service.ISrsMajorsService;
|
import com.srs.comprehensive.service.ISrsMajorsService;
|
||||||
import com.srs.framework.web.domain.server.Sys;
|
import com.srs.framework.web.domain.server.Sys;
|
||||||
|
import com.srs.stureg.domain.GxsdxySjzx009Temp2024xsxx;
|
||||||
import com.srs.stureg.domain.SrsStuReg;
|
import com.srs.stureg.domain.SrsStuReg;
|
||||||
import com.srs.stureg.domain.SrsStuRegImport;
|
import com.srs.stureg.domain.SrsStuRegImport;
|
||||||
import com.srs.stureg.service.ISrsStuRegService;
|
import com.srs.stureg.service.ISrsStuRegService;
|
||||||
@@ -56,6 +57,24 @@ public class SrsStuRegController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
ISrsMajorsService srsMajorsService;
|
ISrsMajorsService srsMajorsService;
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('stureg:temp:index')")
|
||||||
|
@ApiOperation("同步班级代码")
|
||||||
|
@PostMapping("/syncClassCode")
|
||||||
|
public AjaxResult syncClassCode(){
|
||||||
|
return srsStuRegService.syncClassCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('stureg:temp:index')")
|
||||||
|
@ApiOperation("列出新生临时数据")
|
||||||
|
@GetMapping("/listXsxxTemp")
|
||||||
|
public TableDataInfo listXsxxTemp(GxsdxySjzx009Temp2024xsxx param){
|
||||||
|
startPage();
|
||||||
|
List<GxsdxySjzx009Temp2024xsxx> res = srsStuRegService.listXsxxTemp(param);
|
||||||
|
return getDataTable(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("统计住宿")
|
@ApiOperation("统计住宿")
|
||||||
@GetMapping("/countRoomBed")
|
@GetMapping("/countRoomBed")
|
||||||
public AjaxResult countRoomBed(){
|
public AjaxResult countRoomBed(){
|
||||||
|
@@ -3,8 +3,10 @@ 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接口
|
||||||
@@ -13,8 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
* @date 2023-06-28
|
* @date 2023-06-28
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SrsCeScoreMapper
|
public interface SrsCeScoreMapper {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 查询综合评价
|
* 查询综合评价
|
||||||
*
|
*
|
||||||
@@ -30,6 +31,7 @@ public interface SrsCeScoreMapper
|
|||||||
* @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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,6 +50,8 @@ public interface SrsCeScoreMapper
|
|||||||
*/
|
*/
|
||||||
public int updateSrsCeScore(SrsCeScore srsCeScore);
|
public int updateSrsCeScore(SrsCeScore srsCeScore);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除综合评价
|
* 删除综合评价
|
||||||
*
|
*
|
||||||
@@ -66,6 +70,7 @@ public interface SrsCeScoreMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 综合评价连表查询
|
* 综合评价连表查询
|
||||||
|
*
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<SrsCeScoreStudentStuYear> SrsCeScoreStudentStuYear(SrsCeScore srsCeScore);
|
List<SrsCeScoreStudentStuYear> SrsCeScoreStudentStuYear(SrsCeScore srsCeScore);
|
||||||
|
@@ -81,4 +81,6 @@ public interface SrsMajorsMapper extends EasyBaseMapper<SrsMajors>
|
|||||||
void updateSrsStudentList(@Param("studentList") List<SrsMajors> studentList);
|
void updateSrsStudentList(@Param("studentList") List<SrsMajors> studentList);
|
||||||
|
|
||||||
Long selectXYID(String xydm);
|
Long selectXYID(String xydm);
|
||||||
|
|
||||||
|
Long selectOldDeptIdByDeptName(String deptName);
|
||||||
}
|
}
|
||||||
|
@@ -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();
|
||||||
|
|
||||||
|
|
||||||
|
@@ -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;
|
int number = 0;
|
||||||
StringBuilder error = new StringBuilder();
|
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; // 批处理大小
|
||||||
|
for (int i = 0; i < srsCeScoreStudents.size(); i += batchSize) {
|
||||||
|
int endIndex = Math.min(i + batchSize, srsCeScoreStudents.size());
|
||||||
|
List<SrsCeScoreStudent> batch = srsCeScoreStudents.subList(i, endIndex);
|
||||||
|
|
||||||
|
// 在新的事务中处理每批数据
|
||||||
|
number += processBatch(batch);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理完成后调用测试方法
|
||||||
|
// if (!srsCeScoreStudents.isEmpty()) {
|
||||||
|
// cphTestForService.testMethod(Math.toIntExact(srsCeScoreStudents.get(0).getStuYearId()));
|
||||||
|
// }
|
||||||
|
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增批处理方法
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int processBatch(List<SrsCeScoreStudent> batch) {
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
for (SrsCeScoreStudent i : batch) {
|
||||||
// 综合评价成绩
|
// 综合评价成绩
|
||||||
SrsCeScore srsCeScore1 = new SrsCeScore();//综合评价
|
SrsCeScore srsCeScore1 = new SrsCeScore();
|
||||||
SrsStudent srsStudent = srsStudentMapper.selectSrsStudentByStuNo(i.getStuNo());//查询学生信息
|
SrsStudent srsStudent = srsStudentMapper.selectSrsStudentByStuNo(i.getStuNo());
|
||||||
srsCeScore1.setStuId(srsStudent.getStuId());//学生id
|
srsCeScore1.setStuId(srsStudent.getStuId());
|
||||||
srsCeScore1.setStuYearId(i.getStuYearId());//学年id
|
srsCeScore1.setStuYearId(i.getStuYearId());
|
||||||
List<SrsCeScore> srsCeScores = srsCeScoreMapper.selectSrsCeScoreListS(srsCeScore1);//查询综合评价表重复
|
|
||||||
|
List<SrsCeScore> srsCeScores = srsCeScoreMapper.selectSrsCeScoreListS(srsCeScore1);
|
||||||
srsCeScore1.setCeScore(i.getCeScore());
|
srsCeScore1.setCeScore(i.getCeScore());
|
||||||
srsCeScore1.setStuNo(i.getStuNo());
|
srsCeScore1.setStuNo(i.getStuNo());
|
||||||
if (srsCeScores.size()==0){//判断综合评价表有没有重复的值
|
|
||||||
|
if (srsCeScores.isEmpty()) {
|
||||||
srsCeScore1.setCreateBy(getUsername());
|
srsCeScore1.setCreateBy(getUsername());
|
||||||
srsCeScore1.setCreateTime(DateUtils.getNowDate());
|
srsCeScore1.setCreateTime(DateUtils.getNowDate());
|
||||||
srsCeScoreMapper.insertSrsCeScore(srsCeScore1);//没有则添加
|
srsCeScoreMapper.insertSrsCeScore(srsCeScore1);
|
||||||
//ifSrsAdd(srsAddRecord,srsAddRecords);
|
} else {
|
||||||
number++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
srsCeScore1.setUpdateBy(getUsername());
|
srsCeScore1.setUpdateBy(getUsername());
|
||||||
srsCeScore1.setUpdateTime(DateUtils.getNowDate());
|
srsCeScore1.setUpdateTime(DateUtils.getNowDate());
|
||||||
srsCeScore1.setId(srsCeScores.get(0).getId());
|
srsCeScore1.setId(srsCeScores.get(0).getId());
|
||||||
srsCeScoreMapper.updateSrsCeScore(srsCeScore1);//有则修改
|
srsCeScoreMapper.updateSrsCeScore(srsCeScore1);
|
||||||
//ifSrsAdd(srsAddRecord,srsAddRecords);
|
|
||||||
number++;
|
|
||||||
}
|
}
|
||||||
TransactionAspectSupport.currentTransactionStatus().flush();//手动提交事务
|
count++;
|
||||||
//cphTotalScoreMapper.testFor(id);
|
|
||||||
cphTestForService.testMethod(Math.toIntExact(srsCeScoreStudents.get(0).getStuYearId()));
|
|
||||||
return number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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){
|
||||||
//添加
|
//添加
|
||||||
|
@@ -156,7 +156,7 @@ public class SrsMajorsServiceImpl implements ISrsMajorsService
|
|||||||
//同步专业
|
//同步专业
|
||||||
@Override
|
@Override
|
||||||
public void sqlserverSynchronousMYSQL(List<Map> list) {
|
public void sqlserverSynchronousMYSQL(List<Map> list) {
|
||||||
List<SrsMajors> srsMajors = srsMajorsMapper.selectSrsmajorsList();//专业列表
|
List<SrsMajors> srsMajors = srsMajorsMapper.selectSrsmajorsList();//数据库存在的专业列表
|
||||||
//查找重复值
|
//查找重复值
|
||||||
List<Map> updateMap = list.stream()
|
List<Map> updateMap = list.stream()
|
||||||
.filter(obj1 -> srsMajors
|
.filter(obj1 -> srsMajors
|
||||||
@@ -195,22 +195,9 @@ public class SrsMajorsServiceImpl implements ISrsMajorsService
|
|||||||
}
|
}
|
||||||
srsMajors1.setStatus("0");
|
srsMajors1.setStatus("0");
|
||||||
|
|
||||||
// Object zydmobj2=map.get("zydm");
|
if (map.get("yxmc")!=null) {
|
||||||
// if (zydmobj2!=null) {
|
|
||||||
// //科室号查询学院id
|
|
||||||
// String ksh = selectClassSpecialty(zydmobj2.toString());;
|
|
||||||
// if (ksh!=null){
|
|
||||||
// Long deptId = cphTeacherMapper.selectDeptCode(ksh);
|
|
||||||
// if (deptId!=null){
|
|
||||||
// srsMajors1.setCollegeId(deptId);
|
|
||||||
// }
|
|
||||||
// }else {
|
|
||||||
// srsMajors1.setCollegeId(0L);//学院id/科室号
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
if (map.get("yxdm")!=null) {
|
|
||||||
//使用代码查询学院id
|
//使用代码查询学院id
|
||||||
Long yxdm = srsMajorsMapper.selectXYID(map.get("yxdm").toString());
|
Long yxdm = srsMajorsMapper.selectOldDeptIdByDeptName(map.get("yxmc").toString());
|
||||||
if (yxdm!=null) {
|
if (yxdm!=null) {
|
||||||
srsMajors1.setCollegeId(yxdm);//学院id
|
srsMajors1.setCollegeId(yxdm);//学院id
|
||||||
}else {
|
}else {
|
||||||
@@ -234,22 +221,10 @@ public class SrsMajorsServiceImpl implements ISrsMajorsService
|
|||||||
if (zymcobj!=null) {
|
if (zymcobj!=null) {
|
||||||
srsMajors1.setMajorName(zymcobj.toString());
|
srsMajors1.setMajorName(zymcobj.toString());
|
||||||
}
|
}
|
||||||
// Object zydmobj2=map.get("zydm");
|
|
||||||
// if (zydmobj2!=null) {
|
if (map.get("yxmc")!=null) {
|
||||||
// //科室号查询学院id
|
|
||||||
// String ksh = selectClassSpecialty(zydmobj2.toString());;
|
|
||||||
// if (ksh!=null){
|
|
||||||
// Long deptId = cphTeacherMapper.selectDeptCode(ksh);
|
|
||||||
// if (deptId!=null){
|
|
||||||
// srsMajors1.setCollegeId(deptId);
|
|
||||||
// }
|
|
||||||
// }else {
|
|
||||||
// srsMajors1.setCollegeId(0L);//学院id/科室号
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
if (map.get("yxdm")!=null) {
|
|
||||||
//使用代码查询学院id
|
//使用代码查询学院id
|
||||||
Long yxdm = srsMajorsMapper.selectXYID(map.get("yxdm").toString());
|
Long yxdm = srsMajorsMapper.selectOldDeptIdByDeptName(map.get("yxmc").toString());
|
||||||
if (yxdm!=null) {
|
if (yxdm!=null) {
|
||||||
srsMajors1.setCollegeId(yxdm);//学院id
|
srsMajors1.setCollegeId(yxdm);//学院id
|
||||||
}else {
|
}else {
|
||||||
@@ -267,7 +242,7 @@ public class SrsMajorsServiceImpl implements ISrsMajorsService
|
|||||||
List<List<SrsMajors>> lists = ListSliceUtil.updateSlice(updateSrsStudent);
|
List<List<SrsMajors>> lists = ListSliceUtil.updateSlice(updateSrsStudent);
|
||||||
if (lists != null) {
|
if (lists != null) {
|
||||||
for (List<SrsMajors> studentList:lists){
|
for (List<SrsMajors> studentList:lists){
|
||||||
// srsMajorsMapper.updateSrsStudentList(studentList); // 20240822 专业同步只新增不修改
|
srsMajorsMapper.updateSrsStudentList(studentList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -81,7 +81,7 @@ public class SrsSportTestServiceImpl extends ServiceImpl<SrsSportTestMapper,Srs
|
|||||||
temp.setCreateTime(new Date());
|
temp.setCreateTime(new Date());
|
||||||
int res = srsSportTestMapper.insertSrsSportTest(temp);
|
int res = srsSportTestMapper.insertSrsSportTest(temp);
|
||||||
if(res == 1){
|
if(res == 1){
|
||||||
cphTestForService.testMethod(Integer.parseInt(param.getStuYearId().toString()));
|
// cphTestForService.testMethod(Integer.parseInt(param.getStuYearId().toString()));
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}else{
|
}else{
|
||||||
throw new Exception("添加成绩失败");
|
throw new Exception("添加成绩失败");
|
||||||
@@ -91,7 +91,7 @@ public class SrsSportTestServiceImpl extends ServiceImpl<SrsSportTestMapper,Srs
|
|||||||
temp.setTestScore(param.getTestScore());
|
temp.setTestScore(param.getTestScore());
|
||||||
int res = srsSportTestMapper.updateSrsSportTest(temp);
|
int res = srsSportTestMapper.updateSrsSportTest(temp);
|
||||||
if(res == 1){
|
if(res == 1){
|
||||||
cphTestForService.testMethod(Integer.parseInt(param.getStuYearId().toString()));
|
// cphTestForService.testMethod(Integer.parseInt(param.getStuYearId().toString()));
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}else{
|
}else{
|
||||||
throw new Exception("修改成绩失败");
|
throw new Exception("修改成绩失败");
|
||||||
|
@@ -175,16 +175,14 @@
|
|||||||
b.stu_year_name,
|
b.stu_year_name,
|
||||||
a.ce_score as score,
|
a.ce_score as score,
|
||||||
a.stu_no,
|
a.stu_no,
|
||||||
e.`name` as stu_name,
|
c.stu_name,
|
||||||
e.`status`,
|
c.`status`,
|
||||||
c.class_name
|
c.class_name
|
||||||
from cph_total_score as a
|
from srs_ce_score as a
|
||||||
left join srs_stu_year as b on a.stu_year_id = b.id
|
left join srs_stu_year as b on a.stu_year_id = b.id
|
||||||
left join srs_class as c on a.class_code = c.class_code
|
left join view_stu_info as c on a.stu_no = c.stu_no
|
||||||
left join cph_teacher as d on c.teacher_id = d.teacher_id
|
where c.t_no = #{tno}
|
||||||
left join srs_student as e on a.stu_no = e.stu_no
|
ORDER BY c.class_id asc, b.stu_year_name desc, a.stu_no asc
|
||||||
where d.employee_id = #{tno}
|
|
||||||
ORDER BY a.class_id asc, b.stu_year_name desc, a.stu_no asc
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listSport" resultType="com.srs.comprehensive.domain.Vo.CphTeacherLookScore">
|
<select id="listSport" resultType="com.srs.comprehensive.domain.Vo.CphTeacherLookScore">
|
||||||
|
@@ -47,7 +47,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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
|
||||||
@@ -66,7 +73,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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">
|
||||||
@@ -124,8 +139,13 @@ 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">
|
||||||
|
@@ -169,4 +169,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{majorId}
|
#{majorId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectOldDeptIdByDeptName" resultType="Long">
|
||||||
|
select b.dept_id
|
||||||
|
from sys_dept_map as a
|
||||||
|
left join sys_dept as b on a.old_dept_id = b.dept_id
|
||||||
|
where b.dept_name = #{deptName}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@@ -32,7 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<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"/>
|
||||||
@@ -77,15 +78,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
|
|
||||||
<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
|
||||||
@@ -110,7 +151,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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">
|
||||||
@@ -135,17 +178,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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
|
||||||
|
from srs_student as a
|
||||||
left join srs_class as b on a.class_id = b.class_id
|
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
|
||||||
@@ -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">
|
||||||
@@ -341,7 +392,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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.grade_name is not NULL
|
||||||
and a.dept_name is not NULL
|
and a.dept_name is not NULL
|
||||||
GROUP BY a.dept_id, a.grade_id
|
GROUP BY a.dept_id, a.grade_id
|
||||||
order by a.dept_id
|
order by a.dept_id
|
||||||
@@ -353,7 +405,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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>
|
||||||
@@ -380,6 +433,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
order by b.grade_id
|
order by b.grade_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSrsStudentByClassIds" parameterType="list" resultType="SrsStudent">
|
||||||
|
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 id="countLakeGradeStu" 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
|
||||||
@@ -392,18 +454,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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
|
||||||
@@ -416,54 +478,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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
|
FROM rt_stu_quit_school
|
||||||
rt_stu_quit_school
|
WHERE apply_status = 1
|
||||||
WHERE
|
GROUP BY department_Name
|
||||||
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
|
FROM rt_stu_disciplinary_application
|
||||||
rt_stu_disciplinary_application
|
WHERE penalty_status = 0
|
||||||
WHERE
|
GROUP BY department_Name
|
||||||
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
|
||||||
|
FROM view_stu_info a
|
||||||
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
||||||
WHERE b.grade_status in (1,3) AND dept_name in ('自动化工程学院','水利工程学院','电力工程学院','水利工程学院','土木建筑工程学院','机电工程学院','交通工程学院','合作分校')
|
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
|
||||||
|
FROM view_stu_info a
|
||||||
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
||||||
WHERE b.grade_status in (1,3) AND dept_name in ('信息工程学院','经济管理学院')
|
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
|
||||||
|
FROM view_stu_info a
|
||||||
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
INNER JOIN srs_grade b ON a.grade_code = b.grade_code
|
||||||
WHERE b.grade_status in (1, 3)
|
WHERE b.grade_status in (1, 3)
|
||||||
GROUP BY b.grade_name
|
GROUP BY b.grade_name
|
||||||
@@ -473,20 +541,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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)
|
||||||
|
and dept_name is not null
|
||||||
|
and a.`status` = '01'
|
||||||
group by a.dept_name, a.grade_name
|
group by a.dept_name, a.grade_name
|
||||||
order by dept_name, 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
|
||||||
(
|
|
||||||
select count(1) as num,a.major_code
|
|
||||||
from view_stu_info as a
|
from view_stu_info as a
|
||||||
where a.dept_name = #{deptName} and a.`status` = '01'
|
where a.dept_name = #{deptName}
|
||||||
GROUP BY a.major_code
|
and a.`status` = '01'
|
||||||
) as t1
|
GROUP BY a.major_code) as t1
|
||||||
left join srs_majors as t2 on t1.major_code = t2.major_code
|
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
|
left join sys_dept as t3 on t2.college_id = t3.dept_id
|
||||||
order by t1.major_code
|
order by t1.major_code
|
||||||
@@ -496,7 +564,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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>
|
||||||
|
|
||||||
@@ -504,7 +574,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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,8 +588,11 @@ 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>
|
||||||
@@ -526,8 +601,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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>
|
||||||
@@ -536,8 +615,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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>
|
||||||
@@ -546,7 +628,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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>
|
||||||
@@ -554,7 +637,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<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"
|
||||||
|
parameterType="stuDataSelcetDto">
|
||||||
select id,xh,xm,xb,mz,dz,bj,xy,nj, kndj,apply_year from srs_zxj_apply
|
select id,xh,xm,xb,mz,dz,bj,xy,nj, kndj,apply_year from srs_zxj_apply
|
||||||
where stu_year_id = (select id FROM srs_stu_year where status=1) and step =4
|
where stu_year_id = (select id FROM srs_stu_year where status=1) and step =4
|
||||||
<if test="departmentName != null and departmentName!= '' ">and xy=#{departmentName}</if>
|
<if test="departmentName != null and departmentName!= '' ">and xy=#{departmentName}</if>
|
||||||
@@ -564,51 +648,70 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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
|
FROM rt_stu_drop_out_school
|
||||||
rt_stu_drop_out_school
|
WHERE apply_status = 1
|
||||||
WHERE
|
GROUP BY department_Name
|
||||||
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,quantity/sum(quantity)*100 as percen
|
COUNT(1) AS quantity,
|
||||||
FROM srs_student where birthday is not null
|
quantity / sum(quantity) * 100 as percen
|
||||||
|
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 *
|
||||||
|
from (select (case
|
||||||
|
when b.id_card = 4501 then '南宁市'
|
||||||
when b.id_card = 4502 then '柳州市'
|
when b.id_card = 4502 then '柳州市'
|
||||||
when b.id_card = 4503 then '桂林市'
|
when b.id_card = 4503 then '桂林市'
|
||||||
when b.id_card = 4504 then '梧州市'
|
when b.id_card = 4504 then '梧州市'
|
||||||
@@ -622,34 +725,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
when b.id_card = 4512 then '河池市'
|
when b.id_card = 4512 then '河池市'
|
||||||
when b.id_card = 4513 then '来宾市'
|
when b.id_card = 4513 then '来宾市'
|
||||||
when b.id_card = 4514 then '崇左市'
|
when b.id_card = 4514 then '崇左市'
|
||||||
end) as city,total_count,male_count,female_count
|
end) as city,
|
||||||
from (select left(AES_DECRYPT(UNHEX(id_card),'zhxg'),4) as id_card,count(1) as total_count,
|
total_count,
|
||||||
sum(case when gender='男' then 1 else 0 end) as male_count,
|
male_count,
|
||||||
sum(case when gender='女' then 1 else 0 end) as female_count
|
female_count
|
||||||
from srs_student d left join srs_class e on d.class_id=e.class_id
|
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
|
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;
|
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
|
||||||
|
from srs_student a
|
||||||
left join srs_class b on a.class_id = b.class_id
|
left join srs_class b on a.class_id = b.class_id
|
||||||
left join srs_grade c on c.grade_id = b.grade_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
|
where c.grade_status in (1, 3)
|
||||||
group by c.grade_code order by grade_code desc
|
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 left join srs_class e on d.class_id=e.class_id
|
FROM srs_student d
|
||||||
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_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
|
||||||
</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
|
||||||
|
from (select (case
|
||||||
|
when b.id_card = 4501 then '南宁市'
|
||||||
when b.id_card = 4502 then '柳州市'
|
when b.id_card = 4502 then '柳州市'
|
||||||
when b.id_card = 4503 then '桂林市'
|
when b.id_card = 4503 then '桂林市'
|
||||||
when b.id_card = 4504 then '梧州市'
|
when b.id_card = 4504 then '梧州市'
|
||||||
@@ -663,38 +777,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
when b.id_card = 4512 then '河池市'
|
when b.id_card = 4512 then '河池市'
|
||||||
when b.id_card = 4513 then '来宾市'
|
when b.id_card = 4513 then '来宾市'
|
||||||
when b.id_card = 4514 then '崇左市'
|
when b.id_card = 4514 then '崇左市'
|
||||||
end) as city,total_count,male_count,female_count
|
end) as city,
|
||||||
from (select left(AES_DECRYPT(UNHEX(id_card),'zhxg'),4) as id_card,count(1) as total_count,
|
total_count,
|
||||||
sum(case when gender='男' then 1 else 0 end) as male_count,
|
male_count,
|
||||||
sum(case when gender='女' then 1 else 0 end) as female_count
|
female_count
|
||||||
from srs_student d left join srs_class e on d.class_id=e.class_id
|
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
|
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
|
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
|
||||||
|
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
|
||||||
where f.grade_status in (1,3) group by d.dept_name
|
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
|
||||||
|
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
|
||||||
where f.grade_code >= year (date_sub(curdate(), interval 5 year))
|
where f.grade_code >= year (date_sub(curdate(), interval 5 year))
|
||||||
group by f.grade_code order by f.grade_code
|
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);
|
||||||
|
@@ -0,0 +1,49 @@
|
|||||||
|
package com.srs.stureg.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName("gxsdxy_sjzx_009_temp_2024xsxx")
|
||||||
|
public class GxsdxySjzx009Temp2024xsxx {
|
||||||
|
|
||||||
|
@TableField("临时学号_报到后给新的")
|
||||||
|
public String 临时学号报到后给新的; // 临时学号_报到后给新的
|
||||||
|
@TableField("姓名")
|
||||||
|
public String 姓名; // 姓名
|
||||||
|
@TableField("性别")
|
||||||
|
public String 性别; // 性别
|
||||||
|
@TableField("出生日期字符串")
|
||||||
|
public String 出生日期字符串; // 出生日期字符串
|
||||||
|
@TableField("民族代码")
|
||||||
|
public String 民族代码; // 民族代码
|
||||||
|
@TableField("民族名称")
|
||||||
|
public String 民族名称; // 民族名称
|
||||||
|
@TableField("政治面貌代码")
|
||||||
|
public String 政治面貌代码; // 政治面貌代码
|
||||||
|
@TableField("政治面貌名称")
|
||||||
|
public String 政治面貌名称; // 政治面貌名称
|
||||||
|
@TableField("教务系统_所属院系")
|
||||||
|
public String 教务系统所属院系; // 教务系统_所属院系
|
||||||
|
@TableField("教务系统_年度专业代码")
|
||||||
|
public String 教务系统年度专业代码; // 教务系统_年度专业代码\
|
||||||
|
@TableField("教务系统_专业名称")
|
||||||
|
public String 教务系统专业名称; // 教务系统_专业名称
|
||||||
|
@TableField("教务系统_班级编号")
|
||||||
|
public String 教务系统班级编号; // 教务系统_班级编号
|
||||||
|
@TableField("班级名称")
|
||||||
|
public String 班级名称; // 班级名称
|
||||||
|
@TableField("班级简称")
|
||||||
|
public String 班级简称; // 班级简称
|
||||||
|
@TableField("是否报到核验")
|
||||||
|
public String 是否报到核验; // 是否报到核验
|
||||||
|
@TableField("报到核验时间")
|
||||||
|
public String 报到核验时间; // 报到核验时间
|
||||||
|
@TableField("学号")
|
||||||
|
public String 学号; // 学号
|
||||||
|
}
|
@@ -197,10 +197,10 @@ public class SrsStuReg extends BaseEntity
|
|||||||
@TableField("disable_descript")
|
@TableField("disable_descript")
|
||||||
private String disableDescript;
|
private String disableDescript;
|
||||||
@Excel(name = "是否吸烟")
|
@Excel(name = "是否吸烟")
|
||||||
@TableField("isSmoke")
|
@TableField("is_smoke")
|
||||||
public String isSmoke;
|
public String isSmoke;
|
||||||
@Excel(name = "是否早睡")
|
@Excel(name = "是否早睡")
|
||||||
@TableField("isEarly")
|
@TableField("is_early")
|
||||||
public String isEarly;
|
public String isEarly;
|
||||||
@Excel(name = "兴趣特长")
|
@Excel(name = "兴趣特长")
|
||||||
@TableField("hobby")
|
@TableField("hobby")
|
||||||
|
@@ -1,8 +1,11 @@
|
|||||||
package com.srs.stureg.mapper;
|
package com.srs.stureg.mapper;
|
||||||
|
|
||||||
|
import com.srs.common.annotation.DataSource;
|
||||||
|
import com.srs.common.enums.DataSourceType;
|
||||||
import com.srs.comprehensive.domain.Vo.CphSearch;
|
import com.srs.comprehensive.domain.Vo.CphSearch;
|
||||||
import com.srs.comprehensive.domain.Vo.DataScreen;
|
import com.srs.comprehensive.domain.Vo.DataScreen;
|
||||||
import com.srs.framework.mybatisplusMapper.EasyBaseMapper;
|
import com.srs.framework.mybatisplusMapper.EasyBaseMapper;
|
||||||
|
import com.srs.stureg.domain.GxsdxySjzx009Temp2024xsxx;
|
||||||
import com.srs.stureg.domain.SrsStuReg;
|
import com.srs.stureg.domain.SrsStuReg;
|
||||||
import com.srs.stureg.domain.VO.TeacherVo;
|
import com.srs.stureg.domain.VO.TeacherVo;
|
||||||
import org.apache.ibatis.annotations.MapKey;
|
import org.apache.ibatis.annotations.MapKey;
|
||||||
@@ -22,6 +25,9 @@ import java.util.Map;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface SrsStuRegMapper extends EasyBaseMapper<SrsStuReg> {
|
public interface SrsStuRegMapper extends EasyBaseMapper<SrsStuReg> {
|
||||||
|
|
||||||
|
@DataSource(DataSourceType.SLAVE)
|
||||||
|
public List<GxsdxySjzx009Temp2024xsxx> listXsxxTemp(GxsdxySjzx009Temp2024xsxx param);
|
||||||
|
|
||||||
public List<Map<String,Object>> countRoomBed();
|
public List<Map<String,Object>> countRoomBed();
|
||||||
|
|
||||||
public List<Map<String,Object>> countStuXb();
|
public List<Map<String,Object>> countStuXb();
|
||||||
|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.srs.common.core.domain.AjaxResult;
|
import com.srs.common.core.domain.AjaxResult;
|
||||||
import com.srs.comprehensive.domain.Vo.CphSearch;
|
import com.srs.comprehensive.domain.Vo.CphSearch;
|
||||||
import com.srs.comprehensive.domain.Vo.DataScreen;
|
import com.srs.comprehensive.domain.Vo.DataScreen;
|
||||||
|
import com.srs.stureg.domain.GxsdxySjzx009Temp2024xsxx;
|
||||||
import com.srs.stureg.domain.SrsStuReg;
|
import com.srs.stureg.domain.SrsStuReg;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@@ -24,6 +25,10 @@ import java.util.concurrent.Future;
|
|||||||
*/
|
*/
|
||||||
public interface ISrsStuRegService extends IService<SrsStuReg> {
|
public interface ISrsStuRegService extends IService<SrsStuReg> {
|
||||||
|
|
||||||
|
public AjaxResult syncClassCode();
|
||||||
|
|
||||||
|
public List<GxsdxySjzx009Temp2024xsxx> listXsxxTemp(GxsdxySjzx009Temp2024xsxx param);
|
||||||
|
|
||||||
public List<Map<String,Object>> countRoomBed();
|
public List<Map<String,Object>> countRoomBed();
|
||||||
|
|
||||||
public List<Map<String,Object>> countStuXb();
|
public List<Map<String,Object>> countStuXb();
|
||||||
|
@@ -3,19 +3,20 @@ package com.srs.stureg.service.impl;
|
|||||||
import java.lang.management.LockInfo;
|
import java.lang.management.LockInfo;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.*;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.srs.common.annotation.DataSource;
|
||||||
import com.srs.common.core.domain.AjaxResult;
|
import com.srs.common.core.domain.AjaxResult;
|
||||||
import com.srs.common.core.domain.entity.SysDictData;
|
import com.srs.common.core.domain.entity.SysDictData;
|
||||||
import com.srs.common.core.domain.entity.SysUser;
|
import com.srs.common.core.domain.entity.SysUser;
|
||||||
|
import com.srs.common.enums.DataSourceType;
|
||||||
import com.srs.common.exception.ServiceException;
|
import com.srs.common.exception.ServiceException;
|
||||||
import com.srs.common.utils.DateUtils;
|
import com.srs.common.utils.DateUtils;
|
||||||
import com.srs.common.utils.SecurityUtils;
|
import com.srs.common.utils.SecurityUtils;
|
||||||
@@ -45,7 +46,11 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.scheduling.annotation.AsyncResult;
|
import org.springframework.scheduling.annotation.AsyncResult;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
|
import org.springframework.transaction.TransactionDefinition;
|
||||||
|
import org.springframework.transaction.TransactionStatus;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import static com.srs.common.utils.SecurityUtils.getUsername;
|
import static com.srs.common.utils.SecurityUtils.getUsername;
|
||||||
@@ -97,6 +102,151 @@ public class SrsStuRegServiceImpl extends ServiceImpl<SrsStuRegMapper, SrsStuReg
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISrsClassService srsClassService;
|
private ISrsClassService srsClassService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public PlatformTransactionManager transactionManager;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult syncClassCode() {
|
||||||
|
// 初始化两个线程池,根据CPU核心数配置合理线程数
|
||||||
|
ThreadPoolExecutor pool1 = new ThreadPoolExecutor(
|
||||||
|
Runtime.getRuntime().availableProcessors() / 2,
|
||||||
|
Runtime.getRuntime().availableProcessors(),
|
||||||
|
60L, TimeUnit.SECONDS,
|
||||||
|
new LinkedBlockingQueue<>(1000),
|
||||||
|
new ThreadFactory() {
|
||||||
|
private final AtomicInteger counter = new AtomicInteger(1);
|
||||||
|
@Override
|
||||||
|
public Thread newThread(Runnable r) {
|
||||||
|
return new Thread(r, "update-pool-1-" + counter.getAndIncrement());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new ThreadPoolExecutor.CallerRunsPolicy() // 任务满时让提交线程执行,避免丢失
|
||||||
|
);
|
||||||
|
|
||||||
|
ThreadPoolExecutor pool2 = new ThreadPoolExecutor(
|
||||||
|
Runtime.getRuntime().availableProcessors() / 2,
|
||||||
|
Runtime.getRuntime().availableProcessors(),
|
||||||
|
60L, TimeUnit.SECONDS,
|
||||||
|
new LinkedBlockingQueue<>(1000),
|
||||||
|
new ThreadFactory() {
|
||||||
|
private final AtomicInteger counter = new AtomicInteger(1);
|
||||||
|
@Override
|
||||||
|
public Thread newThread(Runnable r) {
|
||||||
|
return new Thread(r, "update-pool-2-" + counter.getAndIncrement());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new ThreadPoolExecutor.CallerRunsPolicy()
|
||||||
|
);
|
||||||
|
|
||||||
|
try {
|
||||||
|
List<SrsStuReg> stuList = this.list();
|
||||||
|
List<GxsdxySjzx009Temp2024xsxx> tempList = srsStuRegMapper.listXsxxTemp(new GxsdxySjzx009Temp2024xsxx());
|
||||||
|
|
||||||
|
tempList.forEach(x -> {
|
||||||
|
x.临时学号报到后给新的 = x.临时学号报到后给新的.replace("LS", "");
|
||||||
|
});
|
||||||
|
|
||||||
|
List<SrsStuReg> needUpdateList = new ArrayList<>();
|
||||||
|
for (SrsStuReg srsStuReg : stuList) {
|
||||||
|
GxsdxySjzx009Temp2024xsxx temp = tempList.stream()
|
||||||
|
.filter(x -> x.临时学号报到后给新的.equals(srsStuReg.getKSH()))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
if (temp != null) {
|
||||||
|
SrsStuReg stu = new SrsStuReg();
|
||||||
|
stu.setId(srsStuReg.getId());
|
||||||
|
stu.setBJDM(temp.教务系统班级编号);
|
||||||
|
stu.setBJ(temp.班级名称);
|
||||||
|
needUpdateList.add(stu);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (needUpdateList.isEmpty()) {
|
||||||
|
return AjaxResult.success("没有需要更新的数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将更新列表拆分为两部分,分配给两个线程池
|
||||||
|
int mid = needUpdateList.size() / 2;
|
||||||
|
List<SrsStuReg> part1 = needUpdateList.subList(0, mid);
|
||||||
|
List<SrsStuReg> part2 = needUpdateList.subList(mid, needUpdateList.size());
|
||||||
|
|
||||||
|
// 用于等待所有线程完成
|
||||||
|
CountDownLatch countDownLatch = new CountDownLatch(2);
|
||||||
|
// 用于捕获线程中的异常
|
||||||
|
AtomicReference<Exception> exceptionRef = new AtomicReference<>();
|
||||||
|
|
||||||
|
// 提交第一个任务到线程池1
|
||||||
|
pool1.submit(() -> {
|
||||||
|
try {
|
||||||
|
if (!part1.isEmpty()) {
|
||||||
|
boolean res = this.updateBatchById(part1);
|
||||||
|
if (!res) {
|
||||||
|
throw new Exception("线程池1批量更新失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
exceptionRef.set(e);
|
||||||
|
} finally {
|
||||||
|
countDownLatch.countDown();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 提交第二个任务到线程池2
|
||||||
|
pool2.submit(() -> {
|
||||||
|
try {
|
||||||
|
if (!part2.isEmpty()) {
|
||||||
|
boolean res = this.updateBatchById(part2);
|
||||||
|
if (!res) {
|
||||||
|
throw new Exception("线程池2批量更新失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
exceptionRef.set(e);
|
||||||
|
} finally {
|
||||||
|
countDownLatch.countDown();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 等待所有任务完成(最多等待30秒)
|
||||||
|
boolean await = countDownLatch.await(30, TimeUnit.SECONDS);
|
||||||
|
if (!await) {
|
||||||
|
throw new Exception("批量更新超时");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否有异常
|
||||||
|
if (exceptionRef.get() != null) {
|
||||||
|
throw exceptionRef.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.success("同步班级代码成功,共更新" + needUpdateList.size() + "条数据");
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return AjaxResult.error(ex.getMessage());
|
||||||
|
} finally {
|
||||||
|
// 关闭线程池
|
||||||
|
pool1.shutdown();
|
||||||
|
pool2.shutdown();
|
||||||
|
try {
|
||||||
|
// 等待线程池关闭(最多等5秒)
|
||||||
|
if (!pool1.awaitTermination(5, TimeUnit.SECONDS)) {
|
||||||
|
pool1.shutdownNow();
|
||||||
|
}
|
||||||
|
if (!pool2.awaitTermination(5, TimeUnit.SECONDS)) {
|
||||||
|
pool2.shutdownNow();
|
||||||
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
pool1.shutdownNow();
|
||||||
|
pool2.shutdownNow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@DataSource(DataSourceType.SLAVE)
|
||||||
|
public List<GxsdxySjzx009Temp2024xsxx> listXsxxTemp(GxsdxySjzx009Temp2024xsxx param){
|
||||||
|
return srsStuRegMapper.listXsxxTemp(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public SrsStuRegServiceImpl(List<SysUser> userList) {
|
public SrsStuRegServiceImpl(List<SysUser> userList) {
|
||||||
this.userList = userList;
|
this.userList = userList;
|
||||||
@@ -136,6 +286,7 @@ public class SrsStuRegServiceImpl extends ServiceImpl<SrsStuRegMapper, SrsStuReg
|
|||||||
srsStuReg.setUpdateBy(getUsername());
|
srsStuReg.setUpdateBy(getUsername());
|
||||||
srsStuReg.setBJ(srsStuReg.getBJ());
|
srsStuReg.setBJ(srsStuReg.getBJ());
|
||||||
srsStuReg.setBJDM(srsStuReg.getBJDM());
|
srsStuReg.setBJDM(srsStuReg.getBJDM());
|
||||||
|
srsStuReg.setRegStatus(entity.getRegStatus());
|
||||||
int updateResult= srsStuRegMapper.updateSrsStuReg(srsStuReg);//更新新生注册表
|
int updateResult= srsStuRegMapper.updateSrsStuReg(srsStuReg);//更新新生注册表
|
||||||
count+=updateResult;
|
count+=updateResult;
|
||||||
SysUser sysUser1 = new SysUser();
|
SysUser sysUser1 = new SysUser();
|
||||||
@@ -963,9 +1114,9 @@ public class SrsStuRegServiceImpl extends ServiceImpl<SrsStuRegMapper, SrsStuReg
|
|||||||
stuReg.setIsRetired(srsStuReg.getIsRetired());
|
stuReg.setIsRetired(srsStuReg.getIsRetired());
|
||||||
stuReg.setIsFiling(srsStuReg.getIsFiling());
|
stuReg.setIsFiling(srsStuReg.getIsFiling());
|
||||||
stuReg.setDisableDescript(srsStuReg.getDisableDescript());
|
stuReg.setDisableDescript(srsStuReg.getDisableDescript());
|
||||||
stuReg.isSmoke = srsStuReg.getIsSmoke();
|
stuReg.setIsSmoke(srsStuReg.getIsSmoke());
|
||||||
stuReg.isEarly = srsStuReg.getIsEarly();
|
stuReg.setIsEarly(srsStuReg.getIsEarly());
|
||||||
stuReg.hobby = srsStuReg.getHobby();
|
stuReg.setHobby(srsStuReg.getHobby());
|
||||||
|
|
||||||
SrsStuTodo srsStuTodo = new SrsStuTodo();
|
SrsStuTodo srsStuTodo = new SrsStuTodo();
|
||||||
if (StringUtils.isNotEmpty(srsStuReg.getLoanNo())) {
|
if (StringUtils.isNotEmpty(srsStuReg.getLoanNo())) {
|
||||||
|
@@ -50,6 +50,10 @@
|
|||||||
<result property="isFiling" column="is_filing" />
|
<result property="isFiling" column="is_filing" />
|
||||||
<result property="isDisability" column="is_disability" />
|
<result property="isDisability" column="is_disability" />
|
||||||
<result property="disableDescript" column="disable_descript" />
|
<result property="disableDescript" column="disable_descript" />
|
||||||
|
<result property="disableDescript" column="disable_descript" />
|
||||||
|
<result property="isSmoke" column="is_smoke" />
|
||||||
|
<result property="isEarly" column="is_early" />
|
||||||
|
<result property="hobby" column="hobby" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSrsStuRegVo">
|
<sql id="selectSrsStuRegVo">
|
||||||
@@ -741,7 +745,6 @@
|
|||||||
left join srs_class cl on a.bjdm=class_code
|
left join srs_class cl on a.bjdm=class_code
|
||||||
left join cph_teacher t on cl.teacher_id=t.teacher_id
|
left join cph_teacher t on cl.teacher_id=t.teacher_id
|
||||||
<where>
|
<where>
|
||||||
a.reg_status in (1,3,4)
|
|
||||||
<if test="BJDM != null">and a.BJDM = #{BJDM}</if>
|
<if test="BJDM != null">and a.BJDM = #{BJDM}</if>
|
||||||
<if test="params.tNo != null">and t.employee_id = #{params.tNo}</if>
|
<if test="params.tNo != null">and t.employee_id = #{params.tNo}</if>
|
||||||
<if test="MZ != null">and a.MZ like concat('%', #{MZ},'%')</if>
|
<if test="MZ != null">and a.MZ like concat('%', #{MZ},'%')</if>
|
||||||
@@ -998,4 +1001,13 @@
|
|||||||
(#{item.XSXM}, #{item.KSH}, #{item.SFZH}, #{item.SJH},#{item.XB},#{item.ZZMM},#{item.MZ},#{item.XY},#{item.ZY},#{item.lastSchool},#{item.famNowAddr},#{item.sfzAddr},#{item.createTime},#{item.createBy},#{item.BJ},#{item.BJDM})
|
(#{item.XSXM}, #{item.KSH}, #{item.SFZH}, #{item.SJH},#{item.XB},#{item.ZZMM},#{item.MZ},#{item.XY},#{item.ZY},#{item.lastSchool},#{item.famNowAddr},#{item.sfzAddr},#{item.createTime},#{item.createBy},#{item.BJ},#{item.BJDM})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="listXsxxTemp" resultType="GxsdxySjzx009Temp2024xsxx" parameterType="GxsdxySjzx009Temp2024xsxx">
|
||||||
|
select a.* from gxsdxy_sjzx_009_temp_2024xsxx as a
|
||||||
|
<where>
|
||||||
|
<if test="临时学号报到后给新的 != null and 临时学号报到后给新的 != ''">and a.临时学号_报到后给新的 like CONCAT('%',#{临时学号报到后给新的},'%')</if>
|
||||||
|
<if test="教务系统班级编号 != null and 教务系统班级编号 != ''">and a.教务系统_班级编号 = #{教务系统班级编号}</if>
|
||||||
|
</where>
|
||||||
|
order by a.临时学号_报到后给新的 asc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Reference in New Issue
Block a user