|
@@ -21,7 +21,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
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.*;
|
|
|
|
|
|
/**
|
|
|
* @autor WoVoM
|
|
@@ -73,6 +76,15 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
*/
|
|
|
@Override
|
|
|
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::getStudentSno, uploadVO.getStudentSno()));
|
|
|
+ if(user1 != null){
|
|
|
+ throw exception(STUDENT_INFO_EXISTS);
|
|
|
+ }
|
|
|
// 1.获取当前登录的用户表
|
|
|
AidingStudentsPersonManageDO aDo = BeanUtils.toBean(uploadVO, AidingStudentsPersonManageDO.class);
|
|
|
AdminUserRespDTO user = adminUserApi.getUser(getLoginUser().getId());
|
|
@@ -95,10 +107,10 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
*/
|
|
|
@Override
|
|
|
public AidingStudentPersonManageInfoRespVO checkAidingStudentsManage() {
|
|
|
- AdminUserRespDTO Loginuser = adminUserApi.getUser(getLoginUser().getId());
|
|
|
- AidingStudentsPersonManageDO user = aidingStudentsPersonManageMapper
|
|
|
- .selectOne(AidingStudentsPersonManageDO::getStudentSno, Loginuser.getStudentId());
|
|
|
- return BeanUtils.toBean(user, AidingStudentPersonManageInfoRespVO.class);
|
|
|
+ return BeanUtils
|
|
|
+ .toBean(aidingStudentsPersonManageMapper
|
|
|
+ .selectOne(AidingStudentsPersonManageDO::getStudentSno, adminUserApi.getUser(getLoginUser().getId()).getStudentId())
|
|
|
+ , AidingStudentPersonManageInfoRespVO.class);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -107,10 +119,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
*/
|
|
|
@Override
|
|
|
public void editAidingStudentsManage(AidingStudentPersonManageInfoRespVO uploadVO) {
|
|
|
- AidingStudentsPersonManageDO aDo = new AidingStudentsPersonManageDO();
|
|
|
- aDo = BeanUtils.toBean(uploadVO, AidingStudentsPersonManageDO.class);
|
|
|
- aDo.setRejectNotes("");
|
|
|
- aidingStudentsPersonManageMapper.updateById(aDo);
|
|
|
+ aidingStudentsPersonManageMapper.updateById(BeanUtils.toBean(uploadVO, AidingStudentsPersonManageDO.class));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -225,7 +234,6 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
updateWrapper.set(AidingStudentsPersonManageDO::getCollegeSuggestionDifficultType, id.getCollegeSuggestionDifficultType());
|
|
|
else if (id.getSchoolSuggestionDifficultType() != null)
|
|
|
updateWrapper.set(AidingStudentsPersonManageDO::getSchoolSuggestionDifficultType, id.getSchoolSuggestionDifficultType());
|
|
|
- else;
|
|
|
aidingStudentsPersonManageMapper.update(null, updateWrapper);
|
|
|
}
|
|
|
}
|
|
@@ -236,6 +244,14 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
*/
|
|
|
@Override
|
|
|
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);
|