|
|
@@ -765,6 +765,23 @@ public class HlgPaymentServiceImpl extends ServiceImpl<HlgPaymentMapper, HlgPaym
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 去特殊空格
|
|
|
+ * @param str
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String trimString(String str){
|
|
|
+ String result="";
|
|
|
+ if(StringUtils.isNotBlank(str)){
|
|
|
+ //去掉ascll码160空格 + 去掉前后空格
|
|
|
+ result = str.trim().replaceAll("\\u00A0","");
|
|
|
+ //去除字符串中头部和尾部所包含的空格(包括:空格(全角,半角)、制表符、换页符等)
|
|
|
+ result = result.replaceAll("^[ *| *| *|//s*]*", "").replaceAll("[ *| *| *|//s*]*$", "");
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
* 导入付款
|
|
|
*
|
|
|
* @param file
|
|
|
@@ -817,19 +834,19 @@ public class HlgPaymentServiceImpl extends ServiceImpl<HlgPaymentMapper, HlgPaym
|
|
|
if (cell2 != null) {
|
|
|
cell2.setCellType(1);
|
|
|
//去掉ascll码160空格 + 去掉前后空格
|
|
|
- String phone = cell2.getStringCellValue().trim().replaceAll("\\u00A0",""); //手机号
|
|
|
+ String phone = trimString(cell2.getStringCellValue()); //手机号
|
|
|
hlgPaymentDetailExport.setPhone(phone);
|
|
|
}
|
|
|
if (cell3 != null) {
|
|
|
cell3.setCellType(1);
|
|
|
//去掉ascll码160空格 + 去掉前后空格
|
|
|
- String idcardNumber = cell3.getStringCellValue().trim().replaceAll("\\u00A0",""); //身份证号
|
|
|
+ String idcardNumber = trimString(cell3.getStringCellValue()); //身份证号
|
|
|
hlgPaymentDetailExport.setIdcardNumber(idcardNumber);
|
|
|
}
|
|
|
if (cell4 != null) {
|
|
|
cell4.setCellType(1);
|
|
|
//去掉ascll码160空格 + 去掉前后空格
|
|
|
- String cardNumber = cell4.getStringCellValue().trim().replaceAll("\\u00A0",""); //银行卡号
|
|
|
+ String cardNumber = trimString(cell4.getStringCellValue()); //银行卡号
|
|
|
hlgPaymentDetailExport.setCardNumber(cardNumber);
|
|
|
}
|
|
|
if (cell5 != null) {
|