|
|
|
@@ -191,6 +191,16 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
if (wxBillAll.getPageIndex() != null && wxBillAll.getPageIndex() != null) { |
|
|
|
PageHelper.startPage(wxBillAll.getPageIndex(), wxBillAll.getPageSize()); |
|
|
|
List<Map<String, Object>> maps = wxBillAllMapper.listData(wxBillAll); |
|
|
|
for (Map<String, Object> map:maps) { |
|
|
|
Integer billType = ((Long)map.get("billTypeValue")).intValue(); |
|
|
|
if(EnumBillType.SETTLE.getCode().equals(billType)){ |
|
|
|
BigDecimal rp = (BigDecimal)map.get("receivePay"); |
|
|
|
WxBillSettle query = new WxBillSettle(); |
|
|
|
query.setId((Long)map.get("id")); |
|
|
|
Long sum = wxBillSettleRecordMapper.getSumMoneyBySettleId(query); |
|
|
|
map.put("owe",rp.subtract(new BigDecimal(sum))); |
|
|
|
} |
|
|
|
} |
|
|
|
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(maps); |
|
|
|
return new ResultData(pageInfo); |
|
|
|
} |
|
|
|
|