关联会议名称动态更新
This commit is contained in:
parent
59465a45ea
commit
39d734a2ee
|
@ -10,9 +10,12 @@ import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||||
import com.ydool.boot.modules.rddb.entity.Appoint;
|
import com.ydool.boot.modules.rddb.entity.Appoint;
|
||||||
import com.ydool.boot.modules.rddb.entity.AppointAttachment;
|
import com.ydool.boot.modules.rddb.entity.AppointAttachment;
|
||||||
import com.ydool.boot.modules.rddb.entity.AppointUser;
|
import com.ydool.boot.modules.rddb.entity.AppointUser;
|
||||||
|
import com.ydool.boot.modules.rddb.entity.Conference;
|
||||||
import com.ydool.boot.modules.rddb.entity.dto.AppointDto;
|
import com.ydool.boot.modules.rddb.entity.dto.AppointDto;
|
||||||
|
import com.ydool.boot.modules.rddb.mapper.ConferenceMapper;
|
||||||
import com.ydool.boot.modules.rddb.service.AppointAttachmentService;
|
import com.ydool.boot.modules.rddb.service.AppointAttachmentService;
|
||||||
import com.ydool.boot.modules.rddb.service.AppointUserService;
|
import com.ydool.boot.modules.rddb.service.AppointUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -28,6 +31,9 @@ public class AppointWrapper extends BaseWrapper<Appoint, AppointDto> {
|
||||||
return new AppointWrapper();
|
return new AppointWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConferenceMapper conferenceMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AppointDto entityVO(Appoint appoint) {
|
public AppointDto entityVO(Appoint appoint) {
|
||||||
AppointDto appointDto = BeanUtil.copyProperties(appoint, AppointDto.class);
|
AppointDto appointDto = BeanUtil.copyProperties(appoint, AppointDto.class);
|
||||||
|
@ -39,14 +45,47 @@ public class AppointWrapper extends BaseWrapper<Appoint, AppointDto> {
|
||||||
.eq(AppointAttachment::getAppointId, appoint.getId())
|
.eq(AppointAttachment::getAppointId, appoint.getId())
|
||||||
.eq(AppointAttachment::getType, Appoint.STATE_PROPOSE)
|
.eq(AppointAttachment::getType, Appoint.STATE_PROPOSE)
|
||||||
.orderByDesc(AppointAttachment::getCreatedAt));
|
.orderByDesc(AppointAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(proposeAttachmentList)) {
|
||||||
|
proposeAttachmentList.stream().forEach(i -> {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
});
|
||||||
|
}
|
||||||
List<AppointAttachment> conferenceAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
List<AppointAttachment> conferenceAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
||||||
.eq(AppointAttachment::getAppointId, appoint.getId())
|
.eq(AppointAttachment::getAppointId, appoint.getId())
|
||||||
.eq(AppointAttachment::getType, Appoint.STATE_CONFERENCE)
|
.eq(AppointAttachment::getType, Appoint.STATE_CONFERENCE)
|
||||||
.orderByDesc(AppointAttachment::getCreatedAt));
|
.orderByDesc(AppointAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(conferenceAttachmentList)) {
|
||||||
|
conferenceAttachmentList.stream().forEach(i -> {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
});
|
||||||
|
}
|
||||||
List<AppointAttachment> performAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
List<AppointAttachment> performAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
||||||
.eq(AppointAttachment::getAppointId, appoint.getId())
|
.eq(AppointAttachment::getAppointId, appoint.getId())
|
||||||
.eq(AppointAttachment::getType, Appoint.STATE_PERFORM)
|
.eq(AppointAttachment::getType, Appoint.STATE_PERFORM)
|
||||||
.orderByDesc(AppointAttachment::getCreatedAt));
|
.orderByDesc(AppointAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(performAttachmentList)) {
|
||||||
|
performAttachmentList.stream().forEach(i -> {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
List<AppointUser> conferenceUserList = appointUserService.list(new LambdaQueryWrapper<AppointUser>()
|
List<AppointUser> conferenceUserList = appointUserService.list(new LambdaQueryWrapper<AppointUser>()
|
||||||
.eq(AppointUser::getAppointId, appoint.getId())
|
.eq(AppointUser::getAppointId, appoint.getId())
|
||||||
|
@ -73,12 +112,12 @@ public class AppointWrapper extends BaseWrapper<Appoint, AppointDto> {
|
||||||
if (Appoint.STATE_END == appoint.getState()) {
|
if (Appoint.STATE_END == appoint.getState()) {
|
||||||
//没打分的不算
|
//没打分的不算
|
||||||
List<AppointUser> scoredAppointUserList = performUserList.stream().filter(item -> item.getScore() != null).collect(Collectors.toList());
|
List<AppointUser> scoredAppointUserList = performUserList.stream().filter(item -> item.getScore() != null).collect(Collectors.toList());
|
||||||
if(CollectionUtil.isNotEmpty(scoredAppointUserList)){
|
if (CollectionUtil.isNotEmpty(scoredAppointUserList)) {
|
||||||
BigDecimal averageScore = scoredAppointUserList.stream().map(item -> item.getScore())
|
BigDecimal averageScore = scoredAppointUserList.stream().map(item -> item.getScore())
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||||
.divide(new BigDecimal(scoredAppointUserList.size()), BigDecimal.ROUND_HALF_UP);
|
.divide(new BigDecimal(scoredAppointUserList.size()), BigDecimal.ROUND_HALF_UP);
|
||||||
appointDto.setAverageScore(averageScore);
|
appointDto.setAverageScore(averageScore);
|
||||||
}else{
|
} else {
|
||||||
appointDto.setAverageScore(new BigDecimal("0"));
|
appointDto.setAverageScore(new BigDecimal("0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.ydool.boot.modules.rddb.wrapper;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ydool.boot.api.util.TokenUtil;
|
import com.ydool.boot.api.util.TokenUtil;
|
||||||
import com.ydool.boot.api.util.UserInfo;
|
import com.ydool.boot.api.util.UserInfo;
|
||||||
|
@ -9,8 +10,10 @@ import com.ydool.boot.common.utils.SpringUtils;
|
||||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||||
import com.ydool.boot.modules.rddb.entity.*;
|
import com.ydool.boot.modules.rddb.entity.*;
|
||||||
import com.ydool.boot.modules.rddb.entity.dto.ContactDbDto;
|
import com.ydool.boot.modules.rddb.entity.dto.ContactDbDto;
|
||||||
|
import com.ydool.boot.modules.rddb.mapper.ConferenceMapper;
|
||||||
import com.ydool.boot.modules.rddb.service.ContactDbAttachmentService;
|
import com.ydool.boot.modules.rddb.service.ContactDbAttachmentService;
|
||||||
import com.ydool.boot.modules.rddb.service.ContactDbUserService;
|
import com.ydool.boot.modules.rddb.service.ContactDbUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -26,6 +29,9 @@ public class ContactDbWrapper extends BaseWrapper<ContactDb, ContactDbDto> {
|
||||||
return new ContactDbWrapper();
|
return new ContactDbWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConferenceMapper conferenceMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContactDbDto entityVO(ContactDb contactDb) {
|
public ContactDbDto entityVO(ContactDb contactDb) {
|
||||||
ContactDbDto dto = BeanUtil.copyProperties(contactDb, ContactDbDto.class);
|
ContactDbDto dto = BeanUtil.copyProperties(contactDb, ContactDbDto.class);
|
||||||
|
@ -37,13 +43,45 @@ public class ContactDbWrapper extends BaseWrapper<ContactDb, ContactDbDto> {
|
||||||
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
||||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD)
|
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD)
|
||||||
.orderByDesc(ContactDbAttachment::getCreatedAt));
|
.orderByDesc(ContactDbAttachment::getCreatedAt));
|
||||||
|
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(recordAttachmentList)) {
|
||||||
|
recordAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
List<ContactDbAttachment> photoAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
|
List<ContactDbAttachment> photoAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
|
||||||
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
||||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_PHOTO)
|
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_PHOTO)
|
||||||
.orderByDesc(ContactDbAttachment::getCreatedAt));
|
.orderByDesc(ContactDbAttachment::getCreatedAt));
|
||||||
|
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(photoAttachmentList)) {
|
||||||
|
photoAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
dto.setConferenceRecordAttachmentList(recordAttachmentList);
|
dto.setConferenceRecordAttachmentList(recordAttachmentList);
|
||||||
dto.setConferencePhotoAttachmentList(photoAttachmentList);
|
dto.setConferencePhotoAttachmentList(photoAttachmentList);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<ContactDbUser> subjectUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
|
List<ContactDbUser> subjectUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
|
||||||
.eq(ContactDbUser::getContactDbId, contactDb.getId())
|
.eq(ContactDbUser::getContactDbId, contactDb.getId())
|
||||||
.eq(ContactDbUser::getType, ContactDb.STATE_SUBJECT)
|
.eq(ContactDbUser::getType, ContactDb.STATE_SUBJECT)
|
||||||
|
|
|
@ -2,19 +2,19 @@ package com.ydool.boot.modules.rddb.wrapper;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ydool.boot.api.util.TokenUtil;
|
import com.ydool.boot.api.util.TokenUtil;
|
||||||
import com.ydool.boot.api.util.UserInfo;
|
import com.ydool.boot.api.util.UserInfo;
|
||||||
import com.ydool.boot.common.utils.SpringUtils;
|
import com.ydool.boot.common.utils.SpringUtils;
|
||||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewOfficer;
|
import com.ydool.boot.modules.rddb.entity.*;
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewOfficerAttachment;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewOfficerAudit;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewOfficerUser;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.dto.ReviewOfficerDto;
|
import com.ydool.boot.modules.rddb.entity.dto.ReviewOfficerDto;
|
||||||
|
import com.ydool.boot.modules.rddb.mapper.ConferenceMapper;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewOfficerAttachmentService;
|
import com.ydool.boot.modules.rddb.service.ReviewOfficerAttachmentService;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewOfficerAuditService;
|
import com.ydool.boot.modules.rddb.service.ReviewOfficerAuditService;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewOfficerUserService;
|
import com.ydool.boot.modules.rddb.service.ReviewOfficerUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -31,6 +31,9 @@ public class ReviewOfficerWrapper extends BaseWrapper<ReviewOfficer, ReviewOffic
|
||||||
return new ReviewOfficerWrapper();
|
return new ReviewOfficerWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConferenceMapper conferenceMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReviewOfficerDto entityVO(ReviewOfficer reviewOfficer) {
|
public ReviewOfficerDto entityVO(ReviewOfficer reviewOfficer) {
|
||||||
ReviewOfficerDto ReviewOfficerDto = BeanUtil.copyProperties(reviewOfficer, ReviewOfficerDto.class);
|
ReviewOfficerDto ReviewOfficerDto = BeanUtil.copyProperties(reviewOfficer, ReviewOfficerDto.class);
|
||||||
|
@ -44,18 +47,70 @@ public class ReviewOfficerWrapper extends BaseWrapper<ReviewOfficer, ReviewOffic
|
||||||
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
||||||
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_IN_REPORT)
|
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_IN_REPORT)
|
||||||
.orderByDesc(ReviewOfficerAttachment::getCreatedAt));
|
.orderByDesc(ReviewOfficerAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(inReportAttachmentList)) {
|
||||||
|
inReportAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewOfficerAttachment> checkAttachmentList = reviewOfficerAttachmentService.list(new LambdaQueryWrapper<ReviewOfficerAttachment>()
|
List<ReviewOfficerAttachment> checkAttachmentList = reviewOfficerAttachmentService.list(new LambdaQueryWrapper<ReviewOfficerAttachment>()
|
||||||
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
||||||
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_CHECK)
|
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_CHECK)
|
||||||
.orderByDesc(ReviewOfficerAttachment::getCreatedAt));
|
.orderByDesc(ReviewOfficerAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(checkAttachmentList)) {
|
||||||
|
checkAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewOfficerAttachment> opinionAttachmentList = reviewOfficerAttachmentService.list(new LambdaQueryWrapper<ReviewOfficerAttachment>()
|
List<ReviewOfficerAttachment> opinionAttachmentList = reviewOfficerAttachmentService.list(new LambdaQueryWrapper<ReviewOfficerAttachment>()
|
||||||
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
||||||
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_OPINION)
|
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_OPINION)
|
||||||
.orderByDesc(ReviewOfficerAttachment::getCreatedAt));
|
.orderByDesc(ReviewOfficerAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(opinionAttachmentList)) {
|
||||||
|
opinionAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewOfficerAttachment> resultAttachmentList = reviewOfficerAttachmentService.list(new LambdaQueryWrapper<ReviewOfficerAttachment>()
|
List<ReviewOfficerAttachment> resultAttachmentList = reviewOfficerAttachmentService.list(new LambdaQueryWrapper<ReviewOfficerAttachment>()
|
||||||
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
||||||
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_RESULT)
|
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_RESULT)
|
||||||
.orderByDesc(ReviewOfficerAttachment::getCreatedAt));
|
.orderByDesc(ReviewOfficerAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(resultAttachmentList)) {
|
||||||
|
resultAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
List<ReviewOfficerAudit> inReportAudit1List = reviewOfficerAuditService.list(new LambdaQueryWrapper<ReviewOfficerAudit>()
|
List<ReviewOfficerAudit> inReportAudit1List = reviewOfficerAuditService.list(new LambdaQueryWrapper<ReviewOfficerAudit>()
|
||||||
.eq(ReviewOfficerAudit::getReviewId, reviewOfficer.getId())
|
.eq(ReviewOfficerAudit::getReviewId, reviewOfficer.getId())
|
||||||
|
|
|
@ -2,19 +2,20 @@ package com.ydool.boot.modules.rddb.wrapper;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ydool.boot.api.util.TokenUtil;
|
import com.ydool.boot.api.util.TokenUtil;
|
||||||
import com.ydool.boot.api.util.UserInfo;
|
import com.ydool.boot.api.util.UserInfo;
|
||||||
import com.ydool.boot.common.utils.SpringUtils;
|
import com.ydool.boot.common.utils.SpringUtils;
|
||||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewSubject;
|
import com.ydool.boot.modules.rddb.entity.*;
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewSubjectAttachment;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewSubjectAudit;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewSubjectUser;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.dto.ReviewSubjectDto;
|
import com.ydool.boot.modules.rddb.entity.dto.ReviewSubjectDto;
|
||||||
|
import com.ydool.boot.modules.rddb.mapper.ConferenceMapper;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewSubjectAttachmentService;
|
import com.ydool.boot.modules.rddb.service.ReviewSubjectAttachmentService;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewSubjectAuditService;
|
import com.ydool.boot.modules.rddb.service.ReviewSubjectAuditService;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewSubjectUserService;
|
import com.ydool.boot.modules.rddb.service.ReviewSubjectUserService;
|
||||||
|
import io.netty.util.internal.StringUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -30,6 +31,9 @@ public class ReviewSubjectWrapper extends BaseWrapper<ReviewSubject, ReviewSubje
|
||||||
return new ReviewSubjectWrapper();
|
return new ReviewSubjectWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConferenceMapper conferenceMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReviewSubjectDto entityVO(ReviewSubject reviewSubject) {
|
public ReviewSubjectDto entityVO(ReviewSubject reviewSubject) {
|
||||||
ReviewSubjectDto ReviewSubjectDto = BeanUtil.copyProperties(reviewSubject, ReviewSubjectDto.class);
|
ReviewSubjectDto ReviewSubjectDto = BeanUtil.copyProperties(reviewSubject, ReviewSubjectDto.class);
|
||||||
|
@ -42,18 +46,70 @@ public class ReviewSubjectWrapper extends BaseWrapper<ReviewSubject, ReviewSubje
|
||||||
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
||||||
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_IN_REPORT)
|
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_IN_REPORT)
|
||||||
.orderByDesc(ReviewSubjectAttachment::getCreatedAt));
|
.orderByDesc(ReviewSubjectAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(inReportAttachmentList)) {
|
||||||
|
inReportAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewSubjectAttachment> checkAttachmentList = reviewSubjectAttachmentService.list(new LambdaQueryWrapper<ReviewSubjectAttachment>()
|
List<ReviewSubjectAttachment> checkAttachmentList = reviewSubjectAttachmentService.list(new LambdaQueryWrapper<ReviewSubjectAttachment>()
|
||||||
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
||||||
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_CHECK)
|
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_CHECK)
|
||||||
.orderByDesc(ReviewSubjectAttachment::getCreatedAt));
|
.orderByDesc(ReviewSubjectAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(checkAttachmentList)) {
|
||||||
|
checkAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewSubjectAttachment> opinionAttachmentList = reviewSubjectAttachmentService.list(new LambdaQueryWrapper<ReviewSubjectAttachment>()
|
List<ReviewSubjectAttachment> opinionAttachmentList = reviewSubjectAttachmentService.list(new LambdaQueryWrapper<ReviewSubjectAttachment>()
|
||||||
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
||||||
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_OPINION)
|
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_OPINION)
|
||||||
.orderByDesc(ReviewSubjectAttachment::getCreatedAt));
|
.orderByDesc(ReviewSubjectAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(opinionAttachmentList)) {
|
||||||
|
opinionAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewSubjectAttachment> resultAttachmentList = reviewSubjectAttachmentService.list(new LambdaQueryWrapper<ReviewSubjectAttachment>()
|
List<ReviewSubjectAttachment> resultAttachmentList = reviewSubjectAttachmentService.list(new LambdaQueryWrapper<ReviewSubjectAttachment>()
|
||||||
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
||||||
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_RESULT)
|
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_RESULT)
|
||||||
.orderByDesc(ReviewSubjectAttachment::getCreatedAt));
|
.orderByDesc(ReviewSubjectAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(resultAttachmentList)) {
|
||||||
|
resultAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
List<ReviewSubjectAudit> inReportAudit1List = reviewSubjectAuditService.list(new LambdaQueryWrapper<ReviewSubjectAudit>()
|
List<ReviewSubjectAudit> inReportAudit1List = reviewSubjectAuditService.list(new LambdaQueryWrapper<ReviewSubjectAudit>()
|
||||||
.eq(ReviewSubjectAudit::getReviewId, reviewSubject.getId())
|
.eq(ReviewSubjectAudit::getReviewId, reviewSubject.getId())
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.ydool.boot.modules.rddb.wrapper;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ydool.boot.api.util.TokenUtil;
|
import com.ydool.boot.api.util.TokenUtil;
|
||||||
import com.ydool.boot.api.util.UserInfo;
|
import com.ydool.boot.api.util.UserInfo;
|
||||||
|
@ -9,8 +10,10 @@ import com.ydool.boot.common.utils.SpringUtils;
|
||||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||||
import com.ydool.boot.modules.rddb.entity.*;
|
import com.ydool.boot.modules.rddb.entity.*;
|
||||||
import com.ydool.boot.modules.rddb.entity.dto.ReviewSuperviseDto;
|
import com.ydool.boot.modules.rddb.entity.dto.ReviewSuperviseDto;
|
||||||
|
import com.ydool.boot.modules.rddb.mapper.ConferenceMapper;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewSuperviseAttachmentService;
|
import com.ydool.boot.modules.rddb.service.ReviewSuperviseAttachmentService;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewSuperviseUserService;
|
import com.ydool.boot.modules.rddb.service.ReviewSuperviseUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -26,6 +29,9 @@ public class ReviewSuperviseWrapper extends BaseWrapper<ReviewSupervise, ReviewS
|
||||||
return new ReviewSuperviseWrapper();
|
return new ReviewSuperviseWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConferenceMapper conferenceMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReviewSuperviseDto entityVO(ReviewSupervise reviewSupervise) {
|
public ReviewSuperviseDto entityVO(ReviewSupervise reviewSupervise) {
|
||||||
|
|
||||||
|
@ -38,22 +44,87 @@ public class ReviewSuperviseWrapper extends BaseWrapper<ReviewSupervise, ReviewS
|
||||||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_SURVEY)
|
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_SURVEY)
|
||||||
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(surveyAttachmentList)) {
|
||||||
|
surveyAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewSuperviseAttachment> reviewAttachmentList = reviewSuperviseAttachmentService.list(new LambdaQueryWrapper<ReviewSuperviseAttachment>()
|
List<ReviewSuperviseAttachment> reviewAttachmentList = reviewSuperviseAttachmentService.list(new LambdaQueryWrapper<ReviewSuperviseAttachment>()
|
||||||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_REVIEW)
|
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_REVIEW)
|
||||||
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(reviewAttachmentList)) {
|
||||||
|
reviewAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewSuperviseAttachment> tailAttachmentList = reviewSuperviseAttachmentService.list(new LambdaQueryWrapper<ReviewSuperviseAttachment>()
|
List<ReviewSuperviseAttachment> tailAttachmentList = reviewSuperviseAttachmentService.list(new LambdaQueryWrapper<ReviewSuperviseAttachment>()
|
||||||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_TAIL)
|
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_TAIL)
|
||||||
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(tailAttachmentList)) {
|
||||||
|
tailAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewSuperviseAttachment> researchAttachmentList = reviewSuperviseAttachmentService.list(new LambdaQueryWrapper<ReviewSuperviseAttachment>()
|
List<ReviewSuperviseAttachment> researchAttachmentList = reviewSuperviseAttachmentService.list(new LambdaQueryWrapper<ReviewSuperviseAttachment>()
|
||||||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_RESEARCH)
|
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_RESEARCH)
|
||||||
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(researchAttachmentList)) {
|
||||||
|
researchAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewSuperviseAttachment> evaluateAttachmentList = reviewSuperviseAttachmentService.list(new LambdaQueryWrapper<ReviewSuperviseAttachment>()
|
List<ReviewSuperviseAttachment> evaluateAttachmentList = reviewSuperviseAttachmentService.list(new LambdaQueryWrapper<ReviewSuperviseAttachment>()
|
||||||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_EVALUATE)
|
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_EVALUATE)
|
||||||
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
.orderByDesc(ReviewSuperviseAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(evaluateAttachmentList)) {
|
||||||
|
evaluateAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
dto.setSurveyAttachmentList(surveyAttachmentList);
|
dto.setSurveyAttachmentList(surveyAttachmentList);
|
||||||
dto.setReviewAttachmentList(reviewAttachmentList);
|
dto.setReviewAttachmentList(reviewAttachmentList);
|
||||||
dto.setTailAttachmentList(tailAttachmentList);
|
dto.setTailAttachmentList(tailAttachmentList);
|
||||||
|
|
|
@ -2,19 +2,19 @@ package com.ydool.boot.modules.rddb.wrapper;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ydool.boot.api.util.TokenUtil;
|
import com.ydool.boot.api.util.TokenUtil;
|
||||||
import com.ydool.boot.api.util.UserInfo;
|
import com.ydool.boot.api.util.UserInfo;
|
||||||
import com.ydool.boot.common.utils.SpringUtils;
|
import com.ydool.boot.common.utils.SpringUtils;
|
||||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewWork;
|
import com.ydool.boot.modules.rddb.entity.*;
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkAttachment;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkAudit;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkUser;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.dto.ReviewWorkDto;
|
import com.ydool.boot.modules.rddb.entity.dto.ReviewWorkDto;
|
||||||
|
import com.ydool.boot.modules.rddb.mapper.ConferenceMapper;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewWorkAttachmentService;
|
import com.ydool.boot.modules.rddb.service.ReviewWorkAttachmentService;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewWorkAuditService;
|
import com.ydool.boot.modules.rddb.service.ReviewWorkAuditService;
|
||||||
import com.ydool.boot.modules.rddb.service.ReviewWorkUserService;
|
import com.ydool.boot.modules.rddb.service.ReviewWorkUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -30,6 +30,9 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
||||||
return new ReviewWorkWrapper();
|
return new ReviewWorkWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConferenceMapper conferenceMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReviewWorkDto entityVO(ReviewWork reviewWork) {
|
public ReviewWorkDto entityVO(ReviewWork reviewWork) {
|
||||||
ReviewWorkDto ReviewWorkDto = BeanUtil.copyProperties(reviewWork, ReviewWorkDto.class);
|
ReviewWorkDto ReviewWorkDto = BeanUtil.copyProperties(reviewWork, ReviewWorkDto.class);
|
||||||
|
@ -42,18 +45,70 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
||||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_IN_REPORT)
|
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_IN_REPORT)
|
||||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(inReportAttachmentList)) {
|
||||||
|
inReportAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewWorkAttachment> checkAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
List<ReviewWorkAttachment> checkAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_CHECK)
|
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_CHECK)
|
||||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(checkAttachmentList)) {
|
||||||
|
checkAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewWorkAttachment> opinionAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
List<ReviewWorkAttachment> opinionAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_OPINION)
|
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_OPINION)
|
||||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(opinionAttachmentList)) {
|
||||||
|
opinionAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
List<ReviewWorkAttachment> resultAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
List<ReviewWorkAttachment> resultAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_RESULT)
|
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_RESULT)
|
||||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(resultAttachmentList)) {
|
||||||
|
resultAttachmentList.stream().forEach(i -> {
|
||||||
|
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||||
|
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||||
|
String conferenceName = "";
|
||||||
|
if (conference != null) {
|
||||||
|
conferenceName = conference.getTitle();
|
||||||
|
}
|
||||||
|
i.setConferenceName(conferenceName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
List<ReviewWorkAudit> inReportAudit1List = reviewWorkAuditService.list(new LambdaQueryWrapper<ReviewWorkAudit>()
|
List<ReviewWorkAudit> inReportAudit1List = reviewWorkAuditService.list(new LambdaQueryWrapper<ReviewWorkAudit>()
|
||||||
.eq(ReviewWorkAudit::getReviewId, reviewWork.getId())
|
.eq(ReviewWorkAudit::getReviewId, reviewWork.getId())
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#local
|
#local
|
||||||
db.user = root
|
db.user = root
|
||||||
db.pass = 123456
|
db.pass = Wang09211108
|
||||||
db.url = jdbc:mysql://127.0.0.1:3306/ydool_rd?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8
|
db.url = jdbc:mysql://127.0.0.1:3306/ydool_rd?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8
|
||||||
db.driver = com.mysql.cj.jdbc.Driver
|
db.driver = com.mysql.cj.jdbc.Driver
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue