优化省名和市名格式
This commit is contained in:
parent
2721cb2326
commit
975e971469
@ -12,7 +12,6 @@ import com.xkrs.service.impl.FirePointServiceImpl;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@ -69,10 +68,12 @@ public class DispatchFirePointController {
|
|||||||
// sysUserDao.save(sysUserEntity);
|
// sysUserDao.save(sysUserEntity);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
for (int i = 450; i < 500; i++) {
|
//310 0000
|
||||||
firePointOrdinaryDao.updateProCityCode(i * 5000L, (i + 1) * 5000L);
|
|
||||||
firePointOrdinaryDao.updateProCityName(i * 5000L, (i + 1) * 5000L);
|
for (int i = 0; i < 10000; i++) {
|
||||||
System.out.println(i + "/" + 462);
|
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);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "OKKKK", locale);
|
||||||
|
@ -106,9 +106,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
|
|||||||
firePointOrdinaryEntity.setAddTime(addTime);
|
firePointOrdinaryEntity.setAddTime(addTime);
|
||||||
StreetEntity streetEntity = obtainInfoByCountyCode(countyCode);
|
StreetEntity streetEntity = obtainInfoByCountyCode(countyCode);
|
||||||
if (streetEntity != null) {
|
if (streetEntity != null) {
|
||||||
firePointOrdinaryEntity.setProCode(streetEntity.getProCode().substring(0, 2));
|
firePointOrdinaryEntity.setProCode(streetEntity.getProCode());
|
||||||
firePointOrdinaryEntity.setProName(streetEntity.getProName());
|
firePointOrdinaryEntity.setProName(streetEntity.getProName());
|
||||||
firePointOrdinaryEntity.setCityCode(streetEntity.getCityCode().substring(0, 4));
|
firePointOrdinaryEntity.setCityCode(streetEntity.getCityCode());
|
||||||
firePointOrdinaryEntity.setCityName(streetEntity.getCityName());
|
firePointOrdinaryEntity.setCityName(streetEntity.getCityName());
|
||||||
}
|
}
|
||||||
firePointOrdinaryEntity.setCountyCode(countyCode);
|
firePointOrdinaryEntity.setCountyCode(countyCode);
|
||||||
@ -141,9 +141,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
|
|||||||
firePointPreciseEntity.setAddTime(addTime);
|
firePointPreciseEntity.setAddTime(addTime);
|
||||||
StreetEntity streetEntity = obtainInfoByCountyCode(countyCode);
|
StreetEntity streetEntity = obtainInfoByCountyCode(countyCode);
|
||||||
if (streetEntity != null) {
|
if (streetEntity != null) {
|
||||||
firePointPreciseEntity.setProCode(streetEntity.getProCode().substring(0, 2));
|
firePointPreciseEntity.setProCode(streetEntity.getProCode());
|
||||||
firePointPreciseEntity.setProName(streetEntity.getProName());
|
firePointPreciseEntity.setProName(streetEntity.getProName());
|
||||||
firePointPreciseEntity.setCityCode(streetEntity.getCityCode().substring(0, 4));
|
firePointPreciseEntity.setCityCode(streetEntity.getCityCode());
|
||||||
firePointPreciseEntity.setCityName(streetEntity.getCityName());
|
firePointPreciseEntity.setCityName(streetEntity.getCityName());
|
||||||
}
|
}
|
||||||
firePointPreciseEntity.setCountyCode(countyCode);
|
firePointPreciseEntity.setCountyCode(countyCode);
|
||||||
@ -222,9 +222,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
|
|||||||
firePointPreciseEntity.setAddTime(addTime);
|
firePointPreciseEntity.setAddTime(addTime);
|
||||||
StreetEntity streetEntity = obtainInfoByCountyCode(countyCode);
|
StreetEntity streetEntity = obtainInfoByCountyCode(countyCode);
|
||||||
if (streetEntity != null) {
|
if (streetEntity != null) {
|
||||||
firePointPreciseEntity.setProCode(streetEntity.getProCode().substring(0, 2));
|
firePointPreciseEntity.setProCode(streetEntity.getProCode());
|
||||||
firePointPreciseEntity.setProName(streetEntity.getProName());
|
firePointPreciseEntity.setProName(streetEntity.getProName());
|
||||||
firePointPreciseEntity.setCityCode(streetEntity.getCityCode().substring(0, 4));
|
firePointPreciseEntity.setCityCode(streetEntity.getCityCode());
|
||||||
firePointPreciseEntity.setCityName(streetEntity.getCityName());
|
firePointPreciseEntity.setCityName(streetEntity.getCityName());
|
||||||
}
|
}
|
||||||
firePointPreciseEntity.setCountyCode(countyCode);
|
firePointPreciseEntity.setCountyCode(countyCode);
|
||||||
|
Loading…
Reference in New Issue
Block a user