Commit d786607a authored by 李腾威's avatar 李腾威

bug 3871 3817

parent 9f2a896d
...@@ -116,8 +116,12 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat ...@@ -116,8 +116,12 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
if (model.getAddress() != null) { if (model.getAddress() != null) {
JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(model.getAddress()); JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(model.getAddress());
model.setAddress(address.getString(BizConstant.ADDRESS)); model.setAddress(address.getString(BizConstant.ADDRESS));
model.setLongitude(Double.valueOf(address.getString(BizConstant.LONGITUDE))); if(!"0".equals(address.getString(BizConstant.LONGITUDE))) {
model.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE))); model.setLongitude(Double.valueOf(address.getString(BizConstant.LONGITUDE)));
}
if(!"0".equals(address.getString(BizConstant.LATITUDE))) {
model.setLongitude(Double.valueOf(address.getString(BizConstant.LATITUDE)));
}
} }
} }
FireStation entity = this.prepareEntity(model); FireStation entity = this.prepareEntity(model);
...@@ -139,8 +143,12 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat ...@@ -139,8 +143,12 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
if (model.getAddress() != null) { if (model.getAddress() != null) {
JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(model.getAddress()); JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(model.getAddress());
model.setAddress(address.getString(BizConstant.ADDRESS)); model.setAddress(address.getString(BizConstant.ADDRESS));
model.setLongitude(Double.valueOf(address.getString(BizConstant.LONGITUDE))); if(!"0".equals(address.getString(BizConstant.LONGITUDE))) {
model.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE))); model.setLongitude(Double.valueOf(address.getString(BizConstant.LONGITUDE)));
}
if(!"0".equals(address.getString(BizConstant.LATITUDE))) {
model.setLongitude(Double.valueOf(address.getString(BizConstant.LATITUDE)));
}
} }
FireStation entity = this.prepareEntity(model); FireStation entity = this.prepareEntity(model);
......
...@@ -1480,7 +1480,9 @@ public class ExcelServiceImpl { ...@@ -1480,7 +1480,9 @@ public class ExcelServiceImpl {
list.add(row.getAndIncrement()); list.add(row.getAndIncrement());
list.add(o.getFireTeamName() + "@" + o.getFireTeamId()); list.add(o.getFireTeamName() + "@" + o.getFireTeamId());
list.add(o.getName() + "@" + o.getSequenceNbr()); list.add(o.getName() + "@" + o.getSequenceNbr());
list.add(o.getJobTitle() + "@" + o.getJobTitleCode()); if(!ValidationUtil.isEmpty(o.getJobTitle())) {
list.add(o.getJobTitle() + "@" + o.getJobTitleCode());
}
data.add(list); data.add(list);
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment