解决结算账户数据显示的bug

This commit is contained in:
季圣华
2020-02-18 00:21:20 +08:00
parent c33c9a5274
commit 05dbdf8964

View File

@@ -388,17 +388,21 @@ public class AccountService {
for (DepotHead depotHead : dataList) { for (DepotHead depotHead : dataList) {
String accountIdList = depotHead.getAccountidlist(); String accountIdList = depotHead.getAccountidlist();
String accountMoneyList = depotHead.getAccountmoneylist(); String accountMoneyList = depotHead.getAccountmoneylist();
if(StringUtil.isNotEmpty(accountIdList) && StringUtil.isNotEmpty(accountMoneyList)) {
accountIdList = accountIdList.replace("[", "").replace("]", "").replace("\"", ""); accountIdList = accountIdList.replace("[", "").replace("]", "").replace("\"", "");
accountMoneyList = accountMoneyList.replace("[", "").replace("]", "").replace("\"", ""); accountMoneyList = accountMoneyList.replace("[", "").replace("]", "").replace("\"", "");
String[] aList = accountIdList.split(","); String[] aList = accountIdList.split(",");
String[] amList = accountMoneyList.split(","); String[] amList = accountMoneyList.split(",");
for (int i = 0; i < aList.length; i++) { for (int i = 0; i < aList.length; i++) {
if (aList[i].toString().equals(id.toString())) { if (aList[i].toString().equals(id.toString())) {
if(amList!=null && amList.length>0) {
accountSum = accountSum.add(new BigDecimal(amList[i])); accountSum = accountSum.add(new BigDecimal(amList[i]));
} }
} }
} }
} }
}
}
} catch (DataAccessException e) { } catch (DataAccessException e) {
logger.error(">>>>>>>>>查找信息异常", e); logger.error(">>>>>>>>>查找信息异常", e);
} }