|
|
|
@@ -127,8 +127,25 @@ public class WxAgileContractServiceImpl implements WxAgileContractService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxRentContract> getRentContractList(WxRentContract rentContract, Integer pageIndex, Integer pageSize) { |
|
|
|
if (StringUtils.isNoneBlank(rentContract.getFloorForRule())) { |
|
|
|
List<Long> contractIds = this.findBuildingFloorContractIds(rentContract, rentContract.getFloorForRule(), null, null, null, 0); |
|
|
|
if (StringUtils.isNotBlank(rentContract.getFloorForRule()) || StringUtils.isNotBlank(rentContract.getQueryShopIdStr())) { |
|
|
|
List<Long> shopIdList = null; |
|
|
|
if (StringUtils.isNotBlank(rentContract.getQueryShopIdStr())) { |
|
|
|
String[] qsids = rentContract.getQueryShopIdStr().split(","); |
|
|
|
if (null != qsids && qsids.length > 0 ) { |
|
|
|
shopIdList = new ArrayList<Long>(); |
|
|
|
for (int i = 0 ; i < qsids.length ; i ++) { |
|
|
|
String qsid = qsids[i]; |
|
|
|
if (StringUtils.isNotBlank(qsid)) { |
|
|
|
shopIdList.add(Long.parseLong(qsid)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (shopIdList.size() <= 0 ) { |
|
|
|
shopIdList = null; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<Long> contractIds = this.findBuildingFloorContractIds(rentContract, rentContract.getFloorForRule(), null, null, shopIdList, 0); |
|
|
|
//List<Long> mids = wxMerchantService.getFloorBuildMerchantIds(rentContract, rentContract.getFloorForRule() , null, null,rentContract.getShopTypeForRule(), 0, 0,null); |
|
|
|
if (null == contractIds || contractIds.size() <= 0 ) { |
|
|
|
rentContract.setId(-1L); |
|
|
|
@@ -136,6 +153,18 @@ public class WxAgileContractServiceImpl implements WxAgileContractService { |
|
|
|
rentContract.setIds(contractIds); |
|
|
|
} |
|
|
|
} |
|
|
|
//根据客户名称查询 |
|
|
|
if (StringUtils.isNotBlank(rentContract.getMerchantName())) { |
|
|
|
WxContractCustomers ccq = new WxContractCustomers(); |
|
|
|
ccq.updateTenantInfo(rentContract); |
|
|
|
ccq.setName(rentContract.getMerchantName()); |
|
|
|
List<Long> customersIdList = wxContractCustomersMapper.findIdList(ccq); |
|
|
|
if (null != customersIdList && customersIdList.size() > 0 ) { |
|
|
|
rentContract.setCustomersIdList(customersIdList); |
|
|
|
}else { |
|
|
|
rentContract.setId(-1L); |
|
|
|
} |
|
|
|
} |
|
|
|
PageInfo<WxRentContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.findList(rentContract)); |
|
|
|
if (null != pageInfo && null != pageInfo.getList() && pageInfo.getList().size() > 0 ) { |
|
|
|
List<Long> customersIdList = new ArrayList<Long>(); |
|
|
|
|