@@ -70,7 +70,7 @@ public class MeetingController { | |||
@GetMapping("detail/{meetingId}/basicInfo") | |||
@WebLog(value = "会议详情-基本信息") | |||
public MeetingDetailBasicVO meetingBasic(@PathVariable Long meetingId) { | |||
return meetingManage.getMeetingBasicInfo(meetingId); | |||
return meetingManage.getMeetingDetail(meetingId); | |||
} | |||
@ApiOperation("邀请情况详情") | |||
@@ -1,8 +1,6 @@ | |||
package com.ningdatech.pmapi.meeting.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.baomidou.mybatisplus.annotation.*; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
@@ -33,7 +31,7 @@ public class ExpertInviteAvoidRule implements Serializable { | |||
private Long meetingId; | |||
@ApiModelProperty("回避专家ID") | |||
private String expertIds; | |||
private String avoidExpertIds; | |||
@ApiModelProperty("回避单位ID") | |||
private String avoidUnitIds; | |||
@@ -45,15 +43,19 @@ public class ExpertInviteAvoidRule implements Serializable { | |||
private Integer weekInviteCount; | |||
@ApiModelProperty("创建人ID") | |||
@TableField(fill = FieldFill.INSERT) | |||
private Long createBy; | |||
@ApiModelProperty("创建时间") | |||
@TableField(fill = FieldFill.INSERT) | |||
private LocalDateTime createOn; | |||
@ApiModelProperty("修改时间") | |||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||
private LocalDateTime updateOn; | |||
@ApiModelProperty("修改人ID") | |||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||
private Long updateBy; | |||
} |
@@ -1,8 +1,6 @@ | |||
package com.ningdatech.pmapi.meeting.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.baomidou.mybatisplus.annotation.*; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
@@ -35,15 +33,19 @@ public class ExpertInviteRule implements Serializable { | |||
private String inviteRule; | |||
@ApiModelProperty("创建人ID") | |||
@TableField(fill = FieldFill.INSERT) | |||
private Long createBy; | |||
@ApiModelProperty("创建时间") | |||
@TableField(fill = FieldFill.INSERT) | |||
private LocalDateTime createOn; | |||
@ApiModelProperty("修改时间") | |||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||
private LocalDateTime updateOn; | |||
@ApiModelProperty("修改人ID") | |||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||
private Long updateBy; | |||
@ApiModelProperty("抽取类型:1 自定义规则、2 指定邀请") | |||
@@ -3,6 +3,8 @@ package com.ningdatech.pmapi.meeting.entity.dto; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.math.BigDecimal; | |||
/** | |||
* <p> | |||
* MeetingEvalProjectDTO | |||
@@ -24,7 +26,7 @@ public class MeetingReviewProjectDTO { | |||
private String projectType; | |||
@ApiModelProperty("申报金额") | |||
private String declareAmount; | |||
private BigDecimal declareAmount; | |||
@ApiModelProperty("申报单位") | |||
private String buildOrg; | |||
@@ -1,7 +1,7 @@ | |||
package com.ningdatech.pmapi.meeting.entity.vo; | |||
import com.alibaba.fastjson.annotation.JSONField; | |||
import com.ningdatech.pmapi.meeting.entity.req.ExpertInviteReq; | |||
import com.ningdatech.pmapi.meeting.entity.dto.MeetingReviewProjectDTO; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Builder; | |||
@@ -9,6 +9,7 @@ import lombok.Data; | |||
import lombok.experimental.Tolerate; | |||
import java.time.LocalDateTime; | |||
import java.util.List; | |||
/** | |||
* <p> | |||
@@ -79,4 +80,7 @@ public class MeetingDetailBasicVO { | |||
@ApiModelProperty("抽取信息") | |||
private InviteRuleDetailVO inviteRule; | |||
@ApiModelProperty("评审项目信息") | |||
private List<MeetingReviewProjectDTO> projects; | |||
} |
@@ -143,7 +143,7 @@ public class MeetingManageHelper { | |||
ExpertInviteAvoidRule avoidRule = inviteAvoidRuleService.getByMeetingId(meetingId); | |||
AvoidInfoDTO result = new AvoidInfoDTO(); | |||
result.setAvoidOrgIdList(StrUtil.split(avoidRule.getAvoidOrgIds(), ",")); | |||
result.setExpertIds(BizUtils.splitToLong(avoidRule.getExpertIds())); | |||
result.setExpertIds(BizUtils.splitToLong(avoidRule.getAvoidExpertIds())); | |||
result.setAvoidUnitIdList(StrUtil.split(avoidRule.getAvoidUnitIds(), ",")); | |||
result.setWeekInviteCount(result.getWeekInviteCount()); | |||
return result; | |||
@@ -151,7 +151,7 @@ public class MeetingManageHelper { | |||
public void saveAvoidInfo(Long meetingId, List<Long> expertIds) { | |||
ExpertInviteAvoidRule avoidRule = inviteAvoidRuleService.getByMeetingId(meetingId); | |||
avoidRule.setExpertIds(CollUtils.joinByComma(expertIds)); | |||
avoidRule.setAvoidExpertIds(CollUtils.joinByComma(expertIds)); | |||
inviteAvoidRuleService.saveOrUpdate(avoidRule); | |||
} | |||
@@ -38,6 +38,8 @@ import com.ningdatech.pmapi.meeting.service.*; | |||
import com.ningdatech.pmapi.meeting.task.ExpertInviteTask; | |||
import com.ningdatech.pmapi.meta.helper.DictionaryCache; | |||
import com.ningdatech.pmapi.meta.helper.TagCache; | |||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | |||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | |||
import com.ningdatech.pmapi.sys.model.dto.RegionDTO; | |||
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; | |||
import com.ningdatech.pmapi.user.service.IUserInfoService; | |||
@@ -82,6 +84,7 @@ public class MeetingManage { | |||
private final DistributedLock distributedLock; | |||
private final PermissionCheckHelper permissionCheckHelper; | |||
private final IUserInfoService userInfoService; | |||
private final IProjectService projectService; | |||
private final IMeetingInnerProjectService meetingInnerProjectService; | |||
private final IMeetingOuterProjectService meetingOuterProjectService; | |||
@@ -177,7 +180,7 @@ public class MeetingManage { | |||
avoidRule.setWeekInviteCount(ObjectUtil.defaultIfNull(avoidRule.getWeekInviteCount(), 0)); | |||
avoidRule.setAvoidOrgIds(CollUtils.joinByComma(avoidInfo.getAvoidOrgIdList())); | |||
avoidRule.setAvoidUnitIds(CollUtils.joinByComma(avoidInfo.getAvoidUnitIdList())); | |||
avoidRule.setExpertIds(CollUtils.joinByComma(avoidInfo.getExpertIds())); | |||
avoidRule.setAvoidExpertIds(CollUtils.joinByComma(avoidInfo.getExpertIds())); | |||
inviteAvoidRuleService.save(avoidRule); | |||
} | |||
} else { | |||
@@ -307,10 +310,10 @@ public class MeetingManage { | |||
return result; | |||
} | |||
public MeetingDetailBasicVO getMeetingBasicInfo(Long meetingId) { | |||
public MeetingDetailBasicVO getMeetingDetail(Long meetingId) { | |||
Meeting meeting = meetingService.getById(meetingId); | |||
Assert.notNull(meeting, "会议不存在"); | |||
return MeetingDetailBasicVO.builder() | |||
MeetingDetailBasicVO detail = MeetingDetailBasicVO.builder() | |||
.meetingId(meeting.getId()) | |||
.meetingName(meeting.getName()) | |||
.meetingType(meeting.getType()) | |||
@@ -327,6 +330,25 @@ public class MeetingManage { | |||
.creator(meeting.getCreator()) | |||
.createBy(meeting.getCreator()) | |||
.build(); | |||
if (meeting.getIsInnerProject()) { | |||
List<MeetingInnerProject> innerProjects = meetingInnerProjectService.listByMeetingId(meetingId); | |||
List<Project> projects = projectService.listByIds(CollUtils.fieldList(innerProjects, MeetingInnerProject::getProjectId)); | |||
List<MeetingReviewProjectDTO> convert = CollUtils.convert(projects, w -> { | |||
MeetingReviewProjectDTO mrp = new MeetingReviewProjectDTO(); | |||
mrp.setBuildOrg(w.getBuildOrgName()); | |||
mrp.setProjectName(w.getProjectName()); | |||
mrp.setProjectType(w.getProjectType().toString()); | |||
mrp.setProjectYear(w.getProjectYear()); | |||
mrp.setDeclareAmount(w.getDeclareAmount()); | |||
return mrp; | |||
}); | |||
detail.setProjects(convert); | |||
} else { | |||
List<MeetingOuterProject> outerProjects = meetingOuterProjectService.listByMeetingId(meetingId); | |||
detail.setProjects(BeanUtil.copyToList(outerProjects, MeetingReviewProjectDTO.class)); | |||
} | |||
detail.setInviteRule(inviteRuleDetail(meetingId)); | |||
return detail; | |||
} | |||
public ExpertInviteDetailVO inviteDetail(Long meetingId) { | |||
@@ -3,6 +3,8 @@ package com.ningdatech.pmapi.meeting.service; | |||
import com.ningdatech.pmapi.meeting.entity.domain.MeetingInnerProject; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import java.util.List; | |||
/** | |||
* <p> | |||
* 会议评审内部项目表 服务类 | |||
@@ -13,4 +15,13 @@ import com.baomidou.mybatisplus.extension.service.IService; | |||
*/ | |||
public interface IMeetingInnerProjectService extends IService<MeetingInnerProject> { | |||
/** | |||
* 查询会议评审的内部项目 | |||
* | |||
* @param meetingId 会议ID | |||
* @return 会议关联的系统内部项目 | |||
* @author WendyYang | |||
**/ | |||
List<MeetingInnerProject> listByMeetingId(Long meetingId); | |||
} |
@@ -3,6 +3,8 @@ package com.ningdatech.pmapi.meeting.service; | |||
import com.ningdatech.pmapi.meeting.entity.domain.MeetingOuterProject; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import java.util.List; | |||
/** | |||
* <p> | |||
* 会议评审外部项目 服务类 | |||
@@ -13,4 +15,13 @@ import com.baomidou.mybatisplus.extension.service.IService; | |||
*/ | |||
public interface IMeetingOuterProjectService extends IService<MeetingOuterProject> { | |||
/** | |||
* 查询会议评审的外部项目 | |||
* | |||
* @param meetingId 会议ID | |||
* @return 评审的外部项目 | |||
* @author WendyYang | |||
**/ | |||
List<MeetingOuterProject> listByMeetingId(Long meetingId); | |||
} |
@@ -38,7 +38,7 @@ public class ExpertInviteAvoidRuleServiceImpl extends ServiceImpl<ExpertInviteAv | |||
AvoidInfoDTO avoidInfo = new AvoidInfoDTO(); | |||
avoidInfo.setAvoidOrgIdList(StrUtils.split(avoidRule.getAvoidOrgIds())); | |||
avoidInfo.setAvoidUnitIdList(StrUtils.split(avoidRule.getAvoidUnitIds())); | |||
avoidInfo.setExpertIds(BizUtils.splitToLong(avoidRule.getExpertIds())); | |||
avoidInfo.setExpertIds(BizUtils.splitToLong(avoidRule.getAvoidExpertIds())); | |||
avoidInfo.setWeekInviteCount(avoidInfo.getWeekInviteCount()); | |||
return avoidInfo; | |||
} | |||
@@ -1,11 +1,14 @@ | |||
package com.ningdatech.pmapi.meeting.service.impl; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.ningdatech.pmapi.meeting.entity.domain.MeetingInnerProject; | |||
import com.ningdatech.pmapi.meeting.mapper.MeetingInnerProjectMapper; | |||
import com.ningdatech.pmapi.meeting.service.IMeetingInnerProjectService; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
/** | |||
* <p> | |||
* 会议评审内部项目表 服务实现类 | |||
@@ -17,4 +20,10 @@ import org.springframework.stereotype.Service; | |||
@Service | |||
public class MeetingInnerProjectServiceImpl extends ServiceImpl<MeetingInnerProjectMapper, MeetingInnerProject> implements IMeetingInnerProjectService { | |||
@Override | |||
public List<MeetingInnerProject> listByMeetingId(Long meetingId) { | |||
return list(Wrappers.lambdaQuery(MeetingInnerProject.class) | |||
.eq(MeetingInnerProject::getMeetingId, meetingId)); | |||
} | |||
} |
@@ -1,11 +1,14 @@ | |||
package com.ningdatech.pmapi.meeting.service.impl; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.ningdatech.pmapi.meeting.entity.domain.MeetingOuterProject; | |||
import com.ningdatech.pmapi.meeting.mapper.MeetingOuterProjectMapper; | |||
import com.ningdatech.pmapi.meeting.service.IMeetingOuterProjectService; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
/** | |||
* <p> | |||
* 会议评审外部项目 服务实现类 | |||
@@ -17,4 +20,10 @@ import org.springframework.stereotype.Service; | |||
@Service | |||
public class MeetingOuterProjectServiceImpl extends ServiceImpl<MeetingOuterProjectMapper, MeetingOuterProject> implements IMeetingOuterProjectService { | |||
@Override | |||
public List<MeetingOuterProject> listByMeetingId(Long meetingId) { | |||
return list(Wrappers.lambdaQuery(MeetingOuterProject.class) | |||
.eq(MeetingOuterProject::getMeetingId, meetingId)); | |||
} | |||
} |