update:修复支付统计页面bug
This commit is contained in:
@@ -74,17 +74,15 @@ public class PaymentStatisticsController {
|
||||
|
||||
List<String> betweenDate = DateDUtil.getBetweenDate(startTime, endTime);
|
||||
|
||||
// 查询字典表支付方式
|
||||
// 查询字典表支付方式 - 使用THIRD_PAY三方支付方式字典
|
||||
List<Dicinfo> pay_type = dicinfoService.findDicinfoTreeNodeList("THIRD_PAY");
|
||||
HashMap<String, String> payMethodMap = new HashMap<>();
|
||||
for (Dicinfo dicinfo : pay_type) {
|
||||
String dicname = dicinfo.getDicname();
|
||||
String dicvalue = dicinfo.getDicvalue();
|
||||
|
||||
// 微信支付支付宝支付 其他剩下的全算其他
|
||||
if ("支付宝支付".equals(dicname) || "微信支付".equals(dicname)) {
|
||||
payMethodMap.put(dicvalue, dicname);
|
||||
}
|
||||
|
||||
// 根据三方支付字典配置映射支付方式
|
||||
payMethodMap.put(dicvalue, dicname);
|
||||
}
|
||||
|
||||
// 先组织好map
|
||||
@@ -100,23 +98,30 @@ public class PaymentStatisticsController {
|
||||
betweenDateList.add(sdf.format(date));
|
||||
}
|
||||
|
||||
numMap.put("支付宝支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
// 根据THIRD_PAY三方支付字典初始化统计分类
|
||||
numMap.put("微信支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
numMap.put("其他", new LinkedHashMap<String, String>() {{
|
||||
numMap.put("刷卡支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
numMap.put("支付宝支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
numMap.put("其他支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
|
||||
moneyMap.put("支付宝支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
moneyMap.put("微信支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
moneyMap.put("其他", new LinkedHashMap<String, String>() {{
|
||||
moneyMap.put("刷卡支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
moneyMap.put("支付宝支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
moneyMap.put("其他支付", new LinkedHashMap<String, String>() {{
|
||||
putAll(addMap);
|
||||
}});
|
||||
|
||||
@@ -127,19 +132,21 @@ public class PaymentStatisticsController {
|
||||
|
||||
for (HashMap<Object, Object> hashMap : thirdNumList) {
|
||||
String num1 = StringDUtil.changeNullToEmpty(hashMap.get("NUM"));
|
||||
String c_jyrq = StringDUtil.changeNullToEmpty(hashMap.get("I_JYRQ"));
|
||||
String c_zffs = StringDUtil.changeNullToEmpty(hashMap.get("I_FXK"));
|
||||
String c_jyrq = StringDUtil.changeNullToEmpty(hashMap.get("C_JYRQ"));
|
||||
String c_zffs = StringDUtil.changeNullToEmpty(hashMap.get("C_ZFFS"));
|
||||
String str_zffs = "";
|
||||
String s = payMethodMap.get(c_zffs);
|
||||
if (s == null) {
|
||||
str_zffs = "其他";
|
||||
str_zffs = "其他支付";
|
||||
} else {
|
||||
str_zffs = s;
|
||||
}
|
||||
LinkedHashMap<String, String> zffsMap = numMap.get(str_zffs);
|
||||
String countNum = zffsMap.get(c_jyrq);
|
||||
countNum = new BigDecimal(countNum).add(new BigDecimal(num1)).toString();
|
||||
zffsMap.put(c_jyrq, countNum);
|
||||
if (zffsMap != null) {
|
||||
String countNum = zffsMap.get(c_jyrq);
|
||||
countNum = new BigDecimal(countNum).add(new BigDecimal(num1)).toString();
|
||||
zffsMap.put(c_jyrq, countNum);
|
||||
}
|
||||
}
|
||||
|
||||
// 将linkedHashMap转为list<hashMap<>> hashMap 中 name 支付方式,data list集合 内容为计算的数据
|
||||
@@ -162,19 +169,21 @@ public class PaymentStatisticsController {
|
||||
List<HashMap<Object, Object>> thirdMoneyList = bankbillHistoryService.findBankBillMoneyByTime(map);
|
||||
for (HashMap<Object, Object> hashMap : thirdMoneyList) {
|
||||
String money = StringDUtil.changeNullToEmpty(hashMap.get("MONEY"));
|
||||
String c_jyrq = StringDUtil.changeNullToEmpty(hashMap.get("I_JYRQ"));
|
||||
String c_zffs = StringDUtil.changeNullToEmpty(hashMap.get("I_FXK"));
|
||||
String c_jyrq = StringDUtil.changeNullToEmpty(hashMap.get("C_JYRQ"));
|
||||
String c_zffs = StringDUtil.changeNullToEmpty(hashMap.get("C_ZFFS"));
|
||||
String str_zffs = "";
|
||||
String s = payMethodMap.get(c_zffs);
|
||||
if (s == null) {
|
||||
str_zffs = "其他";
|
||||
str_zffs = "其他支付";
|
||||
} else {
|
||||
str_zffs = s;
|
||||
}
|
||||
LinkedHashMap<String, String> zffsMap = moneyMap.get(str_zffs);
|
||||
String countNum = zffsMap.get(c_jyrq);
|
||||
countNum = new BigDecimal(countNum).add(new BigDecimal(money)).toString();
|
||||
zffsMap.put(c_jyrq, countNum);
|
||||
if (zffsMap != null) {
|
||||
String countNum = zffsMap.get(c_jyrq);
|
||||
countNum = new BigDecimal(countNum).add(new BigDecimal(money)).toString();
|
||||
zffsMap.put(c_jyrq, countNum);
|
||||
}
|
||||
}
|
||||
|
||||
// 将linkedHashMap转为list<hashMap<>> hashMap 中 name 支付方式,data list集合 内容为计算的数据
|
||||
@@ -261,15 +270,15 @@ public class PaymentStatisticsController {
|
||||
map.put("is_active", "1");
|
||||
List<HashMap<Object, Object>> list = transactionDetailService.findHisAndThirdJoinData(map);
|
||||
|
||||
// his需要统计 1扫码支付 2银行卡支付 3掌医支付 4现金支付 5其他
|
||||
// his需要统计(自定义PayType编码): 1微信支付 2聚合支付 3军保支付 4其他 5现金支付
|
||||
// 三方需要统计 1_1微信支付 1_2支付宝支付 云闪付支付 其他支付 2银行卡支付 3掌医支付 4现金支付 5其他
|
||||
|
||||
HashMap<Object, Object> hisMoneyData = new HashMap<>();
|
||||
hisMoneyData.put("1", "0");
|
||||
hisMoneyData.put("2", "0");
|
||||
hisMoneyData.put("3", "0");
|
||||
hisMoneyData.put("4", "0");
|
||||
hisMoneyData.put("5", "0");
|
||||
hisMoneyData.put("1", "0"); // 微信支付
|
||||
hisMoneyData.put("2", "0"); // 聚合支付
|
||||
hisMoneyData.put("3", "0"); // 军保支付
|
||||
hisMoneyData.put("4", "0"); // 其他
|
||||
hisMoneyData.put("5", "0"); // 现金支付
|
||||
|
||||
HashMap<Object, Object> thirdMoneyData = new HashMap<>();
|
||||
thirdMoneyData.put("1_1", "0");
|
||||
@@ -282,11 +291,11 @@ public class PaymentStatisticsController {
|
||||
thirdMoneyData.put("5", "0");
|
||||
|
||||
HashMap<Object, Object> hisNumData = new HashMap<>();
|
||||
hisNumData.put("1", "0");
|
||||
hisNumData.put("2", "0");
|
||||
hisNumData.put("3", "0");
|
||||
hisNumData.put("4", "0");
|
||||
hisNumData.put("5", "0");
|
||||
hisNumData.put("1", "0"); // 微信支付
|
||||
hisNumData.put("2", "0"); // 聚合支付
|
||||
hisNumData.put("3", "0"); // 军保支付
|
||||
hisNumData.put("4", "0"); // 其他
|
||||
hisNumData.put("5", "0"); // 现金支付
|
||||
|
||||
|
||||
HashMap<Object, Object> thirdNumData = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user