|
|
|
@@ -127,6 +127,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
@Autowired |
|
|
|
WxBillSettleService wxBillSettleService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxBillSettleRecordMapper wxBillSettleRecordMapper; |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map<String, Object> listAsPage(WxBillAll record, Integer pageIndex, Integer pageSize) { |
|
|
|
//更新各账单状态 |
|
|
|
@@ -192,6 +195,16 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
return new ResultData(pageInfo); |
|
|
|
} |
|
|
|
List<Map<String, Object>> maps = wxBillAllMapper.listData(wxBillAll); |
|
|
|
for (Map<String, Object> map:maps) { |
|
|
|
Integer billType = (Integer)map.get("billTypeValue"); |
|
|
|
if(EnumBillType.SETTLE.getCode().equals(billType)){ |
|
|
|
Long rp = (Long)map.get("receive_pay"); |
|
|
|
WxBillSettle query = new WxBillSettle(); |
|
|
|
query.setId((Long)map.get("id")); |
|
|
|
Long sum = wxBillSettleRecordMapper.getSumMoneyBySettleId(query); |
|
|
|
map.put("owe",rp-sum); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(maps); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -257,7 +270,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
try { |
|
|
|
logger.info("更新结算单id:{}", JsonUtil.obj2Json(bill)); |
|
|
|
|
|
|
|
WxBillSettle wxBillSettle = wxBillSettleService.getById((Long)bill.get("id")); |
|
|
|
WxBillSettle wxBillSettle = wxBillSettleService.getById((Long)bill.get("id"),EnumFilter.NO.getCode()); |
|
|
|
|
|
|
|
WxBillSettleRecord settleRecord = new WxBillSettleRecord(); |
|
|
|
settleRecord.setSettleId((Long)bill.get("id")); |
|
|
|
@@ -813,7 +826,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void exportSettleBill(WxBillSettle wxBillSettle, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
wxBillSettle = wxBillSettleService.getById(wxBillSettle.getId()); |
|
|
|
wxBillSettle = wxBillSettleService.getById(wxBillSettle.getId(),EnumFilter.NO.getCode()); |
|
|
|
if(wxBillSettle.getReceiveBillIds() == null) wxBillSettle.setReceiveBillIds(new ArrayList<>()); |
|
|
|
if(wxBillSettle.getPayBillIds() == null) wxBillSettle.setPayBillIds(new ArrayList<>()); |
|
|
|
|
|
|
|
|