From e6b58c914b561cf1e09fddf995ff434681bff13e Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Wed, 16 Feb 2022 16:29:27 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../citybuilding/impl/CityBuildingServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/cm/population/service/citybuilding/impl/CityBuildingServiceImpl.java b/src/main/java/com/cm/population/service/citybuilding/impl/CityBuildingServiceImpl.java index 5d735c2..805a710 100644 --- a/src/main/java/com/cm/population/service/citybuilding/impl/CityBuildingServiceImpl.java +++ b/src/main/java/com/cm/population/service/citybuilding/impl/CityBuildingServiceImpl.java @@ -118,7 +118,7 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui } cityBuildingDao.saveCityBuilding(params); // 自动生成楼宇内的房屋信息 - saveHouse(cityBuildingId, cityBuildingVO, null, "save"); + saveHouse(cityBuildingId, cityBuildingVO, null, "save", token); return cityBuildingId; } @@ -270,7 +270,7 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui Integer newFloor = Integer.valueOf(cityBuildingVO.getBuildingFloor()); if(newFloor > oldFloor) { removeValue = Integer.valueOf(cityBuildingVO.getBuildingFloor()); - saveHouse(cityBuildingId, cityBuildingVO, cityBuildingDTO, "buildingFloor"); + saveHouse(cityBuildingId, cityBuildingVO, cityBuildingDTO, "buildingFloor", token); }else { String buildingNum = cityBuildingVO.getBuildingNum(); Integer unitNum = Integer.valueOf(cityBuildingDTO.getBuildingUnitNum()); @@ -293,7 +293,7 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui Integer newCount = Integer.valueOf(cityBuildingVO.getCountOfFloor()); if(newCount > oldCount) { removeValue = Integer.valueOf(cityBuildingVO.getCountOfFloor()); - saveHouse(cityBuildingId, cityBuildingVO, cityBuildingDTO, "countOfFloor"); + saveHouse(cityBuildingId, cityBuildingVO, cityBuildingDTO, "countOfFloor", token); }else { String buildingNum = cityBuildingVO.getBuildingNum(); Integer unitNum = Integer.valueOf(cityBuildingDTO.getBuildingUnitNum()); @@ -316,7 +316,7 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui Integer newUnitNum = Integer.valueOf(cityBuildingVO.getBuildingUnitNum()); if(newUnitNum > oldUnitNum) { removeValue =Integer.valueOf(cityBuildingVO.getBuildingUnitNum()); - saveHouse(cityBuildingId, cityBuildingVO, cityBuildingDTO, "buildingUnitNum"); + saveHouse(cityBuildingId, cityBuildingVO, cityBuildingDTO, "buildingUnitNum", token); }else { String buildingNum = cityBuildingVO.getBuildingNum(); Integer floor = Integer.valueOf(cityBuildingDTO.getBuildingFloor()); @@ -342,7 +342,7 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui /** * 自动生成楼宇内的房屋信息 */ - private void saveHouse(String cityBuildingId, CityBuildingVO cityBuildingVO, CityBuildingDTO cityBuildingDTO, String value) throws Exception { + private void saveHouse(String cityBuildingId, CityBuildingVO cityBuildingVO, CityBuildingDTO cityBuildingDTO, String value, String token) throws Exception { // 获取楼宇层数和每层户数以及单元数,用于自动生成该楼宇内的房屋信息 // 楼宇编号 String buildingNum = cityBuildingVO.getBuildingNum(); @@ -377,7 +377,7 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui String floorNum = k < 10 ? "0"+k : "" + k; buildingHouseVO.setHouseNumber(buildingNum + "栋" + i + "单元" + j + "楼" + j + floorNum); buildingHouseVO.setDataType(1); - buildingHouseService.save(buildingHouseVO); + buildingHouseService.save(token, buildingHouseVO); } } }