|
|
|
@ -179,12 +179,17 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { |
|
|
|
// 获取执法主体
|
|
|
|
user.setBureauDept(deptApi.iterationDeptParentToBureau(user.getDeptId())); |
|
|
|
// 判断是否执法人员
|
|
|
|
if(StrUtil.isNotEmpty(user.getCertificateNumber())){ |
|
|
|
user.setLawOfficer(this.checkIsLawOfficer(user.getCertificateNumber())); |
|
|
|
log.info("-----------> {} - 判断是否执法人员: {}", user.getUserId(), user.getLawOfficer()); |
|
|
|
log.info("-----------> {} - 执法证件号: {}", user.getUserName(), user.getLawCertificateNum()); |
|
|
|
if(StrUtil.isNotEmpty(user.getLawCertificateNum())){ |
|
|
|
// user.setLawOfficer(this.checkIsLawOfficer(user.getCertificateNumber()));
|
|
|
|
user.setLawOfficer(true); |
|
|
|
}else if (StrUtil.isNotEmpty(user.getCertificateNumber())){ // 没有身份证的话就用执法证去找下
|
|
|
|
List<Zfryjdm2405301> zfryjdm2405301s = xzjcjbxx025711Mapper.queryZFRYByzfcode(user.getLawCertificateNum()); |
|
|
|
if (zfryjdm2405301s.size() > 0) { |
|
|
|
String zfcode = this.checkIsLawOfficer2(user.getCertificateNumber()); |
|
|
|
if (zfcode.length() > 0) { |
|
|
|
UserBean tmpUser = new UserBean(); |
|
|
|
tmpUser.setUserId(user.getUserId()); |
|
|
|
tmpUser.setLawCertificateNum(zfcode); |
|
|
|
userApi.updateUser(tmpUser); |
|
|
|
user.setLawOfficer(true); |
|
|
|
} else { |
|
|
|
user.setLawOfficer(false); |
|
|
|
@ -454,6 +459,28 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { |
|
|
|
return Boolean.FALSE; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public String checkIsLawOfficer2(String userIdCard) { |
|
|
|
//证件号解密
|
|
|
|
String s = IdCardCryptoUtil.symmetricDecryptIdCard(srzSecretKey, userIdCard); |
|
|
|
log.error("----> 打印出身份证解密用盐: {}", srzSecretKey); |
|
|
|
System.out.println("======身份证解密========"); |
|
|
|
log.info(s); |
|
|
|
System.out.println("=============="); |
|
|
|
List<Zfryjdm2405301> zfryjdm2405301s = xzjcjbxx025711Mapper.queryZFRYByIdCard(s); |
|
|
|
System.out.println("======解密后查询========"); |
|
|
|
System.out.println(zfryjdm2405301s); |
|
|
|
System.out.println("=============="); |
|
|
|
if(zfryjdm2405301s.size() > 0 ){ |
|
|
|
if(BeanUtil.isNotEmpty(zfryjdm2405301s.get(0).getZfcode())){ |
|
|
|
return zfryjdm2405301s.get(0).getZfcode(); |
|
|
|
}else{ |
|
|
|
return ""; |
|
|
|
} |
|
|
|
} |
|
|
|
return ""; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public String getSjEnterpriseInfo(String url) { |
|
|
|
HttpClient httpClient = HttpClients.createDefault(); |
|
|
|
|