From 975e97146954f4f35ed1cdc7fb82ea20694d9b06 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Tue, 14 Mar 2023 20:54:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9C=81=E5=90=8D=E5=92=8C?= =?UTF-8?q?=E5=B8=82=E5=90=8D=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/controller/DispatchFirePointController.java | 11 ++++++----- .../service/impl/DispatchFirePointServiceImpl.java | 12 ++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/xkrs/controller/DispatchFirePointController.java b/src/main/java/com/xkrs/controller/DispatchFirePointController.java index ee273c5..768bd80 100644 --- a/src/main/java/com/xkrs/controller/DispatchFirePointController.java +++ b/src/main/java/com/xkrs/controller/DispatchFirePointController.java @@ -12,7 +12,6 @@ import com.xkrs.service.impl.FirePointServiceImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.i18n.LocaleContextHolder; -import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -69,10 +68,12 @@ public class DispatchFirePointController { // sysUserDao.save(sysUserEntity); // } - for (int i = 450; i < 500; i++) { - firePointOrdinaryDao.updateProCityCode(i * 5000L, (i + 1) * 5000L); - firePointOrdinaryDao.updateProCityName(i * 5000L, (i + 1) * 5000L); - System.out.println(i + "/" + 462); + //310 0000 + + for (int i = 0; i < 10000; i++) { + firePointOrdinaryDao.updateProCityCode(i * 310L, (i + 1) * 310L); + firePointOrdinaryDao.updateProCityName(i * 310L, (i + 1) * 310L); + System.out.println(i + "/" + 10000); } return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "OKKKK", locale); diff --git a/src/main/java/com/xkrs/service/impl/DispatchFirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/DispatchFirePointServiceImpl.java index 337d6f2..3f76b11 100644 --- a/src/main/java/com/xkrs/service/impl/DispatchFirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/DispatchFirePointServiceImpl.java @@ -106,9 +106,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { firePointOrdinaryEntity.setAddTime(addTime); StreetEntity streetEntity = obtainInfoByCountyCode(countyCode); if (streetEntity != null) { - firePointOrdinaryEntity.setProCode(streetEntity.getProCode().substring(0, 2)); + firePointOrdinaryEntity.setProCode(streetEntity.getProCode()); firePointOrdinaryEntity.setProName(streetEntity.getProName()); - firePointOrdinaryEntity.setCityCode(streetEntity.getCityCode().substring(0, 4)); + firePointOrdinaryEntity.setCityCode(streetEntity.getCityCode()); firePointOrdinaryEntity.setCityName(streetEntity.getCityName()); } firePointOrdinaryEntity.setCountyCode(countyCode); @@ -141,9 +141,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { firePointPreciseEntity.setAddTime(addTime); StreetEntity streetEntity = obtainInfoByCountyCode(countyCode); if (streetEntity != null) { - firePointPreciseEntity.setProCode(streetEntity.getProCode().substring(0, 2)); + firePointPreciseEntity.setProCode(streetEntity.getProCode()); firePointPreciseEntity.setProName(streetEntity.getProName()); - firePointPreciseEntity.setCityCode(streetEntity.getCityCode().substring(0, 4)); + firePointPreciseEntity.setCityCode(streetEntity.getCityCode()); firePointPreciseEntity.setCityName(streetEntity.getCityName()); } firePointPreciseEntity.setCountyCode(countyCode); @@ -222,9 +222,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { firePointPreciseEntity.setAddTime(addTime); StreetEntity streetEntity = obtainInfoByCountyCode(countyCode); if (streetEntity != null) { - firePointPreciseEntity.setProCode(streetEntity.getProCode().substring(0, 2)); + firePointPreciseEntity.setProCode(streetEntity.getProCode()); firePointPreciseEntity.setProName(streetEntity.getProName()); - firePointPreciseEntity.setCityCode(streetEntity.getCityCode().substring(0, 4)); + firePointPreciseEntity.setCityCode(streetEntity.getCityCode()); firePointPreciseEntity.setCityName(streetEntity.getCityName()); } firePointPreciseEntity.setCountyCode(countyCode);