feat: 复审流程找到的联络人和标准化工程师是否有效判断
This commit is contained in:
+23
-6
@@ -6,21 +6,21 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.modules.laws.system.entity.LawsContactManage;
|
import com.jero.modules.laws.system.entity.LawsContactManage;
|
||||||
import com.jero.modules.laws.system.mapper.LawsContactManageMapper;
|
import com.jero.modules.laws.system.mapper.LawsContactManageMapper;
|
||||||
import com.jero.modules.laws.system.service.ILawsContactManageService;
|
import com.jero.modules.laws.system.service.ILawsContactManageService;
|
||||||
|
import com.jero.modules.system.entity.SysUser;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@@ -30,6 +30,7 @@ import java.util.stream.Collectors;
|
|||||||
* @Date: 2023-10-13
|
* @Date: 2023-10-13
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@Transactional(rollbackFor = JeroBootException.class)
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
public class LawsContactManageServiceImpl extends ServiceImpl<LawsContactManageMapper, LawsContactManage> implements ILawsContactManageService {
|
public class LawsContactManageServiceImpl extends ServiceImpl<LawsContactManageMapper, LawsContactManage> implements ILawsContactManageService {
|
||||||
@@ -134,7 +135,15 @@ public class LawsContactManageServiceImpl extends ServiceImpl<LawsContactManageM
|
|||||||
if (list == null || list.isEmpty()) {
|
if (list == null || list.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return list.get(0).getContactId();
|
String contactUserId = list.get(0).getContactId();
|
||||||
|
SysUser user = sysUserService.getById(contactUserId);
|
||||||
|
// 判断用户是否有效
|
||||||
|
if (user == null) {
|
||||||
|
log.info("部门{}的联络人{}已经被删除", deptId, contactUserId);
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return contactUserId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +155,15 @@ public class LawsContactManageServiceImpl extends ServiceImpl<LawsContactManageM
|
|||||||
if (list == null || list.isEmpty()) {
|
if (list == null || list.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return list.get(0).getEngineerId();
|
String engineerId = list.get(0).getEngineerId();
|
||||||
|
SysUser user = sysUserService.getById(engineerId);
|
||||||
|
// 判断用户是否有效
|
||||||
|
if (user == null) {
|
||||||
|
log.info("部门{}的联络人{}已经被删除", deptId, engineerId);
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return engineerId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user