|
|
@ -1,7 +1,6 @@ |
|
|
package com.zdxt.app.controller; |
|
|
package com.zdxt.app.controller; |
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
import com.zdxt.common.util.CommonUtil; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
|
|
|
import com.zdxt.auth.dto.DeptBean; |
|
|
import com.zdxt.auth.dto.DeptBean; |
|
|
import com.zdxt.auth.dto.DictDataBean; |
|
|
import com.zdxt.auth.dto.DictDataBean; |
|
|
import com.zdxt.auth.dto.UserBean; |
|
|
import com.zdxt.auth.dto.UserBean; |
|
|
@ -9,26 +8,22 @@ import com.zdxt.auth.feign.DeptApi; |
|
|
import com.zdxt.auth.feign.DictDataApi; |
|
|
import com.zdxt.auth.feign.DictDataApi; |
|
|
import com.zdxt.auth.feign.UserApi; |
|
|
import com.zdxt.auth.feign.UserApi; |
|
|
import com.zdxt.auth.project.system.user.service.IUserService; |
|
|
import com.zdxt.auth.project.system.user.service.IUserService; |
|
|
import com.zdxt.auth.project.system.user.service.UserServiceImpl; |
|
|
|
|
|
import com.zdxt.code.domain.*; |
|
|
import com.zdxt.code.domain.*; |
|
|
import com.zdxt.code.service.*; |
|
|
import com.zdxt.code.service.*; |
|
|
import com.zdxt.common.ZDResponse; |
|
|
import com.zdxt.common.ZDResponse; |
|
|
import com.zdxt.common.controller.BaseController; |
|
|
import com.zdxt.common.controller.BaseController; |
|
|
import com.zdxt.common.util.*; |
|
|
import com.zdxt.common.util.*; |
|
|
import com.zdxt.domain.auth.User; |
|
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Controller; |
|
|
import org.springframework.stereotype.Controller; |
|
|
import org.springframework.ui.ModelMap; |
|
|
import org.springframework.ui.ModelMap; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
|
import java.time.Instant; |
|
|
import java.time.Instant; |
|
|
import java.time.LocalDate; |
|
|
import java.time.LocalDate; |
|
|
import java.time.ZoneId; |
|
|
import java.time.ZoneId; |
|
|
import java.time.temporal.ChronoUnit; |
|
|
import java.time.temporal.ChronoUnit; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -159,12 +154,15 @@ public class AppEnforcementRegistrationController extends BaseController |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 执法人员1需要展示用户名+执法码
|
|
|
// 执法人员1需要展示用户名+执法码 没有执法码展示加密手机号
|
|
|
UserBean userBean = userApi.getUserByUserId(ee.getLawEnforcerId()); |
|
|
UserBean userBean = userApi.getUserByUserId(ee.getLawEnforcerId()); |
|
|
String lawCN = StringUtils.isEmpty(userBean.getLawCertificateNum())?"":userBean.getLawCertificateNum(); |
|
|
String lawCN =userBean.getUserName() +" "+userBean.getLawCertificateNum(); |
|
|
ee.setLawEnforcer(userBean.getUserName() +" "+ lawCN); |
|
|
if(StringUtils.isEmpty(userBean.getLawCertificateNum())){ |
|
|
|
|
|
lawCN=userBean.getUserName() +" "+ CommonUtil.encryptPhone(userBean.getPhonenumber()); |
|
|
|
|
|
} |
|
|
|
|
|
ee.setLawEnforcer(lawCN); |
|
|
|
|
|
|
|
|
// 执法人员2需要展示用户名+执法码
|
|
|
// 执法人员2需要展示用户名+执法码 没有执法码展示加密手机号
|
|
|
List<String> lawTwoList = new ArrayList<>(); |
|
|
List<String> lawTwoList = new ArrayList<>(); |
|
|
List<UserBean> userBeans = new ArrayList<>(); |
|
|
List<UserBean> userBeans = new ArrayList<>(); |
|
|
if (StringUtils.isNotEmpty(ee.getLawEnforcerIdTwo())) { |
|
|
if (StringUtils.isNotEmpty(ee.getLawEnforcerIdTwo())) { |
|
|
@ -172,9 +170,11 @@ public class AppEnforcementRegistrationController extends BaseController |
|
|
} |
|
|
} |
|
|
// String tmpUserShow = "";
|
|
|
// String tmpUserShow = "";
|
|
|
for (UserBean ub : userBeans) { |
|
|
for (UserBean ub : userBeans) { |
|
|
String lawCertificateNum = StringUtils.isEmpty(ub.getLawCertificateNum())?"":ub.getLawCertificateNum(); |
|
|
String temp=ub.getUserName() +" "+ub.getLawCertificateNum(); |
|
|
// tmpUserShow += ub.getUserName() +" "+ lawCertificateNum + ",";
|
|
|
if(StringUtils.isEmpty(ub.getLawCertificateNum())){ |
|
|
lawTwoList.add(ub.getUserName() +" "+ lawCertificateNum); |
|
|
temp=ub.getUserName() +" "+ CommonUtil.encryptPhone(ub.getPhonenumber()); |
|
|
|
|
|
} |
|
|
|
|
|
lawTwoList.add(temp); |
|
|
} |
|
|
} |
|
|
// if (tmpUserShow.length() > 0) {
|
|
|
// if (tmpUserShow.length() > 0) {
|
|
|
// tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1);
|
|
|
// tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1);
|
|
|
@ -538,8 +538,11 @@ public class AppEnforcementRegistrationController extends BaseController |
|
|
|
|
|
|
|
|
// 执法人员1需要展示用户名+执法码
|
|
|
// 执法人员1需要展示用户名+执法码
|
|
|
UserBean userBean = userApi.getUserByUserId(enforcementRegistration.getLawEnforcerId()); |
|
|
UserBean userBean = userApi.getUserByUserId(enforcementRegistration.getLawEnforcerId()); |
|
|
String lawCN = StringUtils.isEmpty(userBean.getLawCertificateNum())?"":userBean.getLawCertificateNum(); |
|
|
String lawCN = userBean.getUserName() +" "+userBean.getLawCertificateNum(); |
|
|
enforcementRegistration.setLawEnforcer(userBean.getUserName() +" "+ lawCN); |
|
|
if(StringUtils.isEmpty(userBean.getLawCertificateNum())){ |
|
|
|
|
|
lawCN= userBean.getUserName() +" "+CommonUtil.encryptPhone(userBean.getPhonenumber()); |
|
|
|
|
|
} |
|
|
|
|
|
enforcementRegistration.setLawEnforcer(lawCN); |
|
|
|
|
|
|
|
|
// 执法人员2需要展示用户名+执法码
|
|
|
// 执法人员2需要展示用户名+执法码
|
|
|
List<UserBean> userBeans = new ArrayList<>(); |
|
|
List<UserBean> userBeans = new ArrayList<>(); |
|
|
@ -548,8 +551,12 @@ public class AppEnforcementRegistrationController extends BaseController |
|
|
} |
|
|
} |
|
|
String tmpUserShow = ""; |
|
|
String tmpUserShow = ""; |
|
|
for (UserBean ub : userBeans) { |
|
|
for (UserBean ub : userBeans) { |
|
|
String lawCertificateNum = StringUtils.isEmpty(ub.getLawCertificateNum())?"":ub.getLawCertificateNum(); |
|
|
String temp = ub.getLawCertificateNum(); |
|
|
tmpUserShow += ub.getUserName() +" "+ lawCertificateNum + ","; |
|
|
if(StringUtils.isEmpty(temp)){ |
|
|
|
|
|
temp=CommonUtil.encryptPhone(ub.getPhonenumber()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tmpUserShow += ub.getUserName() +" "+ temp + ","; |
|
|
} |
|
|
} |
|
|
if (tmpUserShow.length() > 0) { |
|
|
if (tmpUserShow.length() > 0) { |
|
|
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1); |
|
|
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1); |
|
|
@ -622,20 +629,26 @@ public class AppEnforcementRegistrationController extends BaseController |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (EnforcementRegistration reg : regResults) { |
|
|
for (EnforcementRegistration reg : regResults) { |
|
|
// 执法人员1需要展示用户名+执法码
|
|
|
// 执法人员1需要展示用户名+执法码 没有执法码展示加密手机号
|
|
|
UserBean userBean = userApi.getUserByUserId(reg.getLawEnforcerId()); |
|
|
UserBean userBean = userApi.getUserByUserId(reg.getLawEnforcerId()); |
|
|
String lawCN = StringUtils.isEmpty(userBean.getLawCertificateNum())?"":userBean.getLawCertificateNum(); |
|
|
String lawCN = userBean.getUserName() +" "+userBean.getLawCertificateNum(); |
|
|
reg.setLawEnforcer(userBean.getUserName() +" "+ lawCN); |
|
|
if(StringUtils.isEmpty(userBean.getLawCertificateNum())){ |
|
|
|
|
|
lawCN=userBean.getUserName() +" "+ CommonUtil.encryptPhone(userBean.getPhonenumber()); |
|
|
|
|
|
} |
|
|
|
|
|
reg.setLawEnforcer(lawCN); |
|
|
|
|
|
|
|
|
// 执法人员2需要展示用户名+执法码
|
|
|
// 执法人员2需要展示用户名+执法码 没有执法码展示加密手机号
|
|
|
List<UserBean> userBeans = new ArrayList<>(); |
|
|
List<UserBean> userBeans = new ArrayList<>(); |
|
|
if (StringUtils.isNotEmpty(reg.getLawEnforcerIdTwo())) { |
|
|
if (StringUtils.isNotEmpty(reg.getLawEnforcerIdTwo())) { |
|
|
userBeans = userApi.getUserByUserIds(reg.getLawEnforcerIdTwo()); |
|
|
userBeans = userApi.getUserByUserIds(reg.getLawEnforcerIdTwo()); |
|
|
} |
|
|
} |
|
|
String tmpUserShow = ""; |
|
|
String tmpUserShow = ""; |
|
|
for (UserBean ub : userBeans) { |
|
|
for (UserBean ub : userBeans) { |
|
|
String lawCertificateNum = StringUtils.isEmpty(ub.getLawCertificateNum())?"":ub.getLawCertificateNum(); |
|
|
String temp = ub.getLawCertificateNum(); |
|
|
tmpUserShow += ub.getUserName() +" "+ lawCertificateNum + ","; |
|
|
if(StringUtils.isEmpty(temp)){ |
|
|
|
|
|
temp= CommonUtil.encryptPhone(ub.getPhonenumber()); |
|
|
|
|
|
} |
|
|
|
|
|
tmpUserShow += ub.getUserName() +" "+ temp + ","; |
|
|
} |
|
|
} |
|
|
if (tmpUserShow.length() > 0) { |
|
|
if (tmpUserShow.length() > 0) { |
|
|
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1); |
|
|
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1); |
|
|
|