| @@ -194,11 +194,10 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| for (Map<String, Object> map:maps) { | for (Map<String, Object> map:maps) { | ||||
| Integer billType = ((Long)map.get("billTypeValue")).intValue(); | Integer billType = ((Long)map.get("billTypeValue")).intValue(); | ||||
| if(EnumBillType.SETTLE.getCode().equals(billType)){ | 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))); | |||||
| Long id = (Long)map.get("id"); | |||||
| WxBillSettle settle = wxBillSettleService.getById(id,EnumFilterSettle.YES.getCode()); | |||||
| BigDecimal money = new BigDecimal(settle.getBalance()).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP); | |||||
| map.put("owe",money); | |||||
| } | } | ||||
| } | } | ||||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(maps); | PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(maps); | ||||
| @@ -208,11 +207,10 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| for (Map<String, Object> map:maps) { | for (Map<String, Object> map:maps) { | ||||
| Integer billType = ((Long)map.get("billTypeValue")).intValue(); | Integer billType = ((Long)map.get("billTypeValue")).intValue(); | ||||
| if(EnumBillType.SETTLE.getCode().equals(billType)){ | 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))); | |||||
| Long id = (Long)map.get("id"); | |||||
| WxBillSettle settle = wxBillSettleService.getById(id,EnumFilterSettle.YES.getCode()); | |||||
| BigDecimal money = new BigDecimal(settle.getBalance()).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP); | |||||
| map.put("owe",money); | |||||
| } | } | ||||
| } | } | ||||
| return new ResultData(maps); | return new ResultData(maps); | ||||