diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java index be68d37843..1d54c3c314 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java @@ -16,7 +16,7 @@ public interface ImportErrorMsgConstants { String NEIGHBOR_HOOD_ERROR = "所属组织、所属网格、详细地址的值未填写,或者所填写信息在系统中未找到"; String HOUSE_ERROR_NAME = "导入失败的列表-房屋"; - String BUILDING_ERROR_NAME = "导入失败的列表-楼宇"; + String BUILDING_ERROR_NAME = "导入失败的列表-楼栋"; String NEIGHBORHOOD_ERROR_NAME = "导入失败的列表-小区"; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java index 2991258f53..39245ab7db 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java @@ -136,7 +136,7 @@ public class BuildingController { TemplateExportParams templatePath = new TemplateExportParams("excel/building_template.xlsx"); Map map = new HashMap<>(); map.put("maplist",new ArrayList()); - ExcelPoiUtils.exportExcel(templatePath ,map,"楼宇信息录入表",response); + ExcelPoiUtils.exportExcel(templatePath ,map,"楼栋信息录入表",response); } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 4b91e3f877..957e1f7c90 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -31,7 +31,6 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constants.ImportTaskConstants; -import com.epmet.dao.IcBuildingDao; import com.epmet.dto.form.*; import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.IcHouseListResultDTO; @@ -40,9 +39,7 @@ import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.excel.IcHouseExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.redis.IcHouseRedis; import com.epmet.service.HouseService; -import com.epmet.service.IcHouseService; import com.epmet.util.ExcelPoiUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -76,12 +73,6 @@ public class HouseController implements ResultDataResolver { @Autowired private EpmetUserOpenFeignClient userOpenFeignClient; @Autowired - private IcBuildingDao icBuildingDao; - @Autowired - private IcHouseRedis icHouseRedis; - @Autowired - private IcHouseService icHouseService; - @Autowired private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; @@ -239,6 +230,8 @@ public class HouseController implements ResultDataResolver { return new Result().ok(str); } + + @PostMapping("queryListHouseInfo") Result> queryListHouseInfo(@RequestBody Set houseIds, @RequestParam("customerId") String customerId) { return new Result>().ok(houseService.queryListHouseInfo(houseIds, customerId)); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java index 8587a72993..0f32e356b7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java @@ -19,15 +19,8 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.dto.result.OptionResultDTO; -import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.IcHouseDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.result.HouseListResultDTO; import com.epmet.dto.result.HousesNameResultDTO; @@ -36,7 +29,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; -import java.util.Map; /** @@ -48,45 +40,10 @@ import java.util.Map; @RestController @RequestMapping("ichouse") public class IcHouseController { - + @Autowired private IcHouseService icHouseService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = icHouseService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - IcHouseDTO data = icHouseService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody IcHouseDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icHouseService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody IcHouseDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - icHouseService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - icHouseService.delete(ids); - return new Result(); - } @PostMapping("houseoption") public Result> getHouseOption(@RequestBody HouseFormDTO formDTO){ return new Result>().ok(icHouseService.getHouseOption(formDTO)); @@ -126,4 +83,4 @@ public class IcHouseController { return new Result>().ok(icHouseService.getHousesNameByIdCards(idCards)); } -} \ No newline at end of file +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java index f7c669b5d9..19a83bf0cf 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java @@ -114,7 +114,7 @@ public class NeighborHoodController { //判断是否存在楼宇,如果存在不能删除 List icBuildingEntities = icBuildingDao.selectList(new QueryWrapper().lambda().eq(IcBuildingEntity::getNeighborHoodId, neighborHoodId)); if(!CollectionUtils.isEmpty(icBuildingEntities)){ - return new Result().error(8001,"小区下已存在楼宇,无法删除"); + return new Result().error(8001,"小区下已存在楼栋,无法删除"); } neighborHoodService.delNeighborhood(neighborHoodId); return new Result().ok("删除成功"); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java index 8bde9b9cff..0caa4a5c71 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java @@ -402,7 +402,7 @@ public class BuildingServiceImpl implements BuildingService { TemplateExportParams templatePath = new TemplateExportParams("excel/building_export.xlsx"); Map map = new HashMap<>(); map.put("maplist",icBuildingExcels); - ExcelPoiUtils.exportExcel(templatePath ,map,"楼宇信息录入表",response); + ExcelPoiUtils.exportExcel(templatePath ,map,"楼栋信息录入表",response); return ; } @Override @@ -535,7 +535,7 @@ public class BuildingServiceImpl implements BuildingService { List icHouseEntities = icHouseDao.selectList(new QueryWrapper().lambda().eq(IcHouseEntity::getBuildingId, formDTO.getBuildingId())); if(!CollectionUtils.isEmpty(icHouseEntities)){ // - throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),"楼宇单元下存在房屋,无法更新"); + throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),"楼栋单元下存在房屋,无法更新"); // icHouseEntities.forEach(item->{ // item.setNeighborHoodId(formDTO.getNeighborHoodId()); // }); @@ -564,7 +564,7 @@ public class BuildingServiceImpl implements BuildingService { icBuildingUnitService.insertBatch(unitList); }else{ //如果小于,判断是否存在房屋,如果存在就提示不能更改 - throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),"楼宇单元下存在房屋,无法更新"); + throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),"楼栋单元下存在房屋,无法更新"); } @@ -581,7 +581,7 @@ public class BuildingServiceImpl implements BuildingService { //如果存在房屋,无法删除 List icHouseEntities = icHouseDao.selectList(new QueryWrapper().lambda().eq(IcHouseEntity::getBuildingId, buildingId)); if(!CollectionUtils.isEmpty(icHouseEntities)){ - throw new RenException(EpmetErrorCode.ORG_DEL_FAILED.getCode(),"楼宇单元下存在房屋,无法删除"); + throw new RenException(EpmetErrorCode.ORG_DEL_FAILED.getCode(),"楼栋单元下存在房屋,无法删除"); } //删除楼宇 icBuildingService.deleteById(buildingId); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 6fb7e02db6..081ba0050c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -411,7 +411,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { } if (!CollectionUtils.isEmpty(exists)){ String collect = exists.stream().map(m -> m.getName()).collect(Collectors.joining(",")); - EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含楼宇信息,暂无法删除",collect)); + EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含楼栋信息,暂无法删除",collect)); throw new EpmetException(EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.getCode()); } }else if (formDTO.getType().equals(CustomerGridConstant.BUILDING)){ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiWarnFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiWarnFormDTO.java index e360113f84..174fc429b2 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiWarnFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiWarnFormDTO.java @@ -59,7 +59,7 @@ public class StatsResiWarnFormDTO implements Serializable { @NotBlank(message = "配置id不能为空",groups = {ListSelectedUser.class}) private String configId; - @NotNull(message = "楼宇不能为空",groups = {ListSelectedUser.class}) + @NotNull(message = "楼栋不能为空",groups = {ListSelectedUser.class}) private List buildingIdList; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcResiUserExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcResiUserExcel.java index 217223a4bb..f0c02ed3f9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcResiUserExcel.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcResiUserExcel.java @@ -49,7 +49,7 @@ public class IcResiUserExcel { @Excel(name = "所属小区ID") private String villageId; - @Excel(name = "所属楼宇Id") + @Excel(name = "所属楼栋Id") private String buildId; @Excel(name = "所属家庭Id") diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcStatsResiWarnExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcStatsResiWarnExcel.java index 59983add12..5cec65426c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcStatsResiWarnExcel.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcStatsResiWarnExcel.java @@ -52,7 +52,7 @@ public class IcStatsResiWarnExcel { @Excel(name = "小区id") private String neighborHoodId; - @Excel(name = "楼宇id") + @Excel(name = "楼栋id") private String buildingId; @Excel(name = "该分类的居民数量") diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java index 0a187604a7..08685568dc 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java @@ -150,7 +150,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { //feign根据buildingIdList 获取网格,小区,楼宇 信息 Result buildingPageList = govOrgOpenFeignClient.buildinglistbyidsPage(buildingIdList,pageNo,pageSize); if (!buildingPageList.success() || null == buildingPageList.getData()) { - throw new RenException("楼宇信息查询失败,buildingList="+ JSON.toJSONString(buildingIdList)); + throw new RenException("楼栋信息查询失败,buildingList="+ JSON.toJSONString(buildingIdList)); } BuildingResultPagedDTO pageData = buildingPageList.getData(); List buildingResultDTOList = pageData.getList();