|
@@ -762,39 +762,135 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
|
|
|
contractManageDto.setPayType("1");
|
|
|
List<ContractManageDto> contractManages = payLogExtendMapper.listByModel(contractManageDto);
|
|
|
Map<String, ContractManageDto> contractManageMap = contractManages.stream().collect(Collectors.toMap(ContractManageDto::getId, item -> item, (existing, replacement) -> existing));
|
|
|
+
|
|
|
+ List<PayLog> payLogs = payLogMapper.selectByExample(new PayLogExample());
|
|
|
+ Map<String, List<PayLog>> payLogMap = payLogs.stream()
|
|
|
+ .filter(payLog -> payLog.getContractId() != null)
|
|
|
+ .collect(Collectors.groupingBy(PayLog::getContractId));
|
|
|
+ HashMap<String, String> payLogMapStr = new HashMap<>();
|
|
|
+ for (String key : payLogMap.keySet()) {
|
|
|
+ List<PayLog> payLogsInfo = payLogMap.get(key);
|
|
|
+ if (CollectionUtils.isNotEmpty(payLogsInfo)) {
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
|
+ for (PayLog payLog : payLogsInfo) {
|
|
|
+ Date payTime = payLog.getPayTime();
|
|
|
+ BigDecimal payMoney = payLog.getPayMoney();
|
|
|
+ Integer contentType = payLog.getContentType();
|
|
|
+ Integer paymentMethod = payLog.getPaymentMethod();
|
|
|
+ String contentTypeStr = "";
|
|
|
+ String paymentMethodStr = "";
|
|
|
+ // 1-定金,2-首付,3-银行按揭,4-专项维修资金,5-楼款,6-补差款,7-意向金,8-首款-定金转,9-房款-定金转
|
|
|
+ switch (contentType) {
|
|
|
+ case 1:
|
|
|
+ contentTypeStr = "定金";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ contentTypeStr = "首付";
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ contentTypeStr = "银行按揭";
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ contentTypeStr = "专项维修资金";
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ contentTypeStr = "楼款";
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ contentTypeStr = "补差款";
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ contentTypeStr = "意向金";
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ contentTypeStr = "首款-定金转";
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ contentTypeStr = "房款-定金转";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ contentTypeStr = "其他";
|
|
|
+ }
|
|
|
+ // 1-现金,2-支付宝,3-微信,4-银行卡,
|
|
|
+ switch (paymentMethod) {
|
|
|
+ case 1:
|
|
|
+ paymentMethodStr = "现金";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ paymentMethodStr = "支付宝";
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ paymentMethodStr = "微信";
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ paymentMethodStr = "银行卡";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ paymentMethodStr = "其他";
|
|
|
+ }
|
|
|
+ builder.append(DateUtils.parseDateToStr("yyyy-MM-dd", payTime))
|
|
|
+ .append(paymentMethodStr)
|
|
|
+ .append("收到")
|
|
|
+ .append(contentTypeStr)
|
|
|
+ .append(payMoney).append("元;");
|
|
|
+ }
|
|
|
+ payLogMapStr.put(key, builder.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 选房信息
|
|
|
List<CustomerManagement> customerManagements = customerManagementMapper.selectByExample(new CustomerManagementExample());
|
|
|
Map<String, CustomerManagement> customerManagementMap = customerManagements.stream().collect(Collectors.toMap(CustomerManagement::getId, item -> item, (existing, replacement) -> existing));
|
|
|
|
|
|
|
|
|
List<ProjectHouseAllVo> projectHouseAllVos = extendMapper.projectHouseAllVoList(model);
|
|
|
- for(ProjectHouseAllVo houseAllVo: projectHouseAllVos){
|
|
|
- if (buyerMap.containsKey(houseAllVo.getCustomerManagementId())){
|
|
|
+ for (ProjectHouseAllVo houseAllVo : projectHouseAllVos) {
|
|
|
+ // 买受人信息
|
|
|
+ if (buyerMap.containsKey(houseAllVo.getCustomerManagementId())) {
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
+ StringBuilder phoneBuilder = new StringBuilder();
|
|
|
+
|
|
|
List<Buyer> buyerInfo = buyerMap.get(houseAllVo.getCustomerManagementId());
|
|
|
- for(Buyer buyer : buyerInfo){
|
|
|
+ for (Buyer buyer : buyerInfo) {
|
|
|
builder.append(buyer.getName())
|
|
|
.append(",");
|
|
|
+ phoneBuilder.append(buyer.getPhone())
|
|
|
+ .append(",");
|
|
|
+ }
|
|
|
+ if (builder.length() > 0) {
|
|
|
+ builder.deleteCharAt(builder.length() - 1);
|
|
|
}
|
|
|
- if(builder.length() > 0){
|
|
|
- builder.deleteCharAt(builder.length()-1);
|
|
|
+ if (phoneBuilder.length() > 0) {
|
|
|
+ phoneBuilder.deleteCharAt(phoneBuilder.length() - 1);
|
|
|
}
|
|
|
houseAllVo.setBuyerName(builder.toString());
|
|
|
+ houseAllVo.setBuyerPhone(phoneBuilder.toString());
|
|
|
}
|
|
|
- if (checkInMap.containsKey(houseAllVo.getContractId())){
|
|
|
+ // 入住信息
|
|
|
+ if (checkInMap.containsKey(houseAllVo.getContractId())) {
|
|
|
CheckIn checkIn = checkInMap.get(houseAllVo.getContractId());
|
|
|
houseAllVo.setCheckInDate(checkIn.getInDate());
|
|
|
}
|
|
|
- if(contractManageMap.containsKey(houseAllVo.getContractId())){
|
|
|
+ // 合同信息
|
|
|
+ if (contractManageMap.containsKey(houseAllVo.getContractId())) {
|
|
|
ContractManageDto contractManage = contractManageMap.get(houseAllVo.getContractId());
|
|
|
+// houseAllVo.setContractHousePrice(contractManage.getHousePrice());
|
|
|
+// houseAllVo.setContractBuyerMoney(contractManage.getBuyerMoney());
|
|
|
+// houseAllVo.setReceivableMoney(contractManage.getBuyerMoney());
|
|
|
houseAllVo.setReceivedMoney(contractManage.getReceivedMoney());
|
|
|
+ houseAllVo.setArrears(contractManage.getArrears());
|
|
|
}
|
|
|
- if(customerManagementMap.containsKey(houseAllVo.getCustomerManagementId())){
|
|
|
+ // 客户房信息
|
|
|
+ if (customerManagementMap.containsKey(houseAllVo.getCustomerManagementId())) {
|
|
|
CustomerManagement customerManagement = customerManagementMap.get(houseAllVo.getCustomerManagementId());
|
|
|
houseAllVo.setRoomSelectionDate(customerManagement.getRoomSelectionDate());
|
|
|
houseAllVo.setBatchNumber(customerManagement.getBatchNumber());
|
|
|
houseAllVo.setRoomSelectionNumber(customerManagement.getRoomSelectionNumber());
|
|
|
}
|
|
|
+ // 付款详情
|
|
|
+ if (payLogMapStr.containsKey(houseAllVo.getContractId())) {
|
|
|
+ houseAllVo.setPayInfo(payLogMapStr.get(houseAllVo.getContractId()));
|
|
|
+ }
|
|
|
}
|
|
|
return projectHouseAllVos;
|
|
|
}
|