|
|
@@ -1,23 +1,9 @@ |
|
|
|
package com.ningdatech.pmapi.staging.utils; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.function.Function; |
|
|
|
|
|
|
|
import javax.annotation.PostConstruct; |
|
|
|
|
|
|
|
import com.ningdatech.pmapi.common.util.SendWorkNoticeUtil; |
|
|
|
import com.ningdatech.pmapi.staging.enums.MsgTypeEnum; |
|
|
|
import com.ningdatech.pmapi.staging.model.entity.WorkNoticeStaging; |
|
|
|
import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import com.google.common.collect.Maps; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.manage.ReviewByDeptJointManage; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.manage.ReviewByProvincialDeptManage; |
|
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.Project; |
|
|
|
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
|
|
|
/** |
|
|
@@ -29,41 +15,11 @@ import lombok.RequiredArgsConstructor; |
|
|
|
@Component |
|
|
|
@RequiredArgsConstructor |
|
|
|
public class WorkNoticeFlowMapUtil { |
|
|
|
//public Map<Integer, Function<WorkNoticeInfo,Boolean>> workNoticeFlowFunctionMap = Maps.newHashMap(); |
|
|
|
/** |
|
|
|
* key 重试的次数 , value 是增加是描述 |
|
|
|
*/ |
|
|
|
public Map<Integer, Integer> intervalTimeMap = Maps.newHashMap(); |
|
|
|
|
|
|
|
///** |
|
|
|
// * 初始化工作通知分派逻辑,代替了if-else部分 |
|
|
|
// * key: 枚举 消息类型 |
|
|
|
// * value: lambda表达式,最终会获取发送工作通知的函数 |
|
|
|
// */ |
|
|
|
//@PostConstruct |
|
|
|
//public void workNoticeFlowFunctionInit(){ |
|
|
|
// // 待审核 |
|
|
|
// workNoticeFlowFunctionMap.put(MsgTypeEnum.AUDIT.getCode(), |
|
|
|
// workNoticeInfos-> SendWorkNoticeUtil.sendWorkNotice(workNoticeInfos)); |
|
|
|
// |
|
|
|
// // 审核通过 |
|
|
|
// workNoticeFlowFunctionMap.put(MsgTypeEnum.PASS.getCode(), |
|
|
|
// workNoticeInfos-> SendWorkNoticeUtil.sendWorkNotice(workNoticeInfos)); |
|
|
|
// |
|
|
|
// // 被驳回 |
|
|
|
// workNoticeFlowFunctionMap.put(MsgTypeEnum.REJECTED.getCode(), |
|
|
|
// workNoticeInfos-> SendWorkNoticeUtil.sendWorkNotice(workNoticeInfos)); |
|
|
|
// |
|
|
|
// // 被退回 |
|
|
|
// workNoticeFlowFunctionMap.put(MsgTypeEnum.BACKED.getCode(), |
|
|
|
// workNoticeInfos-> SendWorkNoticeUtil.sendWorkNotice(workNoticeInfos)); |
|
|
|
// |
|
|
|
// // 被驳回 |
|
|
|
// workNoticeFlowFunctionMap.put(MsgTypeEnum.REJECTED.getCode(), |
|
|
|
// workNoticeInfos-> SendWorkNoticeUtil.sendWorkNotice(workNoticeInfos)); |
|
|
|
// |
|
|
|
//} |
|
|
|
|
|
|
|
/** |
|
|
|
* 扫描的间隔越来越长 秒数 |
|
|
|
*/ |
|
|
|