|
@@ -331,13 +331,16 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements IB
|
331
|
331
|
billInvoice.setCommunityId(userElement.getCommunityId());
|
332
|
332
|
billInvoice.setBillId(bill.getId());
|
333
|
333
|
|
|
334
|
+ /**
|
|
335
|
+ * 需要知道这个房产的业主
|
|
336
|
+ */
|
334
|
337
|
// 楼栋资料库
|
335
|
338
|
QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
|
336
|
|
- queryWrapper.eq("phase", e.getPhase());
|
337
|
|
- queryWrapper.eq("building", e.getBuilding());
|
338
|
|
- queryWrapper.eq("unit", e.getUnit());
|
339
|
|
- queryWrapper.eq("level", e.getLevel());
|
340
|
|
- queryWrapper.eq("room_no", e.getRoomNo());
|
|
339
|
+ queryWrapper.eq("phase_id", e.getPhase());
|
|
340
|
+ queryWrapper.eq("building_id", e.getBuilding());
|
|
341
|
+ queryWrapper.eq("unit_id", e.getUnit());
|
|
342
|
+ queryWrapper.eq("level_id", e.getLevel());
|
|
343
|
+ queryWrapper.eq("room_no_id", e.getRoomNo());
|
341
|
344
|
queryWrapper.eq("community_id", userElement.getCommunityId());
|
342
|
345
|
TpBuildingOwnerInfo buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectOne(queryWrapper);
|
343
|
346
|
if (null == buildingOwnerInfo) {
|
|
@@ -629,6 +632,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements IB
|
629
|
632
|
// 分页查询
|
630
|
633
|
QueryWrapper<TpBuildingOwnerInfo> buildingOwnerInfoQueryWrapper = new QueryWrapper<>();
|
631
|
634
|
buildingOwnerInfoQueryWrapper.eq("community_id", userElement.getCommunityId());
|
|
635
|
+ buildingOwnerInfoQueryWrapper.groupBy("phase_id", "building_id", "unit_id", "level_id", "room_no_id");
|
632
|
636
|
IPage<TpBuildingOwnerInfo> infoIPage = tpBuildingOwnerInfoMapper.selectPage(page, buildingOwnerInfoQueryWrapper);
|
633
|
637
|
List<TpBuildingOwnerInfo> records = infoIPage.getRecords();
|
634
|
638
|
// 总页数
|
|
@@ -655,7 +659,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements IB
|
655
|
659
|
cell = row.createCell(4);
|
656
|
660
|
cell.setCellValue(buildingOwnerInfo.getRoomNoName());
|
657
|
661
|
cell = row.createCell(5);
|
658
|
|
- cell.setCellValue(buildingOwnerInfo.getOwnerName());
|
|
662
|
+ cell.setCellValue(buildingOwnerInfo.getOwnerName() + "");
|
659
|
663
|
currentRow ++;
|
660
|
664
|
index ++;
|
661
|
665
|
if (index == records.size()) {
|