bug修改。
This commit is contained in:
parent
ed787d1643
commit
63cbab59ca
@ -127,9 +127,6 @@ public class School {
|
|||||||
if(school_address != null && school_address.length() > 255 ) {
|
if(school_address != null && school_address.length() > 255 ) {
|
||||||
throw new ParamsException("学校地址超出长度");
|
throw new ParamsException("学校地址超出长度");
|
||||||
}
|
}
|
||||||
if(StringUtils.isEmpty(running_type_name)) {
|
|
||||||
throw new ParamsException("学校办学类型名不能为空");
|
|
||||||
}
|
|
||||||
if(running_type_name != null && running_type_name.length() > 20 ) {
|
if(running_type_name != null && running_type_name.length() > 20 ) {
|
||||||
throw new ParamsException("学校办学类型超出长度");
|
throw new ParamsException("学校办学类型超出长度");
|
||||||
}
|
}
|
||||||
|
@ -60,14 +60,17 @@ public class GridServiceImpl extends DefaultBaseService implements IGridService
|
|||||||
@Override
|
@Override
|
||||||
public String getLocationArea(String locationCode) {
|
public String getLocationArea(String locationCode) {
|
||||||
String locationArea = "";
|
String locationArea = "";
|
||||||
|
System.out.println("locationCode = " + locationCode);
|
||||||
AreaDTO areaDTO = mongoAreaService.getByCode(locationCode);
|
AreaDTO areaDTO = mongoAreaService.getByCode(locationCode);
|
||||||
Integer level = Integer.valueOf(areaDTO.getAreaLevel());
|
Integer level = Integer.valueOf(areaDTO.getAreaLevel());
|
||||||
Integer parentId = Integer.valueOf(areaDTO.getAreaParentId());
|
Integer parentId = Integer.valueOf(areaDTO.getAreaParentId());
|
||||||
String areaName = areaDTO.getAreaName();
|
String areaName = areaDTO.getAreaName();
|
||||||
locationArea = areaName;
|
locationArea = areaName;
|
||||||
if(0 != level && 2 != level) {
|
if(0 != level && 2 != level && level > 1) {
|
||||||
for(int i=1;i<=5;i++) {
|
for(int i=1;i<=5;i++) {
|
||||||
|
System.out.println("parentId.toString() = " + parentId.toString());
|
||||||
areaDTO = mongoAreaService.get(parentId.toString());
|
areaDTO = mongoAreaService.get(parentId.toString());
|
||||||
|
System.out.println("areaDTO.toString() = " + areaDTO.toString());
|
||||||
level = Integer.valueOf(areaDTO.getAreaLevel());
|
level = Integer.valueOf(areaDTO.getAreaLevel());
|
||||||
parentId = Integer.valueOf(areaDTO.getAreaParentId());
|
parentId = Integer.valueOf(areaDTO.getAreaParentId());
|
||||||
areaName = areaDTO.getAreaName();
|
areaName = areaDTO.getAreaName();
|
||||||
|
@ -253,21 +253,38 @@ public class SchoolServiceImpl extends DefaultBaseService implements ISchoolServ
|
|||||||
String locationArea = gridService.getLocationArea(schoolVO.getLocationCode());
|
String locationArea = gridService.getLocationArea(schoolVO.getLocationCode());
|
||||||
school.setlocation_area(locationArea);
|
school.setlocation_area(locationArea);
|
||||||
// 经度
|
// 经度
|
||||||
school.setlongitude(schoolVO.getLongitude().toString());
|
if(null != schoolVO.getLongitude()) {
|
||||||
|
school.setlongitude(schoolVO.getLongitude().toString());
|
||||||
|
}else {
|
||||||
|
school.setlongitude("暂无数据");
|
||||||
|
}
|
||||||
// 纬度
|
// 纬度
|
||||||
school.setlatitude(schoolVO.getLatitude().toString());
|
if(null != schoolVO.getLatitude()) {
|
||||||
GridDTO gridDTO = gridService.get(schoolVO.getGrid());
|
school.setlatitude(schoolVO.getLatitude().toString());
|
||||||
if(null != gridDTO) {
|
}else {
|
||||||
// 网格名称
|
school.setlatitude("暂无数据");
|
||||||
school.setgrid_name(gridDTO.getGridName());
|
}
|
||||||
// 网格编码
|
|
||||||
school.setgrid_code(gridDTO.getGridCode());
|
if(null != schoolVO.getGrid()) {
|
||||||
|
GridDTO gridDTO = gridService.get(schoolVO.getGrid());
|
||||||
|
if(null != gridDTO) {
|
||||||
|
// 网格名称
|
||||||
|
school.setgrid_name(gridDTO.getGridName());
|
||||||
|
// 网格编码
|
||||||
|
school.setgrid_code(gridDTO.getGridCode());
|
||||||
|
}else {
|
||||||
|
// 网格名称
|
||||||
|
school.setgrid_name("暂无数据");
|
||||||
|
// 网格编码
|
||||||
|
school.setgrid_code("暂无数据");
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
// 网格名称
|
// 网格名称
|
||||||
school.setgrid_name("暂无数据");
|
school.setgrid_name("暂无数据");
|
||||||
// 网格编码
|
// 网格编码
|
||||||
school.setgrid_code("暂无数据");
|
school.setgrid_code("暂无数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
return school;
|
return school;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public class FullSyncC0012 implements ApplicationEventPublisherAware {
|
|||||||
|
|
||||||
public FullSyncC0012() {}
|
public FullSyncC0012() {}
|
||||||
|
|
||||||
@KafkaListener(topics = "C0032FullSync")
|
@KafkaListener(topics = "C0012FullSync")
|
||||||
public void message(ConsumerRecord<?, ?> record) {
|
public void message(ConsumerRecord<?, ?> record) {
|
||||||
System.out.println("收到全量同步命令");
|
System.out.println("收到全量同步命令");
|
||||||
JSONObject jsonObject = JSONObject.parseObject(record.value().toString());
|
JSONObject jsonObject = JSONObject.parseObject(record.value().toString());
|
||||||
@ -61,7 +61,7 @@ public class FullSyncC0012 implements ApplicationEventPublisherAware {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@KafkaListener(topics = "C0032")
|
@KafkaListener(topics = "C0012")
|
||||||
public void messageMsg(ConsumerRecord<?, ?> record) {
|
public void messageMsg(ConsumerRecord<?, ?> record) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(record.value().toString());
|
JSONObject jsonObject = JSONObject.parseObject(record.value().toString());
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
Loading…
Reference in New Issue
Block a user