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

Loading…
Cancel
Save