|
@@ -1,8 +1,12 @@
|
|
|
package cn.iocoder.yudao.module.as.service.aidingstudentscollegemanage;
|
|
|
|
|
|
+import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentsPersonManageUploadRespVO;
|
|
|
import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentscollegemanage.AidingStudentsCollegeManageProjectInfoPageRespDO;
|
|
|
import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentsmanage.AidingStudentsManageDO;
|
|
|
import cn.iocoder.yudao.module.as.dal.mysql.aidingstudentsmanage.AidingStudentsManageMapper;
|
|
|
+import cn.iocoder.yudao.module.as.service.aidingstudentsimportlist.AidingStudentsImportListService;
|
|
|
+import cn.iocoder.yudao.module.as.service.aidingstudentsimportlist.AidingStudentsImportListServiceImpl;
|
|
|
+import cn.iocoder.yudao.module.as.service.aidingstudentspersonmanage.AidingStudentsPersonManageServiceImpl;
|
|
|
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;
|
|
@@ -41,6 +45,10 @@ public class AidingStudentsCollegeManageServiceImpl implements AidingStudentsCol
|
|
|
@Resource
|
|
|
private AidingStudentsManageMapper aidingStudentsManageMapper;
|
|
|
@Resource
|
|
|
+ private AidingStudentsPersonManageServiceImpl aidingStudentsPersonManageService;
|
|
|
+ @Resource
|
|
|
+ private AidingStudentsImportListServiceImpl aidingStudentsImportListService;
|
|
|
+ @Resource
|
|
|
private AdminUserApi adminUserApi;
|
|
|
@Resource
|
|
|
private DeptApi deptApi;
|
|
@@ -135,18 +143,18 @@ public class AidingStudentsCollegeManageServiceImpl implements AidingStudentsCol
|
|
|
//获得分页信息
|
|
|
Integer pageNo = pageReqVO.getPageNo();
|
|
|
Integer pageSize = pageReqVO.getPageSize();
|
|
|
- Integer offset = (pageNo - 1) *pageSize;
|
|
|
- List<AidingStudentsCollegeManageProjectInfoPageRespDO> aidingStudentsCollegeManageProjectInfoRespDOS = aidingStudentsCollegeManageMapper.selectProjectInfoPage(pageSize,offset);
|
|
|
+ Integer offset = (pageNo - 1) * pageSize;
|
|
|
+ List<AidingStudentsCollegeManageProjectInfoPageRespDO> aidingStudentsCollegeManageProjectInfoRespDOS = aidingStudentsCollegeManageMapper.selectProjectInfoPage(pageSize, offset);
|
|
|
//转换
|
|
|
List<AidingStudentsCollegeManageProjectInfoRespVO> aidingStudentsCollegeManageProjectInfoRespVOS = BeanUtils.toBean(aidingStudentsCollegeManageProjectInfoRespDOS, AidingStudentsCollegeManageProjectInfoRespVO.class);
|
|
|
//判断
|
|
|
- if (aidingStudentsCollegeManageProjectInfoRespVOS != null){
|
|
|
+ if (aidingStudentsCollegeManageProjectInfoRespVOS != null) {
|
|
|
//获得学校项目创建人
|
|
|
aidingStudentsCollegeManageProjectInfoRespVOS.forEach(aidingStudentsCollegeManageProjectInfoRespVO -> {
|
|
|
aidingStudentsCollegeManageProjectInfoRespVO.setCreator(adminUserApi.getUser(Long.valueOf(aidingStudentsManageMapper.selectById(aidingStudentsCollegeManageProjectInfoRespVO.getId()).getCreator())).getNickname());
|
|
|
});
|
|
|
//返回项目信息
|
|
|
- return new PageResult<>(aidingStudentsCollegeManageProjectInfoRespVOS,aidingStudentsCollegeManageMapper.selectProjectInfoPageCount());
|
|
|
+ return new PageResult<>(aidingStudentsCollegeManageProjectInfoRespVOS, aidingStudentsCollegeManageMapper.selectProjectInfoPageCount());
|
|
|
}
|
|
|
return null;
|
|
|
|
|
@@ -156,19 +164,32 @@ public class AidingStudentsCollegeManageServiceImpl implements AidingStudentsCol
|
|
|
public List<AidingStudentsCollegeManageStudentRespVO> getStudentCollegeManageInfo() {
|
|
|
// 获得学院id
|
|
|
Long deptId = adminUserApi.getUser(getLoginUserId()).getDeptId();
|
|
|
- Long collegeId = deptApi.getCollegeId(deptId);
|
|
|
+ Long collegeId = deptApi.getCollegeId(deptId);
|
|
|
//获得学院的项目
|
|
|
List<AidingStudentsCollegeManageDO> aidingStudentsCollegeManageDOS = aidingStudentsCollegeManageMapper.selectList(Wrappers.lambdaQuery(AidingStudentsCollegeManageDO.class)
|
|
|
- .eq(AidingStudentsCollegeManageDO::getCollegeId, collegeId));
|
|
|
+ .eq(AidingStudentsCollegeManageDO::getCollegeId, collegeId)
|
|
|
+ .orderByDesc(AidingStudentsCollegeManageDO::getCreateTime));
|
|
|
List<AidingStudentsCollegeManageStudentRespVO> aidingStudentsCollegeManageStudentRespVOS = BeanUtils.toBean(aidingStudentsCollegeManageDOS, AidingStudentsCollegeManageStudentRespVO.class);
|
|
|
- //获得项目名字
|
|
|
+ //获得项目名字以及是否在自治区名单
|
|
|
aidingStudentsCollegeManageStudentRespVOS.forEach(aidingStudentsCollegeManageStudentRespVO -> {
|
|
|
aidingStudentsCollegeManageStudentRespVO.setDiName(aidingStudentsManageMapper.selectById(aidingStudentsCollegeManageStudentRespVO.getManageId()).getDiName());
|
|
|
+ //通过身份证查询是否存在
|
|
|
+ AidingStudentsPersonManageUploadRespVO aidingStudentsPersonManageUploadRespVO = aidingStudentsPersonManageService.beforeuploadAidingStudentsManage();
|
|
|
+ aidingStudentsCollegeManageStudentRespVO.setInImportList(aidingStudentsImportListService.checkStudentIDNumberExists(aidingStudentsPersonManageUploadRespVO.getIdCard(), aidingStudentsCollegeManageStudentRespVO.getManageId()));
|
|
|
});
|
|
|
|
|
|
return aidingStudentsCollegeManageStudentRespVOS;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Boolean publishAidingStudentsCollegeManage(Long id) {
|
|
|
+ int update = aidingStudentsCollegeManageMapper.update(
|
|
|
+ Wrappers.lambdaUpdate(AidingStudentsCollegeManageDO.class)
|
|
|
+ .eq(AidingStudentsCollegeManageDO::getId, id)
|
|
|
+ .set(AidingStudentsCollegeManageDO::getComStatus, 1));
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
/*private List<AidingStudentsCollegeManageProjectInfoRespVO> merge2AidingStudentsCollegeManageProjectInfoRespVO
|
|
|
(List<AidingStudentsManageDO> aidingStudentsManageDOS, List<AidingStudentsCollegeManageDO> aidingStudentsCollegeManageDOS) {
|
|
|
List<AidingStudentsCollegeManageProjectInfoRespVO> aidingStudentsCollegeManageProjectInfoRespVOS = new ArrayList<>();
|