Commit 919f020f authored by 陈宏杰's avatar 陈宏杰

姓名格式错误

parent 28b3251d
...@@ -155,7 +155,7 @@ public class ManualToolController { ...@@ -155,7 +155,7 @@ public class ManualToolController {
} }
@RequestMapping("/createFile") @RequestMapping("/createFile")
public String testD2Repost(String type, String startDate, String endDate, Integer daySpilt, String loanStartDateStr, String loanEndDateStr, String prefix, String linkPointTimeStr){ public String createReportFile(String type, String startDate, String endDate, Integer daySpilt, String loanStartDateStr, String loanEndDateStr, String prefix, String linkPointTimeStr){
try { try {
fileReportService.createReportFile(type,startDate,endDate,daySpilt,loanStartDateStr,loanEndDateStr,prefix,linkPointTimeStr); fileReportService.createReportFile(type,startDate,endDate,daySpilt,loanStartDateStr,loanEndDateStr,prefix,linkPointTimeStr);
return "SUCCESS"; return "SUCCESS";
......
...@@ -21,6 +21,7 @@ import cn.quantgroup.report.service.http.IHttpService; ...@@ -21,6 +21,7 @@ import cn.quantgroup.report.service.http.IHttpService;
import cn.quantgroup.report.utils.DateUtils; import cn.quantgroup.report.utils.DateUtils;
import cn.quantgroup.report.utils.IdUtils; import cn.quantgroup.report.utils.IdUtils;
import cn.quantgroup.report.utils.SftpUtil; import cn.quantgroup.report.utils.SftpUtil;
import cn.quantgroup.report.utils.StringUtil;
import cn.quantgroup.report.utils.dingtalk.DingTalk; import cn.quantgroup.report.utils.dingtalk.DingTalk;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -580,6 +581,16 @@ public class BaiHangFileReportService { ...@@ -580,6 +581,16 @@ public class BaiHangFileReportService {
record.setRecordId(id); record.setRecordId(id);
recordList.add(record); recordList.add(record);
repaymentLoanInfo.setReqID(id); repaymentLoanInfo.setReqID(id);
if (StringUtil.getLenOfStr(repaymentLoanInfo.getName())<=1.0) {
log.error("姓名 {} 格式有误,loanId {}",repaymentLoanInfo.getName(),repaymentLoanInfo.getLoanId());
List<ApplyLoanInfoZhuDai> zhuDaiLogList = applyLoanInfoZhuDaiMapper.findByApplyId(repaymentLoanInfo.getLoanId());
if (!CollectionUtils.isEmpty(zhuDaiLogList)) {
repaymentLoanInfo.setName(zhuDaiLogList.get(0).getName());
log.info("loanId {} , 姓名已更改为 {}",repaymentLoanInfo.getLoanId(),repaymentLoanInfo.getName());
} else {
log.error("loanId {} , 姓名未更改",repaymentLoanInfo.getLoanId());
}
}
repaymentLoanInfo.setName(sensitiveFilter(repaymentLoanInfo.getName())); repaymentLoanInfo.setName(sensitiveFilter(repaymentLoanInfo.getName()));
repaymentLoanInfo.setPid(sensitiveFilter(repaymentLoanInfo.getPid())); repaymentLoanInfo.setPid(sensitiveFilter(repaymentLoanInfo.getPid()));
repaymentLoanInfo.setMobile(sensitiveFilter(repaymentLoanInfo.getMobile())); repaymentLoanInfo.setMobile(sensitiveFilter(repaymentLoanInfo.getMobile()));
...@@ -640,7 +651,7 @@ public class BaiHangFileReportService { ...@@ -640,7 +651,7 @@ public class BaiHangFileReportService {
if (stepEndDate.compareTo(idInfo.getRepaymentReceivedAt())>0) { if (stepEndDate.compareTo(idInfo.getRepaymentReceivedAt())>0) {
break; break;
} }
if (stepEndDate.compareTo(DateUtils.parseDate("yyyy-MM-dd HH:mm:ss",linkPointTime))<0) { if (StringUtils.isNotBlank(linkPointTime) && stepEndDate.compareTo(DateUtils.parseDate("yyyy-MM-dd HH:mm:ss",linkPointTime))<0) {
log.info("每30天逾期-跳过日期 {} , loanApplicationHistoryId = {}",DateUtils.parse(stepEndDate),idInfo.getLoanApplicationHistoryId()); log.info("每30天逾期-跳过日期 {} , loanApplicationHistoryId = {}",DateUtils.parse(stepEndDate),idInfo.getLoanApplicationHistoryId());
step++; step++;
continue; continue;
...@@ -659,6 +670,16 @@ public class BaiHangFileReportService { ...@@ -659,6 +670,16 @@ public class BaiHangFileReportService {
record.setRecordId(id); record.setRecordId(id);
recordList.add(record); recordList.add(record);
repaymentLoanInfo.setReqID(id); repaymentLoanInfo.setReqID(id);
if (StringUtil.getLenOfStr(repaymentLoanInfo.getName())<=1.0) {
log.error("姓名 {} 格式有误,loanId {}",repaymentLoanInfo.getName(),repaymentLoanInfo.getLoanId());
List<ApplyLoanInfoZhuDai> zhuDaiLogList = applyLoanInfoZhuDaiMapper.findByApplyId(repaymentLoanInfo.getLoanId());
if (!CollectionUtils.isEmpty(zhuDaiLogList)) {
repaymentLoanInfo.setName(zhuDaiLogList.get(0).getName());
log.info("loanId {} , 姓名已更改为 {}",repaymentLoanInfo.getLoanId(),repaymentLoanInfo.getName());
} else {
log.error("loanId {} , 姓名未更改",repaymentLoanInfo.getLoanId());
}
}
repaymentLoanInfo.setName(sensitiveFilter(repaymentLoanInfo.getName())); repaymentLoanInfo.setName(sensitiveFilter(repaymentLoanInfo.getName()));
repaymentLoanInfo.setPid(sensitiveFilter(repaymentLoanInfo.getPid())); repaymentLoanInfo.setPid(sensitiveFilter(repaymentLoanInfo.getPid()));
repaymentLoanInfo.setMobile(sensitiveFilter(repaymentLoanInfo.getMobile())); repaymentLoanInfo.setMobile(sensitiveFilter(repaymentLoanInfo.getMobile()));
...@@ -724,6 +745,16 @@ public class BaiHangFileReportService { ...@@ -724,6 +745,16 @@ public class BaiHangFileReportService {
record.setRecordId(id); record.setRecordId(id);
recordList.add(record); recordList.add(record);
repaymentLoanInfo.setReqID(id); repaymentLoanInfo.setReqID(id);
if (StringUtil.getLenOfStr(repaymentLoanInfo.getName())<=1.0) {
log.error("姓名 {} 格式有误,loanId {}",repaymentLoanInfo.getName(),repaymentLoanInfo.getLoanId());
List<ApplyLoanInfoZhuDai> zhuDaiLogList = applyLoanInfoZhuDaiMapper.findByApplyId(repaymentLoanInfo.getLoanId());
if (!CollectionUtils.isEmpty(zhuDaiLogList)) {
repaymentLoanInfo.setName(zhuDaiLogList.get(0).getName());
log.info("loanId {} , 姓名已更改为 {}",repaymentLoanInfo.getLoanId(),repaymentLoanInfo.getName());
} else {
log.error("loanId {} , 姓名未更改",repaymentLoanInfo.getLoanId());
}
}
repaymentLoanInfo.setName(sensitiveFilter(repaymentLoanInfo.getName())); repaymentLoanInfo.setName(sensitiveFilter(repaymentLoanInfo.getName()));
repaymentLoanInfo.setPid(sensitiveFilter(repaymentLoanInfo.getPid())); repaymentLoanInfo.setPid(sensitiveFilter(repaymentLoanInfo.getPid()));
repaymentLoanInfo.setMobile(sensitiveFilter(repaymentLoanInfo.getMobile())); repaymentLoanInfo.setMobile(sensitiveFilter(repaymentLoanInfo.getMobile()));
......
...@@ -86,4 +86,19 @@ public class StringUtil { ...@@ -86,4 +86,19 @@ public class StringUtil {
} }
} }
public static double getLenOfStr(String s) {
double valueLength = 0;
String chinese = "[\u4e00-\u9fa5]";
//一个汉字或日韩文长度为1,英文字符长度为0.5
for (int i = 0; i < s.length(); i++) {
String temp = s.substring(i,i + 1);
if (temp.matches(chinese)) {
valueLength += 1;
} else {
valueLength += 0.5;
}
}
return Math.ceil(valueLength);
}
} }
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