|
|
|
@@ -40,6 +40,7 @@ import com.iformall.service.WxFinancePrintService; |
|
|
|
import com.iformall.service.WxFinanceService; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
import com.iformall.service.WxShopService; |
|
|
|
import com.iformall.utils.PriceUtilV2; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.ArrayList; |
|
|
|
@@ -213,10 +214,14 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
|
if (StringUtils.isBlank(fieldName)) { |
|
|
|
|
|
|
|
}else { |
|
|
|
Object or = objectParser.getObjectValue(fieldName,object,params); |
|
|
|
if (null == or) { |
|
|
|
or = ""; |
|
|
|
} |
|
|
|
if (isSetDefaultValue) { |
|
|
|
ov.put("defaultValue", objectParser.getObjectValue(fieldName,object,params)); |
|
|
|
ov.put("defaultValue", or); |
|
|
|
}else { |
|
|
|
ov.put("value", objectParser.getObjectValue(fieldName,object,params)); |
|
|
|
ov.put("value", or); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -272,6 +277,37 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
|
billq.setIds(billIdList); |
|
|
|
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); |
|
|
|
|