|
@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.idea.buildManage.constant.ConstantNodeType;
|
|
|
+import com.idea.buildManage.dto.ProjectHouseAllVo;
|
|
|
import com.idea.buildManage.dto.ProjectHouseVo;
|
|
|
import com.idea.buildManage.excel.MnpBuildingExcel;
|
|
|
import com.idea.buildManage.excel.ParkRoomExcel;
|
|
@@ -27,15 +28,19 @@ import com.idea.buildManage.vo.ParkRoomNode;
|
|
|
import com.idea.buyingMore.mapper.BuyingMoreMapper;
|
|
|
import com.idea.buyingMore.model.BuyingMore;
|
|
|
import com.idea.buyingMore.model.BuyingMoreExample;
|
|
|
+import com.idea.buyingMore.service.BuyingMoreService;
|
|
|
+import com.idea.customerManagement.dto.ContractManageDto;
|
|
|
import com.idea.customerManagement.mapper.BuyerMapper;
|
|
|
import com.idea.customerManagement.mapper.ContractManageMapper;
|
|
|
import com.idea.customerManagement.mapper.CustomerManagementMapper;
|
|
|
import com.idea.customerManagement.mapper.RoomSelectionInfoMapper;
|
|
|
import com.idea.customerManagement.model.*;
|
|
|
+import com.idea.customerManagement.service.BuyerService;
|
|
|
import com.idea.invoice.mapper.InvoiceManageMapper;
|
|
|
import com.idea.invoice.model.InvoiceManage;
|
|
|
import com.idea.invoice.model.InvoiceManageExample;
|
|
|
import com.idea.invoice.util.InvoiceUtil;
|
|
|
+import com.idea.paymentManagement.mapper.PayLogExtendMapper;
|
|
|
import com.idea.paymentManagement.mapper.PayLogMapper;
|
|
|
import com.idea.paymentManagement.mapper.RefundManageMapper;
|
|
|
import com.idea.paymentManagement.model.PayLog;
|
|
@@ -114,7 +119,11 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
|
|
|
@Autowired
|
|
|
private PayLogMapper payLogMapper;
|
|
|
@Autowired
|
|
|
+ private PayLogExtendMapper payLogExtendMapper;
|
|
|
+ @Autowired
|
|
|
private HouseTypeMapper houseTypeMapper;
|
|
|
+ @Autowired
|
|
|
+ private BuyerService buyerService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -220,8 +229,8 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
|
|
|
log.info("推送房间修改详情:{}", json.toJSONString());
|
|
|
// 给nc推送修改载体数据
|
|
|
InvoiceUtil.defdocUpdate(json);
|
|
|
- }catch (Exception e){
|
|
|
- log.error("推送修改房间失败",e);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("推送修改房间失败", e);
|
|
|
}
|
|
|
return updateByPrimaryKeySelective(model);
|
|
|
}
|
|
@@ -315,8 +324,8 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("ncid", parkRoom.getNcid());
|
|
|
InvoiceUtil.defdocDisable(json);
|
|
|
- }catch (Exception e){
|
|
|
- log.error("房间禁用失败:",e);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("房间禁用失败:", e);
|
|
|
}
|
|
|
|
|
|
return result;
|
|
@@ -740,4 +749,45 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public List<ProjectHouseAllVo> projectHouseAllVoList(ParkRoomResponse model) {
|
|
|
+
|
|
|
+ // 买受人
|
|
|
+ List<Buyer> buyers = buyerService.selectByExample(new BuyerExample());
|
|
|
+ Map<String, List<Buyer>> buyerMap = buyers.stream().collect(Collectors.groupingBy(Buyer::getCustomerManagementId));
|
|
|
+ // 入住信息
|
|
|
+ List<CheckIn> checkIns = checkInMapper.selectByExample(new CheckInExample());
|
|
|
+ Map<String, CheckIn> checkInMap = checkIns.stream().collect(Collectors.toMap(CheckIn::getContractManageId, item -> item, (existing, replacement) -> existing));
|
|
|
+ // 付款信息
|
|
|
+ ContractManageDto contractManageDto = new ContractManageDto();
|
|
|
+ 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<ProjectHouseAllVo> projectHouseAllVos = extendMapper.projectHouseAllVoList(model);
|
|
|
+ for(ProjectHouseAllVo houseAllVo: projectHouseAllVos){
|
|
|
+ if (buyerMap.containsKey(houseAllVo.getCustomerManagementId())){
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
|
+ List<Buyer> buyerInfo = buyerMap.get(houseAllVo.getCustomerManagementId());
|
|
|
+ for(Buyer buyer : buyerInfo){
|
|
|
+ builder.append(buyer.getName())
|
|
|
+ .append(",");
|
|
|
+ }
|
|
|
+ if(builder.length() > 0){
|
|
|
+ builder.deleteCharAt(builder.length()-1);
|
|
|
+ }
|
|
|
+ houseAllVo.setBuyerName(builder.toString());
|
|
|
+ }
|
|
|
+ if (checkInMap.containsKey(houseAllVo.getContractId())){
|
|
|
+ CheckIn checkIn = checkInMap.get(houseAllVo.getContractId());
|
|
|
+ houseAllVo.setCheckInDate(checkIn.getInDate());
|
|
|
+ }
|
|
|
+ if(contractManageMap.containsKey(houseAllVo.getContractId())){
|
|
|
+ ContractManageDto contractManage = contractManageMap.get(houseAllVo.getContractId());
|
|
|
+ houseAllVo.setReceivedMoney(contractManage.getReceivedMoney());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return projectHouseAllVos;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|