画空域的空域json及其修改保存

This commit is contained in:
zhulongchuan 2025-11-21 09:51:25 +08:00
parent 20378eeb54
commit 58d72c4f10
6 changed files with 31 additions and 2 deletions

View File

@ -4,6 +4,7 @@ package com.djhk.uav.airspace.controller;
import com.djhk.common.core.controller.BaseController;
import com.djhk.common.core.domain.AjaxResult;
import com.djhk.common.core.domain.R;
import com.djhk.common.core.domain.model.LoginUser;;
import com.djhk.common.core.page.TableDataInfo;
import com.djhk.common.utils.DateUtils;
@ -11,6 +12,9 @@ import com.djhk.common.utils.SecurityUtils;
import com.djhk.uav.airspace.domain.AirspaceApply;
import com.djhk.uav.airspace.service.AirspaceService;
import com.djhk.uav.airspace.service.AirspaceWaypointService;
import com.djhk.uav.label.domain.Plotting;
import com.djhk.uav.label.service.LabelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -26,6 +30,8 @@ public class AirspaceController extends BaseController {
// private RemoteUserService userService;
@Resource
private AirspaceWaypointService airspaceWaypointService;
@Autowired
private LabelService labelService;
/**
* 查询空域申请
@ -93,6 +99,8 @@ public class AirspaceController extends BaseController {
// airspaceWaypointService.insertAirspaceWaypoint(airspaceWaypoint);
// }
// }
Plotting plotting = labelService.selectPlotUuid();
airspaceApply.setUuid(plotting.getUuid());
return AjaxResult.success(airspaceService.insertAirspaceApply(airspaceApply));
}
@ -120,6 +128,8 @@ public class AirspaceController extends BaseController {
Date nowDate = DateUtils.getNowDate();
airspaceApply.setUpdateTime(nowDate);
airspaceApply.setUpdateBy(SecurityUtils.getUsername());
Plotting plotting = labelService.selectPlotUuid();
airspaceApply.setUuid(plotting.getUuid());
return AjaxResult.success(airspaceService.updateAirspaceApply(airspaceApply));
}

View File

@ -178,6 +178,10 @@ public class LabelController extends BaseController {
plotting.setDataType("GeoJSON");
plotting.setOrder(0);
plotting.setDelFlag("0");
plotting.setName("申请空域");
plotting.setAppId("fc4bcf44-83d3-45c9-b5be-e5f2d737aef9");
plotting.setShowStatusWeb(0);
plotting.setType(1);
return labelService.addPlotWeb(plotting);
}

View File

@ -26,6 +26,7 @@ public interface PlottingMappers extends BaseMapper<Plotting>
public Plotting selectPlottingByUUId(String uuid);
public Plotting selectPlottingUUId();
/**
* 查询标绘列表

View File

@ -95,6 +95,8 @@ public interface LabelService {
R selectPlotByUuid(String uuid);
Plotting selectPlotUuid();
/**
* 删除目录
*

View File

@ -9,12 +9,10 @@ import com.djhk.uav.label.domain.Plotting;
import com.djhk.uav.label.domain.PlottingQuery;
import com.djhk.uav.label.mapper.PlottingMappers;
import com.djhk.uav.label.service.LabelService;
import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -118,6 +116,11 @@ public class LabelServiceImpl implements LabelService {
return R.ok(plottingList);
}
@Override
public Plotting selectPlotUuid() {
return plottingMapper.selectPlottingUUId();
}
@Override
public R updatePlot(CatalogueDto catalogueDto) {
// return labelClient.updatePlot(catalogueDto);

View File

@ -76,6 +76,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where uuid = #{uuid}
</select>
<select id="selectPlottingUUId" parameterType="String" resultMap="PlottingResult">
select id,name, plotting_type, app_id, org_id, show_status_web,
data_type, type, del_flag, create_time, create_user_id,
update_time, update_user_id, delete_time, delete_user_id, data, uuid,item_code,`order`
from plotting ORDER BY create_time DESC
LIMIT 1
</select>
<select id="selectMaxLockStatusByFolderIdIds" resultType="java.lang.Integer">
select ifnull(o.m,0) from (
select max(lock_status) m