浏览代码

预警通知修改

tags/24082201
WendyYang 1年前
父节点
当前提交
52a00b8243
共有 4 个文件被更改,包括 57 次插入57 次删除
  1. +34
    -40
      hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertInfoServiceImpl.java
  2. +6
    -6
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingCallOrMsgHelper.java
  3. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/YxtClientHelper.java
  4. +16
    -10
      hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/EarlyWarningManage.java

+ 34
- 40
hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertInfoServiceImpl.java 查看文件

@@ -24,7 +24,7 @@ import com.hz.pm.api.expert.model.cmd.*;
import com.hz.pm.api.expert.model.dto.*; import com.hz.pm.api.expert.model.dto.*;
import com.hz.pm.api.expert.service.*; import com.hz.pm.api.expert.service.*;
import com.hz.pm.api.expert.utils.SensitiveModifySegmentUtils; import com.hz.pm.api.expert.utils.SensitiveModifySegmentUtils;
import com.hz.pm.api.meeting.helper.YxtCallOrSmsHelper;
import com.hz.pm.api.meeting.helper.YxtClientHelper;
import com.hz.pm.api.meta.constant.ExpertDictTypeEnum; import com.hz.pm.api.meta.constant.ExpertDictTypeEnum;
import com.hz.pm.api.meta.model.ExpertRegionInfo; import com.hz.pm.api.meta.model.ExpertRegionInfo;
import com.hz.pm.api.meta.model.entity.ExpertDictionary; import com.hz.pm.api.meta.model.entity.ExpertDictionary;
@@ -78,7 +78,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
private final IUserRoleService userRoleService; private final IUserRoleService userRoleService;
private final IExpertSensitiveInfoModifyDetailRecordService iExpertSensitiveInfoModifyDetailRecordService; private final IExpertSensitiveInfoModifyDetailRecordService iExpertSensitiveInfoModifyDetailRecordService;
private final IUserInfoService userInfoService; private final IUserInfoService userInfoService;
private final YxtCallOrSmsHelper yxtCallOrSmsHelper;
private final YxtClientHelper yxtClientHelper;
private final IExpertGovBusinessStripService expertGovBusinessStripService; private final IExpertGovBusinessStripService expertGovBusinessStripService;


@Value("${login.url:}") @Value("${login.url:}")
@@ -101,7 +101,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {


ExpertUserFullInfo expertUserFullInfo = iExpertUserFullInfoService.getByUserId(userId); ExpertUserFullInfo expertUserFullInfo = iExpertUserFullInfoService.getByUserId(userId);


ExpertUserFullInfo saveExpertUserFullInfo = buildSaveExpertUserFullInfo(expertUserInfoDTO);
ExpertUserFullInfo saveExpertUserFullInfo = buildExpertUserFullInfo(expertUserInfoDTO);
if (Objects.nonNull(expertUserFullInfo)) { if (Objects.nonNull(expertUserFullInfo)) {
// 专家信息审核通过之前,所有信息无需备份 // 专家信息审核通过之前,所有信息无需备份
iExpertUserFullInfoService.removeById(expertUserFullInfo.getId()); iExpertUserFullInfoService.removeById(expertUserFullInfo.getId());
@@ -129,7 +129,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
iExpertTagService.saveBatch(saveExpertTagList); iExpertTagService.saveBatch(saveExpertTagList);
} }
// 保存所有专家字典字段 // 保存所有专家字典字段
List<ExpertDictionary> saveExpertDictionaryList = buildSaveExpertDictionaryList(userId, expertDictionaryList);
List<ExpertDictionary> saveExpertDictionaryList = buildExpertDicts(userId, expertDictionaryList);
if (CollectionUtils.isNotEmpty(saveExpertDictionaryList)) { if (CollectionUtils.isNotEmpty(saveExpertDictionaryList)) {
iExpertDictionaryService.saveBatch(saveExpertDictionaryList); iExpertDictionaryService.saveBatch(saveExpertDictionaryList);
} }
@@ -141,14 +141,14 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
iExpertMetaApplyService.saveBatch(saveExpertIntentionWorkRegionApplyList); iExpertMetaApplyService.saveBatch(saveExpertIntentionWorkRegionApplyList);
} }
// 保存所有专家回避单位 // 保存所有专家回避单位
List<ExpertAvoidCompany> saveExpertAvoidCompanyList = buildSaveExpertAvoidCompanyList(userId, expertAvoidCompanyList);
List<ExpertAvoidCompany> saveExpertAvoidCompanyList = buildExpertAvoidCompany(userId, expertAvoidCompanyList);
if (CollectionUtils.isNotEmpty(saveExpertAvoidCompanyList)) { if (CollectionUtils.isNotEmpty(saveExpertAvoidCompanyList)) {
iExpertAvoidCompanyService.saveBatch(saveExpertAvoidCompanyList); iExpertAvoidCompanyService.saveBatch(saveExpertAvoidCompanyList);
} }
} }




private ExpertUserFullInfo buildSaveExpertUserFullInfo(ExpertUserFullInfoDTO expertUserInfoDTO) {
private ExpertUserFullInfo buildExpertUserFullInfo(ExpertUserFullInfoDTO expertUserInfoDTO) {
ExpertUserFullInfo expertUserFullInfo = new ExpertUserFullInfo(); ExpertUserFullInfo expertUserFullInfo = new ExpertUserFullInfo();
if (Objects.nonNull(expertUserInfoDTO.getIsDingUser())) { if (Objects.nonNull(expertUserInfoDTO.getIsDingUser())) {
expertUserFullInfo.setIsDingUser(expertUserInfoDTO.getIsDingUser()); expertUserFullInfo.setIsDingUser(expertUserInfoDTO.getIsDingUser());
@@ -197,33 +197,35 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }


private List<ExpertDictionary> buildSaveExpertDictionaryList(Long userId, List<ExpertDictionaryDTO> expertDictionaryList) {
if (CollectionUtils.isEmpty(expertDictionaryList)) {
return new ArrayList<>();
}
return expertDictionaryList.stream().map(r -> {
ExpertDictionary expertDictionary = new ExpertDictionary();
expertDictionary.setUserId(userId);
expertDictionary.setExpertInfoField(r.getExpertInfoField());
expertDictionary.setDictionaryCode(r.getDictionaryCode());
expertDictionary.setUpdateOn(LocalDateTime.now());
expertDictionary.setCreateOn(LocalDateTime.now());
return expertDictionary;
private List<ExpertDictionary> buildExpertDicts(Long userId, List<ExpertDictionaryDTO> exertDicts) {
if (CollectionUtils.isEmpty(exertDicts)) {
return Collections.emptyList();
}
LocalDateTime now = LocalDateTime.now();
return exertDicts.stream().map(r -> {
ExpertDictionary expertDict = new ExpertDictionary();
expertDict.setUserId(userId);
expertDict.setExpertInfoField(r.getExpertInfoField());
expertDict.setDictionaryCode(r.getDictionaryCode());
expertDict.setUpdateOn(now);
expertDict.setCreateOn(now);
return expertDict;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }




private List<ExpertAvoidCompany> buildSaveExpertAvoidCompanyList(Long userId, List<ExpertAvoidCompanyDTO> expertAvoidCompanyList) {
if (CollectionUtils.isEmpty(expertAvoidCompanyList)) {
return new ArrayList<>();
private List<ExpertAvoidCompany> buildExpertAvoidCompany(Long userId, List<ExpertAvoidCompanyDTO> avoidCompanies) {
if (CollectionUtils.isEmpty(avoidCompanies)) {
return Collections.emptyList();
} }
return expertAvoidCompanyList.stream().map(r -> {
LocalDateTime now = LocalDateTime.now();
return avoidCompanies.stream().map(r -> {
ExpertAvoidCompany expertAvoidCompany = new ExpertAvoidCompany(); ExpertAvoidCompany expertAvoidCompany = new ExpertAvoidCompany();
expertAvoidCompany.setCompanyName(r.getCompanyName()); expertAvoidCompany.setCompanyName(r.getCompanyName());
expertAvoidCompany.setUserId(userId); expertAvoidCompany.setUserId(userId);
expertAvoidCompany.setCompanyUniqCode(r.getCompanyUniqCode()); expertAvoidCompany.setCompanyUniqCode(r.getCompanyUniqCode());
expertAvoidCompany.setCreateOn(LocalDateTime.now());
expertAvoidCompany.setUpdateOn(LocalDateTime.now());
expertAvoidCompany.setCreateOn(now);
expertAvoidCompany.setUpdateOn(now);
return expertAvoidCompany; return expertAvoidCompany;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
@@ -239,15 +241,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {


List<ExpertDictionaryDTO> recommendedWayList = cmd.getRecommendedWay(); List<ExpertDictionaryDTO> recommendedWayList = cmd.getRecommendedWay();
if (CollectionUtils.isNotEmpty(recommendedWayList)) { if (CollectionUtils.isNotEmpty(recommendedWayList)) {
List<ExpertDictionary> saveExpertDictionaryList = recommendedWayList.stream().map(r -> {
ExpertDictionary expertDictionary = new ExpertDictionary();
expertDictionary.setUserId(userId);
expertDictionary.setExpertInfoField(r.getExpertInfoField());
expertDictionary.setDictionaryCode(r.getDictionaryCode());
expertDictionary.setUpdateOn(LocalDateTime.now());
expertDictionary.setCreateOn(LocalDateTime.now());
return expertDictionary;
}).collect(Collectors.toList());
List<ExpertDictionary> saveExpertDictionaryList = buildExpertDicts(userId, recommendedWayList);
iExpertDictionaryService.saveBatch(saveExpertDictionaryList); iExpertDictionaryService.saveBatch(saveExpertDictionaryList);
} }


@@ -325,7 +319,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
Integer expertRegionLevel = cmd.getExpertRegionLevel(); Integer expertRegionLevel = cmd.getExpertRegionLevel();
Long expertUserId = cmd.getExpertUserId(); Long expertUserId = cmd.getExpertUserId();


if (applyResult) {
if (Boolean.TRUE.equals(applyResult)) {
switch (applyTypeEnum) { switch (applyTypeEnum) {
case EXPERT_INTENTION_JOIN: { case EXPERT_INTENTION_JOIN: {
// 新增履职意向地 // 新增履职意向地
@@ -372,7 +366,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
ExpertUserFullInfo expertInfo = iExpertUserFullInfoService.getByUserId(expertUserId); ExpertUserFullInfo expertInfo = iExpertUserFullInfoService.getByUserId(expertUserId);
UserInfoDetails userDetail = LoginUserUtil.loginUserDetail(); UserInfoDetails userDetail = LoginUserUtil.loginUserDetail();
String content; String content;
if (cmd.getApplyResult()) {
if (Boolean.TRUE.equals(cmd.getApplyResult())) {
// 修改专家状态为可用 // 修改专家状态为可用
// 账号启用 // 账号启用
LambdaUpdateWrapper<UserInfo> userInfoUpdate = Wrappers.lambdaUpdate(UserInfo.class) LambdaUpdateWrapper<UserInfo> userInfoUpdate = Wrappers.lambdaUpdate(UserInfo.class)
@@ -387,7 +381,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
List<ExpertDictionaryDTO> expertType = cmd.getExpertType(); List<ExpertDictionaryDTO> expertType = cmd.getExpertType();
if (CollUtil.isNotEmpty(expertType)) { if (CollUtil.isNotEmpty(expertType)) {
expertType.forEach(r -> r.setExpertInfoField(ExpertDictTypeEnum.EXPERT_TYPE.getKey())); expertType.forEach(r -> r.setExpertInfoField(ExpertDictTypeEnum.EXPERT_TYPE.getKey()));
List<ExpertDictionary> saveExpertDictList = buildSaveExpertDictionaryList(expertUserId, expertType);
List<ExpertDictionary> saveExpertDictList = buildExpertDicts(expertUserId, expertType);
iExpertDictionaryService.saveBatch(saveExpertDictList); iExpertDictionaryService.saveBatch(saveExpertDictList);
} }
// 补充专家 专家角色 // 补充专家 专家角色
@@ -410,7 +404,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
SendSmsContext smsCtx = new SendSmsContext(); SendSmsContext smsCtx = new SendSmsContext();
smsCtx.setContent(content); smsCtx.setContent(content);
smsCtx.setReceiveNumber(expertInfo.getPhoneNo()); smsCtx.setReceiveNumber(expertInfo.getPhoneNo());
yxtCallOrSmsHelper.sendSms(smsCtx);
yxtClientHelper.sendSms(smsCtx);
} }
} }


@@ -464,7 +458,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
List<Long> applyIdList = new ArrayList<>(); List<Long> applyIdList = new ArrayList<>();


ExpertUserFullInfo originalExpertUserFullInfo = iExpertUserFullInfoService.getByUserId(userId); ExpertUserFullInfo originalExpertUserFullInfo = iExpertUserFullInfoService.getByUserId(userId);
ExpertUserFullInfo saveExpertUserFullInfo = buildSaveExpertUserFullInfo(expertUserInfoDTO);
ExpertUserFullInfo saveExpertUserFullInfo = buildExpertUserFullInfo(expertUserInfoDTO);
if (Objects.nonNull(originalExpertUserFullInfo)) { if (Objects.nonNull(originalExpertUserFullInfo)) {
saveExpertUserFullInfo.setId(originalExpertUserFullInfo.getId()); saveExpertUserFullInfo.setId(originalExpertUserFullInfo.getId());
// 删除所有专家字典字段(需审核敏感字段不删除) // 删除所有专家字典字段(需审核敏感字段不删除)
@@ -497,7 +491,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
iExpertUserFullInfoService.saveOrUpdate(saveExpertUserFullInfo); iExpertUserFullInfoService.saveOrUpdate(saveExpertUserFullInfo);


// 保存所有专家字典字段 // 保存所有专家字典字段
List<ExpertDictionary> saveExpertDictionaryList = buildSaveExpertDictionaryList(userId, expertDictionaryList);
List<ExpertDictionary> saveExpertDictionaryList = buildExpertDicts(userId, expertDictionaryList);
saveExpertDictionaryList = saveExpertDictionaryList saveExpertDictionaryList = saveExpertDictionaryList
.stream().filter(r -> !ExpertUserInfoSensitiveFieldEnum.getSensitiveDictionaryList().contains(r.getExpertInfoField())) .stream().filter(r -> !ExpertUserInfoSensitiveFieldEnum.getSensitiveDictionaryList().contains(r.getExpertInfoField()))
.collect(Collectors.toList()); .collect(Collectors.toList());
@@ -506,7 +500,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
} }


// 保存所有专家回避单位 // 保存所有专家回避单位
List<ExpertAvoidCompany> saveExpertAvoidCompanyList = buildSaveExpertAvoidCompanyList(userId, expertAvoidCompanyList);
List<ExpertAvoidCompany> saveExpertAvoidCompanyList = buildExpertAvoidCompany(userId, expertAvoidCompanyList);
if (CollectionUtils.isNotEmpty(saveExpertAvoidCompanyList)) { if (CollectionUtils.isNotEmpty(saveExpertAvoidCompanyList)) {
// 删除回避单位 // 删除回避单位
LambdaQueryWrapper<ExpertAvoidCompany> expertAvoidCompanyRemove = Wrappers.lambdaQuery(ExpertAvoidCompany.class) LambdaQueryWrapper<ExpertAvoidCompany> expertAvoidCompanyRemove = Wrappers.lambdaQuery(ExpertAvoidCompany.class)


+ 6
- 6
hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingCallOrMsgHelper.java 查看文件

@@ -48,7 +48,7 @@ import java.util.stream.Collectors;
public class MeetingCallOrMsgHelper { public class MeetingCallOrMsgHelper {


private final IUserInfoService userInfoService; private final IUserInfoService userInfoService;
private final YxtCallOrSmsHelper yxtCallOrSmsHelper;
private final YxtClientHelper yxtClientHelper;
private final INdWorkNoticeStagingService workNoticeStagingService; private final INdWorkNoticeStagingService workNoticeStagingService;
private final IDingEmployeeInfoService dingEmployeeInfoService; private final IDingEmployeeInfoService dingEmployeeInfoService;
private final IDingOrganizationService dingOrganizationService; private final IDingOrganizationService dingOrganizationService;
@@ -102,7 +102,7 @@ public class MeetingCallOrMsgHelper {
SendSmsContext yxtContent = new SendSmsContext(); SendSmsContext yxtContent = new SendSmsContext();
yxtContent.setContent(msgContent); yxtContent.setContent(msgContent);
yxtContent.setReceiveNumber(info.getMobile()); yxtContent.setReceiveNumber(info.getMobile());
yxtCallOrSmsHelper.sendSms(yxtContent);
yxtClientHelper.sendSms(yxtContent);
// 发送工作通知 // 发送工作通知
if (info.getAccountId() != null) { if (info.getAccountId() != null) {
WorkNoticeInfo swn = getSendWorkNoticeInfo(info.getAccountId()); WorkNoticeInfo swn = getSendWorkNoticeInfo(info.getAccountId());
@@ -148,7 +148,7 @@ public class MeetingCallOrMsgHelper {
} }
}); });
notifyService.saveBatch(notifies); notifyService.saveBatch(notifies);
yxtCallOrSmsHelper.sendSms(yxtContents);
yxtClientHelper.sendSms(yxtContents);
workNoticeStagingService.addByWorkNotice(workingNotices, MsgTypeEnum.EXPERT_REVIEW); workNoticeStagingService.addByWorkNotice(workingNotices, MsgTypeEnum.EXPERT_REVIEW);
} }


@@ -164,7 +164,7 @@ public class MeetingCallOrMsgHelper {
context.setContent(content); context.setContent(content);
return context; return context;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
yxtCallOrSmsHelper.sendSms(contexts);
yxtClientHelper.sendSms(contexts);
} }


/** /**
@@ -184,7 +184,7 @@ public class MeetingCallOrMsgHelper {
context.setReceiveNumber(w.getMobile()); context.setReceiveNumber(w.getMobile());
return context; return context;
}); });
String submitKey = yxtCallOrSmsHelper.submitCallTask(callContexts);
String submitKey = yxtClientHelper.submitCallTask(callContexts);
experts.forEach(w -> w.setSubmitKey(submitKey)); experts.forEach(w -> w.setSubmitKey(submitKey));
} }


@@ -200,7 +200,7 @@ public class MeetingCallOrMsgHelper {
SendSmsContext yxtContent = new SendSmsContext(); SendSmsContext yxtContent = new SendSmsContext();
yxtContent.setContent(msgContent); yxtContent.setContent(msgContent);
yxtContent.setReceiveNumber(info.getMobile()); yxtContent.setReceiveNumber(info.getMobile());
yxtCallOrSmsHelper.sendSms(yxtContent);
yxtClientHelper.sendSms(yxtContent);
// 发送工作通知 // 发送工作通知
if (info.getAccountId() != null) { if (info.getAccountId() != null) {
WorkNoticeInfo swn = getSendWorkNoticeInfo(info.getAccountId()); WorkNoticeInfo swn = getSendWorkNoticeInfo(info.getAccountId());


hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/YxtCallOrSmsHelper.java → hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/YxtClientHelper.java 查看文件

@@ -24,7 +24,7 @@ import static com.ningdatech.yxt.model.cmd.SubmitTaskCallCmd.of;
*/ */
@Component @Component
@AllArgsConstructor @AllArgsConstructor
public class YxtCallOrSmsHelper {
public class YxtClientHelper {


private final YxtClient yxtClient; private final YxtClient yxtClient;



+ 16
- 10
hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/EarlyWarningManage.java 查看文件

@@ -2,7 +2,7 @@ package com.hz.pm.api.sys.manage;


import com.hz.pm.api.common.enumeration.CommonEnum; import com.hz.pm.api.common.enumeration.CommonEnum;
import com.hz.pm.api.common.helper.UserInfoHelper; import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.meeting.helper.YxtCallOrSmsHelper;
import com.hz.pm.api.meeting.helper.YxtClientHelper;
import com.hz.pm.api.projectlib.model.entity.Project; import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum;
import com.hz.pm.api.projectlib.model.enumeration.WarningFlowTypeEnum; import com.hz.pm.api.projectlib.model.enumeration.WarningFlowTypeEnum;
@@ -20,6 +20,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;


import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Objects; import java.util.Objects;
@@ -41,7 +42,7 @@ public class EarlyWarningManage {


private final IEarlyWarningRecordsService earlyWarningRecordsService; private final IEarlyWarningRecordsService earlyWarningRecordsService;


private final YxtCallOrSmsHelper yxtCallOrSmsHelper;
private final YxtClientHelper yxtClientHelper;


private final INotifyService notifyService; private final INotifyService notifyService;


@@ -152,30 +153,32 @@ public class EarlyWarningManage {
SendSmsContext context = new SendSmsContext(); SendSmsContext context = new SendSmsContext();
context.setReceiveNumber(user.getMobile()); context.setReceiveNumber(user.getMobile());
context.setContent(content); context.setContent(content);
yxtCallOrSmsHelper.sendSms(context);
yxtClientHelper.sendSms(context);
} }
} }


/** /**
* 催办 * 催办
* *
* @param noticeMethod
* @param noticeContent
* @param adventTimeout
* @param userId
* @param project
* @param noticeMethod \
* @param noticeContent \
* @param adventTimeout \
* @param userId \
* @param project \
*/ */
@Transactional(rollbackFor = Exception.class)
public void urging(String noticeMethod, String noticeContent, Integer adventTimeout, Integer overTimeout, public void urging(String noticeMethod, String noticeContent, Integer adventTimeout, Integer overTimeout,
Integer biz, LocalDateTime startTime, Long userId, Integer biz, LocalDateTime startTime, Long userId,
Project project, Integer ruleType, Integer noticeType, Project project, Integer ruleType, Integer noticeType,
String path, String batchEmployees, String nodeId) { String path, String batchEmployees, String nodeId) {
//1.存入 预警记录 //1.存入 预警记录
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(userId); UserFullInfoDTO user = userInfoHelper.getUserFullInfo(userId);
WflowEarlyWarningRecords records = new WflowEarlyWarningRecords();
WflowEarlyWarningRecords records;
String content; String content;


switch (WarningRuleTypeEnum.checkByCode(ruleType)) { switch (WarningRuleTypeEnum.checkByCode(ruleType)) {
case PROCESS_WARNING: case PROCESS_WARNING:
records = new WflowEarlyWarningRecords();
if (Objects.isNull(noticeType)) { if (Objects.isNull(noticeType)) {
content = convertContent(noticeContent, project.getProjectName(), content = convertContent(noticeContent, project.getProjectName(),
InstTypeEnum.getByCode(biz), overTimeout); InstTypeEnum.getByCode(biz), overTimeout);
@@ -189,6 +192,7 @@ public class EarlyWarningManage {
records.setRuleType(WarningRuleTypeEnum.PROCESS_WARNING.getCode()); records.setRuleType(WarningRuleTypeEnum.PROCESS_WARNING.getCode());
break; break;
case DECLARED_WARNING: case DECLARED_WARNING:
records = new WflowEarlyWarningRecords();
if (Objects.isNull(noticeType)) { if (Objects.isNull(noticeType)) {
content = convertContent(noticeContent, project.getProjectName(), content = convertContent(noticeContent, project.getProjectName(),
WarningFlowTypeEnum.getByCode(biz), overTimeout); WarningFlowTypeEnum.getByCode(biz), overTimeout);
@@ -202,6 +206,7 @@ public class EarlyWarningManage {
records.setRuleType(WarningRuleTypeEnum.DECLARED_WARNING.getCode()); records.setRuleType(WarningRuleTypeEnum.DECLARED_WARNING.getCode());
break; break;
case OPERATION_WARNING: case OPERATION_WARNING:
records = new WflowEarlyWarningRecords();
if (Objects.isNull(noticeType)) { if (Objects.isNull(noticeType)) {
content = convertContent(noticeContent, project.getProjectName(), content = convertContent(noticeContent, project.getProjectName(),
WarningOperationTypeEnum.getByCode(biz), overTimeout); WarningOperationTypeEnum.getByCode(biz), overTimeout);
@@ -215,6 +220,7 @@ public class EarlyWarningManage {
records.setRuleType(WarningRuleTypeEnum.OPERATION_WARNING.getCode()); records.setRuleType(WarningRuleTypeEnum.OPERATION_WARNING.getCode());
break; break;
case RENEWAL_FUND: case RENEWAL_FUND:
records = new WflowEarlyWarningRecords();
if (Objects.isNull(noticeType)) { if (Objects.isNull(noticeType)) {
content = convertContent(noticeContent, project.getProjectName(), overTimeout); content = convertContent(noticeContent, project.getProjectName(), overTimeout);
} else if (noticeType.equals(WarningNoticeTypeEnum.ADVENT.getCode())) { } else if (noticeType.equals(WarningNoticeTypeEnum.ADVENT.getCode())) {
@@ -262,7 +268,7 @@ public class EarlyWarningManage {
SendSmsContext context = new SendSmsContext(); SendSmsContext context = new SendSmsContext();
context.setReceiveNumber(user.getMobile()); context.setReceiveNumber(user.getMobile());
context.setContent(content); context.setContent(content);
yxtCallOrSmsHelper.sendSms(context);
yxtClientHelper.sendSms(context);
} }
} }




正在加载...
取消
保存