|
|
|
@@ -278,36 +278,6 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
|
billList = wxAllBillService.list(billq); |
|
|
|
} |
|
|
|
|
|
|
|
if (null != billList) { |
|
|
|
BigDecimal receivePayTotal = new BigDecimal(0); |
|
|
|
BigDecimal setoffTotal = new BigDecimal(0); |
|
|
|
BigDecimal payTotal = new BigDecimal(0); |
|
|
|
BigDecimal returnTotal = new BigDecimal(0); |
|
|
|
for (int j = 0 ; j < billList.size() ; j++) { |
|
|
|
WxAllBill ab = billList.get(j); |
|
|
|
if (StringUtils.isNotBlank(ab.getReceivePay())) { |
|
|
|
receivePayTotal = receivePayTotal.add(new BigDecimal(ab.getReceivePay())); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(ab.getSetOff())) { |
|
|
|
setoffTotal = setoffTotal.add(new BigDecimal(ab.getSetOff())); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(ab.getPay())) { |
|
|
|
payTotal = payTotal.add(new BigDecimal(ab.getPay())); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(ab.getReturnPay())) { |
|
|
|
returnTotal = returnTotal.add(new BigDecimal(ab.getReturnPay())); |
|
|
|
} |
|
|
|
} |
|
|
|
//合计 |
|
|
|
WxAllBill totalab = new WxAllBill(); |
|
|
|
totalab.setShopNumber("合计"); |
|
|
|
totalab.setReceivePay(receivePayTotal.toPlainString()); |
|
|
|
totalab.setSetOff(setoffTotal.toPlainString()); |
|
|
|
totalab.setPay(payTotal.toPlainString()); |
|
|
|
totalab.setReturnPay(returnTotal.toPlainString()); |
|
|
|
totalab.setEnergyFeesName(PriceUtilV2.number2CNMontrayUnit(receivePayTotal)); |
|
|
|
billList.add(totalab); |
|
|
|
} |
|
|
|
PrintVo vo = handleComponentData(templateId,o,items, printFinanceReceiveDataHandler,re,printBillDataHandler, billList,merchantMap,feesMap,shopNumber); |
|
|
|
if (null != vo) { |
|
|
|
voList.add(vo); |
|
|
|
@@ -382,9 +352,12 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
|
@Override |
|
|
|
public void confirmPrint(WxFinancePrintTemplate record) { |
|
|
|
if (record.getType().intValue() == EnumFinancePrintDataType.FINANCE_RECEIVE.getCode()) { |
|
|
|
WxFinanceReceive receive = wxFinanceService.getReceiveById(record, record.getDataId()); |
|
|
|
if (null != receive) { |
|
|
|
wxFinanceService.updateReceivePrint(receive); |
|
|
|
for (int i = 0 ; i < record.getDataIds().size() ; i ++) { |
|
|
|
Long dataId = record.getDataIds().get(i); |
|
|
|
WxFinanceReceive receive = wxFinanceService.getReceiveById(record, dataId); |
|
|
|
if (null != receive) { |
|
|
|
wxFinanceService.updateReceivePrint(receive); |
|
|
|
} |
|
|
|
} |
|
|
|
}else if (record.getType().intValue() == EnumFinancePrintDataType.BILL.getCode()) { |
|
|
|
|
|
|
|
|