| @@ -50,6 +50,7 @@ public class WxFeesStandardsController extends BaseController { | |||||
| } | } | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| record.setBillType(EnumBillAllType.PROPERTY.getCode()); | record.setBillType(EnumBillAllType.PROPERTY.getCode()); | ||||
| record.setIsDel(EnumYesOrNo.NO.getCode()); | |||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | ||||
| PageInfo<WxEnergyFees> page = wxEnergyService.feesListAsPage(record, pageNum, pageSize,false); | PageInfo<WxEnergyFees> page = wxEnergyService.feesListAsPage(record, pageNum, pageSize,false); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| @@ -23,11 +23,23 @@ public class WxBillSum implements Serializable { | |||||
| private String needPay = "0"; | private String needPay = "0"; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private BigDecimal needPayNumber; | private BigDecimal needPayNumber; | ||||
| @TableField(exist = false) | |||||
| private String taxNeedPay; | |||||
| public String getTaxNeedPay() { | |||||
| if (StringUtils.isNotBlank(taxRate)) { | |||||
| taxNeedPay = new BigDecimal(needPay).multiply(new BigDecimal(taxRate)).divide(new BigDecimal(100)).setScale(6,BigDecimal.ROUND_HALF_UP).toPlainString(); | |||||
| }else { | |||||
| taxNeedPay = ""; | |||||
| } | |||||
| return taxNeedPay; | |||||
| } | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String noTaxNeedPay = "0"; | private String noTaxNeedPay = "0"; | ||||
| public String getNoTaxNeedPay() { | public String getNoTaxNeedPay() { | ||||
| if (StringUtils.isNotBlank(taxRate)) { | |||||
| noTaxNeedPay = new BigDecimal(needPay).multiply(new BigDecimal(taxRate)).setScale(2,BigDecimal.ROUND_HALF_UP).toPlainString(); | |||||
| String taxpay = getTaxNeedPay(); | |||||
| if (StringUtils.isNotBlank(taxpay)) { | |||||
| noTaxNeedPay = new BigDecimal(needPay).subtract(new BigDecimal(taxpay)).setScale(6,BigDecimal.ROUND_HALF_UP).toPlainString(); | |||||
| return noTaxNeedPay; | return noTaxNeedPay; | ||||
| } | } | ||||
| return needPay; | return needPay; | ||||
| @@ -76,6 +76,11 @@ public class WxMerchantBillVo implements Serializable { | |||||
| @Excel(name = "账单最大日期",format="yyyy-MM-dd", width = 20, orderNum = "8") | @Excel(name = "账单最大日期",format="yyyy-MM-dd", width = 20, orderNum = "8") | ||||
| private Date maxDate; | private Date maxDate; | ||||
| @TableField(exist = false) | |||||
| private String cusName; | |||||
| @TableField(exist = false) | |||||
| private String cusPhone; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<WxBillSum> billSumList; | private List<WxBillSum> billSumList; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -51,6 +51,10 @@ public class PrintMerchantSettleDataHandler implements PrintDataParser{ | |||||
| } | } | ||||
| } | } | ||||
| return ""; | return ""; | ||||
| }else if (name.equals("cusName")) { | |||||
| return receive.getCusName(); | |||||
| }else if (name.equals("cusPhone")) { | |||||
| return receive.getCusPhone(); | |||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -37,6 +37,8 @@ public class PrintMerchantSettleItemDataHandler implements PrintDataParser{ | |||||
| return receive.getNeedPay(); | return receive.getNeedPay(); | ||||
| }else if (name.equals("noTaxNeedPay")) { | }else if (name.equals("noTaxNeedPay")) { | ||||
| return receive.getNoTaxNeedPay(); | return receive.getNoTaxNeedPay(); | ||||
| }else if (name.equals("taxNeedPay")) { | |||||
| return receive.getTaxNeedPay(); | |||||
| }else if (name.equals("paid")) { | }else if (name.equals("paid")) { | ||||
| return receive.getPaid(); | return receive.getPaid(); | ||||
| }else if (name.equals("owe")) { | }else if (name.equals("owe")) { | ||||
| @@ -337,6 +337,19 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||||
| bq.setPaid(payTotal.toPlainString()); | bq.setPaid(payTotal.toPlainString()); | ||||
| bq.setOwe(oweTotal.toPlainString()); | bq.setOwe(oweTotal.toPlainString()); | ||||
| bq.setCurrentTime(new Date()); | bq.setCurrentTime(new Date()); | ||||
| if (null != merchantMap && null != bq.getMerchantId()) { | |||||
| WxMerchant merchant = merchantMap.get(bq.getMerchantId()); | |||||
| if (null != merchant) { | |||||
| bq.setCusName(merchant.getLinkPerson()); | |||||
| bq.setCusPhone(merchant.getLinkPhone()); | |||||
| }else { | |||||
| bq.setCusName(""); | |||||
| bq.setCusPhone(""); | |||||
| } | |||||
| }else { | |||||
| bq.setCusName(""); | |||||
| bq.setCusPhone(""); | |||||
| } | |||||
| PrintVo vo = handleComponentData(bq.getMerchantId(),templateId,o,items, printMerchantSettleDataHandler,bq,printMerchantSettleItemDataHandler, sumlist,merchantMap,feesMap,shopNumber); | PrintVo vo = handleComponentData(bq.getMerchantId(),templateId,o,items, printMerchantSettleDataHandler,bq,printMerchantSettleItemDataHandler, sumlist,merchantMap,feesMap,shopNumber); | ||||
| if (null != vo) { | if (null != vo) { | ||||
| voList.add(vo); | voList.add(vo); | ||||
| @@ -544,20 +544,22 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| wxBillDeposit.setReceivePay(needpay); | wxBillDeposit.setReceivePay(needpay); | ||||
| //wxBillDeposit.setOwe(needpay); | //wxBillDeposit.setOwe(needpay); | ||||
| Date date = new Date(); | Date date = new Date(); | ||||
| Calendar instance = Calendar.getInstance(); | |||||
| instance.setTime(wxPropertyContract.getRentalStartDate()); | |||||
| instance.add(Calendar.DAY_OF_MONTH, -1); | |||||
| Date time = instance.getTime(); | |||||
| //账单开始时间 | |||||
| instance.clear(); | |||||
| instance.setTime(time); | |||||
| instance.add(Calendar.DAY_OF_MONTH, 1); | |||||
| wxBillDeposit.setStarttime(instance.getTime()); | |||||
| //账单结束时间 | |||||
| instance.clear(); | |||||
| instance.setTime(time); | |||||
| instance.add(dayType, wxPropertyContract.getLease()); | |||||
| wxBillDeposit.setEndtime(instance.getTime()); | |||||
| // Calendar instance = Calendar.getInstance(); | |||||
| // instance.setTime(wxPropertyContract.getRentalStartDate()); | |||||
| // instance.add(Calendar.DAY_OF_MONTH, -1); | |||||
| // Date time = instance.getTime(); | |||||
| // //账单开始时间 | |||||
| // instance.clear(); | |||||
| // instance.setTime(time); | |||||
| // instance.add(Calendar.DAY_OF_MONTH, 1); | |||||
| // wxBillDeposit.setStarttime(instance.getTime()); | |||||
| wxBillDeposit.setStarttime(record.getFirstBillDateStart()); | |||||
| // //账单结束时间 | |||||
| // instance.clear(); | |||||
| // instance.setTime(time); | |||||
| // instance.add(dayType, wxPropertyContract.getLease()); | |||||
| // wxBillDeposit.setEndtime(instance.getTime()); | |||||
| wxBillDeposit.setEndtime(record.getFirstBillDateEnd()); | |||||
| wxBillDeposit.setStatus(EnumBillStatus.WAIT_PAY.getCode()); | wxBillDeposit.setStatus(EnumBillStatus.WAIT_PAY.getCode()); | ||||
| wxBillDeposit.updateTenantInfo(wxPropertyContract); | wxBillDeposit.updateTenantInfo(wxPropertyContract); | ||||
| wxBillDeposit.setMerchantId(record.getMerchantId()); | wxBillDeposit.setMerchantId(record.getMerchantId()); | ||||