|
@@ -3,12 +3,17 @@ package com.ym.mec.biz.service.impl;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.microsvc.toolkit.common.response.paging.QueryInfo;
|
|
import com.ym.mec.biz.dal.dao.DegreeRegistrationDao;
|
|
import com.ym.mec.biz.dal.dao.DegreeRegistrationDao;
|
|
import com.ym.mec.biz.dal.dao.OrganizationDao;
|
|
import com.ym.mec.biz.dal.dao.OrganizationDao;
|
|
import com.ym.mec.biz.dal.dao.StudentPaymentOrderDetailDao;
|
|
import com.ym.mec.biz.dal.dao.StudentPaymentOrderDetailDao;
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
|
+import com.ym.mec.biz.dal.enums.DegreeNewsTypeEnum;
|
|
import com.ym.mec.biz.dal.enums.EDegreeStatus;
|
|
import com.ym.mec.biz.dal.enums.EDegreeStatus;
|
|
import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
|
|
import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
|
|
|
|
+import com.ym.mec.biz.dal.vo.DegreeNewsVo;
|
|
|
|
+import com.ym.mec.biz.dal.wrapper.DegreeNewsWrapper;
|
|
|
|
+import com.ym.mec.biz.service.DegreeNewsService;
|
|
import com.ym.mec.biz.service.OrganizationService;
|
|
import com.ym.mec.biz.service.OrganizationService;
|
|
import com.ym.mec.biz.service.StudentPaymentOrderService;
|
|
import com.ym.mec.biz.service.StudentPaymentOrderService;
|
|
import com.ym.mec.common.exception.BizException;
|
|
import com.ym.mec.common.exception.BizException;
|
|
@@ -53,12 +58,15 @@ public class DegreeServiceImpl extends ServiceImpl<DegreeMapper, Degree> impleme
|
|
@Autowired
|
|
@Autowired
|
|
private OrganizationDao organizationDao;
|
|
private OrganizationDao organizationDao;
|
|
|
|
|
|
- /**
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private DegreeNewsService degreeNewsService;
|
|
|
|
+
|
|
|
|
+ /**
|
|
* 查询详情
|
|
* 查询详情
|
|
* @param id 详情ID
|
|
* @param id 详情ID
|
|
* @return Degree
|
|
* @return Degree
|
|
*/
|
|
*/
|
|
- @Override
|
|
|
|
|
|
+ @Override
|
|
public Degree detail(Long id) {
|
|
public Degree detail(Long id) {
|
|
|
|
|
|
return baseMapper.selectById(id);
|
|
return baseMapper.selectById(id);
|
|
@@ -110,7 +118,7 @@ public class DegreeServiceImpl extends ServiceImpl<DegreeMapper, Degree> impleme
|
|
return result.setRecords(degrees);
|
|
return result.setRecords(degrees);
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 添加
|
|
* 添加
|
|
* @param degree DegreeWrapper.Degree
|
|
* @param degree DegreeWrapper.Degree
|
|
@@ -216,10 +224,11 @@ public class DegreeServiceImpl extends ServiceImpl<DegreeMapper, Degree> impleme
|
|
* 学生考级信息查询
|
|
* 学生考级信息查询
|
|
*
|
|
*
|
|
* @param id 考级ID
|
|
* @param id 考级ID
|
|
|
|
+ * @param organId 用户分部ID
|
|
* @return DegreeWrapper.StudentDegreeInfo
|
|
* @return DegreeWrapper.StudentDegreeInfo
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public DegreeWrapper.StudentDegreeInfo studentDegreeInfoById(Long id) {
|
|
|
|
|
|
+ public DegreeWrapper.StudentDegreeInfo studentDegreeInfoById(Long id, Integer organId) {
|
|
|
|
|
|
Degree degree = getById(id);
|
|
Degree degree = getById(id);
|
|
// 考级信息不存在
|
|
// 考级信息不存在
|
|
@@ -251,6 +260,22 @@ public class DegreeServiceImpl extends ServiceImpl<DegreeMapper, Degree> impleme
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 考级最新简章消息ID
|
|
|
|
+ DegreeNewsWrapper.DegreeNewsQuery newsQuery = DegreeNewsWrapper.DegreeNewsQuery
|
|
|
|
+ .builder()
|
|
|
|
+ .page(1)
|
|
|
|
+ .rows(1)
|
|
|
|
+ .status(true)
|
|
|
|
+ .tenantId(wrapper.getTenantId())
|
|
|
|
+ .organId(organId)
|
|
|
|
+ .type(DegreeNewsTypeEnum.GRADE_EXAMINATION_BRIEF.getCode())
|
|
|
|
+ .sortedTime(true)
|
|
|
|
+ .build();
|
|
|
|
+ List<DegreeNewsVo> records = degreeNewsService.selectPage(QueryInfo.getPage(newsQuery), newsQuery).getRecords();
|
|
|
|
+ if (org.apache.commons.collections.CollectionUtils.isNotEmpty(records)) {
|
|
|
|
+ wrapper.setExaminationBriefId(records.get(0).getId());
|
|
|
|
+ }
|
|
|
|
+
|
|
return wrapper;
|
|
return wrapper;
|
|
}
|
|
}
|
|
}
|
|
}
|