This commit is contained in:
马三炮 2025-04-29 10:13:42 +08:00
parent 70b379d3f4
commit 46f3a7fdbf
4 changed files with 20 additions and 15 deletions

View File

@ -104,10 +104,10 @@ public class TbCablewaTransServiceImpl implements TbCablewaTransService {
public ServerResponse delTbCablewaTrans(TbCablewaTransVo data) { public ServerResponse delTbCablewaTrans(TbCablewaTransVo data) {
try { try {
tbCablewaTransMapper.delTbCablewaTrans(data); tbCablewaTransMapper.delTbCablewaTrans(data);
return ServerResponse.createBySuccessMsg("索道运输-修改成功"); return ServerResponse.createBySuccessMsg("索道运输-删除成功");
} catch (Exception e) { } catch (Exception e) {
log.error(e.toString(), e); log.error(e.toString(), e);
return ServerResponse.createErroe("索道运输-修改失败"); return ServerResponse.createErroe("索道运输-删除失败");
} }
} }

View File

@ -3,7 +3,6 @@ package com.bonus.digitalSignage.basic.service.impl;
import com.bonus.digitalSignage.basic.dao.TbSpanTowerMapper; import com.bonus.digitalSignage.basic.dao.TbSpanTowerMapper;
import com.bonus.digitalSignage.basic.service.TbSpanTowerService; import com.bonus.digitalSignage.basic.service.TbSpanTowerService;
import com.bonus.digitalSignage.basic.vo.TbSpanTowerVo; import com.bonus.digitalSignage.basic.vo.TbSpanTowerVo;
import com.bonus.digitalSignage.utils.ServerResponse;
import com.bonus.digitalSignage.utils.StrUtil; import com.bonus.digitalSignage.utils.StrUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

View File

@ -113,6 +113,11 @@ public class TbTowerServiceImpl implements TbTowerService {
if (StringUtils.isNotNull(tbTower) && data.getId()!=tbTower.getId()){ if (StringUtils.isNotNull(tbTower) && data.getId()!=tbTower.getId()){
return ServerResponse.createErroe("排序已存在"); return ServerResponse.createErroe("排序已存在");
} }
//如果改变杆塔类型先删后加
if (tbTower.getUploadType()!=data.getUploadType()){
delTbTower(data);
addTbTower(data);
}else {
//判断新增塔杆的坐标系 1.WGS-84地心坐标系 2.2000国家大地坐标系 //判断新增塔杆的坐标系 1.WGS-84地心坐标系 2.2000国家大地坐标系
if ("1".equals(data.getUploadType())){ if ("1".equals(data.getUploadType())){
double[] bd09 =CoordinateConverter.wgs84ToBd09(Double.parseDouble(data.getLat()),Double.parseDouble(data.getLon())); double[] bd09 =CoordinateConverter.wgs84ToBd09(Double.parseDouble(data.getLat()),Double.parseDouble(data.getLon()));
@ -126,6 +131,7 @@ public class TbTowerServiceImpl implements TbTowerService {
Long userId = UserUtil.getLoginUser().getId(); Long userId = UserUtil.getLoginUser().getId();
data.setUpdateUserId(userId); data.setUpdateUserId(userId);
tbTowerMapper.updateTbTower(data); tbTowerMapper.updateTbTower(data);
}
return ServerResponse.createBySuccessMsg("杆塔管理-修改成功"); return ServerResponse.createBySuccessMsg("杆塔管理-修改成功");
} catch (Exception e) { } catch (Exception e) {
log.error(e.toString(), e); log.error(e.toString(), e);

View File

@ -70,6 +70,6 @@
select id as id,pro_id as proId,tower_name as towerName,lon as lon,lat as lat, select id as id,pro_id as proId,tower_name as towerName,lon as lon,lat as lat,
baidu_lon as baiduLon,baidu_lat as baiduLat,sort as sort,central_meridian as centralMeridian, baidu_lon as baiduLon,baidu_lat as baiduLat,sort as sort,central_meridian as centralMeridian,
upload_type as uploadType upload_type as uploadType
from tb_tower where pro_id = #{proId} and sort = #{sort} from tb_tower where pro_id = #{proId} and sort = #{sort} and is_actvice ='1'
</select> </select>
</mapper> </mapper>