Browse Source

修改预警通知

tags/24080901
WendyYang 10 months ago
parent
commit
7d88ebd9cf
1 changed files with 6 additions and 9 deletions
  1. +6
    -9
      hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningInstanceNotStartTask.java

+ 6
- 9
hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningInstanceNotStartTask.java View File

@@ -11,7 +11,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.hz.pm.api.common.enumeration.CommonEnum;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.projectdeclared.model.entity.Contract;
import com.hz.pm.api.common.util.StrUtils;
import com.hz.pm.api.projectdeclared.model.entity.Operation;
import com.hz.pm.api.projectdeclared.service.IContractService;
import com.hz.pm.api.projectdeclared.service.IOperationService;
@@ -189,19 +189,16 @@ public class EarlyWarningInstanceNotStartTask {
}

for (Project needToWaringProject : needToWaringProjects) {
String username = null;
String mobile = null;
String username;
String mobile;
//去预警通知人 1.项目联系人 2.项目负责人 如果都包含 都要发
List<String> batchEmployees = Lists.newArrayList();
if (notice.contains(WarningNoticeTypeEnum.CONTACT.getCode().toString())) {
String employeeCode = null;
username = needToWaringProject.getContactName();
mobile = needToWaringProject.getContactPhone();
if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(mobile)) {
UserInfo user = userInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class)
.eq(UserInfo::getUsername, username)
.eq(UserInfo::getMobile, mobile)
.last(BizConst.LIMIT_1));
if (StrUtils.isAllNotBlank(username, mobile)) {
UserInfo user = userInfoService.getByUserNameAndMobile(username, mobile);
if (Objects.nonNull(user)) {
employeeCode = user.getEmployeeCode();
}
@@ -214,7 +211,7 @@ public class EarlyWarningInstanceNotStartTask {
String employeeCode = null;
username = needToWaringProject.getResponsibleMan();
mobile = needToWaringProject.getResponsibleManMobile();
if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(mobile)) {
if (StrUtils.isAllNotBlank(username, mobile)) {
UserInfo user = userInfoService.getByUserNameAndMobile(username, mobile);
if (Objects.nonNull(user)) {
employeeCode = user.getEmployeeCode();


Loading…
Cancel
Save