|
|
|
@@ -14,6 +14,7 @@ import com.iformall.domain.po.WxContractCustomers; |
|
|
|
import com.iformall.domain.po.WxContractShop; |
|
|
|
import com.iformall.domain.po.WxEnergyFees; |
|
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
|
import com.iformall.domain.po.WxPropertyContract; |
|
|
|
import com.iformall.domain.po.WxRentContract; |
|
|
|
import com.iformall.domain.po.WxRentContractAgileDeposit; |
|
|
|
import com.iformall.domain.po.WxRentContractAgileDepositShop; |
|
|
|
@@ -135,9 +136,50 @@ public class WxAgileContractServiceImpl implements WxAgileContractService { |
|
|
|
} |
|
|
|
} |
|
|
|
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>(); |
|
|
|
for (int i = 0 ; i < pageInfo.getList().size(); i ++ ){ |
|
|
|
WxRentContract contract = pageInfo.getList().get(i); |
|
|
|
if (null != contract.getCustomersId()) { |
|
|
|
customersIdList.add(contract.getCustomersId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Map<Long,WxContractCustomers> customersMap = getContractCustomersMap(record,customersIdList); |
|
|
|
|
|
|
|
for (int i = 0 ; i < pageInfo.getList().size(); i ++ ) { |
|
|
|
WxRentContract contract = pageInfo.getList().get(i); |
|
|
|
String merchantName = ""; |
|
|
|
if (null != customersMap && null != contract.getCustomersId()) { |
|
|
|
WxContractCustomers cc = customersMap.get(contract.getCustomersId()); |
|
|
|
if (null != cc) { |
|
|
|
merchantName = merchantName + cc.getName(); |
|
|
|
} |
|
|
|
} |
|
|
|
contract.setMerchantName(merchantName); |
|
|
|
} |
|
|
|
} |
|
|
|
return pageInfo; |
|
|
|
} |
|
|
|
|
|
|
|
private Map<Long,WxContractCustomers> getContractCustomersMap(TenantEntity tenantEntity,List<Long> customerIds) { |
|
|
|
WxContractCustomers ccq = new WxContractCustomers(); |
|
|
|
ccq.updateTenantInfo(tenantEntity); |
|
|
|
ccq.setIds(customerIds); |
|
|
|
List<WxContractCustomers> cclist = wxContractCustomersMapper.findList(ccq); |
|
|
|
if (null != cclist && cclist.size() > 0 ){ |
|
|
|
Map<Long,WxContractCustomers> map = new HashMap<Long,WxContractCustomers>(); |
|
|
|
for (int i = 0 ; i < cclist.size() ; i ++ ) { |
|
|
|
WxContractCustomers cc = cclist.get(i); |
|
|
|
if (null != cc) { |
|
|
|
map.put(cc.getId(),cc); |
|
|
|
} |
|
|
|
} |
|
|
|
return map; |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public WxRentContract selectById(Long id) { |
|
|
|
|