update:建行龙支付对账
This commit is contained in:
@@ -599,19 +599,13 @@ public class BankGetDataMethodByJHLZF {
|
|||||||
if (dateTimeParts.length == 2) {
|
if (dateTimeParts.length == 2) {
|
||||||
jyrq = dateTimeParts[0]; // 日期部分
|
jyrq = dateTimeParts[0]; // 日期部分
|
||||||
jysj = dateTimeParts[1]; // 时间部分
|
jysj = dateTimeParts[1]; // 时间部分
|
||||||
log.info("从日期列提取时间 - 日期: [" + jyrq + "], 时间: [" + jysj + "]");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果还是空,设置默认值
|
// 如果还是空,设置默认值
|
||||||
jysj = "00:00:00";
|
jysj = "00:00:00";
|
||||||
log.debug("交易时间为空,设置默认值: 00:00:00");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 调试日志:输出交易日期、时间和支付方式
|
|
||||||
String debugZffs = s1.length > 16 ? s1[16] : "空";
|
|
||||||
log.info("第 " + (i + 1) + " 行 - 交易日期(列13): [" + jyrq + "], 交易时间(列15): [" + jysj + "], 支付方式(列16): [" + debugZffs + "]");
|
|
||||||
|
|
||||||
bankbillHistory.setCJyrq(jyrq); // N列(索引13): 交易日期
|
bankbillHistory.setCJyrq(jyrq); // N列(索引13): 交易日期
|
||||||
bankbillHistory.setCJysj(jysj); // P列(索引15): 交易时间
|
bankbillHistory.setCJysj(jysj); // P列(索引15): 交易时间
|
||||||
bankbillHistory.setCJyje(s1.length > 20 ? s1[20] : "0"); // U列(索引20): 交易金额
|
bankbillHistory.setCJyje(s1.length > 20 ? s1[20] : "0"); // U列(索引20): 交易金额
|
||||||
@@ -654,8 +648,7 @@ public class BankGetDataMethodByJHLZF {
|
|||||||
// EFGH列(索引4): 发卡行
|
// EFGH列(索引4): 发卡行
|
||||||
bankbillHistory.setCFkh(s1.length > 4 ? s1[4] : ""); // 发卡行
|
bankbillHistory.setCFkh(s1.length > 4 ? s1[4] : ""); // 发卡行
|
||||||
|
|
||||||
// 支付方式固定为"建行龙支付"
|
// 支付方式已经在前面设置(从第16列读取),这里不再覆盖
|
||||||
bankbillHistory.setCZffs("建行龙支付"); // 支付方式
|
|
||||||
|
|
||||||
// VW列(索引21): 小费
|
// VW列(索引21): 小费
|
||||||
bankbillHistory.setCSxf(s1.length > 21 ? s1[21] : "0"); // 小费
|
bankbillHistory.setCSxf(s1.length > 21 ? s1[21] : "0"); // 小费
|
||||||
@@ -1201,8 +1194,21 @@ public class BankGetDataMethodByJHLZF {
|
|||||||
try {
|
try {
|
||||||
// 使用SimpleDateFormat格式化日期时间
|
// 使用SimpleDateFormat格式化日期时间
|
||||||
java.util.Date dateValue = cell.getDateCellValue();
|
java.util.Date dateValue = cell.getDateCellValue();
|
||||||
|
|
||||||
|
// 检查是否只有时间(日期部分为1899-12-31或1900-01-01)
|
||||||
|
java.util.Calendar cal = java.util.Calendar.getInstance();
|
||||||
|
cal.setTime(dateValue);
|
||||||
|
int year = cal.get(java.util.Calendar.YEAR);
|
||||||
|
|
||||||
|
if (year == 1899 || year == 1900) {
|
||||||
|
// 只有时间,格式化为 HH:mm:ss
|
||||||
|
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("HH:mm:ss");
|
||||||
|
cellValue = sdf.format(dateValue);
|
||||||
|
} else {
|
||||||
|
// 完整的日期时间,格式化为 yyyy-MM-dd HH:mm:ss
|
||||||
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
cellValue = sdf.format(dateValue);
|
cellValue = sdf.format(dateValue);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
cellValue = cell.getDateCellValue().toString();
|
cellValue = cell.getDateCellValue().toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,19 +81,19 @@ public class BankbillHistoryServiceImpl implements BankbillHistoryService {
|
|||||||
for (int i1 = 0; i1 < payMethodList.size(); i1++) {
|
for (int i1 = 0; i1 < payMethodList.size(); i1++) {
|
||||||
Dicinfo dicinfo = payMethodList.get(i1);
|
Dicinfo dicinfo = payMethodList.get(i1);
|
||||||
String dicname = dicinfo.getDicname();
|
String dicname = dicinfo.getDicname();
|
||||||
//微信 支付宝 现金 特殊处理下
|
String dicvalue = dicinfo.getDicvalue();
|
||||||
if (dicname.contains("微信")){
|
|
||||||
payMethodMap.put("微信",dicinfo.getDicvalue());
|
|
||||||
payMethodMap.put("微信支付",dicinfo.getDicvalue());
|
|
||||||
}else if(dicname.contains("支付宝")){
|
|
||||||
payMethodMap.put("支付宝",dicinfo.getDicvalue());
|
|
||||||
payMethodMap.put("支付宝支付",dicinfo.getDicvalue());
|
|
||||||
}else if (dicname.contains("云闪付")){
|
|
||||||
payMethodMap.put("云闪付",dicinfo.getDicvalue());
|
|
||||||
payMethodMap.put("云闪付支付",dicinfo.getDicvalue());
|
|
||||||
}
|
|
||||||
|
|
||||||
payMethodMap.put(dicinfo.getDicname(),dicinfo.getDicvalue());
|
// 首先精确映射字典名到字典值
|
||||||
|
payMethodMap.put(dicname, dicvalue);
|
||||||
|
|
||||||
|
// 特殊处理:添加简写映射(只对非退款类型)
|
||||||
|
if ("微信支付".equals(dicname)) {
|
||||||
|
payMethodMap.put("微信", dicvalue);
|
||||||
|
} else if ("支付宝支付".equals(dicname)) {
|
||||||
|
payMethodMap.put("支付宝", dicvalue);
|
||||||
|
} else if ("云闪付支付".equals(dicname)) {
|
||||||
|
payMethodMap.put("云闪付", dicvalue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int listNum=0;
|
int listNum=0;
|
||||||
@@ -147,10 +147,6 @@ public class BankbillHistoryServiceImpl implements BankbillHistoryService {
|
|||||||
zffs = payMethodMap.get("其他支付");
|
zffs = payMethodMap.get("其他支付");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加调试日志
|
|
||||||
org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(this.getClass());
|
|
||||||
log.info("建行龙支付映射 - 原始支付方式: [" + cZffsLower + "], 映射后字典值: [" + zffs + "]");
|
|
||||||
} else {
|
} else {
|
||||||
zffs = payMethodMap.get("其他支付");
|
zffs = payMethodMap.get("其他支付");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user