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

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

View File

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