|
@@ -1,5 +1,6 @@
|
|
|
package com.keao.edu.user.service.impl;
|
|
|
|
|
|
+import cfca.sadk.org.bouncycastle.apache.bzip2.BZip2Constants;
|
|
|
import com.keao.edu.auth.api.client.SysUserFeignService;
|
|
|
import com.keao.edu.auth.api.entity.SysUser;
|
|
|
import com.keao.edu.common.dal.BaseDAO;
|
|
@@ -267,6 +268,25 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
+ public void deleteExamOrgan(Long id) {
|
|
|
+ if(Objects.isNull(id)){
|
|
|
+ throw new BizException("参数错误");
|
|
|
+ }
|
|
|
+ ExamOrganizationRelation organizationRelation = examOrganizationRelationDao.get(id);
|
|
|
+ if(Objects.isNull(organizationRelation)){
|
|
|
+ throw new BizException("删除失败");
|
|
|
+ }
|
|
|
+ List<Integer> childOrganIds = organizationService.getChildOrganIds(organizationRelation.getOrganId(), true);
|
|
|
+ List<ExamOrganizationRelation> examOrganizationRelations = examOrganizationRelationDao.getExamOrganizationRelations(organizationRelation.getExaminationBasicId().longValue(), childOrganIds);
|
|
|
+ long count = examOrganizationRelations.stream().filter(e -> e.getSendUrlFlag() == 1).count();
|
|
|
+ if(count>0){
|
|
|
+ throw new BizException("删除失败");
|
|
|
+ }
|
|
|
+ examOrganizationRelationDao.deleteExamOrgans(organizationRelation.getExaminationBasicId().longValue(), childOrganIds);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public void sendUrl(Integer examId) {
|
|
|
if(Objects.isNull(examId)){
|
|
|
throw new BizException("请指定考级项目");
|