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