Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
master
PoffyZhang 1 year ago
parent
commit
687c8852ec
27 changed files with 468 additions and 428 deletions
  1. +0
    -4
      pmapi/pom.xml
  2. +0
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertController.java
  3. +11
    -10
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java
  4. +0
    -31
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertRecommendProofSubmitRequest.java
  5. +15
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertUserBasicInfoSubmitRequest.java
  6. +34
    -29
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
  7. +0
    -20
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingInnerProjectController.java
  8. +0
    -20
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingOuterProjectController.java
  9. +22
    -16
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/Meeting.java
  10. +5
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpert.java
  11. +5
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/ExpertAttendStatusEnum.java
  12. +9
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingDateTermTypeEnum.java
  13. +29
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/ExpertConfirmReq.java
  14. +20
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingExpertIdReq.java
  15. +7
    -65
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInviteDetailVO.java
  16. +41
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/InviteExpertListItemVO.java
  17. +50
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/InviteStatisticsByRuleVO.java
  18. +2
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java
  19. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertInviteManage.java
  20. +134
    -104
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  21. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingExpertServiceImpl.java
  22. +11
    -11
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java
  23. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/WorkNoticeFlowTask.java
  24. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/sys/convert/RegionConverter.java
  25. +1
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Region.java
  26. +67
    -74
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  27. +0
    -5
      pom.xml

+ 0
- 4
pmapi/pom.xml View File

@@ -204,10 +204,6 @@
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-dict-starter</artifactId>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-cache-starter</artifactId>
</dependency>
<dependency>


+ 0
- 8
pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertController.java View File

@@ -5,7 +5,6 @@ import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.expert.manage.ExpertAdminManage;
import com.ningdatech.pmapi.expert.manage.ExpertManage;
import com.ningdatech.pmapi.expert.model.ExpertAdminExpertManageQuery;
import com.ningdatech.pmapi.expert.model.req.ExpertRecommendProofSubmitRequest;
import com.ningdatech.pmapi.expert.model.req.ExpertUserBasicInfoSubmitRequest;
import com.ningdatech.pmapi.expert.model.vo.ExpertAdminExpertManageListVO;
import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO;
@@ -36,16 +35,9 @@ public class ExpertController {
@PostMapping("/basic-info-submit")
@ApiOperation("填写基本信息接口(专家报名使用))")
public void expertBasicInfoSubmit(@Valid @RequestBody ExpertUserBasicInfoSubmitRequest request) {
// ExpertUserInfoValidator.expertUserBasicInfoSubmitRequestValidate(request);
expertManage.expertBasicInfoSubmit(request);
}

@PostMapping("/recommend-proof-submit")
@ApiOperation("推荐证明提交接口(专家报名使用)")
public void expertRecommendProofSubmit(@Valid @RequestBody ExpertRecommendProofSubmitRequest request) {
expertManage.expertRecommendProofSubmit(request);
}

@GetMapping("/detail")
@ApiOperation("专家获取专家详细信息")
public ExpertFullInfoVO getExpertFullInfoDetail() {


+ 11
- 10
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java View File

@@ -15,7 +15,6 @@ import com.ningdatech.pmapi.expert.model.cmd.ExpertFullInfoSaveCmd;
import com.ningdatech.pmapi.expert.model.cmd.ExpertRecommendProofSaveCmd;
import com.ningdatech.pmapi.expert.model.dto.ExpertDictionaryDTO;
import com.ningdatech.pmapi.expert.model.dto.ExpertFullInfoAllDTO;
import com.ningdatech.pmapi.expert.model.req.ExpertRecommendProofSubmitRequest;
import com.ningdatech.pmapi.expert.model.req.ExpertUserBasicInfoSubmitRequest;
import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO;
import com.ningdatech.pmapi.expert.service.ExpertInfoService;
@@ -84,10 +83,16 @@ public class ExpertManage {
.buildExpertFullInfoSaveCmd(userId, basicInfo, eduInfo, jobInfo, professionalInfo);
expertInfoService.saveExpertInfo(expertFullInfoSaveCmd);
}

// 推荐证明材料
List<DictionaryFieldInfo> recommendedWay = request.getRecommendedWay();
// 推荐方式
List<FileBasicInfo> recommendProofFile = request.getRecommendProofFile();
expertRecommendProofSubmit(recommendedWay, recommendProofFile);
}


public void expertRecommendProofSubmit(ExpertRecommendProofSubmitRequest request) {
public void expertRecommendProofSubmit(List<DictionaryFieldInfo> recommendedWay, List<FileBasicInfo> recommendProofFile) {
// 用户id
Long expertUserId = LoginUserUtil.getUserId();
ExpertUserFullInfo expertUserFullInfo = iExpertUserFullInfoService.getByUserId(expertUserId);
@@ -97,20 +102,15 @@ public class ExpertManage {
|| ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey().equals(expertUserFullInfo.getUserInfoStep())) {
throw new BizException("当前状态无法提交证明材料");
}
// 根据用户id 获取用户信息,获取手机号校验 验证码是否正确
String phoneNo = expertUserFullInfo.getPhoneNo();
String verificationCode = request.getVerificationCode();

// 证明材料提交
List<FileBasicInfo> recommendProofFile = request.getRecommendProofFile();
List<DictionaryFieldInfo> recommendedWayList = request.getRecommendedWay();
ExpertRecommendProofSaveCmd expertRecommendProofSaveCmd = new ExpertRecommendProofSaveCmd();
if (CollectionUtils.isNotEmpty(recommendProofFile)) {
expertRecommendProofSaveCmd.setRecommendationProofFileIdList(recommendProofFile.stream().map(FileBasicInfo::getFileId).collect(Collectors.toList()));
}
List<ExpertDictionaryDTO> recommendedWayDictionaryDTOList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(recommendedWayList)) {
recommendedWayDictionaryDTOList = recommendedWayList.stream().map(r -> {
if (CollectionUtils.isNotEmpty(recommendedWay)) {
recommendedWayDictionaryDTOList = recommendedWay.stream().map(r -> {
ExpertDictionaryDTO expertDictionaryDTO = new ExpertDictionaryDTO();
expertDictionaryDTO.setDictionaryCode(r.getDictionaryCode());
expertDictionaryDTO.setExpertInfoField(DictExpertInfoTypeEnum.RECOMMENDED_WAY.getKey());
@@ -133,5 +133,6 @@ public class ExpertManage {
}
List<Long> fileIdList = expertInfoCommonHelper.getExpertFileIdList(expertUserFullInfoAll);
List<AttachFileVo> attachFiles = fileService.getByIds(fileIdList);
return expertUserInfoAssembler.buildExpertFullInfoVO(attachFiles, expertUserFullInfoAll); }
return expertUserInfoAssembler.buildExpertFullInfoVO(attachFiles, expertUserFullInfoAll);
}
}

+ 0
- 31
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertRecommendProofSubmitRequest.java View File

@@ -1,31 +0,0 @@
package com.ningdatech.pmapi.expert.model.req;

import com.ningdatech.pmapi.expert.model.DictionaryFieldInfo;
import com.ningdatech.pmapi.expert.model.FileBasicInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
* @author liuxinxin
* @date 2022/7/22 下午5:49
*/
@Data
@ApiModel("专家证明材料提交Request")
public class ExpertRecommendProofSubmitRequest {

@NotEmpty
@ApiModelProperty("推荐方式")
private List<DictionaryFieldInfo> recommendedWay;

@ApiModelProperty("推荐证明材料")
private List<FileBasicInfo> recommendProofFile;

@NotBlank
@ApiModelProperty("短信验证码")
private String verificationCode;
}

+ 15
- 4
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertUserBasicInfoSubmitRequest.java View File

@@ -1,14 +1,13 @@
package com.ningdatech.pmapi.expert.model.req;

import com.ningdatech.pmapi.expert.model.ExpertBasicInfo;
import com.ningdatech.pmapi.expert.model.ExpertEduInfo;
import com.ningdatech.pmapi.expert.model.ExpertJobInfo;
import com.ningdatech.pmapi.expert.model.ExpertProfessionalInfo;
import com.ningdatech.pmapi.expert.model.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
* @author liuxinxin
@@ -33,4 +32,16 @@ public class ExpertUserBasicInfoSubmitRequest {
@NotNull
@ApiModelProperty("专业信息")
private ExpertProfessionalInfo professionalInfo;


/**
* 补充推荐方式
*/
@NotEmpty
@ApiModelProperty("推荐方式")
private List<DictionaryFieldInfo> recommendedWay;

@ApiModelProperty("推荐证明材料")
private List<FileBasicInfo> recommendProofFile;

}

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

@@ -67,17 +67,17 @@ public class MeetingController {
}

@ApiOperation("会议详情-基本信息")
@GetMapping("detail/{meetingId}/basicInfo")
@GetMapping("/basicInfo/{meetingId}")
@WebLog(value = "会议详情-基本信息")
public MeetingDetailBasicVO meetingBasic(@PathVariable Long meetingId) {
return meetingManage.getMeetingDetail(meetingId);
}

@ApiOperation("邀请情况详情")
@GetMapping("/detail/{meetingId}/inviteDetail")
@ApiOperation("抽取情况")
@GetMapping("/inviteExpertList/{meetingId}")
@WebLog(value = "邀请情况详请")
public ExpertInviteDetailVO inviteDetail(@PathVariable Long meetingId) {
return meetingManage.inviteDetail(meetingId);
public ExpertInviteDetailVO inviteExpertList(@PathVariable Long meetingId) {
return meetingManage.inviteExpertList(meetingId);
}

@ApiOperation("会议基础信息修改")
@@ -88,33 +88,17 @@ public class MeetingController {
}

@ApiOperation("会议详情-抽取规则")
@GetMapping("/detail/inviteRule/{meetingId}")
@GetMapping("/inviteRuleDetail/{meetingId}")
@WebLog(value = "会议详情-抽取规则")
public InviteRuleDetailVO inviteRuleDetail(@PathVariable Long meetingId) {
return meetingManage.inviteRuleDetail(meetingId);
}

@ApiOperation("专家移除")
@PostMapping("/expertRemove")
@WebLog(value = "专家移除")
public void expertRemove(@RequestBody ExpertRemoveReq po) {
meetingManage.expertRemove(po);
}

@ApiOperation("专家替换")
@PostMapping("/expertReplace")
@WebLog(value = "专家替换")
public void expertReplace(@RequestBody ExpertRemoveReq po) {
meetingManage.expertReplace(po);

}

@ApiOperation("确认名单(下发会议通知)")
@GetMapping("/sendMeetingNotice/{meetingId}")
@WebLog(value = "确认名单(下发会议通知")
public void sendMeetingNotice(@PathVariable Long meetingId) {
meetingManage.sendMeetingNotice(meetingId);

}

@ApiOperation("停止抽取")
@@ -122,7 +106,6 @@ public class MeetingController {
@WebLog(value = "停止抽取")
public void stopInvite(@PathVariable Long meetingId) {
meetingManage.stopRandomInvite(meetingId);

}

@ApiOperation("取消会议")
@@ -133,10 +116,10 @@ public class MeetingController {
}

@ApiOperation("邀请函信息")
@GetMapping("/expertInvitationDetail")
@GetMapping("/expertInviteDetail")
@WebLog(value = "邀请函信息")
public ExpertInvitationDetailVO expertInvitationDetail(@RequestParam("meetingId") Long meetingId,
@RequestParam(required = false) Long expertId) {
public ExpertInvitationDetailVO expertInvitationDetail(@RequestParam(required = false) Long expertId,
@RequestParam Long meetingId) {
return meetingManage.expertInvitationDetail(meetingId, expertId);
}

@@ -148,10 +131,32 @@ public class MeetingController {
}

@ApiOperation("确认参加")
@PostMapping("/confirmAttendByManager")
@PostMapping("/expert/confirm")
@WebLog(value = "确认参加")
public void confirmAttendByManager(@RequestBody ExpertRemoveReq po) {
meetingManage.confirmAttendByManager(po);
public void confirmAttendByManager(@RequestBody ExpertConfirmReq req) {
meetingManage.confirmAttendByManager(req);
}

@ApiOperation("释放专家")
@PostMapping("/expert/release")
@WebLog(value = "释放专家")
public void releaseExperts(@RequestBody MeetingCancelReq req) {
meetingManage.releaseExperts(req);
}

@ApiOperation("设置专家组长")
@PostMapping("setUpHeadman")
@WebLog(value = "设置专家组长")
public void setUpHeadman(@RequestBody ExpertConfirmReq req) {
meetingManage.setUpHeadman(req);
}

@ApiOperation("重发短信")
@PostMapping("/confirmedRoster")
@WebLog(value = "重发短信")
public void resendSms(MeetingCancelReq req) {
meetingManage.confirmedRoster(req.getMeetingId());
}


}

+ 0
- 20
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingInnerProjectController.java View File

@@ -1,20 +0,0 @@
package com.ningdatech.pmapi.meeting.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

/**
* <p>
* 会议评审内部项目表 前端控制器
* </p>
*
* @author WendyYang
* @since 2023-02-28
*/
@Controller
@RequestMapping("/pmapi.meeting/meeting-inner-project")
public class MeetingInnerProjectController {

}

+ 0
- 20
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingOuterProjectController.java View File

@@ -1,20 +0,0 @@
package com.ningdatech.pmapi.meeting.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

/**
* <p>
* 会议评审外部项目 前端控制器
* </p>
*
* @author WendyYang
* @since 2023-02-28
*/
@Controller
@RequestMapping("/pmapi.meeting/meeting-outer-project")
public class MeetingOuterProjectController {

}

+ 22
- 16
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/Meeting.java View File

@@ -54,22 +54,6 @@ public class Meeting implements Serializable {
@ApiModelProperty("联系方式")
private String contact;

@ApiModelProperty("创建人ID")
@TableField(fill = FieldFill.INSERT)
private Long createBy;

@ApiModelProperty("创建时间")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createOn;

@ApiModelProperty("修改人ID")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updateBy;

@ApiModelProperty("修改时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateOn;

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

@@ -81,6 +65,9 @@ public class Meeting implements Serializable {
@ApiModelProperty("是否停止随机邀请")
private Boolean inviteStopped;

@ApiModelProperty("是否确认名单")
private Boolean confirmedRoster;

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

@@ -90,4 +77,23 @@ public class Meeting implements Serializable {
@ApiModelProperty("是否为内部项目")
private Boolean isInnerProject;

@ApiModelProperty("抽取类型")
private Integer inviteType;

@ApiModelProperty("创建人ID")
@TableField(fill = FieldFill.INSERT)
private Long createBy;

@ApiModelProperty("创建时间")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createOn;

@ApiModelProperty("修改人ID")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updateBy;

@ApiModelProperty("修改时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateOn;

}

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

@@ -47,9 +47,14 @@ public class MeetingExpert implements Serializable {

private String mobile;

private String expertName;

@ApiModelProperty("当前状态")
private Integer status;

@ApiModelProperty("是否是专家组长")
private Boolean isHeadman;

@ApiModelProperty("前一个状态")
private Integer preStatus;

@@ -68,6 +73,5 @@ public class MeetingExpert implements Serializable {

private String submitKey;

private String expertName;

}

+ 5
- 4
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/ExpertAttendStatusEnum.java View File

@@ -18,14 +18,15 @@ import java.util.Arrays;
public enum ExpertAttendStatusEnum {

NOTICING("通知中", 0),
NOT_ANSWERED("未应答", 1),
UNANSWERED("未应答", 1),
REPLACED("已替换", 2),
AGREED("同意参加", 3),
REFUSED("拒绝参加", 4),
CANCELED("已移除", 5),
ON_LEAVE("已请假", 6);
REMOVED("已移除", 5),
ON_LEAVE("已请假", 6),
RELEASED("已释放", 7);

private final String desc;
private final String value;
private final Integer code;

public boolean eq(Integer code) {


pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingDateTermType.java → pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingDateTermTypeEnum.java View File

@@ -1,32 +1,32 @@
package com.ningdatech.pmapi.meeting.entity.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
* <p>
* MeetingDateTermType-会议日期类型
* MeetingDateTermType
* </p>
*
* @author WendyYang
* @since 09:54 2022/8/15
*/
@Getter
public enum MeetingDateTermType {
@AllArgsConstructor
public enum MeetingDateTermTypeEnum {

/**
* 会议日期类型
*/
ONE_DAY(1, "一天"),
MORE_THAN_ONE(2, "两天及以上");

private final Integer code;
private final String name;
private final String value;

MeetingDateTermType(Integer code, String name) {
this.code = code;
this.name = name;
}

public static MeetingDateTermType getByCode(Integer code) {
public static MeetingDateTermTypeEnum getByCode(Integer code) {
return Arrays.stream(values())
.filter(w -> w.getCode().equals(code))
.findFirst()

+ 29
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/ExpertConfirmReq.java View File

@@ -0,0 +1,29 @@
package com.ningdatech.pmapi.meeting.entity.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
* <p>
* 确认参加参数类
* </p>
*
* @author WendyYang
* @since 08:59 2022/8/10
*/
@Data
@ApiModel("确认参加")
public class ExpertConfirmReq {

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

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

}

+ 20
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingExpertIdReq.java View File

@@ -0,0 +1,20 @@
package com.ningdatech.pmapi.meeting.entity.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
* <p>
* MeetingExpertIdReq
* </p>
*
* @author WendyYang
* @since 14:11 2023/3/3
*/
@Data
public class MeetingExpertIdReq {

@ApiModelProperty("专家会议ID")
private Long expertMeetingId;

}

+ 7
- 65
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/ExpertInviteDetailVO.java View File

@@ -3,13 +3,12 @@ package com.ningdatech.pmapi.meeting.entity.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
* <p>
* ExpertInviteDetailVo
* ExpertInviteDetailVO
* </p>
*
* @author WendyYang
@@ -19,73 +18,16 @@ import java.util.List;
@ApiModel("专家邀请情况实体")
public class ExpertInviteDetailVO {

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("最终参与名单实体")
public static class ExpertAttendListItemVO extends ExpertBasicInfoVO {

private Long meetingId;

private Long expertMeetingId;

@ApiModelProperty("邀请方式")
private String inviteType;

}

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("随机邀请名单实体")
public static class RandomInviteListItemVO extends ExpertBasicInfoVO {

@ApiModelProperty("会议ID")
private Long meetingId;

@ApiModelProperty("专家会议ID")
private Long expertMeetingId;

@ApiModelProperty("电话通知状态")
private String noticeStatus;

@ApiModelProperty("邀请结果")
private String confirmResult;

@ApiModelProperty("邀请状态")
private Integer status;

}

@ApiModelProperty("参与数量总计")
private Integer attendTotal;

@ApiModelProperty("随机邀请参与数量")
private Integer randomAttend;

@ApiModelProperty("指定邀请参与数量")
private Integer appointAttend;

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

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

@ApiModelProperty("随机邀请名单")
private List<RandomInviteListItemVO> randomInviteList;

@ApiModelProperty("指定邀请名单")
private List<RandomInviteListItemVO> appointInviteList;

public void addAttendList(ExpertAttendListItemVO attend) {
this.attendList.add(attend);
}
@ApiModelProperty("是否已确认名单")
private Boolean confirmedRoster;

public void addRandomInviteList(RandomInviteListItemVO randomInvite) {
this.randomInviteList.add(randomInvite);
}
@ApiModelProperty("邀请名单")
private List<InviteExpertListItemVO> inviteExpertList;

public void addAppointInviteList(RandomInviteListItemVO appointInvite) {
this.appointInviteList.add(appointInvite);
}
@ApiModelProperty("抽取情况")
private List<InviteStatisticsByRuleVO> inviteStatistics;

}

+ 41
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/InviteExpertListItemVO.java View File

@@ -0,0 +1,41 @@
package com.ningdatech.pmapi.meeting.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
* <p>
* RandomInviteListItemVO
* </p>
*
* @author WendyYang
* @since 16:48 2023/3/3
*/
@Data
@ApiModel("邀请名单实体")
@EqualsAndHashCode(callSuper = true)
public class InviteExpertListItemVO extends ExpertBasicInfoVO {

@ApiModelProperty("邀请规则ID")
private Long ruleId;

@ApiModelProperty("会议ID")
private Long meetingId;

@ApiModelProperty("专家会议ID")
private Long expertMeetingId;

@ApiModelProperty("电话通知状态")
private String noticeStatus;

@ApiModelProperty("邀请状态")
private Integer status;

@ApiModelProperty("通知时间")
private LocalDateTime noticeTime;

}

+ 50
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/InviteStatisticsByRuleVO.java View File

@@ -0,0 +1,50 @@
package com.ningdatech.pmapi.meeting.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
* <p>
* InviteStatisticsVO
* </p>
*
* @author WendyYang
* @since 18:07 2023/3/4
*/
@Data
public class InviteStatisticsByRuleVO {

@ApiModelProperty("抽取规则ID")
private Long ruleId;

@ApiModelProperty("抽取人数")
private Integer inviteCnt;

@ApiModelProperty("同意人数")
private Integer agreeCnt;

@ApiModelProperty("实抽人数")
private Integer noticedCnt;

public static InviteStatisticsByRuleVO init(Long ruleId) {
InviteStatisticsByRuleVO statistics = new InviteStatisticsByRuleVO();
statistics.setRuleId(ruleId);
statistics.setNoticedCnt(0);
statistics.setInviteCnt(0);
statistics.setAgreeCnt(0);
return statistics;
}

public void incrInviteCnt() {
this.inviteCnt++;
}

public void incrAgreeCnt() {
this.agreeCnt++;
}

public void incrNoticedCnt() {
this.noticedCnt++;
}

}

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

@@ -17,7 +17,6 @@ import com.ningdatech.pmapi.meeting.entity.dto.AvoidInfoDTO;
import com.ningdatech.pmapi.meeting.entity.dto.MeetingAndAttendStatusDTO;
import com.ningdatech.pmapi.meeting.entity.dto.MeetingBasicDTO;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum;
import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingStatusEnum;
import com.ningdatech.pmapi.meeting.entity.req.MeetingListReq;
import com.ningdatech.pmapi.meeting.entity.vo.ExpertBasicInfoVO;
import com.ningdatech.pmapi.meeting.entity.vo.MeetingByManagerVO;
@@ -184,13 +183,13 @@ public class MeetingManageHelper {
switch (ExpertAttendStatusEnum.getByCode(w.getStatus())) {
case REFUSED:
throw BizException.wrap("专家%s已拒绝参加", expertName);
case CANCELED:
case REMOVED:
throw BizException.wrap("专家%s已被移除", expertName);
case REPLACED:
switch (ExpertAttendStatusEnum.getByCode(w.getPreStatus())) {
case REFUSED:
throw BizException.wrap("专家%s已拒绝参加", expertName);
case CANCELED:
case REMOVED:
throw BizException.wrap("专家%s已被移除", expertName);
default:
break;


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertInviteManage.java View File

@@ -409,7 +409,7 @@ public class ExpertInviteManage {
removeExpertIds.addAll(tempRefused);
});
// 被取消的也不可以被再次抽中
BizUtils.notEmpty(expertIdGroupByStatus.get(ExpertAttendStatusEnum.CANCELED), w -> {
BizUtils.notEmpty(expertIdGroupByStatus.get(ExpertAttendStatusEnum.REMOVED), w -> {
List<Long> tempCanceled = CollUtils.fieldList(w, MeetingExpert::getExpertId);
removeExpertIds.addAll(tempCanceled);
});
@@ -417,7 +417,7 @@ public class ExpertInviteManage {
BizUtils.notEmpty(expertIdGroupByStatus.get(ExpertAttendStatusEnum.REPLACED), w -> {
for (MeetingExpert me : w) {
BizUtils.notNull(me.getPreStatus(), preStatus -> {
if (ExpertAttendStatusEnum.REFUSED.eq(preStatus) || ExpertAttendStatusEnum.CANCELED.eq(preStatus)) {
if (ExpertAttendStatusEnum.REFUSED.eq(preStatus) || ExpertAttendStatusEnum.REMOVED.eq(preStatus)) {
removeExpertIds.add(me.getExpertId());
}
});


+ 134
- 104
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java View File

@@ -16,7 +16,6 @@ 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.service.FileService;
import com.ningdatech.pmapi.common.helper.RegionCacheHelper;
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo;
import com.ningdatech.pmapi.expert.helper.PermissionCheckHelper;
@@ -29,8 +28,6 @@ import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertInviteTypeEnum;
import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingStatusEnum;
import com.ningdatech.pmapi.meeting.entity.req.*;
import com.ningdatech.pmapi.meeting.entity.vo.*;
import com.ningdatech.pmapi.meeting.entity.vo.ExpertInviteDetailVO.ExpertAttendListItemVO;
import com.ningdatech.pmapi.meeting.entity.vo.ExpertInviteDetailVO.RandomInviteListItemVO;
import com.ningdatech.pmapi.meeting.helper.ExpertInviteHelper;
import com.ningdatech.pmapi.meeting.helper.MeetingManageHelper;
import com.ningdatech.pmapi.meeting.helper.YxtCallOrSmsHelper;
@@ -42,7 +39,6 @@ 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;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
@@ -73,7 +69,6 @@ public class MeetingManage {
private final IExpertInviteAvoidRuleService inviteAvoidRuleService;
private final IExpertInviteRuleService inviteRuleService;
private final IExpertUserFullInfoService expertUserFullInfoService;
private final FileService fileService;
private final TagCache tagCache;
private final DictionaryCache dictionaryCache;
private final IMeetingExpertService meetingExpertService;
@@ -83,7 +78,6 @@ public class MeetingManage {
private final YxtCallOrSmsHelper yxtCallOrSmsHelper;
private final DistributedLock distributedLock;
private final PermissionCheckHelper permissionCheckHelper;
private final IUserInfoService userInfoService;
private final IProjectService projectService;
private final IMeetingInnerProjectService meetingInnerProjectService;
private final IMeetingOuterProjectService meetingOuterProjectService;
@@ -116,7 +110,8 @@ public class MeetingManage {
meeting.setHoldOrgCode(userDetail.getOrganizationCode());
meeting.setRegionCode(userDetail.getRegionCode());
meeting.setCreator(userDetail.getUsername());
meeting.setInviteStopped(true);
meeting.setInviteStopped(Boolean.FALSE);
meeting.setConfirmedRoster(Boolean.FALSE);
meetingService.save(meeting);
if (meetingBasic.getIsInnerProject()) {
List<MeetingInnerProject> projects = meetingBasic.getProjectIdList().stream().map(w -> {
@@ -351,80 +346,60 @@ public class MeetingManage {
return detail;
}

public ExpertInviteDetailVO inviteDetail(Long meetingId) {
ExpertInviteDetailVO result = new ExpertInviteDetailVO();
public ExpertInviteDetailVO inviteExpertList(Long meetingId) {
Meeting meeting = meetingService.getById(meetingId);
if (Objects.isNull(meeting)) {
throw new BizException("该会议信息不存在");
if (meeting == null) {
throw BizException.wrap("该会议信息不存在");
}
ExpertInviteDetailVO result = new ExpertInviteDetailVO();
result.setInvitedStopped(meeting.getInviteStopped());
result.setConfirmedRoster(meeting.getConfirmedRoster());
List<MeetingExpert> experts = meetingExpertService.listByMeetingId(meetingId);
if (experts.isEmpty()) {
return result;
}
List<MeetingExpert> randomList = new ArrayList<>();
List<MeetingExpert> appointList = new ArrayList<>();
List<MeetingExpert> attendList = new ArrayList<>();
List<Long> expertIds = new ArrayList<>();
experts.forEach(w -> {
boolean randomInvite = w.getInviteType().equals(ExpertInviteTypeEnum.RANDOM.getCode());
if (randomInvite) {
randomList.add(w);
} else {
appointList.add(w);
}
if (w.getStatus().equals(ExpertAttendStatusEnum.AGREED.getCode())) {
attendList.add(w);
if (randomInvite) {
result.setRandomAttend(result.getRandomAttend() + 1);
} else {
result.setAppointAttend(result.getAppointAttend() + 1);
}
}
expertIds.add(w.getExpertId());
});
result.setAttendTotal(attendList.size());
Map<Long, ExpertBasicInfoVO> expertBasicInfoVoMap = meetingManageHelper.getExpertBasicInfo(expertIds);
Function<MeetingExpert, RandomInviteListItemVO> mapping = sme -> {
ExpertBasicInfoVO basicInfoVo = expertBasicInfoVoMap.get(sme.getExpertId());
RandomInviteListItemVO item = BeanUtil.copyProperties(basicInfoVo, RandomInviteListItemVO.class);
item.setStatus(sme.getStatus());
item.setMeetingId(sme.getMeetingId());
List<Long> expertIds = CollUtils.fieldList(experts, MeetingExpert::getExpertId);
Map<Long, ExpertBasicInfoVO> expertMap = meetingManageHelper.getExpertBasicInfo(expertIds);
Function<MeetingExpert, InviteExpertListItemVO> mapping = sme -> {
ExpertBasicInfoVO expert = expertMap.get(sme.getExpertId());
InviteExpertListItemVO item = BeanUtil.copyProperties(expert, InviteExpertListItemVO.class);
item.setExpertMeetingId(sme.getId());
ExpertAttendStatusEnum status = ExpertAttendStatusEnum.getByCode(sme.getStatus());
if (status.equals(ExpertAttendStatusEnum.NOTICING)) {
item.setNoticeStatus(status.getDesc());
item.setConfirmResult(StrUtil.EMPTY);
item.setMeetingId(sme.getMeetingId());
item.setStatus(sme.getStatus());
item.setNoticeTime(sme.getCreateOn());
item.setRuleId(sme.getRuleId());
if (ExpertAttendStatusEnum.NOTICING.eq(sme.getStatus())) {
item.setNoticeStatus("通知中");
} else {
item.setNoticeStatus("已通知");
item.setConfirmResult(status.getDesc());
}
return item;
};
// 随机邀请列表
randomList.forEach(w -> result.addRandomInviteList(mapping.apply(w)));
// 指定抽取列表
appointList.forEach(w -> result.addAppointInviteList(mapping.apply(w)));
boolean isRandom = ExpertInviteTypeEnum.RANDOM.eq(meeting.getInviteType());
if (!isRandom) {
result.setInviteStatistics(new ArrayList<>());
Map<Long, List<MeetingExpert>> groupByRule = CollUtils.group(experts, MeetingExpert::getRuleId);
List<ExpertInviteRule> inviteRules = inviteRuleService.listByIds(groupByRule.keySet());
Map<Long, ExpertInviteRule> ruleMap = CollUtils.listToMap(inviteRules, ExpertInviteRule::getId);
groupByRule.forEach((ruleId, expertList) -> {
InviteStatisticsByRuleVO statistics = InviteStatisticsByRuleVO.init(ruleId);
expertList.forEach((expert) -> {
Integer status = expert.getStatus();
if (ExpertAttendStatusEnum.AGREED.eq(status)) {
statistics.incrAgreeCnt();
}
statistics.setInviteCnt(ruleMap.get(ruleId).getInviteCount());
statistics.incrNoticedCnt();
});
result.getInviteStatistics().add(statistics);
});
}
List<InviteExpertListItemVO> converts = CollUtils.convert(experts, mapping);
result.setInviteExpertList(converts);
// 确定参加列表
attendList.forEach(w -> {
ExpertBasicInfoVO expertBasicInfoVo = expertBasicInfoVoMap.get(w.getExpertId());
ExpertAttendListItemVO item = BeanUtil.copyProperties(expertBasicInfoVo, ExpertAttendListItemVO.class);
item.setInviteType(ExpertInviteTypeEnum.getByCode(w.getInviteType()).getName());
result.addAttendList(item);
});
return result;
}

private boolean meetingInfoChange(Meeting old, Meeting current) {
if (!old.getStartTime().equals(current.getStartTime())) {
return Boolean.TRUE;
}
if (!old.getRegionCode().equals(current.getRegionCode())) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}

/**
* 会议基本信息修改
*
@@ -506,7 +481,7 @@ public class MeetingManage {
public void expertRemove(ExpertRemoveReq po) {
LambdaUpdateWrapper<MeetingExpert> update = Wrappers.lambdaUpdate(MeetingExpert.class)
.eq(MeetingExpert::getId, po.getExpertMeetingId())
.set(MeetingExpert::getStatus, ExpertAttendStatusEnum.CANCELED.getCode());
.set(MeetingExpert::getStatus, ExpertAttendStatusEnum.REMOVED.getCode());
meetingExpertService.update(update);
}

@@ -582,32 +557,6 @@ public class MeetingManage {
meetingExpertService.saveBatch(expertList);
}

public void sendMeetingNotice(Long meetingId) {
String key = "SEND_MEETING_NOTICE:" + meetingId;
if (!distributedLock.lock(key, RETRY_TIMES)) {
throw BizException.wrap("正在下发会议通知");
}
try {
Meeting meeting = meetingService.getById(meetingId);
Assert.isTrue(meeting.getInviteStopped(), "随机邀请未结束");
int noticeCount = meetingExpertService.countExpertByStatusAndMeetingId(ExpertAttendStatusEnum.NOTICING, meetingId, null);
Assert.isTrue(noticeCount == 0, "存在未确认完成的专家,暂无法下发会议通知");
LambdaUpdateWrapper<Meeting> update = Wrappers.lambdaUpdate(Meeting.class)
.eq(Meeting::getId, meetingId);
meetingService.update(update);
// 发送会议通知
List<MeetingExpert> experts = meetingExpertService.listAgreedExperts(Collections.singletonList(meetingId));
if (!experts.isEmpty()) {
// TODO
// String meetingType = dictionaryCache.getByCode(meeting.getType()).getName();
// List<SendSmsContext> contexts = YxtSmsContextBuilder.smsToExpertBySendNotice(meeting, experts, meetingType);
// yxtCallOrSmsHelper.sendSms(contexts);
}
} finally {
distributedLock.releaseLock(key);
}
}

public void stopRandomInvite(Long meetingId) {
expertInviteTask.cancelByMeetingId(meetingId);
}
@@ -649,12 +598,16 @@ public class MeetingManage {
public ExpertInvitationDetailVO expertInvitationDetail(Long meetingId, Long expertId) {
Long userId = expertId == null ? LoginUserUtil.getUserId() : expertId;
MeetingExpert me = meetingExpertService.getByMeetingIdAndExpertId(meetingId, userId);
Assert.notNull(me, "未被邀请参加");
Assert.isTrue(ExpertAttendStatusEnum.AGREED.eq(me.getStatus()), "未确认参加");
ExpertUserFullInfo expertInfo = expertUserFullInfoService.getByUserId(userId);
if (me == null) {
throw BizException.wrap("未被邀请参加此会议");
}
if (ExpertAttendStatusEnum.AGREED.eq(me.getStatus())) {
throw BizException.wrap("未确认参加此会议");
}
ExpertUserFullInfo userInfo = expertUserFullInfoService.getByUserId(userId);
Meeting meeting = meetingService.getById(meetingId);
return ExpertInvitationDetailVO.builder()
.expertName(expertInfo.getExpertName())
.expertName(userInfo.getExpertName())
.holdOrg(meeting.getHoldOrg())
.meetingName(meeting.getName())
.startTime(meeting.getStartTime())
@@ -665,18 +618,95 @@ public class MeetingManage {
.build();
}

public void confirmAttendByManager(ExpertRemoveReq po) {
MeetingExpert meetingExpert = meetingExpertService.getById(po.getExpertMeetingId());
if (meetingExpert.getStatus().equals(ExpertAttendStatusEnum.NOTICING.getCode())) {
public void confirmAttendByManager(ExpertConfirmReq req) {
String key = "CONFIRM_ATTEND:" + req.getExpertMeetingId();
if (!distributedLock.lock(key, RETRY_TIMES)) {
throw BizException.wrap("确认参加失败,请重试!");
}
try {
MeetingExpert me = meetingExpertService.getById(req.getExpertMeetingId());
if (!ExpertAttendStatusEnum.NOTICING.eq(me.getStatus())) {
throw BizException.wrap("确认参加失败,请重试!");
}
LambdaUpdateWrapper<MeetingExpert> update = Wrappers.lambdaUpdate(MeetingExpert.class)
.set(MeetingExpert::getStatus, ExpertAttendStatusEnum.AGREED.getCode())
.set(MeetingExpert::getUpdateOn, LocalDateTime.now())
.set(MeetingExpert::getUpdateBy, LoginUserUtil.getUserId())
.eq(MeetingExpert::getId, po.getExpertMeetingId());
.eq(MeetingExpert::getId, req.getExpertMeetingId());
meetingExpertService.update(update);
} else {
ExpertAttendStatusEnum status = ExpertAttendStatusEnum.getByCode(meetingExpert.getStatus());
throw BizException.wrap("该专家" + status.getDesc());
} finally {
distributedLock.releaseLock(key);
}
}

public void releaseExperts(MeetingCancelReq req) {
String key = "EXPERT_RELEASE:" + req.getMeetingId();
if (!distributedLock.lock(key, RETRY_TIMES)) {
throw BizException.wrap("释放专家失败,请重试!");
}
try {
Meeting meeting = meetingService.getById(req.getMeetingId());
if (MeetingStatusEnum.CANCELED.eq(meeting.getStatus())) {
throw BizException.wrap("会议已取消");
}
LambdaUpdateWrapper<MeetingExpert> update = Wrappers.lambdaUpdate(MeetingExpert.class)
.set(MeetingExpert::getStatus, ExpertAttendStatusEnum.RELEASED.getCode())
.eq(MeetingExpert::getMeetingId, req.getMeetingId());
meetingExpertService.update(update);
} finally {
distributedLock.releaseLock(key);
}
}

@Transactional(rollbackFor = Exception.class)
public void setUpHeadman(ExpertConfirmReq req) {
String key = "SETUP_HEADMAN:" + req.getMeetingId();
if (!distributedLock.lock(key, RETRY_TIMES)) {
throw BizException.wrap("设置专家组长失败,请重试!");
}
try {
Meeting meeting = meetingService.getById(req.getMeetingId());
if (MeetingStatusEnum.CANCELED.eq(meeting.getStatus())) {
throw BizException.wrap("会议已取消");
}
LambdaUpdateWrapper<MeetingExpert> cancel = Wrappers.lambdaUpdate(MeetingExpert.class)
.set(MeetingExpert::getIsHeadman, Boolean.FALSE)
.eq(MeetingExpert::getIsHeadman, Boolean.TRUE)
.eq(MeetingExpert::getMeetingId, req.getMeetingId());
meetingExpertService.update(cancel);
MeetingExpert headman = meetingExpertService.getById(req.getExpertMeetingId());
if (!ExpertAttendStatusEnum.AGREED.eq(headman.getStatus())) {
ExpertAttendStatusEnum status = ExpertAttendStatusEnum.getByCode(headman.getStatus());
throw BizException.wrap("该专家处于:%s状态,不能被设置为专家组长!", status.getValue());
}
LambdaUpdateWrapper<MeetingExpert> setup = Wrappers.lambdaUpdate(MeetingExpert.class)
.set(MeetingExpert::getIsHeadman, Boolean.TRUE)
.eq(MeetingExpert::getId, req.getExpertMeetingId());
meetingExpertService.update(setup);
} finally {
distributedLock.releaseLock(key);
}
}

public void confirmedRoster(Long meetingId) {
String key = "MEETING_RESEND_SMS:" + meetingId;
if (!distributedLock.lock(key, RETRY_TIMES)) {
throw BizException.wrap("请刷新后重试!");
}
try {
Meeting meeting = meetingService.getById(meetingId);
if (!MeetingStatusEnum.NORMAL.eq(meeting.getStatus())) {
throw BizException.wrap("请刷新后重试!");
}
if (!meeting.getConfirmedRoster()) {
// 首次确认的
LambdaUpdateWrapper<Meeting> update = Wrappers.lambdaUpdate(Meeting.class);
update.set(Meeting::getConfirmedRoster, Boolean.TRUE);
update.eq(Meeting::getId, meetingId);
meetingService.update(update);
}
List<MeetingExpert> experts = meetingExpertService.listAgreedExperts(meetingId);
// TODO 发送会议通知
} finally {
distributedLock.releaseLock(key);
}
}



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

@@ -61,7 +61,7 @@ public class MeetingExpertServiceImpl extends ServiceImpl<MeetingExpertMapper, M
ExpertAttendStatusEnum attendStatus = ExpertAttendStatusEnum.getByCode(item.getStatus());
if (item.getInviteType().equals(ExpertInviteTypeEnum.APPOINT.getCode())) {
// 被替换和已取消的不计数
if (attendStatus.equals(ExpertAttendStatusEnum.CANCELED)
if (attendStatus.equals(ExpertAttendStatusEnum.REMOVED)
|| attendStatus.equals(ExpertAttendStatusEnum.REPLACED)) {
return;
}


+ 11
- 11
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java View File

@@ -63,13 +63,13 @@ public class InitProcessTask {
Map<String, WflowForms> formsMap = Maps.newConcurrentMap();
//2.首先插入表单默认配置
for(Region region : regions){
log.info("当前初始化的是 【{}】 表单信息",region.getName());
log.info("当前初始化的是 【{}】 表单信息",region.getRegionName());

WflowForms existsForm = formsService.getOne(Wrappers.lambdaQuery(WflowForms.class)
.eq(WflowForms::getRegionCode, region.getRegionCode())
.last("limit 1"));
if(Objects.nonNull(existsForm)){
log.info("当前区域 【{}】 已经有表单数据 不需要初始化",region.getName());
log.info("当前区域 【{}】 已经有表单数据 不需要初始化",region.getRegionName());
formsMap.put(existsForm.getRegionCode(),existsForm);
continue;
}
@@ -80,28 +80,28 @@ public class InitProcessTask {
wflowForms.setUpdateOn(LocalDateTime.now());
wflowForms.setFormName(TaskContant.Wflow.DEFAULT_FORM_NAME);
wflowForms.setRegionCode(region.getRegionCode());
wflowForms.setRegionName(region.getName());
wflowForms.setRegionName(region.getRegionName());
if(formsService.save(wflowForms)){
log.info("当前区域 【{}】 表单数据已经保存成功",region.getName());
log.info("当前区域 【{}】 表单数据已经保存成功",region.getRegionName());
formsMap.put(wflowForms.getRegionCode(),wflowForms);
}else{
log.info("当前区域 【{}】 表单数据已经保存失败",region.getName());
log.info("当前区域 【{}】 表单数据已经保存失败",region.getRegionName());
}
}

//3.接着插入流程默认配置
for(Region region : regions){
log.info("当前初始化的是 【{}】 流程配置",region.getName());
log.info("当前初始化的是 【{}】 流程配置",region.getRegionName());

if(processModelService.count(Wrappers.lambdaQuery(WflowModels.class)
.eq(WflowModels::getRegionCode,region.getRegionCode())) > 0){
log.info("当前区域 【{}】 已经有流程数据 不需要初始化",region.getName());
log.info("当前区域 【{}】 已经有流程数据 不需要初始化",region.getRegionName());
continue;
}

// WflowForms form = formsMap.get(region.getRegionCode());
// if(Objects.isNull(form)){
// log.info("此区域 【{}】 没有对应form 不进行 流程配置初始化",region.getName());
// log.info("此区域 【{}】 没有对应form 不进行 流程配置初始化",region.getRegionName());
// continue;
// }

@@ -124,12 +124,12 @@ public class InitProcessTask {
if(StringUtils.isNotBlank(processModelService.saveProcess(models))){
//初始的流程在部署表也存一份,用来查询
if(StringUtils.isNotBlank(processModelService.deployProcess(models.getFormId(),null))){
log.info("当前区域 【{}】 流程名[{}] 流程数据已经保存成功",region.getName(),formName);
log.info("当前区域 【{}】 流程名[{}] 流程数据已经保存成功",region.getRegionName(),formName);
}else{
log.info("当前区域 【{}】 流程名[{}] 流程数据保存失败",region.getName(),formName);
log.info("当前区域 【{}】 流程名[{}] 流程数据保存失败",region.getRegionName(),formName);
}
}else{
log.info("当前区域 【{}】流程名[{}] 流程数据保存失败",region.getName(),formName);
log.info("当前区域 【{}】流程名[{}] 流程数据保存失败",region.getRegionName(),formName);
}
}
}


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/WorkNoticeFlowTask.java View File

@@ -46,7 +46,7 @@ public class WorkNoticeFlowTask {
private final INdWorkNoticeStagingService workNoticeStagingService;
private final ZwddClient zwddClient;

@Scheduled(cron = "0 */1 * * * ?")
// @Scheduled(cron = "0 */1 * * * ?")
public void statusFlow() throws UnknownHostException {
//测试暂时用自己电脑HOST
if (TaskContant.Host.HOST_CMM.equals(InetAddress.getLocalHost().getHostName())) {


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/sys/convert/RegionConverter.java View File

@@ -26,7 +26,7 @@ public class RegionConverter {
public static RegionDTO toRegionDTO(Region region) {
RegionDTO dto = new RegionDTO();
dto.setRegionLevel(region.getRegionLevel());
dto.setRegionName(region.getName());
dto.setRegionName(region.getRegionName());
dto.setParentCode(region.getParentCode());
dto.setRegionCode(region.getRegionCode());
dto.setId(region.getId());


+ 1
- 5
pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Region.java View File

@@ -27,7 +27,7 @@ public class Region implements Serializable {

private String regionCode;

private String name;
private String regionName;

private Integer regionLevel;

@@ -37,10 +37,6 @@ public class Region implements Serializable {

private Long parentId;

private LocalDateTime createOn;

private LocalDateTime updateOn;

private String regionCodePath;

private Boolean deleted;


+ 67
- 74
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.collect.Sets;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.pmapi.common.constant.CommonConst;
@@ -28,8 +29,8 @@ import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo;
import com.ningdatech.pmapi.todocenter.bean.vo.ProcessProgressDetailVo;
import com.ningdatech.pmapi.todocenter.enumeration.IsAppendProjectEnum;
import com.ningdatech.pmapi.todocenter.model.dto.req.ProcessDetailReq;
import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedReq;
import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedExportReq;
import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedReq;
import com.ningdatech.pmapi.todocenter.model.dto.vo.ResToBeProcessedVO;
import com.ningdatech.pmapi.user.entity.UserInfo;
import com.ningdatech.pmapi.user.service.IUserInfoService;
@@ -43,20 +44,23 @@ import com.wflow.workflow.bean.vo.ProcessInstanceVo;
import com.wflow.workflow.bean.vo.ProcessProgressVo;
import com.wflow.workflow.bean.vo.ProcessTaskVo;
import com.wflow.workflow.enums.ProcessStatusEnum;
import com.wflow.workflow.service.*;
import com.wflow.workflow.service.ProcessInstanceService;
import com.wflow.workflow.service.ProcessTaskService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.assertj.core.util.Lists;
import org.flowable.bpmn.model.*;
import org.flowable.engine.*;
import org.flowable.engine.HistoryService;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.runtime.ActivityInstance;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;

import static com.ningdatech.pmapi.todocenter.constant.WorkNotice.*;
import static com.wflow.workflow.task.TriggerServiceTask.runtimeService;

@@ -95,8 +99,8 @@ public class TodoCenterManage {
Long userId = LoginUserUtil.getUserId();
//因为要解耦 不能把项目和工作流一起查
//1.先查出用户工作流
List<ProcessTaskVo> userTodoList = processTaskService.getUserTodoList(param.getProcessDefId(),String.valueOf(userId));
if(CollUtil.isEmpty(userTodoList)){
List<ProcessTaskVo> userTodoList = processTaskService.getUserTodoList(param.getProcessDefId(), String.valueOf(userId));
if (CollUtil.isEmpty(userTodoList)) {
return PageVo.empty();
}
List<String> instCodes = userTodoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList());
@@ -105,16 +109,16 @@ public class TodoCenterManage {
//2.再分页查询项目信息
ProjectListReq projectListReq = new ProjectListReq();
projectListReq.setInstCodes(instCodes);
BeanUtils.copyProperties(param,projectListReq);
BeanUtils.copyProperties(param, projectListReq);
PageVo<ProjectLibListItemVO> projectPage = projectLibManage.projectLibList(projectListReq);

if(0L == projectPage.getTotal()){
if (0L == projectPage.getTotal()) {
return PageVo.empty();
}

List<HistoricProcessInstance> instances = historyService.createHistoricProcessInstanceQuery()
.list();
Map<String,HistoricProcessInstance> instanceMap = CollUtils.listToMap(instances,HistoricProcessInstance::getId);
Map<String, HistoricProcessInstance> instanceMap = CollUtils.listToMap(instances, HistoricProcessInstance::getId);

List<ResToBeProcessedVO> resVos = projectPage.getRecords().stream().map(d -> {
ResToBeProcessedVO res = new ResToBeProcessedVO();
@@ -122,9 +126,9 @@ public class TodoCenterManage {
res.setProjectId(d.getId());
ProcessTaskVo taskVo = taskVoMap.get(d.getInstCode());
res.setNodeId(taskVo.getTaskDefKey());
if(instanceMap.containsKey(d.getInstCode())){
if (instanceMap.containsKey(d.getInstCode())) {
res.setProcessStatusName(processInstanceService
.buildProcessStatusStr(instanceMap.get(d.getInstCode()).getEndActivityId()));
.buildProcessStatusStr(instanceMap.get(d.getInstCode())));
}
res.setProcessLaunchTime(d.getCreateOn());
return res;
@@ -149,13 +153,13 @@ public class TodoCenterManage {

//因为要解耦 不能把项目和工作流一起查
//1.先查出用户工作流
List<ProcessTaskVo> userTodoList = processTaskService.getUserTodoList(param.getProcessDefId(),String.valueOf(userId));
List<ProcessTaskVo> userTodoList = processTaskService.getUserTodoList(param.getProcessDefId(), String.valueOf(userId));
List<String> instCodes = userTodoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList());

//2.再查询项目信息
ProjectListReq projectListReq = new ProjectListReq();
projectListReq.setInstCodes(instCodes);
BeanUtils.copyProperties(param,projectListReq);
BeanUtils.copyProperties(param, projectListReq);
List<Project> projects = CollUtil.isEmpty(userTodoList) ? Collections.emptyList() : projectLibManage.projectList(projectListReq);
PageVo<ProjectLibListItemVO> projectLibList = projectLibManage.projectLibList(projectListReq);

@@ -195,11 +199,13 @@ public class TodoCenterManage {
// 获取入参
String processInstanceId = param.getInstanceId();
Long projectId = param.getProjectId();

VUtils.isTrue(Objects.isNull(processInstanceId)).throwMessage("获取流程实例ID失败!");
VUtils.isTrue(Objects.isNull(projectId)).throwMessage("获取项目ID失败!");
// 获取当前申报项目
Project declaredProject = projectService.getOne(Wrappers.lambdaQuery(Project.class)
.eq(Project::getInstCode, processInstanceId)
.eq(Project::getId,projectId));
.eq(Project::getId, projectId));
VUtils.isTrue(Objects.isNull(projectId)).throwMessage("获取项目ID失败!");
// 获取当前项目名称
String projectName = declaredProject.getProjectName();
// 获取当前项目状态
@@ -235,23 +241,18 @@ public class TodoCenterManage {
ProgressNode currentNode = newProgressInfo.get(newProgressInfo.size() - 1);
UserInfo auditUserInfo = null;
// 说明当前节点是子流程节点
if (currentNode.getNodeType().name().equals(NodeTypeEnum.SUB.name())){
if (currentNode.getNodeType().name().equals(NodeTypeEnum.SUB.name())) {
List<ProgressNode> children = currentNode.getChildren();
// 获取子流程当前审核人节点
ProgressNode subCurrentNode = children.get(children.size() - 1);
auditUserInfo = userInfoService.getById(Long.valueOf(subCurrentNode.getUserId()));
}else {
} else {
auditUserInfo = userInfoService.getById(Long.valueOf(currentNode.getUserId()));
}

// 如果流程状态是被退回状态,流程通过后,进入下一个审核人,
// 当前通过审核人一定不是最后一个审核人(下一个审核人至多是最后一个),更新流程状态为审核中
if (ProcessStatusEnum.BE_BACKED.getDesc().equals(currentProcessStatus)) {
// 更新流程状态为审核中
declaredProject.setProcessStatus(ProcessStatusEnum.UNDER_REVIEW.getCode());
declaredProject.setUpdateOn(LocalDateTime.now());
declaredProject.setUpdateBy(userId);
projectService.updateById(declaredProject);
// 获取发送浙政钉工作通知必要信息
WorkNoticeInfo passWorkNoticeInfo = getSendWorkNoticeInfo(auditUserInfo);
String passMsg = String.format(PASS_MSG_TEMPLATE, passWorkNoticeInfo.getOrganizationName(), projectName);
@@ -267,13 +268,13 @@ public class TodoCenterManage {
switch (Objects.requireNonNull(ProjectStatusEnum.getValue(projectStatus))) {
// 当前项目状态是单位内部审核中
case UNDER_INTERNAL_AUDIT:
// 当前项目状态是预审中
// 当前项目状态是预审中
case PRE_APPLYING:
// 当前项目状态是部门联审中
// 当前项目状态是部门联审中
case DEPARTMENT_JOINT_REVIEW:
// 当前项目状态是方案评审中
// 当前项目状态是方案评审中
case SCHEME_UNDER_REVIEW:
// 当前项目状态是终验审核中
// 当前项目状态是终验审核中
case FINAL_ACCEPTANCE_IS_UNDER_REVIEW:
updatePassProjectStatus(userId, declaredProject);
break;
@@ -286,10 +287,13 @@ public class TodoCenterManage {
passWorkNoticeInfo2.setMsg(passMsg2);
// 放入工作通知暂存表中,通过扫表异步发送
workNoticeStagingService.addByWorkNotice(passWorkNoticeInfo2, MsgTypeEnum.PASS);
}else {
} else {
// 若有下一个审核人(当前节点的用户),
// 向其发送浙政钉工作通知:标题:审核任务 内容:【单位名称】的【项目名称】需要您审核。
// 获取发送浙政钉工作通知必要信息
if (Objects.isNull(auditUserInfo)) {
throw new BizException("审核人信息不存在!");
}
WorkNoticeInfo sendWorkNoticeInfo = getSendWorkNoticeInfo(auditUserInfo);
String msg = String.format(PASS_MSG_TEMPLATE, sendWorkNoticeInfo.getOrganizationName(), projectName);
sendWorkNoticeInfo.setMsg(msg);
@@ -321,11 +325,6 @@ public class TodoCenterManage {
case BACK:
// 退回该任务
processTaskService.handleTask(param, userId);
// 更新申报项目表中的流程状态为被退回
declaredProject.setProcessStatus(ProcessStatusEnum.BE_BACKED.getCode());
declaredProject.setUpdateOn(LocalDateTime.now());
declaredProject.setUpdateBy(userId);
projectService.updateById(declaredProject);
// 给项目创建人、流程发起人发送浙政钉工作通知:【项目名称】的【流程名称】被退回,请及时处理。
// 获取发送浙政钉工作通知必要信息
WorkNoticeInfo backWorkNoticeInfo = getSendWorkNoticeInfo(startUserInfo);
@@ -337,7 +336,7 @@ public class TodoCenterManage {
// 撤回(流程发起人和当前流程审核人的前一个审核人操作)
case WITHDRAW:
// 当前登录用户是流程发起人
if (userId.equals(Long.valueOf(startUserId))){
if (userId.equals(Long.valueOf(startUserId))) {
processTaskService.handleTask(param, userId);
// 若是流程发起人点击撤回,项目回到上一个状态,需调用状态机更新项目状态,流程状态更新为审核通过
switch (Objects.requireNonNull(ProjectStatusEnum.getValue(projectStatus))) {
@@ -356,7 +355,7 @@ public class TodoCenterManage {
default:
throw new IllegalStateException("Unexpected value: " + projectStatus);
}
}else {
} else {
// 当前登录用户不是流程发起人
List<ProgressNode> currentProgressInfo = currentInstanceDetail.getProgressInfo();
// 获取当前工作流任务前一个审核人信息
@@ -367,12 +366,12 @@ public class TodoCenterManage {
ProcessInstanceUserDto currentUser = currentProgressNode.getUser();
// 判断当前工作流任务前一个审核人的部门和当前登录用户的部门是否是同一个,如果是同一个才可以撤回,否则抛出异常
boolean orgFlag = currentUser.getOrgCode().equals(beforeUser.getOrgCode());
boolean userFlag = beforeUser.getUserId().equals(String.valueOf( userId));
boolean userFlag = beforeUser.getUserId().equals(String.valueOf(userId));
if (!orgFlag) {
throw new BizException("下一个审核人和您不是同一个部门,无法撤回!");
} else if (!userFlag){
} else if (!userFlag) {
throw new BizException("当前登录用户无法进行撤回操作!");
} else{
} else {
processTaskService.handleTask(param, userId);
}
}
@@ -404,16 +403,13 @@ public class TodoCenterManage {
} catch (Exception e) {
throw new BizException("状态机执行失败!");
}
// 更新流程状态、项目状态到下一个状态
declaredProject.setProcessStatus(ProcessStatusEnum.BE_REJECTED.getCode());
declaredProject.setUpdateOn(LocalDateTime.now());
declaredProject.setUpdateBy(userId);
projectService.updateById(declaredProject);
}


/**
* 获取发送浙政钉工作通知的信息
*
* @param auditUserInfo
* @return com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo
* @author CMM
@@ -422,7 +418,7 @@ public class TodoCenterManage {
public WorkNoticeInfo getSendWorkNoticeInfo(UserInfo auditUserInfo) {
WorkNoticeInfo workNoticeInfo = new WorkNoticeInfo();
Long accountId = auditUserInfo.getAccountId();
if (Objects.isNull(accountId)){
if (Objects.isNull(accountId)) {
throw new BizException("该用户没有录入浙政钉信息!");
}
workNoticeInfo.setAccountId(accountId);
@@ -438,12 +434,13 @@ public class TodoCenterManage {
workNoticeInfo.setOrganizationName(organizationName);
// 构建唯一的消息ID
String bizMsgId = "ZD_WORK_NOTICE_" + StrUtil.UNDERLINE + organizationCode + StrUtil.UNDERLINE
+ organizationName + accountId + StrUtil.UNDERLINE + System.currentTimeMillis();
+ organizationName + accountId + StrUtil.UNDERLINE + System.currentTimeMillis();
workNoticeInfo.setBizMsgId(bizMsgId);
String receiverUserId = String.valueOf(accountId);
workNoticeInfo.setReceiverUserId(receiverUserId);
return workNoticeInfo;
}

/**
* 当为通过操作时,更新项目表中项目状态
*
@@ -465,10 +462,6 @@ public class TodoCenterManage {
} catch (Exception e) {
throw new BizException("状态机执行失败!");
}
// 更新流程状态、项目状态到下一个状态
declaredProject.setProcessStatus(ProcessStatusEnum.APPROVED.getCode());
declaredProject.setUpdateOn(LocalDateTime.now());
declaredProject.setUpdateBy(userId);
projectService.updateById(declaredProject);
}

@@ -503,6 +496,7 @@ public class TodoCenterManage {
return rootUserId;

}

/**
* 获取当前节点的下一个节点的审核用户ID
*
@@ -559,11 +553,6 @@ public class TodoCenterManage {
} catch (Exception e) {
throw new BizException("状态机执行失败!");
}
// 更新项目状态
declaredProject.setProcessStatus(ProcessStatusEnum.APPROVED.getCode());
declaredProject.setUpdateOn(LocalDateTime.now());
declaredProject.setUpdateBy(userId);
projectService.updateById(declaredProject);
}

/**
@@ -582,18 +571,18 @@ public class TodoCenterManage {

Set<String> userSet = Sets.newHashSet();
progressInfo.forEach(node -> {
if(CollUtil.isNotEmpty(node.getChildren())){
for(ProgressNode innerNode : node.getChildren()){
if (CollUtil.isNotEmpty(node.getChildren())) {
for (ProgressNode innerNode : node.getChildren()) {
userSet.add(innerNode.getUserId());
}
}else{
} else {
userSet.add(node.getUserId());
}
});
Map<String, ProcessInstanceUserDto> userMap = userInfoService.getUserMapByIds(userSet);

// 装配节点审核人员信息
buildUser(progressInfo,userMap);
buildUser(progressInfo, userMap);

ProcessProgressDetailVo res = new ProcessProgressDetailVo();
res.setProcessProgressVo(progressInstanceDetail);
@@ -602,11 +591,11 @@ public class TodoCenterManage {
return res;
}

private void buildUser(List<ProgressNode> progressInfo,Map<String, ProcessInstanceUserDto> userMap) {
private void buildUser(List<ProgressNode> progressInfo, Map<String, ProcessInstanceUserDto> userMap) {
for (ProgressNode progressNode : progressInfo) {
progressNode.setUser(userMap.get(progressNode.getUserId()));
if(CollUtil.isNotEmpty(progressNode.getChildren())){
buildUser(progressNode.getChildren(),userMap);
if (CollUtil.isNotEmpty(progressNode.getChildren())) {
buildUser(progressNode.getChildren(), userMap);
}
}
}
@@ -623,8 +612,8 @@ public class TodoCenterManage {
Long userId = LoginUserUtil.getUserId();

// 查出用户已处理工作流
List<ProcessTaskVo> userIdoList = processTaskService.getUserIdoList(param.getProcessDefId(),String.valueOf(userId));
if(CollUtil.isEmpty(userIdoList)){
List<ProcessTaskVo> userIdoList = processTaskService.getUserIdoList(param.getProcessDefId(), String.valueOf(userId));
if (CollUtil.isEmpty(userIdoList)) {
return PageVo.empty();
}
List<String> instCodes = userIdoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList());
@@ -633,7 +622,7 @@ public class TodoCenterManage {
// 分页查询项目信息
ProjectListReq projectListReq = new ProjectListReq();
projectListReq.setInstCodes(instCodes);
BeanUtils.copyProperties(param,projectListReq);
BeanUtils.copyProperties(param, projectListReq);

PageVo<ProjectLibListItemVO> projectPage = projectLibManage.projectLibList(projectListReq);
if (0L == projectPage.getTotal()) {
@@ -648,7 +637,7 @@ public class TodoCenterManage {
res.setProcessHandleTime(d.getUpdateOn());
return res;
}).collect(Collectors.toList());
return PageVo.of(resVos,projectPage.getTotal());
return PageVo.of(resVos, projectPage.getTotal());
}

/**
@@ -715,10 +704,12 @@ public class TodoCenterManage {
public PageVo<ResToBeProcessedVO> mySubmittedList(ToBeProcessedReq param) {

// 获取登录用户ID
Long startUserId = LoginUserUtil.getUserId();
Long startUserId = LoginUserUtil.getUserId();
// 查出登录用户已提交工作流
List<ProcessInstanceVo> userSubmittedList = processInstanceService.getUserSubmittedList(String.valueOf(startUserId), param.getProcessDefId(), null);
if(CollUtil.isEmpty(userSubmittedList)){
Map<String, ProcessInstanceVo> instanceVoMap = userSubmittedList.stream()
.collect(Collectors.toMap(ProcessInstanceVo::getInstanceId, v -> v));
if (CollUtil.isEmpty(userSubmittedList)) {
return PageVo.empty();
}
List<String> instCodes = userSubmittedList.stream().map(ProcessInstanceVo::getInstanceId).collect(Collectors.toList());
@@ -726,7 +717,7 @@ public class TodoCenterManage {
// 分页查询项目信息
ProjectListReq projectListReq = new ProjectListReq();
projectListReq.setInstCodes(instCodes);
BeanUtils.copyProperties(param,projectListReq);
BeanUtils.copyProperties(param, projectListReq);

PageVo<ProjectLibListItemVO> projectPage = projectLibManage.projectLibList(projectListReq);
if (0L == projectPage.getTotal()) {
@@ -737,11 +728,12 @@ public class TodoCenterManage {
ResToBeProcessedVO res = new ResToBeProcessedVO();
BeanUtils.copyProperties(d, res);
res.setProjectId(d.getId());
res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus()));
ProcessInstanceVo instanceVo = instanceVoMap.get(d.getInstCode());
res.setProcessStatusName(instanceVo.getStatus());
res.setProcessLaunchTime(d.getCreateOn());
return res;
}).collect(Collectors.toList());
return PageVo.of(resVos,projectPage.getTotal());
return PageVo.of(resVos, projectPage.getTotal());
}

/**
@@ -756,7 +748,7 @@ public class TodoCenterManage {
public void exportMySubmittedList(HttpServletResponse response, ToBeProcessedExportReq param) {

// 获取登录用户ID
long userId = LoginUserUtil.getUserId();
long userId = LoginUserUtil.getUserId();

param.setPageNumber(CommonConst.EXPORT_PAGE_NUMBER);
param.setPageSize(CommonConst.EXPORT_PAGE_SIZE);
@@ -769,7 +761,8 @@ public class TodoCenterManage {
projectListReq.setInstCodes(instCodes);
BeanUtils.copyProperties(param, projectListReq);
List<Project> projects = CollUtil.isEmpty(userSubmittedList) ? Collections.emptyList() :
projectLibManage.projectList(projectListReq);projectLibManage.projectList(projectListReq);
projectLibManage.projectList(projectListReq);
projectLibManage.projectList(projectListReq);

ExcelExportWriter excelExportWriter = new ExcelExportWriter();

@@ -807,11 +800,11 @@ public class TodoCenterManage {
*/
public PageVo<ResToBeProcessedVO> ccmeList(ToBeProcessedReq param) {
// 获取当前登录用户ID
Long userId = LoginUserUtil.getUserId();
Long userId = LoginUserUtil.getUserId();

// 查询抄送登录用户的工作流
List<ProcessInstanceVo> ccMeList = processInstanceService.getCcMeList(param.getProcessDefId(), String.valueOf(userId));
if(CollUtil.isEmpty(ccMeList)){
if (CollUtil.isEmpty(ccMeList)) {
return PageVo.empty();
}
List<String> instCodes = ccMeList.stream().map(ProcessInstanceVo::getInstanceId).collect(Collectors.toList());
@@ -821,7 +814,7 @@ public class TodoCenterManage {
// 分页查询项目信息
ProjectListReq projectListReq = new ProjectListReq();
projectListReq.setInstCodes(instCodes);
BeanUtils.copyProperties(param,projectListReq);
BeanUtils.copyProperties(param, projectListReq);

PageVo<ProjectLibListItemVO> projectPage = projectLibManage.projectLibList(projectListReq);
if (0L == projectPage.getTotal()) {
@@ -834,11 +827,11 @@ public class TodoCenterManage {
ProcessInstanceVo instanceVo = instanceVoMap.get(d.getInstCode());
res.setNodeId(instanceVo.getNodeId());
res.setProjectId(d.getId());
res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus()));
res.setProcessStatusName(instanceVo.getStatus());
res.setProcessLaunchTime(d.getCreateOn());
return res;
}).collect(Collectors.toList());
return PageVo.of(resVos,projectPage.getTotal());
return PageVo.of(resVos, projectPage.getTotal());
}

/**


+ 0
- 5
pom.xml View File

@@ -88,11 +88,6 @@
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-dict-starter</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-basic</artifactId>
<version>1.0.0</version>
</dependency>


Loading…
Cancel
Save