Browse Source

房屋添加 3:未出售 状态

master
jianjun 3 years ago
parent
commit
22cc7c4507
  1. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java
  2. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java
  3. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java
  4. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java
  5. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java
  6. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java
  7. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java
  8. 18
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java
  9. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java

@ -98,7 +98,7 @@ public class ImportGeneralDTO implements Serializable {
private String purpose;
/**
* 房屋状态 1出租 0自住 2闲置
* 房屋状态 1出租 0自住 2闲置 3:未出售
*/
private String rentFlagString;
private Integer rentFlag;

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java

@ -81,7 +81,7 @@ public class IcHouseAddFormDTO implements Serializable {
private String purpose;
/**
* 1出租 0自住 2闲置
* 1出租 0自住 2闲置 3: 未出售
*/
@NotNull(message = "房屋状态不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class})
private Integer rentFlag;

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java

@ -48,7 +48,7 @@ public class IcHouseListFormDTO extends PageFormDTO {
*/
private String ownerPhone;
/**
* 房屋状态 1出租 0自住 2闲置
* 房屋状态 1出租 0自住 2闲置 3:未出售
*/
private String rentFlag;
/**

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java

@ -50,7 +50,7 @@ public class HouseChartResultDTO implements Serializable {
@JsonIgnore
private Integer num;
//1:出租 0:自住 2:闲置
//1:出租 0:自住 2:闲置 3:未出售
@JsonIgnore
private Integer rentFlag;

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java

@ -8,7 +8,8 @@ public enum HouseRentFlagEnums {
NO(0,"否");*/
HOUSE_ZZ(0,"自住"),
HOUSE_CZ(1,"出租"),
HOUSE_XZ(2,"闲置");
HOUSE_XZ(2,"闲置"),
HOUSE_WCS(3,"未出售");
@ -41,7 +42,7 @@ public enum HouseRentFlagEnums {
public static Integer getCodeByName(String name){
if(StringUtils.isEmpty(name)){
return 0;
return null;
}
for (HouseRentFlagEnums e : HouseRentFlagEnums.values()) {
if (e.getName().equals(name)) {

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java

@ -83,7 +83,7 @@ public class IcHouseEntity extends BaseEpmetEntity {
private String purpose;
/**
* 1出租0未出租
* 1出租 0自住 2闲置 3未出售
*/
private Integer rentFlag;

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java

@ -191,12 +191,14 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
return;
}
dto.setPurpose(HousePurposeEnums.getKeyByValue(dto.getPurpose()));
if (StringUtils.isNotBlank(dto.getRentFlagString()) && (!dto.getRentFlagString().equals("自住") && !dto.getRentFlagString().equals("出租") && !dto.getRentFlagString().equals("闲置"))){
//根据name 获取code 名字没有匹配返回null
Integer rentFlagCode = HouseRentFlagEnums.getCodeByName(dto.getRentFlagString());
if (StringUtils.isNotBlank(dto.getRentFlagString()) && rentFlagCode == null){
nums.add(num);
disposeErrorMsg(info,"房屋状态的值未填写或者所填写信息在系统中未找到");
return;
}
dto.setRentFlag(HouseRentFlagEnums.getCodeByName(dto.getRentFlagString()));
dto.setRentFlag(rentFlagCode);
dto.setHouseName(dto.getBuildingName()+"-"+dto.getBuildingUnit()+"-"+dto.getDoorName());
if (formDTO.getOrgType().equals(CustomerGridConstant.BUILDING)){
disposeBuildingHouse(dto);

18
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java

@ -1,6 +1,5 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -222,19 +221,8 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
HouseListResultDTO dto = new HouseListResultDTO();
dto.setHouseId(item.getId());
dto.setHouseName(item.getHouseName());
switch (item.getRentFlag()) {
case NumConstant.ZERO:
dto.setRentFlag("自住");
break;
case NumConstant.ONE:
dto.setRentFlag("出租");
break;
case NumConstant.TWO:
dto.setRentFlag("闲置");
break;
default:
break;
}
String houseTypeName = HouseRentFlagEnums.getTypeValue(item.getRentFlag());
dto.setRentFlag(houseTypeName == null ? StrConstant.EPMETY_STR:houseTypeName);
List<HouseListResultDTO.CategoryListBean> categories = new ArrayList<>();
if (null != countMap && CollectionUtils.isNotEmpty(categoryList)) {
for (IcResiCategoryStatsConfigDTO category : categoryList) {
@ -302,4 +290,4 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
lqw.eq(IcHouseEntity::getHouseCode, houseCode);
return ConvertUtils.sourceToTarget(baseDao.selectOne(lqw), IcHouseDTO.class);
}
}
}

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -96,6 +96,7 @@
(case when a.RENT_FLAG = '0' then '自住'
when a.RENT_FLAG = '1' then '出租'
when a.RENT_FLAG = '2' then '闲置'
when a.RENT_FLAG = '3' then '未出售'
else '' end) as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
@ -467,6 +468,7 @@
(case when a.RENT_FLAG = '0' then '自住'
when a.RENT_FLAG = '1' then '出租'
when a.RENT_FLAG = '2' then '闲置'
when a.RENT_FLAG = '3' then '未出售'
else '' end) as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,

Loading…
Cancel
Save