|
|
@ -77,8 +77,28 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
ImportGeneralDTO dto = ConvertUtils.sourceToTarget(data, ImportGeneralDTO.class); |
|
|
|
dto.setNum(num); |
|
|
|
dto.setCustomerId(formDTO.getCustomerId()); |
|
|
|
// 应产品要求
|
|
|
|
if (StringUtils.isNotBlank(dto.getHouseType()) && ( !dto.getHouseType().equals("楼房") || !dto.getHouseType().equals("平房") || !dto.getHouseType().equals("别墅") ) ){ |
|
|
|
nums.add(num); |
|
|
|
return; |
|
|
|
} |
|
|
|
dto.setHouseType(HouseTypeEnums.getKeyByValue(dto.getHouseType())); |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getPurpose()) && (!dto.getPurpose().equals("住宅") || |
|
|
|
!dto.getPurpose().equals("商业") || |
|
|
|
!dto.getPurpose().equals("办公") || |
|
|
|
!dto.getPurpose().equals("工业") || |
|
|
|
!dto.getPurpose().equals("仓储") || |
|
|
|
!dto.getPurpose().equals("商住混用") || |
|
|
|
!dto.getPurpose().equals("其他")) ){ |
|
|
|
nums.add(num); |
|
|
|
return; |
|
|
|
} |
|
|
|
dto.setPurpose(HousePurposeEnums.getKeyByValue(dto.getPurpose())); |
|
|
|
if (StringUtils.isNotBlank(dto.getRentFlagString()) && (!dto.getRentFlagString().equals("出租") || !dto.getRentFlagString().equals("未出租"))){ |
|
|
|
nums.add(num); |
|
|
|
return; |
|
|
|
} |
|
|
|
dto.setRentFlag(HouseRentFlagEnums.getCodeByName(dto.getRentFlagString())); |
|
|
|
dto.setHouseName(dto.getBuildingName()+"-"+dto.getBuildingUnit()+"-"+dto.getDoorName()); |
|
|
|
if (formDTO.getOrgType().equals(CustomerGridConstant.BUILDING)){ |
|
|
@ -110,8 +130,10 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
for (ImportGeneralDTO r : needInsertList) { |
|
|
|
if (k.equals(r.getBuildingUnitId()+"_"+r.getDoorName())){ |
|
|
|
// 集合里重复的
|
|
|
|
if (r.getExistStatus()){ |
|
|
|
nums.add(r.getNum()); |
|
|
|
} |
|
|
|
r.setExistStatus(true); |
|
|
|
nums.add(r.getNum()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -123,8 +145,10 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
for (ImportGeneralDTO n : needInsertList) { |
|
|
|
if ((n.getBuildingUnitId()+"_"+n.getDoorName()).equals(e)){ |
|
|
|
// 库里存在的
|
|
|
|
if (n.getExistStatus()){ |
|
|
|
nums.add(n.getNum()); |
|
|
|
} |
|
|
|
n.setExistStatus(true); |
|
|
|
nums.add(n.getNum()); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|