| @@ -13,6 +13,7 @@ import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxAllBill; | |||
| import com.iformall.domain.po.WxBillAction; | |||
| import com.iformall.domain.po.WxBillPayWay; | |||
| import com.iformall.domain.po.WxEnergyFees; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.WxMerchantBUser; | |||
| import com.iformall.domain.po.WxPropertyContract; | |||
| @@ -32,10 +33,12 @@ import com.iformall.mapper.WxRentContractMapper; | |||
| import com.iformall.service.ExcelService; | |||
| import com.iformall.service.WxAllBillService; | |||
| import com.iformall.service.WxBillActionService; | |||
| import com.iformall.service.WxEnergyService; | |||
| import com.iformall.service.WxFinanceService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.WxMerchantTradeDailyService; | |||
| import com.iformall.service.WxPayAccountBillService; | |||
| import com.iformall.service.WxShopService; | |||
| import com.iformall.service.helper.WxBillAllHelper; | |||
| import com.iformall.utils.Constant; | |||
| import com.iformall.utils.DateUtils; | |||
| @@ -93,6 +96,9 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||
| @Lazy | |||
| @Autowired | |||
| WxMerchantService wxMerchantService; | |||
| @Lazy | |||
| @Autowired | |||
| WxShopService wxShopService; | |||
| @Lazy | |||
| @Autowired | |||
| @@ -102,6 +108,10 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||
| @Autowired | |||
| WxFinanceService wxFinanceService; | |||
| @Lazy | |||
| @Autowired | |||
| WxEnergyService wxEnergyService; | |||
| @Autowired | |||
| WxRentContractMapper wxRentContractMapper; | |||
| @@ -146,7 +156,48 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||
| @Override | |||
| public PageInfo<WxAllBill> listAsPage(WxAllBill record, Integer pageIndex, Integer pageSize) { | |||
| updateQueryParam(record); | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxAllBillMapper.findList(record)); | |||
| PageInfo<WxAllBill> billRentList = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxAllBillMapper.findList(record)); | |||
| if (null == billRentList) { | |||
| return null; | |||
| } | |||
| Map<Long,WxRentContract> rentContractMap = new HashMap<Long,WxRentContract>(); | |||
| if (null != billRentList.getList()) { | |||
| List<Long> merchantIds = new ArrayList<Long>(); | |||
| for (int i = 0 ; i < billRentList.getList().size() ; i ++) { | |||
| WxAllBill ab = billRentList.getList().get(i); | |||
| merchantIds.add(ab.getMerchantId()); | |||
| } | |||
| Map<Long, String> shopNumberMap = wxShopService.getMerchantShopNumberMap(record, merchantIds, null); | |||
| WxMerchant mq = new WxMerchant(); | |||
| mq.updateTenantInfo(record); | |||
| mq.setIds(merchantIds); | |||
| Map<Long, WxMerchant> merchantMap = wxMerchantService.findMerchantMap(mq); | |||
| WxEnergyFees fq = new WxEnergyFees(); | |||
| fq.updateTenantInfo(record); | |||
| Map<Long, WxEnergyFees> feesMap = wxEnergyService.getFeesMap(fq); | |||
| for (int i = 0 ; i < billRentList.getList().size() ; i ++) { | |||
| WxAllBill e = billRentList.getList().get(i); | |||
| if (null != shopNumberMap) { | |||
| e.setShopNumber(shopNumberMap.get(e.getMerchantId())); | |||
| } | |||
| if (null != merchantMap) { | |||
| WxMerchant m = merchantMap.get(e.getMerchantId()); | |||
| if (null != m) { | |||
| e.setMerchantName(m.getName()); | |||
| } | |||
| } | |||
| if (null != feesMap) { | |||
| WxEnergyFees f = feesMap.get(e.getEnergyFeesId()); | |||
| if (null != f) { | |||
| e.setEnergyFeesName(f.getName()); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| return billRentList; | |||
| } | |||
| @Override | |||