From 131001ad805abf36395a09f189220823ee058de1 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Mon, 18 Dec 2023 14:38:40 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=20=20--renpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/api/residential/ResidentialController.java | 2 +- .../population/service/house/impl/HouseServiceImpl.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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(); // 基本信息:街道、社区、小区、楼栋