Commit 744ee557 authored by hongguangwu's avatar hongguangwu

MVP1.7.14-薪资人员导入校验优化

parent 952cf2e3
...@@ -354,6 +354,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -354,6 +354,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
, "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
bankMap = checkListR.getData().getCheckMap(); bankMap = checkListR.getData().getCheckMap();
} else {
errorList.add(new ErrorMessage((0), "【银行卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】!"));
} }
} }
Map<String, Boolean> phoneMap = new HashMap<>(); Map<String, Boolean> phoneMap = new HashMap<>();
...@@ -365,6 +367,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -365,6 +367,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
, "/tcheckmobile/inner/checkMobileBatch", phoneList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckmobile/inner/checkMobileBatch", phoneList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (phoneR != null && phoneR.getData() != null) { if (phoneR != null && phoneR.getData() != null) {
phoneMap = phoneR.getData().getCheckMap(); phoneMap = phoneR.getData().getCheckMap();
} else {
errorList.add(new ErrorMessage((0), "【手机号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】!"));
} }
List<TSalaryEmployee> empPhoneList = baseMapper.getListByPhone(phoneList); List<TSalaryEmployee> empPhoneList = baseMapper.getListByPhone(phoneList);
for (TSalaryEmployee e : empPhoneList) { for (TSalaryEmployee e : empPhoneList) {
...@@ -487,6 +491,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -487,6 +491,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
, "/tcheckmobile/inner/checkMobileBatch", phoneList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckmobile/inner/checkMobileBatch", phoneList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (phoneR != null && phoneR.getData() != null) { if (phoneR != null && phoneR.getData() != null) {
phoneMap = phoneR.getData().getCheckMap(); phoneMap = phoneR.getData().getCheckMap();
} else {
errorList.add(new ErrorMessage((0), "【手机号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
} }
List<TSalaryEmployee> empPhoneList = baseMapper.getListByPhone(phoneList); List<TSalaryEmployee> empPhoneList = baseMapper.getListByPhone(phoneList);
for (TSalaryEmployee e : empPhoneList) { for (TSalaryEmployee e : empPhoneList) {
...@@ -505,6 +511,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -505,6 +511,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
, "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
bankMap = checkListR.getData().getCheckMap(); bankMap = checkListR.getData().getCheckMap();
} else {
errorList.add(new ErrorMessage((0), "【银行卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
} }
} }
boolean isFalse = false; boolean isFalse = false;
...@@ -692,12 +700,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -692,12 +700,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
TCheckIdCard check = checkListR.getData(); TCheckIdCard check = checkListR.getData();
if (check == null || Common.isEmpty(check.getIsTrue())) { if (check == null || Common.isEmpty(check.getIsTrue())) {
return pre + "校验服务器未返回,请联系管理员!"; return pre + SalaryConstants.CHECK_NO_RESPONSE;
} else if (check.getIsTrue() == CommonConstants.ZERO_INT) { } else if (check.getIsTrue() == CommonConstants.ZERO_INT) {
return pre + check.getReason(); return pre + check.getReason();
} }
} else { } else {
return pre + "校验服务器未返回,请联系管理员!"; return pre + SalaryConstants.CHECK_NO_RESPONSE;
} }
} }
// 银行卡 // 银行卡
...@@ -742,8 +750,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -742,8 +750,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return pre + checkMobile.getMessage(); return pre + checkMobile.getMessage();
} }
} else { } else {
return pre + "校验服务未找到手机号,请联系管理员!"; return pre + SalaryConstants.CHECK_NO_RESPONSE;
} }
} else {
return pre + SalaryConstants.CHECK_NO_RESPONSE;
} }
} }
} }
...@@ -892,6 +902,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -892,6 +902,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
, "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
bankCheckMap = checkListR.getData().getCheckMap(); bankCheckMap = checkListR.getData().getCheckMap();
} else {
errorMessageList.add(new ErrorMessage((0), "【银行卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】!!!!"));
return;
} }
} }
// 系统已有人员手机号Map // 系统已有人员手机号Map
...@@ -903,6 +916,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -903,6 +916,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
, "/tcheckmobile/inner/checkMobileBatch", phoneList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckmobile/inner/checkMobileBatch", phoneList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (phoneR != null && phoneR.getData() != null) { if (phoneR != null && phoneR.getData() != null) {
phoneCheckMap = phoneR.getData().getCheckMap(); phoneCheckMap = phoneR.getData().getCheckMap();
} else {
errorMessageList.add(new ErrorMessage((0), "【手机号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】!!!!"));
return;
} }
List<TSalaryEmployee> empPhoneList = baseMapper.getListByPhone(phoneList); List<TSalaryEmployee> empPhoneList = baseMapper.getListByPhone(phoneList);
for (TSalaryEmployee e : empPhoneList) { for (TSalaryEmployee e : empPhoneList) {
...@@ -1203,6 +1219,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -1203,6 +1219,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
, "/tcheckmobile/inner/checkMobileBatch", phoneList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckmobile/inner/checkMobileBatch", phoneList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (phoneR != null && phoneR.getData() != null) { if (phoneR != null && phoneR.getData() != null) {
phoneCheckMap = phoneR.getData().getCheckMap(); phoneCheckMap = phoneR.getData().getCheckMap();
} else {
errorMessageList.add(new ErrorMessage((0), "【手机号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】!!"));
return R.ok(errorMessageList);
} }
} }
if (!bankList.isEmpty()) { if (!bankList.isEmpty()) {
...@@ -1210,6 +1229,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -1210,6 +1229,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
, "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
bankCheckMap = checkListR.getData().getCheckMap(); bankCheckMap = checkListR.getData().getCheckMap();
} else {
errorMessageList.add(new ErrorMessage((0), "【银行卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】!!"));
return R.ok(errorMessageList);
} }
} }
if (!checkList.isEmpty()) { if (!checkList.isEmpty()) {
...@@ -1217,6 +1239,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -1217,6 +1239,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
, "/tcheckidcard/inner/checkIdCardBatch", checkList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckidcard/inner/checkIdCardBatch", checkList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (idCardR != null && idCardR.getData() != null) { if (idCardR != null && idCardR.getData() != null) {
idCardMap = idCardR.getData().getCheckMap(); idCardMap = idCardR.getData().getCheckMap();
} else {
errorMessageList.add(new ErrorMessage((0), "【身份证号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】!!"));
return R.ok(errorMessageList);
} }
} }
int idCardFlag = 0; int idCardFlag = 0;
...@@ -1584,6 +1609,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -1584,6 +1609,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} else { } else {
return "手机号校验不通过,请更改手机号后重试!"; return "手机号校验不通过,请更改手机号后重试!";
} }
} else {
return "手机号未校验:" + SalaryConstants.CHECK_NO_RESPONSE;
} }
} }
return null; return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment