update 后管

This commit is contained in:
Guoqs
2024-08-16 14:32:02 +08:00
parent 04b2b5a44f
commit 52fba818eb

View File

@@ -188,8 +188,14 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
if (StringUtils.isNotBlank(pileStationInfo.getMatchCars())) {
vo.setSelectMatchCars(Lists.newArrayList(pileStationInfo.getMatchCars().split(",")));
}
vo.setStationLat(pileStationInfo.getStationLat());
vo.setStationLng(pileStationInfo.getStationLng());
// 数据库保存的是GCJ02坐标需要转换成天地图使用的WGS84坐标
if (StringUtils.isNotBlank(pileStationInfo.getStationLat()) && StringUtils.isNotBlank(pileStationInfo.getStationLng())) {
CoordinateUtil.Coordinate coordinate = CoordinateUtil.gcj02ToWgs84(Double.parseDouble(pileStationInfo.getStationLat()), Double.parseDouble(pileStationInfo.getStationLng()));
vo.setStationLat(String.valueOf(coordinate.getLat()));
vo.setStationLng(String.valueOf(coordinate.getLng()));
}
vo.setCountryCode(pileStationInfo.getCountryCode());
vo.setConstruction(pileStationInfo.getConstruction());
vo.setBusinessHours(pileStationInfo.getBusinessHours());
@@ -407,7 +413,6 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
}
}
pileStationInfo.setUpdateBy(SecurityUtils.getUsername());
pileStationInfo.setUpdateTime(DateUtils.getNowDate());
int i = pileStationInfoMapper.updatePileStationInfo(pileStationInfo);