Browse Source

执法端-历史活查询明细判断空值

dev-V1.0.1
niujiyi 5 months ago
parent
commit
e898aba6f4
  1. 1
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppNonEnforcementRegistrationController.java
  2. 32
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/NonEnforcementRegistrationServiceImpl.java

1
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppNonEnforcementRegistrationController.java

@ -46,6 +46,7 @@ public class AppNonEnforcementRegistrationController extends BaseController {
/** /**
* 执法端-非行政查询执法登记列表 * 执法端-非行政查询执法登记列表
*/ */
@SaIgnore
@GetMapping("/queryById") @GetMapping("/queryById")
public R<NonEnforcementRegistrationVo> queryById(String id) public R<NonEnforcementRegistrationVo> queryById(String id)
{ {

32
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/NonEnforcementRegistrationServiceImpl.java

@ -63,25 +63,33 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg
{ {
NonEnforcementRegistrationVo nonReg = nonEnforcementRegistrationMapper.selectVoById(id); NonEnforcementRegistrationVo nonReg = nonEnforcementRegistrationMapper.selectVoById(id);
if (nonReg != null && nonReg.getId() != null) { if (nonReg != null && nonReg.getId() != null) {
SysUserVo user = sysUserMapper.selectUserById(Long.valueOf(nonReg.getLawEnforcerId())); // 处理主执法人员信息
String temp=user.getLawCertificateNum(); if (StringUtils.isNotEmpty(nonReg.getLawEnforcerId())) {
if(StringUtils.isEmpty(temp)){ SysUserVo user = sysUserMapper.selectUserById(Long.valueOf(nonReg.getLawEnforcerId()));
temp= CommonUtil.encryptPhone(user.getPhonenumber()); if (user != null) {
String temp = user.getLawCertificateNum();
if (StringUtils.isEmpty(temp)) {
temp = CommonUtil.encryptPhone(user.getPhonenumber());
}
nonReg.setLawEnforcer(user.getUserName() + " " + temp);
}
} }
nonReg.setLawEnforcer(user.getUserName()+" "+temp);
if(StringUtils.isNotEmpty(nonReg.getLawEnforcerOther())){ if(StringUtils.isNotEmpty(nonReg.getLawEnforcerOther())){
List<SysUserVo> list = sysUserMapper.selectUserByIds(Convert.toStrArray(nonReg.getLawEnforcerIdOther())); List<SysUserVo> list = sysUserMapper.selectUserByIds(Convert.toStrArray(nonReg.getLawEnforcerIdOther()));
if(list.size()!=0){ if(list != null && list.size() != 0){
String tmpUserShow = ""; String tmpUserShow = "";
for (SysUserVo ub : list) { for (SysUserVo ub : list) {
String t = ub.getLawCertificateNum(); if (ub != null) {
if(StringUtils.isEmpty(t)){ String t = ub.getLawCertificateNum();
t=CommonUtil.encryptPhone(ub.getPhonenumber()); if(StringUtils.isEmpty(t)){
t = CommonUtil.encryptPhone(ub.getPhonenumber());
}
tmpUserShow += ub.getUserName() + " " + t + ",";
} }
tmpUserShow += ub.getUserName() +" "+ t + ",";
} }
if (tmpUserShow.length() > 0) { if (tmpUserShow.length() > 0) {
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1); tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length() - 1);
} }
nonReg.setLawEnforcerOther(tmpUserShow); nonReg.setLawEnforcerOther(tmpUserShow);
} }
@ -89,7 +97,7 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg
LambdaQueryWrapper<ZdxtFile> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ZdxtFile> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ZdxtFile::getBusinessId, nonReg.getId()); queryWrapper.eq(ZdxtFile::getBusinessId, nonReg.getId());
List<ZdxtFile> zdxtFileCommons=zdxtFileMapper.selectList(queryWrapper); List<ZdxtFile> zdxtFileCommons = zdxtFileMapper.selectList(queryWrapper);
if (zdxtFileCommons.size() > 0) { if (zdxtFileCommons.size() > 0) {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("fileList", zdxtFileCommons); params.put("fileList", zdxtFileCommons);

Loading…
Cancel
Save