|
|
|
@ -15,6 +15,7 @@ import com.zdxt.enforcementcode.mapper.ZdxtFileMapper; |
|
|
|
import com.zdxt.enforcementcode.service.INonEnforcementRegistrationService; |
|
|
|
import jakarta.servlet.ServletOutputStream; |
|
|
|
import jakarta.servlet.http.HttpServletResponse; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.poi.hssf.usermodel.*; |
|
|
|
import org.apache.poi.ss.usermodel.*; |
|
|
|
import org.dromara.common.core.enums.FormatsType; |
|
|
|
@ -43,6 +44,7 @@ import java.util.stream.Collectors; |
|
|
|
* @author kylin |
|
|
|
* @date 2025-06-19 |
|
|
|
*/ |
|
|
|
@Slf4j |
|
|
|
@Service |
|
|
|
public class NonEnforcementRegistrationServiceImpl implements INonEnforcementRegistrationService |
|
|
|
{ |
|
|
|
@ -65,6 +67,7 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg |
|
|
|
if (nonReg != null && nonReg.getId() != null) { |
|
|
|
// 处理主执法人员信息
|
|
|
|
if (StringUtils.isNotEmpty(nonReg.getLawEnforcerId())) { |
|
|
|
try { |
|
|
|
SysUserVo user = sysUserMapper.selectUserById(Long.valueOf(nonReg.getLawEnforcerId())); |
|
|
|
if (user != null) { |
|
|
|
String temp = user.getLawCertificateNum(); |
|
|
|
@ -73,9 +76,13 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg |
|
|
|
} |
|
|
|
nonReg.setLawEnforcer(user.getUserName() + " " + temp); |
|
|
|
} |
|
|
|
} catch (NumberFormatException e) { |
|
|
|
log.warn("无效的执法人员ID: {}", nonReg.getLawEnforcerId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(nonReg.getLawEnforcerOther())){ |
|
|
|
try { |
|
|
|
List<SysUserVo> list = sysUserMapper.selectUserByIds(Convert.toStrArray(nonReg.getLawEnforcerIdOther())); |
|
|
|
if(list != null && list.size() != 0){ |
|
|
|
String tmpUserShow = ""; |
|
|
|
@ -93,6 +100,9 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg |
|
|
|
} |
|
|
|
nonReg.setLawEnforcerOther(tmpUserShow); |
|
|
|
} |
|
|
|
} catch (NumberFormatException e) { |
|
|
|
log.warn("无效的其他执法人员ID: {}", nonReg.getLawEnforcerIdOther()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
LambdaQueryWrapper<ZdxtFile> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
@ -252,6 +262,7 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg |
|
|
|
list.forEach(li -> { |
|
|
|
// 处理主执法人员信息
|
|
|
|
if (StringUtils.isNotEmpty(li.getLawEnforcerId())) { |
|
|
|
try { |
|
|
|
SysUserVo sysUserVo = sysUserMapper.selectUserById(Long.valueOf(li.getLawEnforcerId())); |
|
|
|
if (sysUserVo != null) { |
|
|
|
String lawCN = sysUserVo.getLawCertificateNum(); |
|
|
|
@ -262,11 +273,15 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg |
|
|
|
} else { |
|
|
|
li.setLawEnforcer(li.getLawEnforcer()); |
|
|
|
} |
|
|
|
} catch (NumberFormatException e) { |
|
|
|
log.warn("无效的执法人员ID: {}", li.getLawEnforcerId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 处理其他执法人员信息
|
|
|
|
List<String> lawTwoList = new ArrayList<>(); |
|
|
|
if (StringUtils.isNotEmpty(li.getLawEnforcerOther()) && StringUtils.isNotEmpty(li.getLawEnforcerIdOther())) { |
|
|
|
try { |
|
|
|
List<SysUserVo> userBeans = sysUserMapper.selectUserByIds(Convert.toStrArray(li.getLawEnforcerIdOther())); |
|
|
|
if (userBeans != null && !userBeans.isEmpty()) { |
|
|
|
userBeans.forEach(u -> { |
|
|
|
@ -280,6 +295,9 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg |
|
|
|
}); |
|
|
|
li.setLawEnforcerOtherList(lawTwoList); |
|
|
|
} |
|
|
|
} catch (NumberFormatException e) { |
|
|
|
log.warn("无效的其他执法人员ID: {}", li.getLawEnforcerIdOther()); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|