Browse Source

会议详情修改

tags/24080901
WendyYang 1 year ago
parent
commit
dc330a0f64
12 changed files with 90 additions and 18 deletions
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
  2. +6
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/ExpertInviteAvoidRule.java
  3. +5
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/ExpertInviteRule.java
  4. +3
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java
  5. +5
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingDetailBasicVO.java
  6. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java
  7. +25
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  8. +11
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingInnerProjectService.java
  9. +11
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingOuterProjectService.java
  10. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/ExpertInviteAvoidRuleServiceImpl.java
  11. +10
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingInnerProjectServiceImpl.java
  12. +10
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingOuterProjectServiceImpl.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java View File

@@ -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("邀请情况详情")


+ 6
- 4
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/ExpertInviteAvoidRule.java View File

@@ -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;

}

+ 5
- 3
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/ExpertInviteRule.java View File

@@ -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
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java View File

@@ -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;


+ 5
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingDetailBasicVO.java View File

@@ -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;

}

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java View File

@@ -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);
}



+ 25
- 3
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java View File

@@ -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) {


+ 11
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingInnerProjectService.java View File

@@ -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);

}

+ 11
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingOuterProjectService.java View File

@@ -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);

}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/ExpertInviteAvoidRuleServiceImpl.java View File

@@ -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;
}


+ 10
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingInnerProjectServiceImpl.java View File

@@ -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));
}

}

+ 10
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingOuterProjectServiceImpl.java View File

@@ -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));
}

}

Loading…
Cancel
Save