|
|
@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.text.DecimalFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
@ -117,6 +118,11 @@ public class ImportBuildingInfoListener extends AnalysisEventListener<BuildingIn |
|
|
|
disposeErrorMsg(info,"单元数的值未填写"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (null == data.getSort()){ |
|
|
|
data.setSort(NumConstant.ZERO_DOT_ZERO); |
|
|
|
}else { |
|
|
|
data.setSort(getDouble(data.getSort())); |
|
|
|
} |
|
|
|
// 应产品要求添加
|
|
|
|
if (StringUtils.isNotBlank(dto.getType()) && (!dto.getType().equals("商品房") && !dto.getType().equals("自建房")) && !dto.getType().equals("别墅")){ |
|
|
|
nums.add(num); |
|
|
@ -137,6 +143,14 @@ public class ImportBuildingInfoListener extends AnalysisEventListener<BuildingIn |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public Double getDouble(Double d){ |
|
|
|
if (null == d){ |
|
|
|
return NumConstant.ZERO_DOT_ZERO; |
|
|
|
} |
|
|
|
DecimalFormat df = new DecimalFormat("#.##"); |
|
|
|
return Double.parseDouble(df.format(d)); |
|
|
|
} |
|
|
|
|
|
|
|
public void finalDispose(){ |
|
|
|
if (CollectionUtils.isEmpty(needDisposeList)){ |
|
|
|
return; |
|
|
|