Commit 06138ed9 authored by fangxinjiang's avatar fangxinjiang

银行卡校验-fxj

parent 7d45eeb5
......@@ -3889,12 +3889,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMust.append("身份证号;");
}
// 2格式不正确:在循环里已经判断了
// 3校验是否通过:姓名&身份证号是否一致、手机号是否真实、姓名&银行卡号是否一致
// 3校验是否通过:姓名&身份证号是否一致、手机号是否真实、姓名&身份证&银行卡号是否一致
if (Common.isNotNull(detail.getBankNo())) {
if (Common.isNotNull(detail.getEmpName())) {
bankCheck = new TCheckBankNo();
bankCheck.setBankNo(detail.getBankNo());
bankCheck.setName(detail.getEmpName());
bankCheck.setIdNum(detail.getEmpIdcard());
bankList.add(bankCheck);
} else {
errorMust.append("有银行卡号则员工姓名必填;");
......
......@@ -3697,6 +3697,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
bankCheck = new TCheckBankNo();
bankCheck.setBankNo(detail.getBankNo());
bankCheck.setName(detail.getEmpName());
bankCheck.setIdNum(detail.getEmpIdcard());
bankList.add(bankCheck);
}
}
......
......@@ -112,6 +112,7 @@ public class ChecksUtil {
TCheckBankNo checkBankNo = new TCheckBankNo();
checkBankNo.setBankNo(cardNo);
checkBankNo.setName(name);
checkBankNo.setIdNum(idNum);
checkBankNo.setMessage(ChecksConstants.CHECK_CONFIG_ACCESS);
checkBankNo.setResult("01");
checkBankNo.setType(CommonConstants.ONE_STRING);
......
......@@ -126,7 +126,7 @@ public class TCheckBankNoController {
@Inner
@PostMapping("/inner/checkBankNo" )
public CheckBankNoVo checkBankNoInner(@RequestBody TCheckBankNo checkBankNo) {
return tCheckBankNoService.checkBankNoTwo(checkBankNo.getName(),checkBankNo.getBankNo());
return tCheckBankNoService.checkBankNoThree(checkBankNo.getName(),checkBankNo.getBankNo(),checkBankNo.getIdNum());
}
/**
......@@ -141,8 +141,8 @@ public class TCheckBankNoController {
@Operation(description = "C端预入职银行卡号校验")
@SysLog("C端预入职银行卡号校验" )
@GetMapping("/checkPreBankNo" )
public R<String> checkPreBankNo(@RequestParam String empName,@RequestParam String bankNo, @RequestParam String deptId) {
return tCheckBankNoService.checkPreBankNo(empName, bankNo, deptId);
public R<String> checkPreBankNo(@RequestParam String empName,@RequestParam String bankNo, @RequestParam String deptId,@RequestParam String idNum) {
return tCheckBankNoService.checkPreBankNo(empName, bankNo, deptId,idNum);
}
/**
......@@ -186,6 +186,20 @@ public class TCheckBankNoController {
return tCheckBankNoService.checkBankNo(name, bankNo);
}
/**
* @Description: 代发户调用银行卡校验--如果其他接口也要调用,加上信息
* @Author: hgw
* @Date: 2023/1/13 9:41
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.check.entity.TCheckBankNo>
**/
@Operation(description = "调用银行卡校验")
@SysLog("调用银行卡校验" )
@PostMapping("/checkBankNoThree" )
public R<TCheckBankNo> checkBankNoThree(@RequestParam String name, @RequestParam String bankNo, @RequestParam String idNum) {
CheckBankNoVo vo = tCheckBankNoService.checkBankNoThree(name, bankNo,idNum);
return vo.getRes();
}
/**
* 银行卡号校验
* @param checkBankNo 姓名 是 [string] 身份证号码,限单个 是 [string] 银行卡号,限单个 是 [string]银行预留手机号,仅支持国内11位号码
......
......@@ -54,7 +54,7 @@ public interface TCheckBankNoService extends IService<TCheckBankNo> {
* @Date: 2024/7/16 15:00
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> checkPreBankNo(String empName, String bankNo, String deptId);
R<String> checkPreBankNo(String empName, String bankNo, String deptId,String idNum);
/**
* @param list
......
......@@ -41,6 +41,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpWorkRecordExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
......@@ -97,6 +98,7 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
TCheckBankNo checkBankNo = baseMapper.selectOne(Wrappers.<TCheckBankNo>query().lambda()
.eq(TCheckBankNo::getBankNo,cardNo)
.eq(TCheckBankNo::getName,name)
.eq(TCheckBankNo::getIdNum,idNum)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(checkBankNo)){
vo.setRes(R.ok(checkBankNo));
......@@ -112,14 +114,15 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
}
@Override
public R<String> checkPreBankNo(String empName, String bankNo, String deptId) {
if (Common.isEmpty(empName) || Common.isEmpty(bankNo)){
public R<String> checkPreBankNo(String empName, String bankNo, String deptId,String idNum) {
if (Common.isEmpty(empName) || Common.isEmpty(bankNo) || Common.isEmpty(idNum)){
return R.failed(MsgUtils.getMessage(ErrorCodes.CHECKS_BANK_NO_REQUEST_PARAM_ERROR));
}
synchronized (this){
TCheckBankNo checkBankNo = baseMapper.selectOne(Wrappers.<TCheckBankNo>query().lambda()
.eq(TCheckBankNo::getBankNo,bankNo)
.eq(TCheckBankNo::getName,empName)
.eq(TCheckBankNo::getIdNum,idNum)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(checkBankNo)){
if (CommonConstants.ZERO_ONE.equals(checkBankNo.getResult())) {
......@@ -149,7 +152,7 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
}
}
}
R<TCheckBankNo> resR = ChecksUtil.checkBankNoTwo(empName,bankNo,canCheckService.getCanCheck());
R<TCheckBankNo> resR = ChecksUtil.checkBankNoThree(empName,bankNo,idNum,canCheckService.getCanCheck());
if (Common.isNotNull(resR) && Common.isNotNull(resR.getData())){
baseMapper.insert(resR.getData());
checkBankNo = resR.getData();
......
......@@ -334,6 +334,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName());
checkBankNo.setBankNo(employee.getBankNo());
checkBankNo.setIdNum(employee.getEmpIdcard());
bankList.add(checkBankNo);
}
// 将重复的手机号组装到map里,下面去拦截
......@@ -469,6 +470,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName());
checkBankNo.setBankNo(employee.getBankNo());
checkBankNo.setIdNum(employee.getEmpIdcard());
bankList.add(checkBankNo);
}
// 将重复的手机号组装到map里,下面去拦截
......@@ -717,9 +719,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TCheckBankNo checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName());
checkBankNo.setBankNo(employee.getBankNo());
checkBankNo.setIdNum(employee.getEmpIdcard());
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", checkBankNo, CheckBankNoVo.class, SecurityConstants.FROM_IN);
String pre = "姓名卡号验证:";
String pre = "姓名+身份证+卡号验证:";
if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo = checkListR.getData();
TCheckBankNo check = (null == vo.getRes()) ? null : vo.getRes().getData();
......@@ -873,6 +876,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
checkBankNo = new TCheckBankNo();
checkBankNo.setName(vo.getEmpName());
checkBankNo.setBankNo(vo.getBankNo());
checkBankNo.setIdNum(vo.getEmpIdcard());
bankList.add(checkBankNo);
}
}
......@@ -1067,6 +1071,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TCheckBankNo checkIdCard = new TCheckBankNo();
checkIdCard.setName(employee.getEmpName());
checkIdCard.setBankNo(employee.getBankNo());
checkIdCard.setIdNum(employee.getEmpIdcard());
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", checkIdCard, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
......@@ -1096,6 +1101,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName());
checkBankNo.setBankNo(employee.getBankNo());
checkBankNo.setIdNum(employee.getEmpIdcard());
bankList.add(checkBankNo);
}
}
......@@ -1172,6 +1178,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
checkBankNo = new TCheckBankNo();
checkBankNo.setName(emp.getEmpName());
checkBankNo.setBankNo(emp.getBankNo());
checkBankNo.setIdNum(emp.getEmpIdcard());
bankList.add(checkBankNo);
}
}
......@@ -1558,9 +1565,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TCheckBankNo checkBankNo = new TCheckBankNo();
checkBankNo.setName(tSalaryEmployee.getEmpName());
checkBankNo.setBankNo(tSalaryEmployee.getBankNo());
checkBankNo.setIdNum(tSalaryEmployee.getEmpIdcard());
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", checkBankNo, CheckBankNoVo.class, SecurityConstants.FROM_IN);
String pre = "姓名卡号验证:";
String pre = "姓名+身份证+卡号验证:";
if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo = checkListR.getData();
TCheckBankNo check = (null == vo.getRes()) ? null : vo.getRes().getData();
......
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