Merge remote-tracking branch 'origin/main'

This commit is contained in:
MDSMO
2025-08-29 19:49:07 +08:00
150 changed files with 5889 additions and 435 deletions

View File

@@ -126,4 +126,15 @@ public class SrsIdentifytableController extends BaseController {
{
return toAjax(srsIdentifytableService.deleteSrsIdentifytableByIds(ids));
}
/**
* 班级信息
*/
@Log(title = "学生鉴定信息", businessType = BusinessType.DELETE)
@GetMapping("/deptdata")
@ApiOperation("获取对应人的班级信息")
public AjaxResult deptData()
{
return success(srsIdentifytableService.deptDataLsit());
}
}

View File

@@ -2,6 +2,8 @@ package com.srs.comprehensive.domain;
import com.srs.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import com.srs.common.annotation.Sensitive;
import com.srs.common.enums.DesensitizedType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
@@ -70,6 +72,7 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("联系电话")
@TableField("contact_number")
@Excel(name = "联系电话")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
private String contactNumber;
/**

View File

@@ -91,6 +91,8 @@ public class SrsStudent extends BaseEntity
})
@TableField(exist = false)
private SrsMajors srsMajors;
@TableField(exist = false)
private CphStuExtraInfo cphStuExtraInfo;
/** 所属班级ID */
private Long classId;

View File

@@ -217,6 +217,7 @@ private static final long serialVersionUID=1L;
@TableField(exist = false)
public String editStatus;
@TableField(exist = false)
public String surveyName;
}

View File

@@ -6,16 +6,16 @@ import org.apache.ibatis.annotations.Mapper;
/**
* 审核明细Mapper接口
*
*
* @author 邓
* @date 2023-07-04
*/
@Mapper
public interface CphAuditDetailsMapper
public interface CphAuditDetailsMapper
{
/**
* 查询审核明细
*
*
* @param id 审核明细主键
* @return 审核明细
*/
@@ -25,12 +25,12 @@ public interface CphAuditDetailsMapper
/**
* 查询审核明细列表
*
*
* @param cphAuditDetails 审核明细
* @return 审核明细集合
*/
public List<CphAuditDetails> selectCphAuditDetailsList(CphAuditDetails cphAuditDetails);
/**
* 查询已审核
* @author zhy
@@ -50,7 +50,7 @@ public interface CphAuditDetailsMapper
/**
* 新增审核明细
*
*
* @param cphAuditDetails 审核明细
* @return 结果
*/
@@ -58,7 +58,7 @@ public interface CphAuditDetailsMapper
/**
* 修改审核明细
*
*
* @param cphAuditDetails 审核明细
* @return 结果
*/
@@ -66,7 +66,7 @@ public interface CphAuditDetailsMapper
/**
* 删除审核明细
*
*
* @param id 审核明细主键
* @return 结果
*/
@@ -74,9 +74,11 @@ public interface CphAuditDetailsMapper
/**
* 批量删除审核明细
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteCphAuditDetailsByIds(Long[] ids);
public int cancelAuditById(Long id);
public int cancelCphAudiDetailsById(Long id);
}

View File

@@ -1,6 +1,5 @@
package com.srs.comprehensive.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.comprehensive.domain.CphClasstwo;
import com.srs.comprehensive.domain.Vo.CphScoreVo;
import com.srs.comprehensive.domain.Vo.StuIdNo;
@@ -12,7 +11,7 @@ import java.util.List;
/**
* 第二课堂Mapper接口
*
*
* @author zhy
* @date 2023-07-03
*/
@@ -29,7 +28,7 @@ public interface CphClasstwoMapper extends EasyBaseMapper<CphClasstwo>
/**
* 查询第二课堂
*
*
* @param id 第二课堂主键
* @return 第二课堂
*/
@@ -37,7 +36,7 @@ public interface CphClasstwoMapper extends EasyBaseMapper<CphClasstwo>
/**
* 查询第二课堂列表
*
*
* @param cphClasstwo 第二课堂
* @return 第二课堂集合
*/
@@ -57,7 +56,7 @@ public interface CphClasstwoMapper extends EasyBaseMapper<CphClasstwo>
/**
* 新增第二课堂
*
*
* @param cphClasstwo 第二课堂
* @return 结果
*/
@@ -65,7 +64,7 @@ public interface CphClasstwoMapper extends EasyBaseMapper<CphClasstwo>
/**
* 修改第二课堂
*
*
* @param cphClasstwo 第二课堂
* @return 结果
*/
@@ -73,7 +72,7 @@ public interface CphClasstwoMapper extends EasyBaseMapper<CphClasstwo>
/**
* 删除第二课堂
*
*
* @param id 第二课堂主键
* @return 结果
*/
@@ -81,7 +80,7 @@ public interface CphClasstwoMapper extends EasyBaseMapper<CphClasstwo>
/**
* 批量删除第二课堂
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/

View File

@@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
/**
* 消息Mapper接口
*
*
* @author srs
* @date 2023-07-12
*/
@@ -17,7 +17,7 @@ public interface CphMsgMapper extends BaseMapper<CphMsg>
{
/**
* 查询消息
*
*
* @param id 消息主键
* @return 消息
*/
@@ -25,7 +25,7 @@ public interface CphMsgMapper extends BaseMapper<CphMsg>
/**
* 查询消息列表
*
*
* @param cphMsg 消息
* @return 消息集合
*/
@@ -33,7 +33,7 @@ public interface CphMsgMapper extends BaseMapper<CphMsg>
/**
* 新增消息
*
*
* @param cphMsg 消息
* @return 结果
*/
@@ -41,7 +41,7 @@ public interface CphMsgMapper extends BaseMapper<CphMsg>
/**
* 修改消息
*
*
* @param cphMsg 消息
* @return 结果
*/
@@ -49,17 +49,34 @@ public interface CphMsgMapper extends BaseMapper<CphMsg>
/**
* 删除消息
*
*
* @param id 消息主键
* @return 结果
*/
public int deleteCphMsgById(Long id);
/**
* 根据接收人和内容中的标识来查找流程消息 (使用LIKE查询) 知无涯
*
* @param cphMsg 包含 receiver 和 content (作为模糊查询的标识) 的查询对象
* @return 匹配的消息列表
*/
public List<CphMsg> selectCphMsgListForFlowable(CphMsg cphMsg);
/**
* 批量删除消息
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteCphMsgByIds(Long[] ids);
/**
* 根据学号查询用户ID
*
* @param stuNo 学号
* @return 用户ID
*/
public Long getUserIdByStuNo(String stuNo);
}

View File

@@ -1,8 +1,6 @@
package com.srs.comprehensive.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.comprehensive.domain.CphStuScoreMiddle;
import com.srs.comprehensive.domain.Dto.CphStuScoreMiddleDto;
import com.srs.framework.mybatisplusMapper.EasyBaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

View File

@@ -1,13 +1,10 @@
package com.srs.comprehensive.mapper;
import com.srs.common.core.domain.entity.SysDept;
import java.util.List;
import java.util.Map;
import com.srs.comprehensive.domain.CphTeacher;
import com.srs.comprehensive.domain.Dto.CphExport;
import com.srs.comprehensive.domain.SrsClass;
import com.srs.comprehensive.domain.SrsGrade;
import com.srs.comprehensive.domain.SrsMajors;
import com.srs.comprehensive.domain.Vo.*;

View File

@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Param;
/**
* 【加分记录】Mapper接口
*
*
* @author srs
* @date 2023-06-20
*/
@@ -24,7 +24,7 @@ public interface SrsAddRecordMapper extends EasyBaseMapper<SrsAddRecord>
/**
* 查询【请填写功能名称】
*
*
* @param id 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
@@ -32,7 +32,7 @@ public interface SrsAddRecordMapper extends EasyBaseMapper<SrsAddRecord>
/**
* 查询【请填写功能名称】列表
*
*
* @param srsAddRecord 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
@@ -40,7 +40,7 @@ public interface SrsAddRecordMapper extends EasyBaseMapper<SrsAddRecord>
/**
* 新增【请填写功能名称】
*
*
* @param srsAddRecord 【请填写功能名称】
* @return 结果
*/
@@ -50,7 +50,7 @@ public interface SrsAddRecordMapper extends EasyBaseMapper<SrsAddRecord>
/**
* 修改【请填写功能名称】
*
*
* @param srsAddRecord 【请填写功能名称】
* @return 结果
*/
@@ -58,7 +58,7 @@ public interface SrsAddRecordMapper extends EasyBaseMapper<SrsAddRecord>
/**
* 删除【请填写功能名称】
*
*
* @param id 【请填写功能名称】主键
* @return 结果
*/
@@ -66,7 +66,7 @@ public interface SrsAddRecordMapper extends EasyBaseMapper<SrsAddRecord>
/**
* 批量删除【请填写功能名称】
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/

View File

@@ -7,7 +7,6 @@ import com.srs.comprehensive.domain.Vo.CphSearch;
import com.srs.framework.mybatisplusMapper.EasyBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;

View File

@@ -2,7 +2,6 @@ package com.srs.comprehensive.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.comprehensive.domain.SrsGrade;
import com.srs.framework.mybatisplusMapper.EasyBaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@@ -2,6 +2,8 @@ package com.srs.comprehensive.mapper;
import java.util.List;
import com.srs.common.core.domain.entity.SysDept;
import com.srs.comprehensive.domain.SrsClass;
import com.srs.comprehensive.domain.SrsIdentifytable;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -107,4 +109,13 @@ public interface SrsIdentifytableMapper extends BaseMapper<SrsIdentifytable> {
* @return 结果
*/
int deleteSrsGraduataByIds(Long[] ids);
/**
* 获取对应人的班级信息
*
* @param userName 用户名称
* @return 结果
*/
List<SrsClass> selectDeptByDeptCodes(String userName);
}

View File

@@ -2,7 +2,6 @@ package com.srs.comprehensive.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.comprehensive.domain.SrsMajors;
import com.srs.framework.mybatisplusMapper.EasyBaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@@ -1,13 +1,10 @@
package com.srs.comprehensive.mapper;
import java.util.List;
import java.util.Set;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.comprehensive.domain.SrsSportTest;
import com.srs.comprehensive.domain.SumSportTest;
import com.srs.comprehensive.domain.Vo.CphScoreVo;
import com.srs.comprehensive.domain.Vo.SrsSportTestStudent;
import com.srs.comprehensive.domain.Vo.StuIdNo;
import com.srs.framework.mybatisplusMapper.EasyBaseMapper;
import org.apache.ibatis.annotations.Mapper;
@@ -15,7 +12,7 @@ import org.apache.ibatis.annotations.Param;
/**
* 体能测试Mapper接口
*
*
* @author srs
* @date 2023-06-28
*/
@@ -39,7 +36,7 @@ public interface SrsSportTestMapper extends EasyBaseMapper<SrsSportTest>
/**
* 查询体能测试
*
*
* @param id 体能测试主键
* @return 体能测试
*/
@@ -53,7 +50,7 @@ public interface SrsSportTestMapper extends EasyBaseMapper<SrsSportTest>
/**
* 查询体能测试列表
*
*
* @param srsSportTest 体能测试
* @return 体能测试集合
*/
@@ -63,7 +60,7 @@ public interface SrsSportTestMapper extends EasyBaseMapper<SrsSportTest>
/**
* 新增体能测试
*
*
* @param srsSportTest 体能测试
* @return 结果
*/
@@ -71,7 +68,7 @@ public interface SrsSportTestMapper extends EasyBaseMapper<SrsSportTest>
/**
* 修改体能测试
*
*
* @param srsSportTest 体能测试
* @return 结果
*/
@@ -79,7 +76,7 @@ public interface SrsSportTestMapper extends EasyBaseMapper<SrsSportTest>
/**
* 删除体能测试
*
*
* @param id 体能测试主键
* @return 结果
*/
@@ -87,7 +84,7 @@ public interface SrsSportTestMapper extends EasyBaseMapper<SrsSportTest>
/**
* 批量删除体能测试
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/

View File

@@ -11,11 +11,11 @@ import com.srs.comprehensive.domain.Vo.CphSearch;
/**
* 审核明细Service接口
*
*
* @author 邓
* @date 2023-07-04
*/
public interface ICphAuditDetailsService
public interface ICphAuditDetailsService
{
public int reSub(CphResub param);
@@ -30,7 +30,7 @@ public interface ICphAuditDetailsService
/**
* 查询审核明细
*
*
* @param id 审核明细主键
* @return 审核明细
*/
@@ -48,7 +48,7 @@ public interface ICphAuditDetailsService
/**
* 查询审核明细列表
*
*
* @param cphAuditDetails 审核明细
* @return 审核明细集合
*/
@@ -64,7 +64,7 @@ public interface ICphAuditDetailsService
/**
* 新增审核明细
*
*
* @param cphAuditDetails 审核明细
* @return 结果
*/
@@ -72,7 +72,7 @@ public interface ICphAuditDetailsService
/**
* 修改审核明细
*
*
* @param cphAuditDetails 审核明细
* @return 结果
*/
@@ -85,6 +85,12 @@ public interface ICphAuditDetailsService
*/
public int auditOpera(CphAuditDetails cphAuditDetails);
/**
* 批量同意
* @param
* @return
*/
/**
* 批量同意
* @param
@@ -94,15 +100,17 @@ public interface ICphAuditDetailsService
/**
* 批量删除审核明细
*
*
* @param ids 需要删除的审核明细主键集合
* @return 结果
*/
public int deleteCphAuditDetailsByIds(Long[] ids);
//撤销
public int cancelAuditById(Long id);
/**
* 删除审核明细信息
*
*
* @param id 审核明细主键
* @return 结果
*/

View File

@@ -5,15 +5,15 @@ import com.srs.comprehensive.domain.CphMsg;
/**
* 消息Service接口
*
*
* @author srs
* @date 2023-07-12
*/
public interface ICphMsgService
public interface ICphMsgService
{
/**
* 查询消息
*
*
* @param id 消息主键
* @return 消息
*/
@@ -21,7 +21,7 @@ public interface ICphMsgService
/**
* 查询消息列表
*
*
* @param cphMsg 消息
* @return 消息集合
*/
@@ -29,7 +29,7 @@ public interface ICphMsgService
/**
* 新增消息
*
*
* @param cphMsg 消息
* @return 结果
*/
@@ -37,7 +37,7 @@ public interface ICphMsgService
/**
* 修改消息
*
*
* @param cphMsg 消息
* @return 结果
*/
@@ -45,7 +45,7 @@ public interface ICphMsgService
/**
* 批量删除消息
*
*
* @param ids 需要删除的消息主键集合
* @return 结果
*/
@@ -53,9 +53,25 @@ public interface ICphMsgService
/**
* 删除消息信息
*
*
* @param id 消息主键
* @return 结果
*/
public int deleteCphMsgById(Long id);
/**
* 删除消息信息 精准匹配版
*
* @param cphMsg 消息
* @return 列表
*/
List<CphMsg> selectCphMsgListForFlowable(CphMsg cphMsg);
/**
* 根据学号查询用户ID
*
* @param stuNo 学号
* @return 用户ID
*/
public Long getUserIdByStuNo(String stuNo);
}

View File

@@ -3,6 +3,8 @@ package com.srs.comprehensive.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.srs.comprehensive.domain.CascaderEntity;
import com.srs.comprehensive.domain.SrsClass;
import com.srs.comprehensive.domain.SrsIdentifytable;
/**
@@ -59,4 +61,12 @@ public interface ISrsIdentifytableService extends IService<SrsIdentifytable> {
* @return 结果
*/
int deleteSrsIdentifytableById(Long id);
/**
* 获取对应人的班级信息
*
* @param
* @return 集合结果
*/
List<SrsClass> deptDataLsit();
}

View File

@@ -435,8 +435,8 @@ public class CphAuditDetailsServiceImpl implements ICphAuditDetailsService {
temp.setId(cphAuditDetails.getProjectId());
temp.setAuditStatus(cphAuditDetails.getStatusCode().toString());
cphIamService.updateCphIam(temp);
if (cphAuditDetails.getStatusCode() == 6L)//判断审核状态是否完成
Long statusCode=cphAuditDetailsMapper.selectCphAuditDetailsById(cphAuditDetails.getId()).getStatusCode();
if (statusCode == 6L)//判断审核状态是否完成
{
SrsStudent stu = _stuService.selectSrsStudentByStuId(cphAuditDetails.getSubmitterId());
SrsAddRecord srsAddRecord = new SrsAddRecord();//加分记录表
@@ -519,7 +519,13 @@ public class CphAuditDetailsServiceImpl implements ICphAuditDetailsService {
public int deleteCphAuditDetailsByIds(Long[] ids) {
return cphAuditDetailsMapper.deleteCphAuditDetailsByIds(ids);
}
@Override
public int cancelAuditById(Long id) {
int result=0;
result=cphAuditDetailsMapper.cancelAuditById(id);
result+= cphAuditDetailsMapper.cancelCphAudiDetailsById(id);
return result;
}
/**
* 删除审核明细信息
*

View File

@@ -12,7 +12,7 @@ import com.srs.comprehensive.service.ICphMsgService;
/**
* 消息Service业务层处理
*
*
* @author srs
* @date 2023-07-12
*/
@@ -24,7 +24,7 @@ public class CphMsgServiceImpl extends ServiceImpl<CphMsgMapper,CphMsg> implemen
/**
* 查询消息
*
*
* @param id 消息主键
* @return 消息
*/
@@ -36,7 +36,7 @@ public class CphMsgServiceImpl extends ServiceImpl<CphMsgMapper,CphMsg> implemen
/**
* 查询消息列表
*
*
* @param cphMsg 消息
* @return 消息
*/
@@ -48,7 +48,7 @@ public class CphMsgServiceImpl extends ServiceImpl<CphMsgMapper,CphMsg> implemen
/**
* 新增消息
*
*
* @param cphMsg 消息
* @return 结果
*/
@@ -61,7 +61,7 @@ public class CphMsgServiceImpl extends ServiceImpl<CphMsgMapper,CphMsg> implemen
/**
* 修改消息
*
*
* @param cphMsg 消息
* @return 结果
*/
@@ -74,7 +74,7 @@ public class CphMsgServiceImpl extends ServiceImpl<CphMsgMapper,CphMsg> implemen
/**
* 批量删除消息
*
*
* @param ids 需要删除的消息主键
* @return 结果
*/
@@ -86,7 +86,7 @@ public class CphMsgServiceImpl extends ServiceImpl<CphMsgMapper,CphMsg> implemen
/**
* 删除消息信息
*
*
* @param id 消息主键
* @return 结果
*/
@@ -95,4 +95,26 @@ public class CphMsgServiceImpl extends ServiceImpl<CphMsgMapper,CphMsg> implemen
{
return cphMsgMapper.deleteCphMsgById(id);
}
/**
* 删除消息信息
*
* @param cphMsg 消息
* @return 结果
*/
@Override
public List<CphMsg> selectCphMsgListForFlowable(CphMsg cphMsg) {
return cphMsgMapper.selectCphMsgListForFlowable(cphMsg);
}
/**
* 根据学号查询用户ID
*
* @param stuNo 学号
* @return 用户ID
*/
@Override
public Long getUserIdByStuNo(String stuNo)
{
return cphMsgMapper.getUserIdByStuNo(stuNo);
}
}

View File

@@ -19,8 +19,10 @@ import com.srs.comprehensive.mapper.ClassCounMapper;
import com.srs.comprehensive.mapper.Gxsdxy02JzgxxMapper;
import com.srs.comprehensive.mapper.InfoTeacherMapper;
import com.srs.comprehensive.util.ListSliceUtil;
import com.srs.system.domain.QgzxTeacher;
import com.srs.system.domain.SysPost;
import com.srs.system.domain.SysUserRole;
import com.srs.system.mapper.QgzxTeacherMapper;
import com.srs.system.mapper.SysRoleMapper;
import com.srs.system.mapper.SysUserMapper;
import com.srs.system.mapper.SysUserRoleMapper;
@@ -47,6 +49,8 @@ public class CphTeacherServiceImpl implements ICphTeacherService
{
@Autowired
private CphTeacherMapper cphTeacherMapper;
@Autowired
private QgzxTeacherMapper qgzxTeacherMapper;
@Autowired
private Gxsdxy02JzgxxMapper teacherMapper;
@@ -350,14 +354,121 @@ public class CphTeacherServiceImpl implements ICphTeacherService
}
//同步辅导员
// @Override
// @Transactional(rollbackFor = Exception.class)
// public void sqlserverSynchronousMYSQL(List<Map> list) {
// //辅导员列表
// List<CphTeacher> cphTeachers = cphTeacherMapper.selectTeacherList();
// //查找重复值
// List<Map> updateMap = list.stream()
// .filter(obj1 -> cphTeachers
// .stream().anyMatch(obj2 -> {
// Object xhObj = obj1.get("zgh");
// if (xhObj != null) {
// String zgh = xhObj.toString();
// return obj2.getEmployeeId().equals(zgh);
// }
// return false;
// }))
// .collect(Collectors.toList());
//
// //添加需要
// List<String> kshList2 = cphTeachers.stream()
// .map(CphTeacher::getEmployeeId)
// .collect(Collectors.toList());
//
// List<Map> insertMap = list.stream()
// .filter(obj -> {
// Object xhObj = obj.get("zgh");
// return xhObj != null && !kshList2.contains(xhObj.toString());
// })
// .collect(Collectors.toList());
// //添加
// List<CphTeacher> insertStudentList = new ArrayList<>();
// for (Map map:insertMap){
// CphTeacher cphTeacher = new CphTeacher();
// Object xmObj = map.get("xm");
// if (xmObj != null) {
// cphTeacher.setName(xmObj.toString());
// }
// Object xbObj = map.get("xb");
// if (xbObj != null) {
// String s = xbObj.toString();
// if (!Objects.equals(s, "NULL") && !Objects.equals(s, "null")&&!Objects.equals(s," ")) {
// cphTeacher.setGender(xbObj.toString());
// }
// }
// Object zghObj = map.get("zgh");
// if (zghObj != null) {
// cphTeacher.setEmployeeId(zghObj.toString());
// }
// //学院id
// Object yxdmObj = map.get("yxdm");
// if (yxdmObj!=null) {
// Long deptId = cphTeacherMapper.selectDeptCode(yxdmObj.toString());
// if (deptId != null) {
// cphTeacher.setDeptId(deptId);
// }
// }
// cphTeacher.setStatus("1");
// cphTeacher.setCreateTime(DateUtils.getNowDate());
// insertStudentList.add(cphTeacher);
// }
// if (insertStudentList.size()!=0) {
// cphTeacherMapper.insertBatchSomeColumn(insertStudentList);
// }
// //修改
// List<CphTeacher> updateSrsStudent = new ArrayList<>();
// for (Map map:updateMap){
// CphTeacher cphTeacher = new CphTeacher();
// Object xmObj = map.get("xm");
// if (xmObj != null) {
// cphTeacher.setName(xmObj.toString());
// }
// Object xbObj = map.get("xb");
// if (xbObj != null) {
// String s = xbObj.toString();
// if (!Objects.equals(s, "NULL") && !Objects.equals(s, "null")&&!Objects.equals(s," ")) {
// cphTeacher.setGender(xbObj.toString());
// }
// }
// Object zghObj = map.get("zgh");
// if (zghObj != null) {
// cphTeacher.setEmployeeId(zghObj.toString());
// }
// //学院id
// Object yxdmObj = map.get("yxdm");
// if (yxdmObj!=null) {
// Long ksh = cphTeacherMapper.selectDeptCode(yxdmObj.toString());
// if (ksh != null) {
// cphTeacher.setDeptId(ksh);
// }
// }
// cphTeacher.setUpdateTime(DateUtils.getNowDate());
// updateSrsStudent.add(cphTeacher);
// }
// /*if (updateSrsStudent.size()!=0) {
// List<List<CphTeacher>> lists = ListSliceUtil.updateSlice(updateSrsStudent);
// if (lists != null) {
// for (List<CphTeacher> studentList : lists) {
// cphTeacherMapper.updateSrsClassList(studentList);
// }
// }
// }*/
//
//
//
// }
//同步教职工表
@Override
@Transactional(rollbackFor = Exception.class)
public void sqlserverSynchronousMYSQL(List<Map> list) {
//辅导员列表
List<CphTeacher> cphTeachers = cphTeacherMapper.selectTeacherList();
//教职工列表
List<QgzxTeacher> qgzxTeachers = qgzxTeacherMapper.selectTeacherList();
//查找重复值
List<Map> updateMap = list.stream()
.filter(obj1 -> cphTeachers
.filter(obj1 -> qgzxTeachers
.stream().anyMatch(obj2 -> {
Object xhObj = obj1.get("zgh");
if (xhObj != null) {
@@ -369,8 +480,8 @@ public class CphTeacherServiceImpl implements ICphTeacherService
.collect(Collectors.toList());
//添加需要
List<String> kshList2 = cphTeachers.stream()
.map(CphTeacher::getEmployeeId)
List<String> kshList2 = qgzxTeachers.stream()
.map(QgzxTeacher::getEmployeeId)
.collect(Collectors.toList());
List<Map> insertMap = list.stream()
@@ -380,68 +491,68 @@ public class CphTeacherServiceImpl implements ICphTeacherService
})
.collect(Collectors.toList());
//添加
List<CphTeacher> insertStudentList = new ArrayList<>();
List<QgzxTeacher> insertStudentList = new ArrayList<>();
for (Map map:insertMap){
CphTeacher cphTeacher = new CphTeacher();
QgzxTeacher qgzxTeacher = new QgzxTeacher();
Object xmObj = map.get("xm");
if (xmObj != null) {
cphTeacher.setName(xmObj.toString());
qgzxTeacher.setName(xmObj.toString());
}
Object xbObj = map.get("xb");
if (xbObj != null) {
String s = xbObj.toString();
if (!Objects.equals(s, "NULL") && !Objects.equals(s, "null")&&!Objects.equals(s," ")) {
cphTeacher.setGender(xbObj.toString());
qgzxTeacher.setGender(xbObj.toString());
}
}
Object zghObj = map.get("zgh");
if (zghObj != null) {
cphTeacher.setEmployeeId(zghObj.toString());
qgzxTeacher.setEmployeeId(zghObj.toString());
}
//学院id
Object yxdmObj = map.get("yxdm");
if (yxdmObj!=null) {
Long deptId = cphTeacherMapper.selectDeptCode(yxdmObj.toString());
Long deptId = qgzxTeacherMapper.selectDeptCode(yxdmObj.toString());
if (deptId != null) {
cphTeacher.setDeptId(deptId);
qgzxTeacher.setDeptId(deptId);
}
}
cphTeacher.setStatus("1");
cphTeacher.setCreateTime(DateUtils.getNowDate());
insertStudentList.add(cphTeacher);
qgzxTeacher.setStatus("1");
qgzxTeacher.setCreateTime(DateUtils.getNowDate());
insertStudentList.add(qgzxTeacher);
}
if (insertStudentList.size()!=0) {
cphTeacherMapper.insertBatchSomeColumn(insertStudentList);
qgzxTeacherMapper.insertBatchSomeColumn(insertStudentList);
}
//修改
List<CphTeacher> updateSrsStudent = new ArrayList<>();
List<QgzxTeacher> updateSrsStudent = new ArrayList<>();
for (Map map:updateMap){
CphTeacher cphTeacher = new CphTeacher();
QgzxTeacher qgzxTeacher = new QgzxTeacher();
Object xmObj = map.get("xm");
if (xmObj != null) {
cphTeacher.setName(xmObj.toString());
qgzxTeacher.setName(xmObj.toString());
}
Object xbObj = map.get("xb");
if (xbObj != null) {
String s = xbObj.toString();
if (!Objects.equals(s, "NULL") && !Objects.equals(s, "null")&&!Objects.equals(s," ")) {
cphTeacher.setGender(xbObj.toString());
qgzxTeacher.setGender(xbObj.toString());
}
}
Object zghObj = map.get("zgh");
if (zghObj != null) {
cphTeacher.setEmployeeId(zghObj.toString());
qgzxTeacher.setEmployeeId(zghObj.toString());
}
//学院id
Object yxdmObj = map.get("yxdm");
if (yxdmObj!=null) {
Long ksh = cphTeacherMapper.selectDeptCode(yxdmObj.toString());
Long ksh = qgzxTeacherMapper.selectDeptCode(yxdmObj.toString());
if (ksh != null) {
cphTeacher.setDeptId(ksh);
qgzxTeacher.setDeptId(ksh);
}
}
cphTeacher.setUpdateTime(DateUtils.getNowDate());
updateSrsStudent.add(cphTeacher);
qgzxTeacher.setUpdateTime(DateUtils.getNowDate());
updateSrsStudent.add(qgzxTeacher);
}
/*if (updateSrsStudent.size()!=0) {
List<List<CphTeacher>> lists = ListSliceUtil.updateSlice(updateSrsStudent);

View File

@@ -1,17 +1,20 @@
package com.srs.comprehensive.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import com.srs.common.core.domain.entity.SysDept;
import com.srs.common.core.domain.model.LoginUser;
import com.srs.common.utils.DateUtils;
import com.srs.comprehensive.domain.GraduateStudentNews;
import com.srs.comprehensive.domain.SaveStudent;
import com.srs.comprehensive.mapper.GraduateTextMapper;
import com.srs.comprehensive.mapper.SrsGraduateStudentMapper;
import com.srs.common.utils.SecurityUtils;
import com.srs.comprehensive.domain.*;
import com.srs.comprehensive.mapper.*;
import com.srs.comprehensive.service.ICascaderDataStudentService;
import com.srs.comprehensive.util.FileUploadUtil;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.srs.comprehensive.mapper.SrsIdentifytableMapper;
import com.srs.comprehensive.domain.SrsIdentifytable;
import com.srs.comprehensive.service.ISrsIdentifytableService;
/**
@@ -156,4 +159,23 @@ public class SrsIdentifytableServiceImpl extends ServiceImpl<SrsIdentifytableMap
public int deleteSrsIdentifytableById(Long id) {
return srsIdentifytableMapper.deleteSrsIdentifytableById(id);
}
/**
* 获取对应人的班级信息
*
* @param
* @return 集合结果
*/
@Override
public List<SrsClass> deptDataLsit() {
//获取登录人的信息
LoginUser loginUser = SecurityUtils.getLoginUser();
List<SrsClass> depts = srsIdentifytableMapper.selectDeptByDeptCodes(loginUser.getUsername());
if(depts != null && depts.size() > 0) {
return depts;
}
return new ArrayList<>();
}
}

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.CphAuditDetailsMapper">
<resultMap type="CphAuditDetails" id="CphAuditDetailsResult">
<result property="id" column="id" />
<result property="projectName" column="project_name" />
@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCphAuditDetailsList" parameterType="CphAuditDetails" resultMap="CphAuditDetailsResult">
<include refid="selectCphAuditDetailsVo"/>
<where>
<where>
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
<if test="submitterId != null "> and submitter_id = #{submitterId}</if>
<if test="submitterName != null and submitterName != ''"> and submitter_name like concat('%', #{submitterName}, '%')</if>
@@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by stu_no,id desc
</select>
<select id="selectCphAuditDetailsById" parameterType="Long" resultMap="CphAuditDetailsResult">
<include refid="selectCphAuditDetailsVo"/>
where ad.id = #{id}
@@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectCphAuditDetailsVo"/>
where ad.project_id = #{id}
</select>
<insert id="insertCphAuditDetails" parameterType="CphAuditDetails" useGeneratedKeys="true" keyProperty="id">
insert into cph_audit_details
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -159,9 +159,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteCphAuditDetailsByIds" parameterType="String">
delete from cph_audit_details where id in
delete from cph_audit_details where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
<update id="cancelAuditById" parameterType="Long">
update cph_iam set audit_status=1 where id=#{id}
</update>
<update id="cancelCphAudiDetailsById" parameterType="Long">
update cph_audit_details set status_code=1 where project_id=#{id}
</update>
</mapper>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.CphGoodApplyMapper">
<resultMap type="CphGoodApply" id="CphGoodApplyResult">
@@ -66,25 +66,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select t2.* ,sc.class_name,
(select count(1) from srs_student where `status` = '01' and class_id = sc.class_id) as class_count,
(select count(1) from srs_student as f1
left join srs_class as f2 on f1.class_id = f2.class_id
left join srs_class as f2 on f1.class_id = f2.class_id
where f1.`status` = '01' and f2.major_id = sc.major_id and f2.grade_id = sc.grade_id) as major_count
from
(select t1.* from (
select a.stu_no,a.stu_year_id,b.stu_year_name,a.stu_score,a.cph_score,a.sport_score,
RANK() OVER(PARTITION BY c.class_id,a.stu_year_id,d.grade_id ORDER BY a.cph_score DESC ) as cph_class_rank,
RANK() OVER(PARTITION BY c.class_id,a.stu_year_id,d.grade_id ORDER BY a.stu_score DESC ) as stu_class_rank,
RANK() OVER(PARTITION BY d.major_id,a.stu_year_id,d.grade_id ORDER BY a.stu_score DESC ) as stu_major_rank
from cph_total_score as a
left join srs_stu_year as b on a.stu_year_id = b.id
left join srs_student as c on a.stu_no = c.stu_no
left join srs_class as d on c.class_id = d.class_id
)as t1
where t1.stu_no = #{stuNo} and t1.stu_year_id in (
select id from srs_stu_year as b where b.`status` = 1
)
select a.stu_no,a.stu_year_id,b.stu_year_name,a.stu_score,a.cph_score,a.sport_score,
RANK() OVER(PARTITION BY c.class_id,a.stu_year_id,d.grade_id ORDER BY a.cph_score DESC ) as cph_class_rank,
RANK() OVER(PARTITION BY c.class_id,a.stu_year_id,d.grade_id ORDER BY a.stu_score DESC ) as stu_class_rank,
RANK() OVER(PARTITION BY d.major_id,a.stu_year_id,d.grade_id ORDER BY a.stu_score DESC ) as stu_major_rank
from cph_total_score as a
left join srs_stu_year as b on a.stu_year_id = b.id
left join srs_student as c on a.stu_no = c.stu_no
left join srs_class as d on c.class_id = d.class_id
)as t1
where t1.stu_no = #{stuNo} and t1.stu_year_id in (
select id from srs_stu_year as b where b.`status` = 1
)
)as t2
left join srs_student as ss on t2.stu_no = ss.stu_no
left join srs_class as sc on ss.class_id = sc.class_id
left join srs_student as ss on t2.stu_no = ss.stu_no
left join srs_class as sc on ss.class_id = sc.class_id
</select>
<select id="listOwnYearCourseScore" resultType="CphCourseNameScore">
@@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(a.is_pass) as course_count,sum(case when a.is_pass='true' then 1 else 0 end ) as pass_count,
sum(case when a.is_pass='false' then 1 else 0 end ) as unpass_count , b.stu_year_name
from cph_stu_score_middle as a
left join srs_stu_year as b on a.xndm = b.xndm
left join srs_stu_year as b on a.xndm = b.xndm
where a.stu_no = #{stuNo}
GROUP BY b.id
</select>
@@ -124,31 +124,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(a.is_pass) as course_count,sum(case when a.is_pass='1' then 1 else 0 end ) as pass_count,
sum(case when a.is_pass='0' then 1 else 0 end ) as unpass_count , b.stu_year_name
from cph_stu_score_middle as a
left join srs_stu_year as b on a.xndm = b.xndm
left join srs_stu_year as b on a.xndm = b.xndm
where a.stu_no = #{stuNo} and a.xndm = (select t2.xndm from cph_own_good_type as t1
left join srs_stu_year as t2 on t1.stu_year_id = t2.id where t1.type_code = #{code})
left join srs_stu_year as t2 on t1.stu_year_id = t2.id where t1.type_code = #{code})
GROUP BY b.id
</select>
<select id="getOwnIamCountByCode" resultType="CphIamSitCount">
select d.stu_year_name,
count(1) as iam_count,
sum(case when c.max_score > 0 then 1 else 0 end ) as add_count,
sum(case when c.max_score &lt; 0 then 1 else 0 end ) as minus_count
count(1) as iam_count,
sum(case when c.max_score > 0 then 1 else 0 end ) as add_count,
sum(case when c.max_score &lt; 0 then 1 else 0 end ) as minus_count
from cph_iam as a
left join srs_student as b on a.to_add = b.stu_id
left join cph_rules as c on a.rule_id = c.rule_id
left join srs_stu_year as d on a.stu_year_id = d.id
left join srs_student as b on a.to_add = b.stu_id
left join cph_rules as c on a.rule_id = c.rule_id
left join srs_stu_year as d on a.stu_year_id = d.id
where b.stu_no = #{stuNo} and a.audit_status = 6
and a.stu_year_id = (select stu_year_id from cph_own_good_type as t where t.type_code = #{code})
and a.stu_year_id = (select stu_year_id from cph_own_good_type as t where t.type_code = #{code})
GROUP BY a.stu_year_id
</select>
<select id="listOwnXyjxjApply" resultType="com.srs.comprehensive.domain.Vo.CphGoodApplyVo">
select a.* ,b.type_name,c.fdy_comment,c.dept_comment,c.final_comment
from cph_good_apply as a
left join cph_own_good_type as b on a.type_code = b.type_code
left join cph_good_audit as c on a.id = c.apply_id
left join cph_own_good_type as b on a.type_code = b.type_code
left join cph_good_audit as c on a.id = c.apply_id
where a.stu_no = #{stuNo} and b.parent_code = "XYJXJ"
ORDER BY create_time DESC
</select>
@@ -156,11 +156,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="listFdyAudit" resultType="CphGoodAuditFdyVo" parameterType="CphSearch">
select c.stu_no,c.`name` as stu_name,d.class_name,b.apply_status,f.type_name,a.*
from cph_good_audit as a
left join cph_good_apply as b on a.apply_id = b.id
left join srs_student as c on b.stu_no = c.stu_no
left join srs_class as d on c.class_id = d.class_id
left join cph_teacher as e on d.teacher_id = e.teacher_id
left join cph_own_good_type as f on b.type_code = f.type_code
left join cph_good_apply as b on a.apply_id = b.id
left join srs_student as c on b.stu_no = c.stu_no
left join srs_class as d on c.class_id = d.class_id
left join cph_teacher as e on d.teacher_id = e.teacher_id
left join cph_own_good_type as f on b.type_code = f.type_code
<where>
e.employee_id = #{tNo}
<if test="status != null and status != ''"> and b.apply_status = #{status}</if>
@@ -173,13 +173,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="listXwAudit" resultType="CphGoodAuditFdyVo" parameterType="CphSearch">
select b.apply_status,c.stu_no,c.`name` as stu_name,d.class_name,f.type_name,a.*,e.major_id,e.major_name,e.major_type_name,
d.class_name
d.class_name
from cph_good_audit as a
left join cph_good_apply as b on a.apply_id = b.id
left join srs_student as c on b.stu_no = c.stu_no
left join srs_class as d on c.class_id = d.class_id
left join cph_own_good_type as f on b.type_code = f.type_code
left join srs_majors as e on d.major_id = e.major_id
left join cph_good_apply as b on a.apply_id = b.id
left join srs_student as c on b.stu_no = c.stu_no
left join srs_class as d on c.class_id = d.class_id
left join cph_own_good_type as f on b.type_code = f.type_code
left join srs_majors as e on d.major_id = e.major_id
<where>
<if test="deptId != null and deptId != ''"> and e.college_id = #{deptId}</if>
<if test="majorId != null and majorId != ''"> and d.major_id = #{majorId}</if>
@@ -226,7 +226,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="importShxs" resultType="CphGoodApplyVo" parameterType="CphSearch">
select d.stu_year_name,e.class_name,a.stu_no,b.`name` as stu_name,c.type_name,NOW() as import_time,f.major_type_name,
f.major_name,g.dept_name,
f.major_name,g.dept_name,
case
when a.apply_status = 1 then '已提交待辅导员审核'
when a.apply_status = 6 then '学工审核通过'
@@ -293,7 +293,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="listXyjxjCanType" resultType="com.srs.comprehensive.domain.Vo.CphGoodTypeCode">
select concat(b.stu_year_name,a.type_name) as type_name , a.type_code,a.stu_year_id
from cph_own_good_type 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
where a.parent_code = 'XYJXJ' and enable_status = 1 and start_status = 1
</select>
@@ -329,26 +329,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getGrades" resultType="java.util.Map" parameterType="CphGoodApply">
SELECT cph_good_apply.id as applyId,cph_good_apply.stu_no as stuNo,cph_good_apply.zzmm,cph_good_apply.born_time as bornTime
,cph_good_apply.type_code as typeCode,cph_good_apply.class_post as classPost,
cph_good_apply.good_his as goodHis,cph_good_apply.main_his as mainHis
cph_good_apply.good_his as goodHis,cph_good_apply.main_his as mainHis
,cph_good_apply.material,cph_good_apply.apply_status as applyStatus,cph_good_apply.apply_time as applyTime,
cph_good_audit.*,cph_own_good_type.type_name as typeName,cph_own_good_type.stu_year_id as stuYearId
,cph_good_audit.fdy_comment as fdyComment,cph_good_audit.dept_comment as deptComment,cph_good_audit.final_comment as finalComment
,cph_good_apply.classtwo_sure as classtwoSure,cph_good_apply.youth_percent as youthPercent
from cph_good_apply
cph_good_audit.*,cph_own_good_type.type_name as typeName,cph_own_good_type.stu_year_id as stuYearId
,cph_good_audit.fdy_comment as fdyComment,cph_good_audit.dept_comment as deptComment,cph_good_audit.final_comment as finalComment
,cph_good_apply.classtwo_sure as classtwoSure,cph_good_apply.youth_percent as youthPercent
from cph_good_apply
LEFT JOIN cph_good_audit ON cph_good_apply.id = cph_good_audit.apply_id
left join cph_own_good_type on cph_good_apply.type_code=cph_own_good_type.type_code
left join cph_own_good_type on cph_good_apply.type_code=cph_own_good_type.type_code
where stu_no = #{stuNo}
and cph_good_apply.type_code like '%SHXS%'
order by cph_good_apply.id desc
</select>
<select id="getMyApply" resultType="com.srs.comprehensive.domain.Vo.ApplyYxgbVo">
select cpa.id, cpa.zzmm,cpa.class_post,stu_no, cpa.type_code, type_name, stu_year_name, apply_time,cpa.youth_percent,cpa.classtwo_sure,cpa.good_his,cpa.main_his, cpa.apply_status AS `status`,fdy_comment,dept_comment,final_comment
from cph_good_apply cpa
left join cph_good_audit cga on cpa.id = cga.apply_id
left join cph_own_good_type cogt on cpa.type_code = cogt.type_code
left join srs_stu_year ssy on cogt.stu_year_id = ssy.id
where stu_no = #{username}
and cpa.type_code like '%YXXSGB%'
select cpa.id, cpa.zzmm,cpa.class_post,stu_no, cpa.type_code, type_name, stu_year_name, apply_time,cpa.youth_percent,cpa.classtwo_sure,cpa.good_his,cpa.main_his, cpa.apply_status AS `status`,fdy_comment,dept_comment,final_comment
from cph_good_apply cpa
left join cph_good_audit cga on cpa.id = cga.apply_id
left join cph_own_good_type cogt on cpa.type_code = cogt.type_code
left join srs_stu_year ssy on cogt.stu_year_id = ssy.id
where stu_no = #{username}
and cpa.type_code like '%YXXSGB%'
order by cpa.id desc
</select>
@@ -356,21 +356,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select t2.* ,sc.class_name,
(select count(1) from srs_student where `status` = '01' and class_id = sc.class_id) as class_count,
(select count(1) from srs_student as f1
left join srs_class as f2 on f1.class_id = f2.class_id
left join srs_class as f2 on f1.class_id = f2.class_id
where f1.`status` = '01' and f2.major_id = sc.major_id and f2.grade_id = sc.grade_id) as major_count
from
(select t1.* from (
select a.stu_no,a.stu_year_id,b.stu_year_name,a.stu_score,a.cph_score,a.sport_score,
RANK() OVER(PARTITION BY c.class_id,a.stu_year_id,d.grade_id ORDER BY a.cph_score DESC ) as cph_class_rank,
RANK() OVER(PARTITION BY c.class_id,a.stu_year_id,d.grade_id ORDER BY a.stu_score DESC ) as stu_class_rank,
RANK() OVER(PARTITION BY d.major_id,a.stu_year_id,d.grade_id ORDER BY a.stu_score DESC ) as stu_major_rank
from cph_total_score as a
left join srs_stu_year as b on a.stu_year_id = b.id
left join srs_student as c on a.stu_no = c.stu_no
left join srs_class as d on c.class_id = d.class_id
)as t1
where t1.stu_no = #{stuNo}
and t1.stu_year_id = (
select a.stu_no,a.stu_year_id,b.stu_year_name,a.stu_score,a.cph_score,a.sport_score,
RANK() OVER(PARTITION BY c.class_id,a.stu_year_id,d.grade_id ORDER BY a.cph_score DESC ) as cph_class_rank,
RANK() OVER(PARTITION BY c.class_id,a.stu_year_id,d.grade_id ORDER BY a.stu_score DESC ) as stu_class_rank,
RANK() OVER(PARTITION BY d.major_id,a.stu_year_id,d.grade_id ORDER BY a.stu_score DESC ) as stu_major_rank
from cph_total_score as a
left join srs_stu_year as b on a.stu_year_id = b.id
left join srs_student as c on a.stu_no = c.stu_no
left join srs_class as d on c.class_id = d.class_id
)as t1
where t1.stu_no = #{stuNo}
and t1.stu_year_id = (
select stu_year_id from cph_own_good_type where type_code = #{code}
))as t2
left join srs_student as ss on t2.stu_no = ss.stu_no
@@ -402,7 +402,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="material != null">material,</if>
<if test="classtwoSure != null">classtwo_sure,</if>
<if test="youthPercent != null">youth_percent,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stuNo != null">#{stuNo},</if>
<if test="zzmm != null">#{zzmm},</if>
@@ -425,7 +425,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="material != null">#{material},</if>
<if test="classtwoSure != null">#{classtwoSure},</if>
<if test="youthPercent != null">#{youthPercent},</if>
</trim>
</trim>
</insert>
<update id="updateCphGoodApply" parameterType="CphGoodApply">
@@ -467,7 +467,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<select id="countJwcUnDo" resultType="String">
<select id="countJwcUnDo" resultType="String">
select concat('good-',count(a.id)) as `all`
from cph_good_apply as a
where a.apply_status = 3
@@ -491,6 +491,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select concat('zx-',count(a.id)) as `all`
from srs_zxj_apply as a
where a.`step` = 3
<!-- 知无涯 教务困难资助-->
union
select concat('knzz-',count(a.id)) as `all`
from knzz_tufa_apply as a
where a.apply_status = 3
/*宁博 6、困难资助-国家励志奖学金-学工审核代办*/
union
select concat('knzzgl-',count(a.id)) as `all`
from knzz_gl_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 3
-- 陈冠元 困难资助-自治区人民政府奖学金-学工审核代办
union
select concat('knzzzzq-',count(a.id)) as `all`
from knzz_zzq_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 3
-- 邵政文-(日常事务-学生证补办-辅导员审核-学工审核)
union
select concat('xszb-',count(a.id)) as `all`
from rt_stu_id_reissue as a
where a.inspection_progress = 1
-- 邵政文-(日常事务-在校证明申请-辅导员审核-学工审核)
union
select concat('zxzm-',count(a.id)) as `all`
from rt_stu_at_school as a
where a.xgstatus = 0 or a.xgstatus is null
/*庞世斌 4、学生奖惩-先进班集体-学工审核代办*/
union
select concat('xjbjt-',count(a.id)) as `all`
from cph_new_good_class_apply as a
WHERE a.apply_status = 3
<!-- 知无涯 "中职升高职" 学校终审 -->
union
select concat('zsg-',count(a.id)) as `all`
from knzz_zsg_apply as a
where a.apply_status = 3
</select>
<select id="countStuUnDo" resultType="String" parameterType="String">
@@ -517,99 +554,228 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select concat('zx-',count(a.id)) as `all`
from srs_zxj_apply as a
where a.`step` = 4 and a.xh = #{stuNo}
<!-- 知无涯 学生困难资助申请驳回-->
union
select concat('knzz-',count(a.id)) as `all`
from knzz_tufa_apply as a
where a.apply_status = 6 and a.stu_no = #{stuNo}
</select>
<select id="countXwUnDo" resultType="String" parameterType="Long">
select concat('good-',count(a.id)) as `all`
from cph_good_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 = 2 and b.dept_id = #{id}
union
select concat('lake-',count(a.id)) as `all`
from cph_lake_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 = 2 and b.dept_id = #{id}
union
select concat('biye-',count(a.id)) as `all`
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 = 2 and b.dept_id = #{id}
union
select concat('dms-',count(a.id)) as `all`
from dms_manage_application 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.`status` = 1 and b.dept_id = #{id}
union
select concat('kn-',count(a.id)) as `all`
from srs_knrd_apply as a
left join view_stu_info as b on a.xh = b.stu_no
left join view_stu_info as b on a.xh = b.stu_no
where a.`step` = 3 and b.dept_id = #{id}
and
EXISTS(
SELECT m.* FROM sys_role r
LEFT JOIN sys_role_menu rm on r.role_id = rm.role_id
LEFT JOIN sys_menu m on rm.menu_id = m.menu_id
where r.role_key ='stumanger' and m.component = 'poverty/povertyapply/xw'
)
and
EXISTS(
SELECT m.* FROM sys_role r
LEFT JOIN sys_role_menu rm on r.role_id = rm.role_id
LEFT JOIN sys_menu m on rm.menu_id = m.menu_id
where r.role_key ='stumanger' and m.component = 'poverty/povertyapply/xw'
)
union
select concat('zx-',count(a.id)) as `all`
from srs_zxj_apply as a
left join view_stu_info as b on a.xh = b.stu_no
left join view_stu_info as b on a.xh = b.stu_no
where a.`step` = 2 and b.dept_id = #{id}
and
EXISTS(
SELECT m.* FROM sys_role r
LEFT JOIN sys_role_menu rm on r.role_id = rm.role_id
LEFT JOIN sys_menu m on rm.menu_id = m.menu_id
where r.role_key ='stumanger' and m.component = 'poverty/xw'
)
and
EXISTS(
SELECT m.* FROM sys_role r
LEFT JOIN sys_role_menu rm on r.role_id = rm.role_id
LEFT JOIN sys_menu m on rm.menu_id = m.menu_id
where r.role_key ='stumanger' and m.component = 'poverty/xw'
)
<!-- 知无涯 学务困难资助 -->
union
select concat('knzz-',count(a.id)) as `all`
from knzz_tufa_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 2 and b.dept_id = #{id}
/*宁博 6、困难资助-国家励志奖学金-学务审核代办*/
union
select concat('knzzgl-',count(a.id)) as `all`
from knzz_gl_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 2 and b.dept_id = #{id}
-- 陈冠元 困难资助-自治区人民政府奖学金-学校审核代办
union
select concat('knzzzzq-',count(a.id)) as `all`
from knzz_zzq_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 2 and b.dept_id = #{id}
/*庞世斌 4、学生奖惩-先进班集体-学务审核代办*/
union
select concat('xjbjt-',count(a.id)) as `all`
from cph_new_good_class_apply as a
left join srs_class as c on a.class_id = c.class_id
left join srs_majors as e on c.major_id = e.major_id
left join sys_dept as f on e.college_id = f.dept_id
WHERE a.apply_status = 2 and f.dept_id = #{id}
<!-- 知无涯"中职升高职" 学务审核 -->
union
select concat('zsg-',count(a.id)) as `all`
from knzz_zsg_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 2 and b.dept_id = #{id}
<!-- 知无涯"铺导员综合绩效" (第1步学务初审) -->
union
select concat('jx-',count(a.id)) as `all`
from sys_performance as a
left join sys_user as b on a.credit_pass = b.user_name
where a.xwstatus IS NULL and b.dept_id = #{id}
# 宁博-辅导员管理--成果绩效----(第1步学务初审)
union
select concat('cg-',count(a.check_id)) as `all`
from sys_teacher_achievementcheck as a
left join sys_user as b on a.teacher_id = b.user_name
where a.check_status = 1 and b.dept_id = #{id}
-- 陈冠元 辅导员业绩考核-学务审核待办
union
select concat('yj-',count(a.id)) as `all`
from sys_teacher_kpi_filling as a
left join sys_user as b on a.job_number = b.user_name
where a.role_audit = 1 and b.dept_id = #{id}
</select>
<select id="countFdyUnDo" resultType="String" parameterType="String">
select concat('good-',count(a.id)) as `all`
from cph_good_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 = 1 and b.t_no = #{tNo}
union
select concat('lake-',count(a.id)) as `all`
from cph_lake_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 = 1 and b.t_no = #{tNo}
union
select concat('biye-',count(a.id)) as `all`
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 = 1 and b.t_no = #{tNo}
union
select concat('dms-',count(a.id)) as `all`
from dms_manage_application 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.`status` = 0 and b.t_no = #{tNo}
union
select concat('kn-',count(a.id)) as `all`
from srs_knrd_apply as a
left join view_stu_info as b on a.xh = b.stu_no
left join view_stu_info as b on a.xh = b.stu_no
where a.`step` = 2 and b.t_no = #{tNo}
union
select concat('zx-',count(a.id)) as `all`
from srs_zxj_apply as a
left join view_stu_info as b on a.xh = b.stu_no
left join view_stu_info as b on a.xh = b.stu_no
where a.`step` = 1 and b.t_no = #{tNo}
union
select concat('qgzxgw-',count(a.id)) as `all`
from qgzx_stu_post as a
left join qgzx_post as b on a.post_id = b.id
left join sys_dept as c on b.dept_code = c.dept_code
left join view_stu_info as d on a.stu_no = d.stu_no
left join qgzx_post as b on a.post_id = b.id
left join sys_dept as c on b.dept_code = c.dept_code
left join view_stu_info as d on a.stu_no = d.stu_no
where b.zdls_no = #{tNo} and a.apply_status = '1'
union
select concat('qgzxgzjl-',count(a.id)) as `all`
from qgzx_stu_post as a
left join qgzx_post as b on a.post_id = b.id
left join sys_dept as c on b.dept_code = c.dept_code
left join view_stu_info as d on a.stu_no = d.stu_no
left join qgzx_post as b on a.post_id = b.id
left join sys_dept as c on b.dept_code = c.dept_code
left join view_stu_info as d on a.stu_no = d.stu_no
where b.zdls_no = #{tNo} and a.apply_status = '1'
<!-- 知无涯 辅导员困难资助-->
union
select concat('knzz-',count(a.id)) as `all`
from knzz_tufa_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 1 and b.t_no = #{tNo}
<!-- 知无涯 统计待审核的离校申请 -->
union
select concat('leave-',count(a.return_school_id)) as `all`
from sur_itinerary as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.leave_status = 1 and b.t_no = #{tNo}
/*宁博 10、假期去向-学生返校-辅导员审核代办*/
union
select concat('return-',count(a.return_school_id)) as `all`
from sur_itinerary as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.status = '1' and b.t_no = #{tNo}
/*宁博 6、困难资助-国家励志奖学金-辅导员审核代办*/
union
select concat('knzzgl-',count(a.id)) as `all`
from knzz_gl_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 1 and b.t_no = #{tNo}
-- 陈冠元 困难资助-自治区人民政府奖学金-辅导员审核代办
union
select concat('knzzzzq-',count(a.id)) as `all`
from knzz_zzq_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 1 and b.t_no = #{tNo}
-- 邵政文-(日常事务-学生证补办-辅导员审核-学工审核)
union
select concat('xszb-',count(a.id)) as `all`
from rt_stu_id_reissue as a
left join view_stu_info as b on a.stu_no = b.stu_no
where b.t_no = #{tNo} and a.inspection_progress = 0
-- 邵政文-(日常事务-在校证明申请-辅导员审核-学工审核)
union
select concat('zxzm-',count(a.id)) as `all`
from rt_stu_at_school as a
left join view_stu_info as d on a.student_id = d.stu_no
where d.t_no = #{tNo} and (a.status = 0 or a.status is null)
/* 庞世斌 学生奖惩-先进班集体-辅导员审核代办*/
union
select concat('xjbjt-',count(a.id)) as `all`
from cph_new_good_class_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
WHERE b.t_no = #{tNo} and a.apply_status = 1
/*庞世斌 3、综合素质-综合素质申请审核代办*/
union
select concat('zhsz-',count(a.id)) as `all`
from cph_audit_details a
left join view_stu_info as b on a.submitter_id = b.stu_id
WHERE status_code = 1 and t_no=#{tNo}
<!-- 知无涯"中职升高职" 辅导员审核 -->
union
select concat('zsg-',count(a.id)) as `all`
from knzz_zsg_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 1 and b.t_no = #{tNo}
<!--知无涯 "铺导员综合绩效" 待办 (第3步科室复核 和 第4步学工处长终审) -->
union
select concat('jx-',count(a.id)) as `all`
from sys_performance as a
where (a.shstatus IS NOT NULL and a.ksstatus IS NULL) -- 科室复核待办
or (a.ksstatus IS NOT NULL and a.xgstatus IS NULL) -- 学工处长待办
-- 邵政文-(宿舍管理-住宿费用-辅导员确认待办)
union
select concat('zsfy-',count(a.id)) as `all`
from view_dms_record as a
left join dms_new_record as b on a.stu_year_id = b.id
left join view_stu_info as d on a.stu_no = d.stu_no
where d.t_no = #{tNo} and a.apply_status = 1
</select>
@@ -628,12 +794,154 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where a.penalty_status=3 and b.dept_id = #{id}
and
EXISTS(
SELECT m.* FROM sys_role r
LEFT JOIN sys_role_menu rm on r.role_id = rm.role_id
LEFT JOIN sys_menu m on rm.menu_id = m.menu_id
where r.role_key ='Junior_college_leader'
)
SELECT m.* FROM sys_role r
LEFT JOIN sys_role_menu rm on r.role_id = rm.role_id
LEFT JOIN sys_menu m on rm.menu_id = m.menu_id
where r.role_key ='Junior_college_leader'
)
<!-- 知无涯 书记困难资助-->
union
select concat('knzz-',count(a.id)) as `all`
from knzz_tufa_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.apply_status = 1 and b.dept_id = #{id}
<!-- 知无涯"书记综合绩效" 待办 (第2步书记审核) -->
union
select concat('jx-',count(a.id)) as `all`
from sys_performance as a
left join sys_user as b on a.credit_pass = b.user_name
where a.xwstatus IS NOT NULL and a.shstatus IS NULL and b.dept_id = #{id}
# 宁博-辅导员管理--成果绩效----待办 (第2步书记审核)
union
select concat('cg-',count(a.check_id)) as `all`
from sys_teacher_achievementcheck as a
left join sys_user as b on a.teacher_id = b.user_name
where a.check_status = 2 and b.dept_id = #{id}
-- 陈冠元 辅导员业绩考核-学院书记待办
union
select concat('yj-',count(a.id)) as `all`
from sys_teacher_kpi_filling as a
left join sys_user as b on a.job_number = b.user_name
where a.role_audit = 2 and b.dept_id = #{id}
</select>
<!--
========================================================================================================================
开发与维护文档 (Development & Maintenance Document)
========================================================================================================================
最后更新: 2025-08-19
负责人: 知无涯
模块概述:
本 XML 文件是整个学工系统的核心组件之一,其主要功能是为系统首页(工作台)提供各个角色的“待办事项”数量统计。
它并非传统的CRUD映射文件而是通过一系列复杂的 `UNION` 查询,从不同的业务表中汇总统计数据。
核心设计模式:
1. 角色分离:文件通过不同的 `<select>` 标签id 以 `count...UnDo` 命名)来为不同的系统角色提供独立的待办统计逻辑。
2. 联合查询UNION每个角色的待办数量都是通过 `UNION` 连接多个 `SELECT COUNT(...)` 语句来实现的。
3. 键值对格式:每个 `SELECT` 语句都使用 `CONCAT('prefix-', COUNT(...))` 的格式返回一个字符串,例如 'jx-5'。
- 'prefix-' (例如 'jx-')这是待办事项的唯一标识符Key
- COUNT(...) (例如 5)这是该事项的待办数量Value
前端会根据这个 'prefix' 来匹配并更新界面上对应待办事项的数量。
角色与待办事项详解:
1. <select id="countJwcUnDo"> - 学工/校级管理员 (Jwc)
- 职责:负责各项业务的最终审批环节。
- 数据范围:全校范围,无部门或个人过滤。
- 包含待办项:
- `good-`, `lake-`, `biye-`: 评优/毕业生状态为3 (待校级审核)。
- `dms-`: 宿舍状态为2 (待校级审核)。
- `kn-`, `zx-`: 困难认定/助学金,进入最终步骤。
- `knzz-`, `knzzgl-`, `knzzzzq-`: 各类困难资助状态为3 (待校级终审)。
- `xszb-`, `zxzm-`: 学生证补办/在校证明,进入校级审核环节。
- `xjbjt-`: 先进班集体状态为3 (待校级审核)。
- `zsg-`: 中职升高职状态为3 (待校级终审)。
2. <select id="countXwUnDo"> - 学务/院系管理员 (Xw)
- 职责:负责各项业务的院系级审批(第二级)。
- 数据范围按当前登录用户的院系ID (`dept_id`) 过滤。
- 包含待办项:
- 常规业务 (`good-`, `biye-`, `dms-`, `kn-`, `zx-`等):状态均为流程的第二步。
- `zsg-`: 中职升高职状态为2 (待院系审核)。
- `jx-`: 辅导员综合绩效,状态为 `xwstatus IS NULL` (流程第一步)。
3. <select id="countSjUnDo"> - 书记/院系领导 (Sj)
- 职责:负责院系内的特殊和高级别审批。
- 数据范围按当前登录用户的院系ID (`dept_id`) 过滤。
- 包含待办项:
- `sj-`: 学生违纪处分状态为3。
- `knzz-`: 困难资助状态为1 (可代办辅导员的待办)。
- `jx-`: 辅导员综合绩效,状态为 `xwstatus IS NOT NULL and shstatus IS NULL` (流程第二步)。
4. <select id="countFdyUnDo"> - 辅导员/指导老师 (Fdy)
- 职责:这是一个综合性角色,处理多项职责的待办。
- 数据范围:主要按辅导员/教师工号 (`t_no`) 过滤。
- 包含待办项:
- 常规初审 (`good-`, `biye-`, `dms-`, `kn-`, `zx-`等):状态均为流程的第一步。
- 勤工助学 (`qgzxgw-`, `qgzxgzjl-`): 作为“指导老师”,按 `zdls_no` 过滤。
- `zsg-`: 中职升高职状态为1 (流程第一步)。
- `jx-`: 辅导员综合绩效,这是一个特例。此处的待办是为内嵌在此角色中的“科室复核”和“学工处长”岗准备的,
查询条件是 `(shstatus IS NOT NULL and ksstatus IS NULL) or (ksstatus IS NOT NULL and xgstatus IS NULL)`
它聚合了绩效审批的第三步和第四步。
5. <select id="countStuUnDo"> - 学生 (Stu)
- 职责:处理被驳回或需要本人操作的申请。
- 数据范围:按当前登录学生的学号 (`stuNo`) 过滤。
- 包含待办项:主要是各项业务被驳回的状态,例如 `apply_status = 6`。
如何新增一个待办事项 (示例:为辅导员添加“新增奖学金”待办)
1. **确定角色和审批环节**
- 角色:辅导员。
- 环节:初审。
- 因此,我们需要修改 `<select id="countFdyUnDo">`。
2. **确定业务逻辑**
- 业务表:`new_scholarship_apply`。
- 状态字段:`status`。
- 待办状态值:`1` (代表“待初审”)。
- 过滤方式:按辅导员教师工号 `t_no` 过滤。
3. **选择一个唯一的前缀 (Prefix)**
- 我们选择 `xsjxj-` (“新式奖学金”的拼音首字母)。
4. **编写并添加SQL代码**
- 在 `<select id="countFdyUnDo">` 的最后一个 `union` 之后,添加以下代码块:
```xml
union
select concat('xsjxj-',count(a.id)) as `all`
from new_scholarship_apply as a
left join view_stu_info as b on a.stu_no = b.stu_no
where a.status = 1 and b.t_no = #{tNo}
```
5. **同步更新前端代码**
- 在前端定义辅导员 `taskList` 的地方,添加一个新的对象:
```javascript
{
label: "辅导员·新增奖学金审核",
name: "xsjxj", // 必须与后端的 'xsjxj-' 匹配
value: 0,
url: "/scholarship/new/fdy-audit" // 跳转到对应的审核页面
}
```
注意事项与最佳实践:
- **保持一致性**新增业务时尽量遵循现有的状态码约定如1=待初审, 2=待院审, 3=待校审, 6=驳回)。
- **注释是关键**:添加任何新的 `union` 查询时,请务必在前面加上清晰的注释,说明其业务目的和开发者。
- **前端同步**:后端添加的任何新前缀,都必须在前端有对应的 `name` 才能显示出来。
- **性能考虑**`UNION` 的性能开销会随着子查询的增多而增加。虽然目前性能良好,但未来应避免无限制地增加。
- **逻辑严谨**:在编写 `WHERE` 条件时,要特别注意审批链的流转,确保上级审批的待办条件正确承接了下级的“已通过”状态。
========================================================================================================================
-->
</mapper>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.CphMsgMapper">
<resultMap type="CphMsg" id="CphMsgResult">
<result property="id" column="id" />
<result property="sender" column="sender" />
@@ -21,19 +21,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCphMsgList" parameterType="CphMsg" resultMap="CphMsgResult">
<include refid="selectCphMsgVo"/>
<where>
<where>
<if test="sender != null "> and sender = #{sender}</if>
<if test="receiver != null "> and receiver = #{receiver}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
</where>
order by id desc
</select>
<select id="selectCphMsgById" parameterType="Long" resultMap="CphMsgResult">
<include refid="selectCphMsgVo"/>
where id = #{id}
</select>
<insert id="insertCphMsg" parameterType="CphMsg" useGeneratedKeys="true" keyProperty="id">
insert into cph_msg
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sender != null">#{sender},</if>
<if test="receiver != null">#{receiver},</if>
@@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</trim>
</insert>
<update id="updateCphMsg" parameterType="CphMsg">
@@ -75,9 +75,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteCphMsgByIds" parameterType="String">
delete from cph_msg where id in
delete from cph_msg where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
<select id="getUserIdByStuNo" parameterType="String" resultType="Long">
select user_id from sys_user where user_name = #{stuNo}
</select>
<select id="selectCphMsgListForFlowable" parameterType="CphMsg" resultMap="CphMsgResult">
<include refid="selectCphMsgVo"/>
<where>
<if test="receiver != null "> and receiver = #{receiver}</if>
<if test="content != null and content != ''">
and content LIKE CONCAT('%', #{content}, '%')
</if>
</where>
order by id desc
</select>
</mapper>

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.KnzzGlApplyMapper">
<resultMap type="KnzzGlApply" id="KnzzGlApplyResult">
<result property="id" column="id" />
<result property="stuYearId" column="stu_year_id" />
@@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectKnzzGlApplyList" parameterType="KnzzGlApply" resultMap="KnzzGlApplyResult">
<include refid="selectKnzzGlApplyVo"/>
<where>
<where>
<if test="stuYearId != null "> and stu_year_id = #{stuYearId}</if>
<if test="stuNo != null and stuNo != ''"> and stu_no = #{stuNo}</if>
<if test="stuName != null and stuName != ''"> and stu_name like concat('%', #{stuName}, '%')</if>
@@ -112,13 +112,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="xgNo != null and xgNo != ''"> and xg_no = #{xgNo}</if>
<if test="applyStatus != null and applyStatus != ''"> and apply_status = #{applyStatus}</if>
</where>
order by id desc
</select>
<select id="selectKnzzGlApplyById" parameterType="Long" resultMap="KnzzGlApplyResult">
<include refid="selectKnzzGlApplyVo"/>
where id = #{id}
</select>
<insert id="insertKnzzGlApply" parameterType="KnzzGlApply" useGeneratedKeys="true" keyProperty="id">
insert into knzz_gl_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -289,7 +290,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteKnzzGlApplyByIds" parameterType="String">
delete from knzz_gl_apply where id in
delete from knzz_gl_apply where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
@@ -317,4 +318,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by a.id desc
</select>
</mapper>
</mapper>

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.KnzzTufaApplyMapper">
<resultMap type="KnzzTufaApply" id="KnzzTufaApplyResult">
<result property="id" column="id" />
<result property="stuNo" column="stu_no" />
@@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectKnzzTufaApplyList" parameterType="KnzzTufaApply" resultMap="KnzzTufaApplyResult">
<include refid="selectKnzzTufaApplyVo"/>
<where>
<where>
<if test="stuNo != null and stuNo != ''"> and stu_no = #{stuNo}</if>
<if test="stuName != null and stuName != ''"> and stu_name like concat('%', #{stuName}, '%')</if>
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
@@ -98,13 +98,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="leaderNo != null and leaderNo != ''"> and leader_no = #{leaderNo}</if>
<if test="stuYearId != null "> and stu_year_id = #{stuYearId}</if>
</where>
order by id desc
</select>
<select id="selectKnzzTufaApplyById" parameterType="Long" resultMap="KnzzTufaApplyResult">
<include refid="selectKnzzTufaApplyVo"/>
where id = #{id}
</select>
<insert id="insertKnzzTufaApply" parameterType="KnzzTufaApply" useGeneratedKeys="true" keyProperty="id">
insert into knzz_tufa_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -254,7 +255,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteKnzzTufaApplyByIds" parameterType="String">
delete from knzz_tufa_apply where id in
delete from knzz_tufa_apply where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
@@ -283,4 +284,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
</mapper>
</mapper>

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.KnzzZsgApplyMapper">
<resultMap type="KnzzZsgApply" id="KnzzZsgApplyResult">
<result property="id" column="id" />
<result property="stuName" column="stu_name" />
@@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectKnzzZsgApplyList" parameterType="KnzzZsgApply" resultMap="KnzzZsgApplyResult">
<include refid="selectKnzzZsgApplyVo"/>
<where>
<where>
<if test="stuName != null and stuName != ''"> and stu_name like concat('%', #{stuName}, '%')</if>
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
<if test="birthMonth != null and birthMonth != ''"> and birth_month = #{birthMonth}</if>
@@ -110,13 +110,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyFile != null and applyFile != ''"> and apply_file = #{applyFile}</if>
<if test="stuYearId != null "> and stu_year_id = #{stuYearId}</if>
</where>
order by id desc
</select>
<select id="selectKnzzZsgApplyById" parameterType="Long" resultMap="KnzzZsgApplyResult">
<include refid="selectKnzzZsgApplyVo"/>
where id = #{id}
</select>
<insert id="insertKnzzZsgApply" parameterType="KnzzZsgApply" useGeneratedKeys="true" keyProperty="id">
insert into knzz_zsg_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -286,7 +287,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteKnzzZsgApplyByIds" parameterType="String">
delete from knzz_zsg_apply where id in
delete from knzz_zsg_apply where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
@@ -314,4 +315,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
</mapper>
</mapper>

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.KnzzZzqApplyMapper">
<resultMap type="KnzzZzqApply" id="KnzzZzqApplyResult">
<result property="id" column="id" />
<result property="stuYearId" column="stu_year_id" />
@@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectKnzzZzqApplyList" parameterType="KnzzZzqApply" resultMap="KnzzZzqApplyResult">
<include refid="selectKnzzZzqApplyVo"/>
<where>
<where>
<if test="stuYearId != null "> and stu_year_id = #{stuYearId}</if>
<if test="stuNo != null and stuNo != ''"> and stu_no = #{stuNo}</if>
<if test="stuName != null and stuName != ''"> and stu_name like concat('%', #{stuName}, '%')</if>
@@ -96,13 +96,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyStatus != null and applyStatus != ''"> and apply_status = #{applyStatus}</if>
<if test="applyFile != null and applyFile != ''"> and apply_file = #{applyFile}</if>
</where>
order by id desc
</select>
<select id="selectKnzzZzqApplyById" parameterType="Long" resultMap="KnzzZzqApplyResult">
<include refid="selectKnzzZzqApplyVo"/>
where id = #{id}
</select>
<insert id="insertKnzzZzqApply" parameterType="KnzzZzqApply" useGeneratedKeys="true" keyProperty="id">
insert into knzz_zzq_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -243,7 +244,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteKnzzZzqApplyByIds" parameterType="String">
delete from knzz_zzq_apply where id in
delete from knzz_zzq_apply where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
@@ -272,4 +273,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
</mapper>
</mapper>

View File

@@ -54,6 +54,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<!-- 班级信息 -->
<select id="selectDeptByDeptCodes" parameterType="String" resultType="com.srs.comprehensive.domain.SrsClass">
SELECT DISTINCT v.class_id,v.class_name
FROM view_stu_info v
JOIN srs_class c ON v.teacher_id = c.teacher_id
WHERE v.t_no = #{userName}
</select>
<!-- <insert id="insertSrsIdentifytable" parameterType="SrsIdentifytable" useGeneratedKeys="true" keyProperty="id">-->
<!-- insert into srs_identifytable-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->

View File

@@ -159,7 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="majorId != null ">and d.major_id = #{majorId}</if>
<if test="classId != null ">and c.class_id = #{classId}</if>
</where>
order by a.id asc
order by a.id desc
</select>
<select id="countXw" parameterType="CphSearch" resultType="SrsKnrdApply">
@@ -185,6 +185,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="classId != null ">and c.class_id = #{classId}</if>
</where>
group by ejxyldqmyj
order by a.id desc
</select>

View File

@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="yj != null "> and (a.bjpyyj = #{yj} or a.ejxyldqmyj = #{yj} or xsqmyj = #{yj})</if>
<if test="applyYear != null "> and a.apply_year like CONCAT('%',#{applyYear},'%')</if>
order by a.id asc
order by a.id desc
</select>
<select id="selectSrsKnrdApprovalRecordByIds" resultType="SrsKnrdApprovalRecord">
select * from srs_knrd_approval_record where apply_id=#{id}

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.SrsKnrdTimeMapper">
<resultMap type="SrsKnrdTime" id="SrsKnrdTimeResult">
<result property="id" column="id" />
<result property="stuNo" column="stu_no" />
@@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSrsKnrdTimeList" parameterType="SrsKnrdTime" resultMap="SrsKnrdTimeResult">
<include refid="selectSrsKnrdTimeVo"/>
<where>
<where>
<if test="stuNo != null and stuNo != ''"> and a.stu_no = #{stuNo}</if>
<if test="stuTime != null "> and a.stu_time = #{stuTime}</if>
<if test="fdyTime != null "> and a.fdy_time = #{fdyTime}</if>
@@ -36,13 +36,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="stuYearId != null "> and a.stu_year_id = #{stuYearId}</if>
<if test="term != null and term != ''"> and a.term = #{term}</if>
</where>
order by a.id desc
</select>
<select id="selectSrsKnrdTimeById" parameterType="Long" resultMap="SrsKnrdTimeResult">
<include refid="selectSrsKnrdTimeVo"/>
where a.id = #{id}
</select>
<insert id="insertSrsKnrdTime" parameterType="SrsKnrdTime" useGeneratedKeys="true" keyProperty="id">
insert into srs_knrd_time
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -84,9 +85,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteSrsKnrdTimeByIds" parameterType="String">
delete from srs_knrd_time where id in
delete from srs_knrd_time where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -27,6 +27,7 @@
<if test="knrdType != null and knrdType != ''">and a.knrd_type = #{knrdType}</if>
<if test="stuYearId != null ">and a.stu_year_id = #{stuYearId}</if>
</where>
order by a.id desc
</select>
<select id="selectSrsKnrdTypeById" parameterType="Long" resultMap="SrsKnrdTypeResult">
@@ -70,4 +71,4 @@
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -32,6 +32,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<association property="srsMajors" column="major_id" javaType="srsMajors" resultMap="SrsMajorsResult" />
<association property="srsClass" column="class_id" javaType="srsClass" resultMap="SrsClassResult" />
<association property="cphTeacher" column="teacher_id" javaType="cphTeacher" resultMap="CphTeacherResult" />
<association property="cphStuExtraInfo" column="stu_no" javaType="cphStuExtraInfo" resultMap="CphStuExtraInfoResult" />
</resultMap>
<resultMap id="CphStuExtraInfoResult" type="CphStuExtraInfo">
<result property="stuNo" column="stu_no"/>
<result property="mz" column="mz"/>
<result property="zzmm" column="zzmm"/>
<result property="jg" column="jg"/>
<result property="xx" column="xx"/>
</resultMap>
<resultMap id="CphTeacherResult" type="CphTeacher">
<result property="teacherId" column="teacher_id"/>
@@ -77,13 +85,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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,
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.*
d.*,m.*,c.*,g.*
from srs_student s
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 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 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
</sql>
<select id="selectSrsStudentList" parameterType="SrsStudent" resultMap="SrsStudentResult">
<include refid="selectSrsStudentVo"/>

View File

@@ -307,7 +307,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null "> and (a.status1 = #{status} or a.status2 = #{status} or a.status3 = #{status})</if>
<if test="applyYear != null"> and a.apply_year like CONCAT('%',#{applyYear},'%')</if>
</where>
order by a.id asc
order by a.id desc
</select>
<insert id="insertSrsZxjApply" parameterType="SrsZxjApply" useGeneratedKeys="true" keyProperty="id">

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.SrsZxjApprovalRecordMapper">
<resultMap type="SrsZxjApprovalRecord" id="SrsZxjApprovalRecordResult">
<result property="id" column="id" />
<result property="step" column="step" />
@@ -24,19 +24,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSrsZxjApprovalRecordList" parameterType="SrsZxjApprovalRecord" resultMap="SrsZxjApprovalRecordResult">
<include refid="selectSrsZxjApprovalRecordVo"/>
<where>
<where>
<if test="step != null "> and step = #{step}</if>
<if test="operator != null and operator != ''"> and operator = #{operator}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
</where>
</select>
<select id="selectSrsZxjApprovalRecordById" parameterType="Long" resultMap="SrsZxjApprovalRecordResult">
<include refid="selectSrsZxjApprovalRecordVo"/>
where id = #{id}
</select>
<insert id="insertSrsZxjApprovalRecord" parameterType="SrsZxjApprovalRecord" useGeneratedKeys="true" keyProperty="id">
insert into srs_zxj_approval_record
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -88,14 +88,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="operator != null ">and r.operator like concat('%',#{operator},'%')</if>
<if test="status != null"> and r.status = #{status}</if>
order by a.id asc
order by a.id desc
</select>
<delete id="deleteSrsZxjApprovalRecordById" parameterType="Long">
delete from srs_zxj_approval_record where id = #{id}
</delete>
<delete id="deleteSrsZxjApprovalRecordByIds" parameterType="String">
delete from srs_zxj_approval_record where id in
delete from srs_zxj_approval_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
@@ -107,4 +107,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -43,6 +43,7 @@
<if test="stuYearId != null ">and a.stu_year_id = #{stuYearId}</if>
<if test="term != null and term != ''">and a.term = #{term}</if>
</where>
order by a.id desc
</select>
<select id="selectSrsZxjTimeById" parameterType="Long" resultMap="SrsZxjTimeResult">
@@ -98,4 +99,4 @@
#{id}
</foreach>
</delete>
</mapper>
</mapper>