Browse Source

设备 不通过桩号获取经纬度

develop
lau572 2 months ago
parent
commit
aadb08cd10
  1. 8
      zc-business/src/main/java/com/zc/business/service/impl/DcDeviceServiceImpl.java

8
zc-business/src/main/java/com/zc/business/service/impl/DcDeviceServiceImpl.java

@ -238,13 +238,13 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i
dcDevice.setCreateTime(new Date()); dcDevice.setCreateTime(new Date());
dcDevice.setUseState(DcDevice.UNUSEDSTATE); dcDevice.setUseState(DcDevice.UNUSEDSTATE);
if (Objects.nonNull(dcDevice.getStakeMark())){ /*if (Objects.nonNull(dcDevice.getStakeMark())){
DcStakeMark dcStakeMark = dcStakeMarkService.getStakeMark(dcDevice.getStakeMark()); DcStakeMark dcStakeMark = dcStakeMarkService.getStakeMark(dcDevice.getStakeMark());
if (Objects.nonNull(dcStakeMark)){ if (Objects.nonNull(dcStakeMark)){
dcDevice.setLongitude(dcStakeMark.getLongitude()); dcDevice.setLongitude(dcStakeMark.getLongitude());
dcDevice.setLatitude(dcStakeMark.getLatitude()); dcDevice.setLatitude(dcStakeMark.getLatitude());
} }
} }*/
if (save(dcDevice)) { if (save(dcDevice)) {
// 更新缓存 // 更新缓存
@ -290,13 +290,13 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i
} }
dcDevice.setUpdateTime(new Date()); dcDevice.setUpdateTime(new Date());
if (Objects.nonNull(dcDevice.getStakeMark())){ /*if (Objects.nonNull(dcDevice.getStakeMark())){
DcStakeMark dcStakeMark = dcStakeMarkService.getStakeMark(dcDevice.getStakeMark()); DcStakeMark dcStakeMark = dcStakeMarkService.getStakeMark(dcDevice.getStakeMark());
if (Objects.nonNull(dcStakeMark)){ if (Objects.nonNull(dcStakeMark)){
dcDevice.setLongitude(dcStakeMark.getLongitude()); dcDevice.setLongitude(dcStakeMark.getLongitude());
dcDevice.setLatitude(dcStakeMark.getLatitude()); dcDevice.setLatitude(dcStakeMark.getLatitude());
} }
} }*/
if (updateById(dcDevice)) { if (updateById(dcDevice)) {
// 更新缓存 // 更新缓存

Loading…
Cancel
Save