关联会议名称动态更新
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.AppointAttachment;
|
||||
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.mapper.ConferenceMapper;
|
||||
import com.ydool.boot.modules.rddb.service.AppointAttachmentService;
|
||||
import com.ydool.boot.modules.rddb.service.AppointUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
@ -28,6 +31,9 @@ public class AppointWrapper extends BaseWrapper<Appoint, AppointDto> {
|
|||
return new AppointWrapper();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ConferenceMapper conferenceMapper;
|
||||
|
||||
@Override
|
||||
public AppointDto entityVO(Appoint appoint) {
|
||||
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::getType, Appoint.STATE_PROPOSE)
|
||||
.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>()
|
||||
.eq(AppointAttachment::getAppointId, appoint.getId())
|
||||
.eq(AppointAttachment::getType, Appoint.STATE_CONFERENCE)
|
||||
.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>()
|
||||
.eq(AppointAttachment::getAppointId, appoint.getId())
|
||||
.eq(AppointAttachment::getType, Appoint.STATE_PERFORM)
|
||||
.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>()
|
||||
.eq(AppointUser::getAppointId, appoint.getId())
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ydool.boot.modules.rddb.wrapper;
|
|||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ydool.boot.api.util.TokenUtil;
|
||||
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.modules.rddb.entity.*;
|
||||
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.ContactDbUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
@ -26,6 +29,9 @@ public class ContactDbWrapper extends BaseWrapper<ContactDb, ContactDbDto> {
|
|||
return new ContactDbWrapper();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ConferenceMapper conferenceMapper;
|
||||
|
||||
@Override
|
||||
public ContactDbDto entityVO(ContactDb contactDb) {
|
||||
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::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD)
|
||||
.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>()
|
||||
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_PHOTO)
|
||||
.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.setConferencePhotoAttachmentList(photoAttachmentList);
|
||||
|
||||
|
||||
|
||||
List<ContactDbUser> subjectUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
|
||||
.eq(ContactDbUser::getContactDbId, contactDb.getId())
|
||||
.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.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ydool.boot.api.util.TokenUtil;
|
||||
import com.ydool.boot.api.util.UserInfo;
|
||||
import com.ydool.boot.common.utils.SpringUtils;
|
||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewOfficer;
|
||||
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.*;
|
||||
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.ReviewOfficerAuditService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewOfficerUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -31,6 +31,9 @@ public class ReviewOfficerWrapper extends BaseWrapper<ReviewOfficer, ReviewOffic
|
|||
return new ReviewOfficerWrapper();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ConferenceMapper conferenceMapper;
|
||||
|
||||
@Override
|
||||
public ReviewOfficerDto entityVO(ReviewOfficer reviewOfficer) {
|
||||
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::getType, ReviewOfficer.STATE_IN_REPORT)
|
||||
.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>()
|
||||
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
||||
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_CHECK)
|
||||
.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>()
|
||||
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
||||
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_OPINION)
|
||||
.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>()
|
||||
.eq(ReviewOfficerAttachment::getReviewId, reviewOfficer.getId())
|
||||
.eq(ReviewOfficerAttachment::getType, ReviewOfficer.STATE_RESULT)
|
||||
.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>()
|
||||
.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.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ydool.boot.api.util.TokenUtil;
|
||||
import com.ydool.boot.api.util.UserInfo;
|
||||
import com.ydool.boot.common.utils.SpringUtils;
|
||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewSubject;
|
||||
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.*;
|
||||
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.ReviewSubjectAuditService;
|
||||
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.util.List;
|
||||
|
@ -30,6 +31,9 @@ public class ReviewSubjectWrapper extends BaseWrapper<ReviewSubject, ReviewSubje
|
|||
return new ReviewSubjectWrapper();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ConferenceMapper conferenceMapper;
|
||||
|
||||
@Override
|
||||
public ReviewSubjectDto entityVO(ReviewSubject reviewSubject) {
|
||||
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::getType, ReviewSubject.STATE_IN_REPORT)
|
||||
.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>()
|
||||
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
||||
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_CHECK)
|
||||
.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>()
|
||||
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
||||
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_OPINION)
|
||||
.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>()
|
||||
.eq(ReviewSubjectAttachment::getReviewId, reviewSubject.getId())
|
||||
.eq(ReviewSubjectAttachment::getType, ReviewSubject.STATE_RESULT)
|
||||
.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>()
|
||||
.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.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ydool.boot.api.util.TokenUtil;
|
||||
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.modules.rddb.entity.*;
|
||||
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.ReviewSuperviseUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
@ -26,6 +29,9 @@ public class ReviewSuperviseWrapper extends BaseWrapper<ReviewSupervise, ReviewS
|
|||
return new ReviewSuperviseWrapper();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ConferenceMapper conferenceMapper;
|
||||
|
||||
@Override
|
||||
public ReviewSuperviseDto entityVO(ReviewSupervise reviewSupervise) {
|
||||
|
||||
|
@ -38,22 +44,87 @@ public class ReviewSuperviseWrapper extends BaseWrapper<ReviewSupervise, ReviewS
|
|||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_SURVEY)
|
||||
.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>()
|
||||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_REVIEW)
|
||||
.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>()
|
||||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_TAIL)
|
||||
.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>()
|
||||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_RESEARCH)
|
||||
.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>()
|
||||
.eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSupervise.getId())
|
||||
.eq(ReviewSuperviseAttachment::getType, ReviewSuperviseAttachment.TYPE_EVALUATE)
|
||||
.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.setReviewAttachmentList(reviewAttachmentList);
|
||||
dto.setTailAttachmentList(tailAttachmentList);
|
||||
|
|
|
@ -2,19 +2,19 @@ package com.ydool.boot.modules.rddb.wrapper;
|
|||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ydool.boot.api.util.TokenUtil;
|
||||
import com.ydool.boot.api.util.UserInfo;
|
||||
import com.ydool.boot.common.utils.SpringUtils;
|
||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWork;
|
||||
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.*;
|
||||
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.ReviewWorkAuditService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewWorkUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
@ -30,6 +30,9 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
|||
return new ReviewWorkWrapper();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ConferenceMapper conferenceMapper;
|
||||
|
||||
@Override
|
||||
public ReviewWorkDto entityVO(ReviewWork reviewWork) {
|
||||
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::getType, ReviewWork.STATE_IN_REPORT)
|
||||
.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>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_CHECK)
|
||||
.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>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_OPINION)
|
||||
.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>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_RESULT)
|
||||
.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>()
|
||||
.eq(ReviewWorkAudit::getReviewId, reviewWork.getId())
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#local
|
||||
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.driver = com.mysql.cj.jdbc.Driver
|
||||
|
||||
|
|
Loading…
Reference in New Issue