Преглед на файлове

创建会议修改

tags/24080901
WendyYang преди 1 година
родител
ревизия
014b991f2f
променени са 13 файла, в които са добавени 53 реда и са изтрити 150 реда
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
  2. +15
    -31
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/Meeting.java
  3. +14
    -35
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java
  4. +0
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingBasicInfoModifyReq.java
  5. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInvitationDetailVO.java
  6. +1
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInviteDetailVO.java
  7. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingByManagerVO.java
  8. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingDetailBasicVO.java
  9. +2
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java
  10. +0
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/DashboardManage.java
  11. +14
    -59
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  12. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingServiceImpl.java
  13. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertInviteTask.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java Целия файл

@@ -36,8 +36,8 @@ public class MeetingController {
@PostMapping("/save")
@ApiOperation("新建会议")
@WebLog(value = "新建会议")
public IdVo<Long> meetingCreate(@Valid @RequestBody MeetingBasicDTO po) {
return meetingManage.save(po);
public IdVo<Long> meetingCreate(@Valid @RequestBody MeetingBasicDTO req) {
return meetingManage.save(req);
}

@PostMapping("/expertInviteByCreate")


+ 15
- 31
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/Meeting.java Целия файл

@@ -33,36 +33,27 @@ public class Meeting implements Serializable {
@ApiModelProperty("事务类型")
private String type;

@ApiModelProperty("评审耗时:1 半天、2 一天")
private Integer meetingUsageTime;

@ApiModelProperty("开始时间")
private LocalDateTime startTime;

@ApiModelProperty("结束时间")
private LocalDateTime endTime;

@ApiModelProperty("评委出席时间")
private LocalDateTime judgesAttendanceTime;

@ApiModelProperty("地区编码")
private String regionCode;

@ApiModelProperty("地区层级")
private Integer regionLevel;

@ApiModelProperty("地区详情")
private String regionDetail;

@ApiModelProperty("联系人")
private String connecter;

@ApiModelProperty("联系方式")
private String contact;

@ApiModelProperty("事务说明")
private String description;

@ApiModelProperty("附件")
private String attachment;

@ApiModelProperty("备注")
private String remark;

@ApiModelProperty("创建人ID")
@TableField(fill = FieldFill.INSERT)
private Long createBy;
@@ -80,25 +71,15 @@ public class Meeting implements Serializable {
private LocalDateTime updateOn;

@ApiModelProperty("创建人")
private String author;

@ApiModelProperty("创建人地区编码")
private String authorRegionCode;
private String creator;

@ApiModelProperty("创建人地区层级")
private Integer authorRegionLevel;
@ApiModelProperty("会议地址")
private String meetingAddress;

private Integer status;

private String resultDescription;

private String resultAttachment;

@ApiModelProperty("是否下发会议通知")
private Boolean sendMeetingNotice;

@ApiModelProperty("是否停止随机邀请")
private Boolean stopRandomInvite;
private Boolean inviteStopped;

@ApiModelProperty("是否进行了专家抽取")
private Boolean invited;
@@ -107,10 +88,13 @@ public class Meeting implements Serializable {
private String cancelRemark;

@ApiModelProperty("举办单位")
private String holdCompany;
private String holdOrg;

@ApiModelProperty("举办单位ID")
private String holdOrgCode;

public String getHoldCompanyBracket() {
return "(" + this.getHoldCompany() + ")";
return "(" + this.getHoldOrg() + ")";
}

}

+ 14
- 35
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java Целия файл

@@ -1,5 +1,7 @@
package com.ningdatech.pmapi.meeting.entity.dto;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -7,7 +9,6 @@ import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
* <p>
@@ -21,10 +22,6 @@ import java.util.List;
@ApiModel("会议基本信息")
public class MeetingBasicDTO {

@NotEmpty(message = "抽取单位不能为空")
@ApiModelProperty("抽取单位")
private String inviterCompany;

@NotEmpty(message = "事务名称不能为空")
@ApiModelProperty("事务名称")
private String name;
@@ -35,46 +32,28 @@ public class MeetingBasicDTO {

@NotNull(message = "开始时间不能为空")
@ApiModelProperty("开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startTime;

@NotNull(message = "结束时间不能为空")
@ApiModelProperty("结束时间")
private LocalDateTime endTime;

@NotEmpty(message = "地区编码不能为空")
@ApiModelProperty("地区编码")
private String regionCode;
@NotNull(message = "评审耗时不能为空")
@ApiModelProperty("评审耗时:1 半天、2 一天")
private Integer meetingUsageTime;

@NotNull(message = "地区编码层级不能为空")
@ApiModelProperty("地区编码层级")
private Integer regionLevel;
@NotNull(message = "评委出席时间不能为空")
@ApiModelProperty("评委出席时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime judgesAttendanceTime;

@NotEmpty(message = "地址详情不能为空")
@ApiModelProperty("地址详情")
private String regionDetail;
@NotEmpty(message = "评审地点不能为空")
@ApiModelProperty("评审地点")
private String meetingAddress;

@NotEmpty(message = "联系人不能为空")
@ApiModelProperty("联系人")
private String connecter;
private String contacter;

@NotEmpty(message = "联系方式不能为空")
@ApiModelProperty("联系方式")
private String contact;

@NotEmpty(message = "事务说明不能为空")
@ApiModelProperty("事务说明")
private String description;

@ApiModelProperty("附件ID")
private List<String> attachmentIds;

@ApiModelProperty("备注")
private String remark;

@ApiModelProperty("创建人")
private String author;

@ApiModelProperty("创建时间")
private LocalDateTime createOn;

}

+ 0
- 4
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingBasicInfoModifyReq.java Целия файл

@@ -19,10 +19,6 @@ import java.util.List;
@Data
public class MeetingBasicInfoModifyReq {

@NotEmpty(message = "抽取单位不能为空")
@ApiModelProperty("抽取单位")
private String inviterCompany;

@ApiModelProperty("会议ID")
@NotNull(message = "会议ID不能为空")
private Long id;


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInvitationDetailVO.java Целия файл

@@ -30,7 +30,7 @@ public class ExpertInvitationDetailVO {
private LocalDateTime inviteTime;

@ApiModelProperty("会议举办单位")
private String holdCompany;
private String holdOrg;

@ApiModelProperty("会议开始时间")
@JSONField(format = "yyyy-MM-dd HH:mm")


+ 1
- 4
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInviteDetailVO.java Целия файл

@@ -66,10 +66,7 @@ public class ExpertInviteDetailVO {
private Integer appointAttend = 0;

@ApiModelProperty("是否已停止邀请")
private Boolean hasStopInvite;

@ApiModelProperty("是否已下发通知")
private Boolean hasSendNotice;
private Boolean invitedStopped;

@ApiModelProperty("最终参与名单")
private List<ExpertAttendListItemVO> attendList = new ArrayList<>();


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingByManagerVO.java Целия файл

@@ -71,6 +71,6 @@ public class MeetingByManagerVO {
private Boolean invited;

@ApiModelProperty("抽取单位")
private String inviterCompany;
private String holdOrg;

}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingDetailBasicVO.java Целия файл

@@ -89,7 +89,7 @@ public class MeetingDetailBasicVO {
private Boolean invited;

@ApiModelProperty("抽取单位")
private String inviterCompany;
private String holdOrg;

@ApiModelProperty("是否已确认下发会议通知名单")
private Boolean sendMeetingNotice;


+ 2
- 9
pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java Целия файл

@@ -9,8 +9,6 @@ import com.ningdatech.pmapi.common.util.BizUtils;
import com.ningdatech.pmapi.common.util.StrUtils;
import com.ningdatech.pmapi.expert.constant.ExpertAccountStatusEnum;
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo;
import com.ningdatech.pmapi.expert.model.dto.ExpertDictionaryDTO;
import com.ningdatech.pmapi.expert.model.dto.ExpertUserFullInfoDTO;
import com.ningdatech.pmapi.expert.service.ExpertInfoService;
import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService;
import com.ningdatech.pmapi.meeting.entity.domain.ExpertInviteAvoidRule;
@@ -26,9 +24,7 @@ import com.ningdatech.pmapi.meeting.entity.vo.MeetingByManagerVO;
import com.ningdatech.pmapi.meeting.service.IExpertInviteAvoidRuleService;
import com.ningdatech.pmapi.meeting.service.IExpertInviteRuleService;
import com.ningdatech.pmapi.meeting.service.IMeetingExpertService;
import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum;
import com.ningdatech.pmapi.meta.helper.DictionaryCache;
import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO;
import lombok.AllArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Component;
@@ -77,7 +73,7 @@ public class MeetingManageHelper {
return MeetingByManagerVO.builder()
.id(meeting.getId())
.dateTypeName(dictionaryCache.getByCode(meeting.getType()).getName())
.meetingAddress(meeting.getRegionDetail())
.meetingAddress(meeting.getMeetingAddress())
.name(meeting.getName())
.startTime(meeting.getStartTime())
.endTime(meeting.getEndTime())
@@ -85,7 +81,7 @@ public class MeetingManageHelper {
.contact(meeting.getContact())
.status(meeting.getStatus())
.invited(meeting.getInvited())
.inviterCompany(meeting.getHoldCompany())
.holdOrg(meeting.getHoldOrg())
.build();
}

@@ -93,9 +89,6 @@ public class MeetingManageHelper {
if (StrUtil.isNotBlank(po.getName())) {
query.like(Meeting::getName, po.getName());
}
if (StrUtil.isNotBlank(po.getAddress())) {
query.like(Meeting::getRegionDetail, po.getAddress());
}
if (StrUtil.isNotBlank(po.getType())) {
query.eq(Meeting::getType, po.getType());
}


+ 0
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/DashboardManage.java Целия файл

@@ -169,7 +169,6 @@ public class DashboardManage {
item.setEndTime(w.getEndTime());
item.setStartTime(w.getStartTime());
item.setStatus(w.getStatus());
item.setRegionDetail(w.getRegionDetail());
item.setType(dictionaryCache.getByCode(w.getType()).getName());
item.setMeetingName(w.getName());
return item;


+ 14
- 59
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java Целия файл

@@ -15,10 +15,7 @@ import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.basic.util.ValidUtil;
import com.ningdatech.cache.lock.DistributedLock;
import com.ningdatech.file.entity.vo.result.AttachFileVo;
import com.ningdatech.file.service.FileService;
import com.ningdatech.pmapi.common.util.BizUtils;
import com.ningdatech.pmapi.common.util.StrUtils;
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo;
import com.ningdatech.pmapi.expert.helper.PermissionCheckHelper;
import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService;
@@ -45,7 +42,7 @@ import com.ningdatech.pmapi.meeting.service.IMeetingService;
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.user.entity.UserInfo;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.service.IUserInfoService;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.RequiredArgsConstructor;
@@ -105,16 +102,13 @@ public class MeetingManage {
try {
Meeting meeting = BeanUtil.copyProperties(po, Meeting.class);
meeting.setStatus(Manager.UNCOMPLETED.getCode());
if (CollectionUtils.isNotEmpty(po.getAttachmentIds())) {
meeting.setAttachment(CollUtils.joinByComma(po.getAttachmentIds()));
}
Long userId = LoginUserUtil.getUserId();
UserInfo userInfo = userInfoService.getById(userId);
meeting.setHoldCompany(po.getInviterCompany());
meeting.setAuthor(userInfo.getUsername());
UserInfoDetails userDetail = LoginUserUtil.loginUserDetail();
// TODO
meeting.setHoldOrg(userDetail.getOrganizationName());
meeting.setHoldOrgCode(userDetail.getOrganizationCode());
meeting.setCreator(userDetail.getUsername());
meeting.setInvited(Boolean.FALSE);
meeting.setStopRandomInvite(true);
meeting.setSendMeetingNotice(false);
meeting.setInviteStopped(true);
meetingService.save(meeting);
return IdVo.of(meeting.getId());
} finally {
@@ -149,7 +143,7 @@ public class MeetingManage {
.eq(Meeting::getId, req.getMeetingId());
if (CollectionUtils.isNotEmpty(req.getRandomRules())) {
expertInviteTask.addInviteExpertTaskByMeetingCreate(meeting.getId(), 5);
updater.set(Meeting::getStopRandomInvite, false);
updater.set(Meeting::getInviteStopped, false);
}
meetingService.update(updater);
// 回避规则
@@ -286,11 +280,6 @@ public class MeetingManage {
if (Objects.isNull(meeting)) {
throw new BizException("该会议信息不存在");
}
String attachment = meeting.getAttachment();
List<AttachFileVo> attachments = new ArrayList<>();
if (StrUtils.isNotBlank(attachment)) {
attachments.addAll(fileService.getByIds(BizUtils.splitToLong(attachment)));
}
Integer attendStatus = null;
if (LoginUserUtil.isExpert()) {
List<Long> meIds = Collections.singletonList(meetingId);
@@ -305,50 +294,32 @@ public class MeetingManage {
.name(meeting.getName())
.type(meeting.getType())
.typeName(dictionaryCache.getByCode(meeting.getType()).getName())
.author(meeting.getAuthor())
.author(meeting.getCreator())
.startTime(meeting.getStartTime())
.endTime(meeting.getEndTime())
.createOn(meeting.getCreateOn())
.contact(meeting.getContact())
.connecter(meeting.getConnecter())
.description(meeting.getDescription())
.remark(meeting.getRemark())
.address(meeting.getRegionDetail())
.attachments(attachments)
.status(meeting.getStatus())
.attendStatus(attendStatus)
.cancelRemark(meeting.getCancelRemark())
.createBy(meeting.getAuthor())
.inviterCompany(meeting.getHoldCompany())
.createBy(meeting.getCreator())
.holdOrg(meeting.getHoldOrg())
.invited(meeting.getInvited())
.sendMeetingNotice(meeting.getSendMeetingNotice())
.build();
}

public void uploadMeetingResult(MeetingResultReq po) {
LambdaUpdateWrapper<Meeting> updater = Wrappers.lambdaUpdate(Meeting.class)
.eq(Meeting::getId, po.getMeetingId())
.set(Meeting::getResultDescription, po.getResultDescription())
.set(Meeting::getStatus, Manager.COMPLETED.getCode());
if (CollectionUtils.isNotEmpty(po.getAttachments())) {
updater.set(Meeting::getResultAttachment, CollUtils.joinByComma(po.getAttachments()));
}
meetingService.update(updater);
}

public MeetingResultVO meetingResultDetail(Long meetingId) {
LambdaQueryWrapper<Meeting> query = Wrappers.lambdaQuery(Meeting.class)
.select(Meeting::getResultAttachment, Meeting::getResultDescription)
.eq(Meeting::getId, meetingId);
Meeting meeting = meetingService.getOne(query);
MeetingResultVO result = new MeetingResultVO();
result.setMeetingId(meetingId);
result.setResultDescription(meeting.getResultDescription());
result.setAttachments(new ArrayList<>());
if (StrUtils.isNotBlank(meeting.getResultAttachment())) {
List<Long> fileIds = BizUtils.splitToLong(meeting.getResultAttachment());
result.getAttachments().addAll(fileService.getByIds(fileIds));
}
return result;
}

@@ -359,8 +330,7 @@ public class MeetingManage {
if (Objects.isNull(meeting)) {
throw new BizException("该会议信息不存在");
}
result.setHasStopInvite(meeting.getStopRandomInvite());
result.setHasSendNotice(meeting.getSendMeetingNotice());
result.setInvitedStopped(meeting.getInviteStopped());
List<MeetingExpert> experts = meetingExpertService.listByMeetingId(meetingId);
if (experts.isEmpty()) {
return result;
@@ -425,9 +395,6 @@ public class MeetingManage {
if (!old.getRegionCode().equals(current.getRegionCode())) {
return Boolean.TRUE;
}
if (!old.getRegionDetail().equals(current.getRegionDetail())) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}

@@ -439,16 +406,7 @@ public class MeetingManage {
public void meetingBasicInfoModify(MeetingBasicInfoModifyReq po) {
Meeting meeting = new Meeting();
BeanUtil.copyProperties(po, meeting);
if (CollectionUtils.isEmpty(po.getAttachmentIds())) {
meeting.setAttachment(StrUtil.EMPTY);
} else {
meeting.setAttachment(CollUtils.joinByComma(po.getAttachmentIds()));
}
if (StrUtil.isBlank(po.getRemark())) {
meeting.setRemark(StrUtil.EMPTY);
}
LocalDateTime now = LocalDateTime.now();
meeting.setHoldCompany(po.getInviterCompany());
Meeting old = meetingService.getById(po.getId());
if (Manager.UNCOMPLETED.eq(old.getStatus()) && meetingInfoChange(old, meeting)) {
List<MeetingExpert> meList = meetingExpertService.listExpertByAgreeAttend(Collections.singletonList(po.getId()));
@@ -613,12 +571,10 @@ public class MeetingManage {
try {
Meeting meeting = meetingService.getById(meetingId);
Assert.isTrue(Manager.UNCOMPLETED.eq(meeting.getStatus()), "非未完成会议无法发送会议通知");
Assert.isTrue(!meeting.getSendMeetingNotice(), "该会议已下发过会议通知");
Assert.isTrue(meeting.getStopRandomInvite(), "随机邀请未结束");
Assert.isTrue(meeting.getInviteStopped(), "随机邀请未结束");
int noticeCount = meetingExpertService.countExpertByStatusAndMeetingId(ExpertAttendStatus.NOTICING, meetingId, null);
Assert.isTrue(noticeCount == 0, "存在未确认完成的专家,暂无法下发会议通知");
LambdaUpdateWrapper<Meeting> update = Wrappers.lambdaUpdate(Meeting.class)
.set(Meeting::getSendMeetingNotice, Boolean.TRUE)
.eq(Meeting::getId, meetingId);
meetingService.update(update);
// 发送会议通知
@@ -679,8 +635,7 @@ public class MeetingManage {
Meeting meeting = meetingService.getById(meetingId);
return ExpertInvitationDetailVO.builder()
.expertName(expertInfo.getExpertName())
.holdCompany(meeting.getHoldCompany())
.regionDetail(meeting.getRegionDetail())
.holdOrg(meeting.getHoldOrg())
.meetingName(meeting.getName())
.startTime(meeting.getStartTime())
.endTime(meeting.getEndTime())


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingServiceImpl.java Целия файл

@@ -27,7 +27,7 @@ public class MeetingServiceImpl extends ServiceImpl<MeetingMapper, Meeting> impl
public void stopRandomInvite(Long meetingId) {
Meeting meeting = new Meeting();
meeting.setId(meetingId);
meeting.setStopRandomInvite(Boolean.TRUE);
meeting.setInviteStopped(Boolean.TRUE);
baseMapper.updateById(meeting);
}



+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertInviteTask.java Целия файл

@@ -156,7 +156,7 @@ public class ExpertInviteTask {
addInviteExpertTask(meetingId, false, properties.getInviteDelay());
log.info("重置会议的随机抽取状态:{}", meetingId);
LambdaUpdateWrapper<Meeting> update = Wrappers.lambdaUpdate(Meeting.class);
update.set(Meeting::getStopRandomInvite, false);
update.set(Meeting::getInviteStopped, false);
update.set(Meeting::getUpdateBy, LoginUserUtil.getUserId());
update.set(Meeting::getUpdateOn, LocalDateTime.now());
update.eq(Meeting::getId, meetingId);


Loading…
Отказ
Запис