diff --git a/src/main/java/com/cm/population/controller/api/residential/ResidentialController.java b/src/main/java/com/cm/population/controller/api/residential/ResidentialController.java index 9961d2d..44070b7 100644 --- a/src/main/java/com/cm/population/controller/api/residential/ResidentialController.java +++ b/src/main/java/com/cm/population/controller/api/residential/ResidentialController.java @@ -190,7 +190,7 @@ public class ResidentialController extends AbstractController { @ApiOperation(value = "新增小区管理", notes = "新增小区管理接口") @GetMapping("excel") public SuccessResult excel() { - String fileName = "C:\\Users\\29492\\Desktop\\民族东路社区(1).xlsx"; + String fileName = "C:\\Users\\29492\\Desktop\\万泉佳苑底店楼宇批量导入.xlsx"; List list = EasyExcel.read(fileName, ReadExcelResidentialModel.class, new AnalysisEventListener() { diff --git a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java index 1ad670e..6a17ce6 100644 --- a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java +++ b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java @@ -515,7 +515,13 @@ public class HouseServiceImpl extends AbstractService implements IHouseService { flagNum += 1; } - houseNum = floor + "0" + flagNum; + if(flagNum < 10) { + houseNum = floor + "0" + flagNum; + }else { + houseNum = floor + "" + flagNum; + } + + HouseVO houseVO = new HouseVO(); // 基本信息:街道、社区、小区、楼栋