|
@@ -6,21 +6,32 @@ import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentspersonmanage.Aidi
|
|
|
import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentspersonmanage.AidingStudentsPersonManageDO;
|
|
|
import cn.iocoder.yudao.module.as.dal.mysql.aidingstudentspersonmanage.AidingStudentPersonManageEvaluationResultMapper;
|
|
|
import cn.iocoder.yudao.module.as.dal.mysql.aidingstudentspersonmanage.AidingStudentsPersonManageMapper;
|
|
|
+import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
|
|
|
+import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
|
|
|
+import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskPageReqVO;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
|
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
|
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.*;
|
|
|
+
|
|
|
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
|
|
|
+import static cn.iocoder.yudao.module.as.enums.ErrorCodeConstants.*;
|
|
|
+import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.AIDING_NOT_EXISTS;
|
|
|
+import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.OA_LEAVE_NOT_EXISTS;
|
|
|
|
|
|
/**
|
|
|
* @autor WoVoM
|
|
@@ -31,6 +42,9 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti
|
|
|
@Slf4j
|
|
|
public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStudentsPersonManageMapper, AidingStudentsPersonManageDO> implements AidingStudentsPersonManageService{
|
|
|
|
|
|
+
|
|
|
+ public static final String PROCESS_KEY = "familyDifficulties";
|
|
|
+
|
|
|
@Autowired
|
|
|
private AidingStudentsPersonManageMapper aidingStudentsPersonManageMapper;
|
|
|
|
|
@@ -43,28 +57,23 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
@Autowired
|
|
|
private AdminUserApi adminUserApi;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private BpmProcessInstanceApi processInstanceApi;
|
|
|
/**
|
|
|
* 学生上传材料之前的信息回显
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public AidingStudentsPersonManageUploadRespVO beforeuploadAidingStudentsManage() {
|
|
|
+ public AidingStudentPersonManageInfoRespVO beforeuploadAidingStudentsManage() {
|
|
|
try {
|
|
|
AdminUserRespDTO user = adminUserApi.getUser(getLoginUser().getId());
|
|
|
- AidingStudentsPersonManageUploadRespVO result = new AidingStudentsPersonManageUploadRespVO();
|
|
|
- // 获取当前登录的用户表
|
|
|
+ AidingStudentPersonManageInfoRespVO result = new AidingStudentPersonManageInfoRespVO();
|
|
|
Map map = aidingStudentsPersonManageMapper.getByStudentId(user.getStudentId());
|
|
|
- log.info("map = {}" , map);
|
|
|
- // *班级名称
|
|
|
- result.setClassName((String) map.get("SZBJMC"));
|
|
|
- // *学号
|
|
|
- result.setStudentSno(user.getStudentId());
|
|
|
- // *入学年份
|
|
|
- result.setEnrollmentYear((String) map.get("RXNY"));
|
|
|
- // *身份证
|
|
|
- result.setIdCard((String) map.get("SFZJH"));
|
|
|
- // *户籍
|
|
|
- result.setRegisteredResidence((String) map.get("JG"));
|
|
|
+ result.setClassName((String) map.get("SZBJMC"))
|
|
|
+ .setStudentId(user.getStudentId())
|
|
|
+ .setEnrollmentYear((String) map.get("RXNY"))
|
|
|
+ .setIdCard((String) map.get("SFZJH"))
|
|
|
+ .setRegisteredResidence((String) map.get("JG"));
|
|
|
return result;
|
|
|
} catch (Exception exception) {
|
|
|
exception.printStackTrace();
|
|
@@ -78,43 +87,49 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public void uploadAidingStudentsManage(AidingStudentsPersonManageUploadRespVO uploadVO) {
|
|
|
+ @Transactional
|
|
|
+ public void uploadAidingStudentsManage(AidingStudentPersonManageInfoRespVO uploadVO) {
|
|
|
+ // 0.检查数据库是否已经存在该信息
|
|
|
+ AidingStudentsPersonManageDO user1 = aidingStudentsPersonManageMapper
|
|
|
+ .selectOne(new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
|
|
|
+ .eq(AidingStudentsPersonManageDO::getManageId, uploadVO.getManageId())
|
|
|
+ .eq(AidingStudentsPersonManageDO::getCollegeManageId, uploadVO.getCollegeManageId())
|
|
|
+ .eq(AidingStudentsPersonManageDO::getStudentId, uploadVO.getStudentId()));
|
|
|
+ if (user1 != null) {
|
|
|
+ throw exception(STUDENT_INFO_EXISTS);
|
|
|
+ }
|
|
|
// 1.获取当前登录的用户表
|
|
|
AidingStudentsPersonManageDO aDo = BeanUtils.toBean(uploadVO, AidingStudentsPersonManageDO.class);
|
|
|
- AdminUserRespDTO user = adminUserApi.getUser(getLoginUser().getId());
|
|
|
+ AdminUserRespDTO user = adminUserApi.getUser(getLoginUser().getId());
|
|
|
Map map = aidingStudentsPersonManageMapper.getByStudentId(user.getStudentId());
|
|
|
// 2.补充字段
|
|
|
// 项目ID跟学院项目ID前端传
|
|
|
-
|
|
|
- // 学院ID
|
|
|
- Long collegeId = deptApi.getCollegeId(user.getDeptId());
|
|
|
- aDo.setCollegeId(collegeId);
|
|
|
-
|
|
|
Map resultmap = aidingStudentsPersonManageMapper.getMajorById(map.get("SZZYM"));
|
|
|
- log.info("resultMap = {}", resultmap);
|
|
|
- // 专业名称
|
|
|
- aDo.setMajor((String) resultmap.get("ZYMC"));
|
|
|
- // 学院名称
|
|
|
- aDo.setCollegeName((String) resultmap.get("DWMC"));
|
|
|
- // 年级
|
|
|
- aDo.setGrade((String) map.get("SZNJ"));
|
|
|
- // 姓名
|
|
|
- aDo.setNickname(user.getNickname());
|
|
|
- // 状态
|
|
|
- aDo.setStatus(0);
|
|
|
- // 用户ID
|
|
|
+ aDo.setCollegeId(deptApi.getCollegeId(user.getDeptId()))
|
|
|
+ .setMajor((String) resultmap.get("ZYMC"))
|
|
|
+ .setCollegeName((String) resultmap.get("DWMC"))
|
|
|
+ .setGrade((String) map.get("SZNJ"))
|
|
|
+ .setNickname(user.getNickname())
|
|
|
+ .setStatus(0);
|
|
|
aidingStudentsPersonManageMapper.insert(aDo);
|
|
|
+ String processInstanceId = processInstanceApi.createProcessInstance(user.getId(),
|
|
|
+ new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(PROCESS_KEY)
|
|
|
+ .setBusinessKey(String.valueOf(aDo.getId())));
|
|
|
+ AidingStudentsPersonManageDO aDo2 =
|
|
|
+ new AidingStudentsPersonManageDO().setId(aDo.getId()).setProcessInstanceId(processInstanceId);
|
|
|
+ // 将工作流的编号,更新到综测审批单项中
|
|
|
+ aidingStudentsPersonManageMapper.updateById(aDo2);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 学生查看自己的申请信息
|
|
|
*/
|
|
|
@Override
|
|
|
- public AidingStudentsPersonManageUploadRespVO checkAidingStudentsManage() {
|
|
|
- AdminUserRespDTO Loginuser = adminUserApi.getUser(getLoginUser().getId());
|
|
|
- AidingStudentsPersonManageDO user = aidingStudentsPersonManageMapper
|
|
|
- .selectOne(AidingStudentsPersonManageDO::getStudentSno, Loginuser.getStudentId());
|
|
|
- return BeanUtils.toBean(user, AidingStudentsPersonManageUploadRespVO.class);
|
|
|
+ public AidingStudentPersonManageInfoRespVO checkAidingStudentsManage() {
|
|
|
+ return BeanUtils
|
|
|
+ .toBean(aidingStudentsPersonManageMapper
|
|
|
+ .selectOne(AidingStudentsPersonManageDO::getStudentId, adminUserApi.getUser(getLoginUser().getId()).getStudentId())
|
|
|
+ , AidingStudentPersonManageInfoRespVO.class);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -122,30 +137,29 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
* @param uploadVO
|
|
|
*/
|
|
|
@Override
|
|
|
- public void editAidingStudentsManage(AidingStudentsPersonManageUploadRespVO uploadVO) {
|
|
|
- AidingStudentsPersonManageDO aDo = new AidingStudentsPersonManageDO();
|
|
|
- aDo = BeanUtils.toBean(uploadVO, AidingStudentsPersonManageDO.class);
|
|
|
- aDo.setRejectNotes("");
|
|
|
- aidingStudentsPersonManageMapper.updateById(aDo);
|
|
|
+ public void editAidingStudentsManage(AidingStudentPersonManageInfoRespVO uploadVO) {
|
|
|
+ aidingStudentsPersonManageMapper.updateById(BeanUtils.toBean(uploadVO, AidingStudentsPersonManageDO.class));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 学院获取各个班级的分页信息
|
|
|
+ * 学院获取各个班级数据统计
|
|
|
* @param pageReqVO
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public PageResult<AidingStudentPersonManageCollegeRespVO> getAidingStudentsPersonManageCollegePage(
|
|
|
- AidingStudentPersonManagerCollegePageReqVO pageReqVO) {
|
|
|
- AidingStudentPersonManageCollegeRespVO vo = new AidingStudentPersonManageCollegeRespVO();
|
|
|
+ public PageResult<AidingStudentPersonManageInfoRespVO> getAidingStudentsPersonManageCollegeData(
|
|
|
+ AidingStudentPersonManageInfoPageReqVO pageReqVO) {
|
|
|
+ AidingStudentPersonManageInfoRespVO vo = new AidingStudentPersonManageInfoRespVO();
|
|
|
List<AidingStudentPersonManageClassVO> list = new ArrayList<>();
|
|
|
+ // 1.模糊查询
|
|
|
List<AidingStudentsPersonManageDO> allList = aidingStudentsPersonManageMapper
|
|
|
.selectList(new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
|
|
|
.eq(AidingStudentsPersonManageDO::getCollegeManageId, pageReqVO.getCollegeManageId())
|
|
|
.eq(AidingStudentsPersonManageDO::getManageId, pageReqVO.getManageId())
|
|
|
.like(StringUtils.isNotBlank(pageReqVO.getMajor()), AidingStudentsPersonManageDO::getMajor, pageReqVO.getMajor())
|
|
|
.like(StringUtils.isNotBlank(pageReqVO.getGrade()), AidingStudentsPersonManageDO::getGrade, pageReqVO.getGrade())
|
|
|
- .like(StringUtils.isNotBlank(pageReqVO.getClName()), AidingStudentsPersonManageDO::getClassName, pageReqVO.getClName()));
|
|
|
+ .like(StringUtils.isNotBlank(pageReqVO.getClassName()), AidingStudentsPersonManageDO::getClassName, pageReqVO.getClassName()));
|
|
|
+ // 2.统计学院学生信息状态
|
|
|
int wait = 0, edit = 0, pass = 0;
|
|
|
for (int i = 0; i < allList.size(); i++) {
|
|
|
AidingStudentsPersonManageDO aDo = allList.get(i);
|
|
@@ -159,24 +173,28 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- vo.setCollegeAll(allList.size());
|
|
|
- vo.setCollegeAudit(wait);
|
|
|
- vo.setCollegeEdit(edit);
|
|
|
- vo.setCollegePass(pass);
|
|
|
- log.info("vo信息如下{}", vo);
|
|
|
- log.info("pageVo信息如下{}", pageReqVO);
|
|
|
+ // 3.查看班级数量
|
|
|
List<Map<String, Object>> maps = aidingStudentsPersonManageMapper
|
|
|
.countByClassName(pageReqVO);
|
|
|
- log.info("map信息如下{}", maps);
|
|
|
+ // 3.1 各班民主评议情况
|
|
|
+ List<AidingStudentPersonManageEvaluationResultDO> reviewList = aidingStudentPersonManageEvaluationResultMapper
|
|
|
+ .selectList(new LambdaQueryWrapper<AidingStudentPersonManageEvaluationResultDO>()
|
|
|
+ .eq(AidingStudentPersonManageEvaluationResultDO::getCollegeManageId, pageReqVO.getCollegeManageId())
|
|
|
+ .eq(AidingStudentPersonManageEvaluationResultDO::getManageId, pageReqVO.getManageId()));
|
|
|
+ vo.setCollegeAll(allList.size())
|
|
|
+ .setCollegeAudit(wait)
|
|
|
+ .setCollegeEdit(edit)
|
|
|
+ .setCollegePass(pass)
|
|
|
+ .setDoneEvaluationNumber(reviewList.size())
|
|
|
+ .setWaitingForEvaluationNumber(maps.size() - reviewList.size());
|
|
|
+ // 3.2 统计各个班级完成的情况
|
|
|
for (Map<String, Object> map : maps) {
|
|
|
- log.info("遍历Map{}", map);
|
|
|
AidingStudentPersonManageClassVO classVo = new AidingStudentPersonManageClassVO();
|
|
|
List<AidingStudentsPersonManageDO> classList = aidingStudentsPersonManageMapper
|
|
|
.selectList(new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
|
|
|
.eq(AidingStudentsPersonManageDO::getCollegeManageId, pageReqVO.getCollegeManageId())
|
|
|
.eq(AidingStudentsPersonManageDO::getManageId, pageReqVO.getManageId())
|
|
|
.eq(AidingStudentsPersonManageDO::getClassName, map.get("class_name")));
|
|
|
- log.info("classList = {}", classList);
|
|
|
wait = 0;
|
|
|
edit = 0;
|
|
|
pass = 0;
|
|
@@ -191,69 +209,65 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
} else {
|
|
|
}
|
|
|
}
|
|
|
- log.info("classVo 如下{}", classVo);
|
|
|
- classVo.setClassName((String) map.get("class_name"));
|
|
|
- classVo.setClassAll(classList.size());
|
|
|
- classVo.setClassAudit(wait);
|
|
|
- classVo.setClassEdit(edit);
|
|
|
- classVo.setClassPass(pass);
|
|
|
+ classVo
|
|
|
+ .setClassName((String) map.get("class_name"))
|
|
|
+ .setClassAll(classList.size())
|
|
|
+ .setClassAudit(wait)
|
|
|
+ .setClassEdit(edit)
|
|
|
+ .setClassPass(pass);
|
|
|
list.add(classVo);
|
|
|
}
|
|
|
+
|
|
|
+ // 4.封装返回
|
|
|
vo.setList(list);
|
|
|
- log.info("vo = {}", vo);
|
|
|
Long total = Long.valueOf(list.size());
|
|
|
- log.info("total = {}", total);
|
|
|
- List<AidingStudentPersonManageCollegeRespVO> Tlist = new ArrayList<>();
|
|
|
+ List<AidingStudentPersonManageInfoRespVO> Tlist = new ArrayList<>();
|
|
|
Tlist.add(vo);
|
|
|
- log.info("Tlist = {}", Tlist);
|
|
|
- PageResult<AidingStudentPersonManageCollegeRespVO> result = new PageResult<>(Tlist, total);
|
|
|
+ PageResult<AidingStudentPersonManageInfoRespVO> result = new PageResult<>(Tlist, total);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 班级获取学生申请信息分页
|
|
|
- * @param pageReqVO
|
|
|
- * @return
|
|
|
- */
|
|
|
+
|
|
|
@Override
|
|
|
- public PageResult<AidingStudentsPersonManageDO> getAidingStudentsPersonManageClassPage(
|
|
|
- AidingStudentsPersonManageClassPageReqVO pageReqVO) {
|
|
|
- return aidingStudentsPersonManageMapper.selectPage(pageReqVO);
|
|
|
- }
|
|
|
+ public List<AidingStudentsPersonManageDO> getAidingStudentsPersonManageClassPage(List<String> ids,
|
|
|
+ BpmTaskPageReqVO pageVO){
|
|
|
+ return aidingStudentsPersonManageMapper.selectListByProcessInstanceId(ids,pageVO);
|
|
|
+ };
|
|
|
|
|
|
/**
|
|
|
- * 班级定序 - 集体
|
|
|
+ * 定序与建议等级
|
|
|
* @param ids
|
|
|
*/
|
|
|
@Override
|
|
|
public void allsortAidingStudentsManage(List<AidingStudentPersonManageSortReqVO> ids) {
|
|
|
for (AidingStudentPersonManageSortReqVO id : ids) {
|
|
|
- sortAidingStudentsManage(Long.valueOf(id.getId()), id.getSort(), id.getDifficultType());
|
|
|
+ LambdaUpdateWrapper<AidingStudentsPersonManageDO> updateWrapper = new LambdaUpdateWrapper<>();
|
|
|
+ updateWrapper.eq(AidingStudentsPersonManageDO::getId, id.getId())
|
|
|
+ .set(AidingStudentsPersonManageDO::getSort, id.getSort());
|
|
|
+ if (id.getClassSuggestionDifficultType() != null)
|
|
|
+ updateWrapper.set(AidingStudentsPersonManageDO::getClassSuggestionDifficultType, id.getClassSuggestionDifficultType());
|
|
|
+ else if (id.getCollegeSuggestionDifficultType() != null)
|
|
|
+ updateWrapper.set(AidingStudentsPersonManageDO::getCollegeSuggestionDifficultType, id.getCollegeSuggestionDifficultType());
|
|
|
+ else if (id.getSchoolSuggestionDifficultType() != null)
|
|
|
+ updateWrapper.set(AidingStudentsPersonManageDO::getSchoolSuggestionDifficultType, id.getSchoolSuggestionDifficultType());
|
|
|
+ aidingStudentsPersonManageMapper.update(null, updateWrapper);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 班级定序 - 个人
|
|
|
- * @param id
|
|
|
- * @param sort
|
|
|
- */
|
|
|
- @Override
|
|
|
- public void sortAidingStudentsManage(Long id, Integer sort, Integer difficultType) {
|
|
|
- UpdateWrapper<AidingStudentsPersonManageDO> updateWrapper = new UpdateWrapper<>();
|
|
|
- updateWrapper.eq("id", id)
|
|
|
- .set("sort", sort);
|
|
|
- if(difficultType != null){
|
|
|
- updateWrapper.set("difficult_type", difficultType);
|
|
|
- }
|
|
|
- aidingStudentsPersonManageMapper.update(null, updateWrapper);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 班主任上传线下讨论结果信息
|
|
|
* @param classuploadVO
|
|
|
*/
|
|
|
@Override
|
|
|
- public void uploadResultAidingStudentsManage(AidingStudentPersonManageClassResultReqVO classuploadVO) {
|
|
|
+ public void uploadResultAidingStudentsManage(AidingStudentPersonManageInfoPageReqVO classuploadVO) {
|
|
|
+ AidingStudentPersonManageEvaluationResultDO aidingStudentPersonManageEvaluationResultDO = aidingStudentPersonManageEvaluationResultMapper
|
|
|
+ .selectOne(new LambdaQueryWrapper<AidingStudentPersonManageEvaluationResultDO>()
|
|
|
+ .eq(AidingStudentPersonManageEvaluationResultDO::getCollegeManageId, classuploadVO.getCollegeManageId())
|
|
|
+ .eq(AidingStudentPersonManageEvaluationResultDO::getManageId, classuploadVO.getManageId())
|
|
|
+ .eq(AidingStudentPersonManageEvaluationResultDO::getClassName, classuploadVO.getClassName()));
|
|
|
+ if(aidingStudentPersonManageEvaluationResultDO != null){
|
|
|
+ throw exception(CLASS_DISCUSSION_INFO_EXISTS);
|
|
|
+ }
|
|
|
AidingStudentPersonManageEvaluationResultDO ado = new AidingStudentPersonManageEvaluationResultDO();
|
|
|
org.springframework.beans.BeanUtils.copyProperties(classuploadVO,ado);
|
|
|
ado.setStatus(1);
|
|
@@ -262,12 +276,12 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * (学校)办公室老师获取学生分页信息
|
|
|
+ * 学生分页信息
|
|
|
* @param pageReqVO
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public PageResult<AidingStudentPersonManageSchoolRespVO> schoolgetAidingStudentsPersonManagePage(AidingStudentPersonManageSchoolPageReqVO pageReqVO) {
|
|
|
+ public PageResult<AidingStudentPersonManageInfoRespVO> AidingStudentsPersonManagePage(AidingStudentPersonManageInfoPageReqVO pageReqVO) {
|
|
|
/**
|
|
|
* 表格信息
|
|
|
*/
|
|
@@ -276,29 +290,29 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
.like(StringUtils.isNotBlank(pageReqVO.getCollegeName()), AidingStudentsPersonManageDO::getCollegeName, pageReqVO.getCollegeName())
|
|
|
.eq(pageReqVO.getManageId() != null ,AidingStudentsPersonManageDO::getManageId, pageReqVO.getManageId())
|
|
|
.eq(pageReqVO.getDifficultType() != null,AidingStudentsPersonManageDO::getDifficultType, pageReqVO.getDifficultType())
|
|
|
+ .eq(pageReqVO.getCollegeManageId() != null,AidingStudentsPersonManageDO::getCollegeManageId, pageReqVO.getCollegeManageId())
|
|
|
.like(StringUtils.isNotBlank(pageReqVO.getMajor()), AidingStudentsPersonManageDO::getMajor, pageReqVO.getMajor())
|
|
|
.like(StringUtils.isNotBlank(pageReqVO.getGrade()), AidingStudentsPersonManageDO::getGrade, pageReqVO.getGrade())
|
|
|
- .like(StringUtils.isNotBlank(pageReqVO.getClName()), AidingStudentsPersonManageDO::getClassName, pageReqVO.getClName())
|
|
|
+ .like(StringUtils.isNotBlank(pageReqVO.getClassName()), AidingStudentsPersonManageDO::getClassName, pageReqVO.getClassName())
|
|
|
.like(StringUtils.isNotBlank(pageReqVO.getNickname()), AidingStudentsPersonManageDO::getNickname, pageReqVO.getNickname())
|
|
|
- .like(StringUtils.isNotBlank(pageReqVO.getStudentSno()), AidingStudentsPersonManageDO::getStudentSno, pageReqVO.getStudentSno())
|
|
|
+ .like(StringUtils.isNotBlank(pageReqVO.getStudentId()), AidingStudentsPersonManageDO::getStudentId, pageReqVO.getStudentId())
|
|
|
+ .orderByAsc(AidingStudentsPersonManageDO::getSort)
|
|
|
);
|
|
|
- log.info("allList = {}", allList);
|
|
|
- return new PageResult<>(BeanUtils.toBean(allList, AidingStudentPersonManageSchoolRespVO.class), (long) allList.size());
|
|
|
+ return new PageResult<>(BeanUtils.toBean(allList, AidingStudentPersonManageInfoRespVO.class), (long) allList.size());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取各个学院的部分信息
|
|
|
+ * 学校-获取各个学院的数据
|
|
|
* @param manageId
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public AidingStudentPersonManageDataPartRespVO schoolgetAidingStudentsPersonManageData(Integer manageId) {
|
|
|
- AidingStudentPersonManageDataPartRespVO resultvo = new AidingStudentPersonManageDataPartRespVO();
|
|
|
+ public AidingStudentPersonManageInfoRespVO schoolgetAidingStudentsPersonManageData(Long manageId) {
|
|
|
+ AidingStudentPersonManageInfoRespVO resultvo = new AidingStudentPersonManageInfoRespVO();
|
|
|
// 1.获得这个项目的所有信息(不分学院)
|
|
|
List<AidingStudentsPersonManageDO> manageList = aidingStudentsPersonManageMapper
|
|
|
.selectList(new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
|
|
|
.eq(AidingStudentsPersonManageDO::getCollegeManageId, manageId));
|
|
|
- log.info("获取所有学院信息如下{}", manageList);
|
|
|
int pass = 0;
|
|
|
for (AidingStudentsPersonManageDO aDo : manageList) {
|
|
|
if(aDo.getStatus() == 1){
|
|
@@ -312,14 +326,11 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
queryWrapper.select("college_id", "COUNT(*) as collegeNumber")
|
|
|
.groupBy("college_id");
|
|
|
List<Map<String, Object>> maps = aidingStudentsPersonManageMapper.selectMaps(queryWrapper);
|
|
|
- log.info("学院人数如下:maps {}", maps);
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
|
for (Map<String, Object> map : maps) {
|
|
|
Map<String, Object> temp = new HashMap<>();
|
|
|
Long collegeId = (Long) map.get("college_id");
|
|
|
DeptRespDTO dept = deptApi.getDept(collegeId);
|
|
|
- log.info("collegeId = {}, dept {}", collegeId, dept);
|
|
|
- // dept DeptRespDTO(id=18429, name=计算机科学与工程学院, parentId=0, leaderUserId=null, status=0)
|
|
|
temp.put("collegeName", dept.getName());
|
|
|
temp.put("all", map.get("collegeNumber"));
|
|
|
List<AidingStudentsPersonManageDO> passList = aidingStudentsPersonManageMapper
|
|
@@ -331,4 +342,44 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
}
|
|
|
return resultvo.setCollegeNumber(list);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 学校审核学生信息
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public AidingStudentPersonManageInfoRespVO schoolauditAidingStudentsPersonManageData(Long id) {
|
|
|
+ // 1.获取申请表信息()
|
|
|
+ AidingStudentsPersonManageDO aDo = aidingStudentsPersonManageMapper.selectById(id);
|
|
|
+ // 2.获取评议结果信息
|
|
|
+ AidingStudentPersonManageEvaluationResultDO EvaluationResultDO = aidingStudentPersonManageEvaluationResultMapper
|
|
|
+ .selectOne(new LambdaQueryWrapper<AidingStudentPersonManageEvaluationResultDO>()
|
|
|
+ .eq(AidingStudentPersonManageEvaluationResultDO::getClassName, aDo.getClassName()));
|
|
|
+ // 3.整合
|
|
|
+ AidingStudentPersonManageInfoRespVO vo = new AidingStudentPersonManageInfoRespVO();
|
|
|
+ org.springframework.beans.BeanUtils.copyProperties(EvaluationResultDO, vo);
|
|
|
+ org.springframework.beans.BeanUtils.copyProperties(aDo, vo);
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void updateAppealStatus(Long id, Integer status) {
|
|
|
+ validateLeaveExists(id);
|
|
|
+ aidingStudentsPersonManageMapper.updateById(
|
|
|
+ new AidingStudentsPersonManageDO().setId(id).setStatus(status)
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ private void validateLeaveExists(Long id) {
|
|
|
+ if (aidingStudentsPersonManageMapper.selectById(id) == null) {
|
|
|
+ throw exception(AIDING_NOT_EXISTS);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<AidingStudentsPersonManageDO> selectByProcessInstanceIdsGroupByClass(List<String> processInstanceIds,
|
|
|
+ BpmTaskPageReqVO pageVO){
|
|
|
+ return aidingStudentsPersonManageMapper.selectByProcessInstanceIdsGroupByUser(processInstanceIds,pageVO);
|
|
|
+ }
|
|
|
}
|