获取当前楼栋的所有房屋信息接口新增字段 --renpc

This commit is contained in:
Renpc-kilig 2023-11-17 11:06:40 +08:00
parent c6a808fb1c
commit 62a35b4e60
2 changed files with 18 additions and 0 deletions

View File

@ -102,6 +102,8 @@ public class BatchHouseDTO {
private String name;
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
private String gmtCreate;
@ApiModelProperty(name = "isCreator", value = "是否时创建人")
private Integer isCreator;
public String getHouseId() {
return houseId;
@ -126,6 +128,14 @@ public class BatchHouseDTO {
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Integer getIsCreator() {
return isCreator;
}
public void setIsCreator(Integer isCreator) {
this.isCreator = isCreator;
}
}
}

View File

@ -259,6 +259,10 @@ public class HouseServiceImpl extends AbstractService implements IHouseService {
@Override
public BatchHouseDTO getAllHouse(Map<String, Object> params) {
// 获取当前登陆人ID
UserInfoBO userInfoBO = this.securityComponent.getCurrentUser();
String userId = userInfoBO.getUserId();
BatchHouseDTO batchHouseDTO = new BatchHouseDTO();
// 获取楼栋信息
BuildingDTO buildingDTO = buildingService.get(params.get("buildingId").toString());
@ -291,9 +295,13 @@ public class HouseServiceImpl extends AbstractService implements IHouseService {
if (i == houseDTO.getAffiliationFloors()) {
if (null != houseDTO.getAffiliatedUnit()) {
if (j == houseDTO.getAffiliationUnit()) {
house.setIsCreator(0);
house.setHouseId(houseDTO.getHouseId());
house.setName(houseDTO.getHouseNum().toString());
house.setGmtCreate(houseDTO.getGmtCreate());
if(userId.equals(houseDTO.getCreator())) {
house.setIsCreator(1);
}
houseList.add(house);
}
}