浏览代码

区域标记修改-重点区域,资源(2个),植树区域

lidongyu 1 年之前
父节点
当前提交
f300707436
共有 16 个文件被更改,包括 511 次插入204 次删除
  1. 16 0
      data-ui/src/api/data/digitalresources/info.js
  2. 73 72
      data-ui/src/views/components/supermap-2.5d.vue
  3. 177 19
      data-ui/src/views/data/common/ISuperMapAreaMarker.vue
  4. 54 45
      data-ui/src/views/data/digitalforest/afforestationarea/index.vue
  5. 13 12
      data-ui/src/views/data/digitalresources/farm/farmland/index.vue
  6. 12 12
      data-ui/src/views/data/digitalresources/farm/info/index.vue
  7. 27 29
      data-ui/src/views/data/generalbusiness/importarea/index.vue
  8. 16 0
      src/main/java/com/sooka/sponest/data/digitalresource/controller/CenterdataTResourcesLandInfoController.java
  9. 4 0
      src/main/java/com/sooka/sponest/data/digitalresource/service/ICenterdataTResourcesLandInfoService.java
  10. 43 14
      src/main/java/com/sooka/sponest/data/digitalresource/service/impl/CenterdataTResourcesLandInfoServiceImpl.java
  11. 24 0
      src/main/java/com/sooka/sponest/data/generalbusiness/domain/bo/LatLngAndFlagType.java
  12. 6 1
      src/main/java/com/sooka/sponest/data/system/areamarking/domain/RegionalFlag.java
  13. 7 0
      src/main/java/com/sooka/sponest/data/system/areamarking/mapper/CenterdataTAreaMarkingMapper.java
  14. 7 0
      src/main/java/com/sooka/sponest/data/system/areamarking/service/ICenterdataTAreaMarkingService.java
  15. 15 0
      src/main/java/com/sooka/sponest/data/system/areamarking/service/impl/CenterdataTAreaMarkingServiceImpl.java
  16. 17 0
      src/main/resources/mapper/system/areamarking/CenterdataTAreaMarkingMapper.xml

+ 16 - 0
data-ui/src/api/data/digitalresources/info.js

@@ -73,6 +73,22 @@ export function delRegionalFlag(eventId) {
   return request({
     url:'/sooka-sponest-center-data/info/delRegionalFlag/' + eventId,
     method: 'delete'
+  })
+}
+
 
+// 删除单个区域标记
+export function delRegionalFlagByFlagType(eventId,flagType) {
+  return request({
+    url:'/sooka-sponest-center-data/info/delRegionalFlagByFlagType/' + eventId +'/'+flagType,
+    method: 'delete'
+  })
+}
+// 修改区域标识名称
+export function updateRegionalFlag(data) {
+  return request({
+    url: 'center-data/info/updateRegionalFlag',
+    method: 'put',
+    data: data
   })
 }

+ 73 - 72
data-ui/src/views/components/supermap-2.5d.vue

@@ -162,6 +162,11 @@
           this.markerboxEntity = []
         }
       },
+      clearAllByQin(val) {
+
+        this.viewer.entities.removeAll();
+        this.entityHandler(val-2)
+      },
       //移除之前添加的线
       clearC() {
         if (this.connectBoxEntity != null) {
@@ -640,61 +645,55 @@
       /**
        * 地图画线(贴地)
        */
-      setConnectList(connectList, color, withAlpha) {
-        let that = this
-        //Cesium.Color.fromCssColorString('#67ADDF')   16进制颜色设置
-        let material = Cesium.Color.fromCssColorString(color).withAlpha(withAlpha);
-        that.connectBoxEntity = that.viewer.entities.add({
-          Type: 'Polyline',
-          polyline: {
-            positions: Cesium.Cartesian3.fromDegreesArray(connectList),
-            clampToGround: true,//贴地 true,不贴地  false
-            width: 5,
-            material: material
-          }
-        })
-        setTimeout(() => {
-          if(connectList!=null&&Array.isArray(connectList)&&connectList.length>0){
-            that.viewer.camera.flyTo({
-              destination: Cesium.Cartesian3.fromDegrees(connectList[0],connectList[1],6500),
-              complete: function () {
-                // 飞行结束后设置相机的高度
-                var newHeight = 6500;
-                var destination = that.viewer.camera.position.clone();
-                destination.z = newHeight;
-              }
-            });
-          }
-        }, 3000);
-      },
-      setGraphicsList1(graphicsList, color, withAlpha) {
-        let that = this
-        //Cesium.Color.fromCssColorString('#67ADDF')   16进制颜色设置
 
+      setGraphicsList1(graphicsList, color, withAlpha) {
+        let that = this;
+        that.viewer.entities.removeAll(); // 移除地图标点
         let material = Cesium.Color.fromCssColorString(color).withAlpha(withAlpha);
-        that.graphicsBoxEntity = that.viewer.entities.add({
-          polygon: {
-            hierarchy: Cesium.Cartesian3.fromDegreesArray(graphicsList),
-            clampToGround: true,//贴地 true,不贴地  false
-            width: 5,
-            material: material
-          }
-        });
-        setTimeout(() => {
-          if(graphicsList!=null&&Array.isArray(graphicsList)&&graphicsList.length>0){
-            that.viewer.camera.flyTo({
-              destination: Cesium.Cartesian3.fromDegrees(graphicsList[0],graphicsList[1],6500),
-              complete: function () {
-                // 飞行结束后设置相机的高度
-                var newHeight = 6500;
-                var destination = that.viewer.camera.position.clone();
-                destination.z = newHeight;
-              }
-            });
-          }
-        }, 3000);
+        for (let i = 0; i < graphicsList.length; i++) {
+          let positions = Cesium.Cartesian3.fromDegreesArray(graphicsList[i].latLng);
+          let name = graphicsList[i].name.toString();
+          let center = Cesium.BoundingSphere.fromPoints(positions).center;
+          let namePosition = Cesium.Cartographic.fromCartesian(center);
+          namePosition.height = 0; // 将名称高度设置为0,使其贴地显示
+
+          that.graphicsBoxEntity = that.viewer.entities.add({
+            polygon: {
+              hierarchy: positions,
+              clampToGround: true,
+              width: 5,
+              material: material
+            }
+          });
 
+          that.viewer.entities.add({
+            position: center,
+            label: {
+              text: name ,
+              font: 'Bold 12px sans-serif',
+              fillColor: Cesium.Color.BLACK,
+              outlineColor: Cesium.Color.WHITE,
+              outlineWidth: 2,
+              pixelOffset: new Cesium.Cartesian2(0, 0),
+              heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+              disableDepthTestDistance: Number.POSITIVE_INFINITY
+            }
+          });
+        }
       },
+      // setTimeout(() => {
+      //   if(graphicsList!=null&&Array.isArray(graphicsList)&&graphicsList.length>0){
+      //     that.viewer.camera.flyTo({
+      //       destination: Cesium.Cartesian3.fromDegrees(graphicsLists[0],graphicsLists[1],6500),
+      //       complete: function () {
+      //         // 飞行结束后设置相机的高度
+      //         var newHeight = 6500;
+      //         var destination = that.viewer.camera.position.clone();
+      //         destination.z = newHeight;
+      //       }
+      //     });
+      //   }
+      // }, 3000);
       /**
        * 地图图形(贴地)
        */
@@ -703,27 +702,29 @@
         //Cesium.Color.fromCssColorString('#67ADDF')   16进制颜色设置
 
         let material = Cesium.Color.fromCssColorString(color).withAlpha(withAlpha);
-        that.graphicsBoxEntity = that.viewer.entities.add({
-          polygon: {
-            hierarchy: Cesium.Cartesian3.fromDegreesArray(graphicsList),
-            clampToGround: true,//贴地 true,不贴地  false
-            width: 5,
-            material: material
-          }
-        })
-        setTimeout(() => {
-          if(graphicsList!=null&&Array.isArray(graphicsList)&&graphicsList.length>0){
-            that.viewer.camera.flyTo({
-              destination: Cesium.Cartesian3.fromDegrees(graphicsList[0],graphicsList[1],6500),
-              complete: function () {
-                // 飞行结束后设置相机的高度
-                var newHeight = 6500;
-                var destination = that.viewer.camera.position.clone();
-                destination.z = newHeight;
-              }
-            });
-          }
-        }, 3000);
+        for (let i = 0; i < graphicsList.length; i++) {
+          that.graphicsBoxEntity = that.viewer.entities.add({
+            polygon: {
+              hierarchy: Cesium.Cartesian3.fromDegreesArray(graphicsList[i]),
+              clampToGround: true,//贴地 true,不贴地  false
+              width: 5,
+              material: material
+            }
+          })
+        }
+        // setTimeout(() => {
+        //   if(graphicsList!=null&&Array.isArray(graphicsList)&&graphicsList.length>0){
+        //     that.viewer.camera.flyTo({
+        //       destination: Cesium.Cartesian3.fromDegrees(graphicsList[0],graphicsList[1],6500),
+        //       complete: function () {
+        //         // 飞行结束后设置相机的高度
+        //         var newHeight = 6500;
+        //         var destination = that.viewer.camera.position.clone();
+        //         destination.z = newHeight;
+        //       }
+        //     });
+        //   }
+        // }, 3000);
       }
     },
   }

+ 177 - 19
data-ui/src/views/data/common/ISuperMapAreaMarker.vue

@@ -13,29 +13,103 @@
             <el-button type="primary" @click="closeDialog">确定</el-button>
     </el-dialog>
     <el-dialog title="区域坐标" :visible.sync="showLongitudeq" @close='close' width="80%">
+      <div style="width: 100%; display: flex;">
+        <div style="width: 20%; float: left;">
+          <el-table ref="table" v-loading="loading" :data="tableData" style="width: 100%; max-height: 100%;overflow-y: auto;" v-if="sign===3" @selection-change="handleSelectionChange">
+            <el-table-column type="selection" width="55" align="center"/>
+            <el-table-column prop="flagType" label="区域序号" width="180"></el-table-column>
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.row)"
+              >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        </div>
+      <div style="width: 80%; float: left;">
       <Supermap ref="areaSupermap" style="width: 100%;height:75vh"
                 :mapDiv="uuid" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']"
                 :isSideBySide="false" :showAreaLatLng="showAreaLatLng"></Supermap>
-            <el-button type="primary" @click="closeDialog">确定</el-button>
 
+      </div>
+      </div>
+      <el-button type="primary" @click="closeDialog">确定</el-button>
+      <el-button @click="clearAway">清除</el-button>
     </el-dialog>
     <el-dialog :title="(sign===1?'经纬度':(sign===2?'线坐标':'区域坐标'))" :visible.sync="visible" append-to-body
                width="90%"
                height="60%"
                @close='close'>
-      <supermap ref="supermap" style="width: 100%; height: 75vh" :putSmUserID_layer="putSmUserID_layer"
-                @showLatLng="showLatLng"></supermap>
+      <div style="width: 100%; display: flex;">
+        <div style="width: 20%; float: left;">
+          <el-table ref="table" v-loading="loading" :data="tableData" height="100%"  v-if="sign===3" @selection-change="handleSelectionChange">
+            <el-table-column type="selection" width="55" align="center"/>
+            <el-table-column prop="name" label="区域名称" width="180"></el-table-column>
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
+              <template slot-scope="scope">
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="handleUpdate(scope.row)"
+                  v-hasPermi="['farm:farmland:edit']"
+                >修改
+                </el-button>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="handleDelete(scope.row)"
+                >删除
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+
+        <div style="width: 80%; float: left;">
+          <supermap ref="supermap" style="width: 100%; height: 75vh;" :putSmUserID_layer="putSmUserID_layer" @showLatLng="showLatLng"></supermap>
+        </div>
+      </div>
             <el-button type="primary" @click="closeDialog">确定</el-button>
-    </el-dialog></div>
+            <el-button @click="clearAway">清除</el-button>
+    </el-dialog>
+
+
+  <el-dialog :title="title" :visible.sync="visibleName" append-to-body  width="400px">
+    <el-form ref="obj" :model="obj" :rules="rules" label-width="100px">
+      <el-form-item label="区域名称" prop="name">
+        <el-input v-model="obj.name" placeholder="请输入区域名称" maxlength="20"/>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="submitForm">确 定</el-button>
+      <el-button @click="cancel">取 消</el-button>
+    </div>
+  </el-dialog>
+</div>
 </template>
 
 
 <script>
 import {getConfigKey} from "@/api/system/config";
+
+import {
+  delRegionalFlagByFlagType,
+  getRegionalFlag,
+  updateInfo,
+  updateRegionalFlag
+} from '@/api/data/digitalresources/info'
 import request from '@/utils/request'
 const uuidv4 = require("uuid/v4")
 import supermap from '@/views/components/supermap-2.5d';
 import Supermap from './supermap';
+import { delFarmland, getFarmland, updateFarmland } from '@/api/data/digitalresources/farmland'
 export default {
   name: "ISuperMapArearAndCameras",
   components: {supermap, Supermap},
@@ -44,6 +118,13 @@ export default {
   // },
   data() {
     return {
+      // 遮罩层
+      loading: true,
+      eventId:null,
+      visibleName:false,
+      id:null,
+      arr:[],
+      tableData:[],
       cameraMarkersList:[],
       visuForestCloudCameraBOList:[],
       visuForestCloudCameraBOListSearch:[],
@@ -58,9 +139,18 @@ export default {
         longitude: undefined,
         latitude: undefined,
         xiantude: undefined,
+        name:undefined,
+      },
+      rules: {
+        name: [
+          {required: true, message: "区域名称不能为空", trigger: "change" }
+        ],
       }
     };
   },
+  created() {
+    this.getRegionalFlag();
+  },
   methods: {
     putSmUserID_layer: function (entity) {
 
@@ -68,6 +158,25 @@ export default {
     showAreaLatLng: function (latlng) {
       this.obj.xiantude = JSON.stringify(latlng);
     },
+
+    /** 区域标记按钮操作 */
+    getRegionalFlag() {
+      this.loading = true;
+      getRegionalFlag(this.eventId).then(response => {
+        this.tableData = response.data;
+        this.loading = false;
+      })
+    },
+    //删除
+    handleDelete(row){
+      this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
+        return delRegionalFlagByFlagType(row.eventId,row.flagType);
+      }).then(() => {
+        this.getRegionalFlag();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
     showLatLng: function (val) {
       if (this.sign === 1) {
         this.obj.longitude = val.longitude;
@@ -81,12 +190,18 @@ export default {
       this.obj.latitude = lat;
       this.obj.longitude = lng;
     },
-    initP(sign, form) {
+    clearAway(){
+      this.$refs.table.clearSelection();
+      this.$refs.supermap.clearAllByQin(this.sign)
+      this.obj.xiantude = null;
+    },
+    initP(sign, form,eventId) {
       getConfigKey('supermapKey').then(response => {
         let isN = response.msg;
         if (isN === 'true') this.visible = true;
         if (isN === 'false') sign === 2 ? this.showLongitudex = true : (sign === 1 ? this.showLongitude = true : this.showLongitudeq = true);
         this.sign = sign;
+        this.eventId = eventId
         this.uuid = uuidv4();
         this.$nextTick(() => {
             //2d 点
@@ -115,15 +230,12 @@ export default {
             }
             //2.5d 线/区域
             if ((this.sign === 2 && this.visible === true) || (this.sign === 3 && this.visible === true)) {
-              const arr = JSON.parse(form.xiantude == undefined || form.xiantude == null ? "[]" : form.xiantude);
-              const array = [];
-              for (let i = 0; i < arr.length; i++) {
-                array.push(arr[i].lng);
-                array.push(arr[i].lat);
-              }
+              // const arr = JSON.parse(form.xiantude == undefined || form.xiantude == null ? "[]" : form.xiantude);
+              // console.log(arr)
+              this.getRegionalFlag();
               setTimeout(() => {
                 this.$refs.supermap.superMapInfo(this.sign, {
-                  graphicsList: array && array.length > 0 ? array : [],
+                  graphicsList: this.arr && this.arr.length > 0 ? this.arr : [],
                   color: "rgba(250,4,4,0)",
                   withAlpha: 0.8
                 });
@@ -138,10 +250,11 @@ export default {
             }
             //2d 区域
             if (this.sign === 3 && this.showLongitudeq === true) {
-              const arr = JSON.parse(form.xiantude);
+              this.getRegionalFlag();
+              // const arr = JSON.parse(form.xiantude);
               setTimeout(() => {
                 this.$refs.areaSupermap.setGraphicsList(
-                  arr && arr.length > 0 ? arr : [],
+                  this.arr && this.arr.length > 0 ? this.arr : [],
                   "#1a1919");
               }, 2000)
             }
@@ -149,13 +262,58 @@ export default {
         )
       })
     },
+    handleSelectionChange(selection) {
+      if ((this.sign === 2 && this.visible === true) || (this.sign === 3 && this.visible === true)) {
+        this.$refs.supermap.entityHandler(1);
+        this.$refs.supermap.setGraphicsList1(selection, "rgba(250,4,4,0)", 0.8);
+      }
+      if (this.sign === 3 && this.showLongitudeq === true) {
+        this.$refs.supermap.setGraphicsList(selection, "#1a1919");
+      }
+    },
+    submitForm(){
+      this.$refs["obj"].validate(valid => {
+          if (valid) {
+            if (this.id) {
+              updateRegionalFlag(this.obj).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.getRegionalFlag();
+              });
+            } else {
+              this.$emit('send', this.obj);
+            }
 
+            this.visibleName = false;
+            this.clearAway();
+            // this.visible = false;
+            this.showLongitude = false;
+            this.showLongitudex = false;
+            this.showLongitudeq = false;
+          }
+      });
+    },
+    cancel(){
+      this.obj.name = null;
+      this.visibleName = false;
+      this.clearAway();
+    },
+    reset() {
+      this.obj.name=null,
+      this.resetForm("obj");
+    },
+        handleUpdate(row) {
+        this.reset();
+        this.obj.eventId = this.eventId
+        this.obj.flagType = row.flagType
+        this.id = 1;//修改表标识
+        this.visibleName = true;
+        this.title = "修改区域标记";
+    },
     closeDialog() {
-      if (this.obj.longitude || (this.obj.xiantude && JSON.parse(this.obj.xiantude).length > 0)) this.$emit('send', this.obj);
-      this.visible = false;
-      this.showLongitude = false;
-      this.showLongitudex = false;
-      this.showLongitudeq = false;
+      this.reset();
+      this.id = null;
+      this.title = "添加区域标记";
+      if (this.obj.longitude || (this.obj.xiantude && JSON.parse(this.obj.xiantude).length > 0))this.visibleName = true;
     },
     closeDialogsend() {
       this.$emit('send', 666);

+ 54 - 45
data-ui/src/views/data/digitalforest/afforestationarea/index.vue

@@ -155,6 +155,9 @@
       <el-table-column label="修改时间" align="center" prop="updateTime"/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
+          <el-button size="mini" type="text" icon="el-icon-document" @click="regionalFlagAdd(scope.row)"
+          >区域标记
+          </el-button>
           <el-button
             size="mini"
             type="text"
@@ -244,12 +247,12 @@
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
-            <el-form-item label="经度" prop="longitude" @dblclick.native="showMap">
+            <el-form-item label="经度" prop="longitude" @dblclick.native="showMap1">
               <el-input v-model="form.longitude" placeholder="鼠标双击选择经纬度"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap">
+            <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap1">
               <el-input v-model="form.latitude" placeholder="鼠标双击选择经纬度"/>
             </el-form-item>
           </el-col>
@@ -280,16 +283,6 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row :gutter="20">
-          <el-col :span="12">
-            <el-form-item label="维护植树造林区域" prop="points" @dblclick.native="showMapTwo">
-              <el-input v-model="form.points" placeholder="鼠标双击选择区域" :disabled="disabled" maxlength="50" disabled/>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-
-          </el-col>
-        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm" v-show=!disabled>确 定</el-button>
@@ -297,25 +290,12 @@
       </div>
     </el-dialog>
 
-    <el-dialog :title="titleLongitude" :visible.sync="showLongitude" append-to-body>
-      <el-input v-show="false" v-model="form.longitude" disabled></el-input>
-      <el-input v-show="false" v-model="form.latitude" disabled></el-input>
-      <supermap style="width: 100%;height: 500px;" :mapDiv="'afforestationareaMap'" :mapSite="{doubleClickZoom:false}"
-                :codes="['9fa5']" :isSideBySide="false" :showLatLng="showLatLng"></supermap>
-      <el-button type="primary" @click="showLongitude=false">确定</el-button>
-    </el-dialog>
 
     <!-- 添加区域标记 -->
-    <el-dialog title="区域坐标" :visible.sync="showLongitudetwo" width="1000px" append-to-body>
-      <supermap ref="fireAreaSupermap" v-if="showLongitudetwo" style="width: 100%;height:74vh"
-                :mapDiv="'afforestationareaSuperMap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']"
-                :isSideBySide="false"
-                :showAreaLatLng="showAreaLatLng"></supermap>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="showLongitudetwo=false">确定</el-button>
-      </div>
-    </el-dialog>
-    <ISuperMap ref="ISuperMap" v-if="ISuperMapvisible" @send="send"/>
+
+    <ISuperMap ref="ISuperMap1" v-if="ISuperMapvisible" @send="send1"/>
+
+    <ISuperMapAreaMarker ref="ISuperMap" v-if="regionalFlagOpen" @send="send"/>
   </div>
 </template>
 
@@ -337,19 +317,28 @@ import supermap from '@/views/components/supermap'
 import {listAfforestationPlan} from "@/api/data/digitalforest/afforestation/afforestation";
 import {checkPositiveDecimal, checkLat, checkLon} from "@/api/rules/rules";
 import ISuperMap from "@/views/data/common/ISuperMap";
+import { addRegionalFlag } from '@/api/data/digitalresources/info'
+import ISuperMapAreaMarker from "@/views/data/common/ISuperMapAreaMarker";
 
 export default {
   name: "Afforestationarea",
-  components: {ISuperMap, deptselector, Treeselect, supermap},
+  components: {ISuperMap, deptselector, Treeselect, supermap,ISuperMapAreaMarker},
   dicts: ['forest_type', 'forest_regional_division'],
   data() {
     return {
-      sign: 1,
+      //区域标记
+      regionalFlagObj: {
+        eventId: null,
+        latLngs: [],
+        type: '4',
+        name:null,
+      },
+      sign:3,
+      sign1: 1,
       ISuperMapvisible: false,
       disabled: false,
       // 信息弹出层上的坐标弹层
       showLongitude: false,
-      showLongitudetwo: false,
       regionalFlagOpen: false,
       titleLongitude: '经纬度',
       titleLongitudeTwo: '',
@@ -365,7 +354,6 @@ export default {
       multiple: true,
       // 显示搜索条件
       showSearch: true,
-      regionalFlag: false,
       // 总条数
       total: 0,
       // 植树造林区域管理表格数据
@@ -437,7 +425,6 @@ export default {
     this.getList();
     this.getTreeselect();
     this.getWarehouseIds();
-    this.regionalFlag = true;
   },
   methods: {
     hx(node) {
@@ -446,10 +433,10 @@ export default {
       this.form.deptName = node.label
       this.$refs.form.validateField("deptId")
     },
-    showMap() {
+    showMap1() {
       this.ISuperMapvisible = true;
       this.$nextTick(() => {
-        this.$refs.ISuperMap.init(this.sign, {
+        this.$refs.ISuperMap1.init(this.sign1, {
           id: this.form.id,
           longitude: this.form.longitude,
           latitude: this.form.latitude,
@@ -459,14 +446,28 @@ export default {
     },
     send(val) {
       if (val===true){
+        this.regionalFlagOpen = false;
+        return;
+      }
+      if (this.sign === 2 || this.sign === 3) this.regionalFlagObj.latLngs = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+      this.regionalFlagObj.name = val.name;
+      addRegionalFlag(this.regionalFlagObj).then(res =>{
+        this.$modal.msgSuccess(res.msg);
+        this.$refs.ISuperMap.getRegionalFlag();
+      });
+      // this.regionalFlagOpen = false
+
+    },
+    send1(val) {
+      if (val===true){
         this.ISuperMapvisible = false;
         return;
       }
-      if (this.sign === 1) {
+      if (this.sign1 === 1) {
         this.form.longitude = val.longitude;
         this.form.latitude = val.latitude;
       }
-      if (this.sign === 2 || this.sign === 3) this.form.longitude = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+      if (this.sign1 === 2 || this.sign1 === 3) this.form.longitude = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
       this.ISuperMapvisible = false
     },
     getWarehouseIds() {
@@ -487,11 +488,22 @@ export default {
     },
     /** 区域标记按钮操作 */
     regionalFlagAdd(row) {
-      this.regionalFlagOpen = true;
+      const eventId = row.id;
+      this.regionalFlagObj.eventId= eventId;
+      this.showMap(eventId)
+      // getRegionalFlag(eventId).then(response => {
+      //   this.regionalFlagObj1 = response.data;
+      // })
     },
-    /** 区域标记按钮操作 */
-    cancelRegionalFlag() {
-      this.regionalFlagOpen = false;
+    showMap(eventId) {
+      this.regionalFlagOpen = true;
+      this.$nextTick(() => {
+        this.$refs.ISuperMap.initP(this.sign, {
+          longitude: undefined,
+          latitude: undefined,
+          xiantude: undefined
+        },eventId)
+      })
     },
     /** 区域标记按钮操作 */
     submitRegionalFlag() {
@@ -521,9 +533,6 @@ export default {
       this.form.latitude = lat;
       this.form.longitude = lng;
     },
-    showMapTwo() {
-      this.showLongitudetwo = true;
-    },
     /** 查询部门下拉树结构 */
     getTreeselect() {
       treeselect().then(response => {

+ 13 - 12
data-ui/src/views/data/digitalresources/farm/farmland/index.vue

@@ -229,7 +229,9 @@
                 eventId: null,
                 latLngs: [],
                 type: '2',
+                name:null,
               },
+              regionalFlagObj1: [],
               regionalFlagOpen:false,
               sign:3,
               titleLongitude:'永久基本农田管理区域标记',
@@ -317,22 +319,20 @@
             /** 区域标记按钮操作 */
             regionalFlagAdd(row) {
               const eventId = row.id;
-              getRegionalFlag(eventId).then(response => {
-                this.regionalFlagObj.eventId = eventId;
-                this.regionalFlagObj.latLngs = response.data.latLngs;
-                this.showMap(this.regionalFlagObj.latLngs)
-              })
-
-              console.log(this.regionalFlagObj)
+              this.regionalFlagObj.eventId= eventId;
+              this.showMap(eventId)
+              // getRegionalFlag(eventId).then(response => {
+              //   this.regionalFlagObj1 = response.data;
+              // })
             },
-          showMap(params) {
+          showMap(eventId) {
             this.regionalFlagOpen = true;
             this.$nextTick(() => {
               this.$refs.ISuperMap.initP(this.sign, {
                 longitude: undefined,
                 latitude: undefined,
-                xiantude: params
-              })
+                xiantude: undefined
+              },eventId)
             })
           },
           send(val) {
@@ -341,11 +341,12 @@
               return;
             }
             if (this.sign === 2 || this.sign === 3) this.regionalFlagObj.latLngs = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+            this.regionalFlagObj.name = val.name;
             addRegionalFlag(this.regionalFlagObj).then(res =>{
               this.$modal.msgSuccess(res.msg);
-              this.getList()
+              this.$refs.ISuperMap.getRegionalFlag();
             });
-            this.regionalFlagOpen = false
+            // this.regionalFlagOpen = false
 
           },
 

+ 12 - 12
data-ui/src/views/data/digitalresources/farm/info/index.vue

@@ -250,6 +250,7 @@
           eventId: null,
           latLngs: [],
           type: '1',
+          name:null,
         },
         sign:3,
         regionalFlagOpen: false,
@@ -366,22 +367,20 @@
       /** 区域标记按钮操作 */
       regionalFlagAdd(row) {
         const eventId = row.id;
-        getRegionalFlag(eventId).then(response => {
-          this.regionalFlagObj.eventId = eventId;
-          this.regionalFlagObj.latLngs = response.data.latLngs;
-          this.showMap(this.regionalFlagObj.latLngs)
-        })
-
-        console.log(this.regionalFlagObj)
+        this.regionalFlagObj.eventId= eventId;
+        this.showMap(eventId)
+        // getRegionalFlag(eventId).then(response => {
+        //   this.regionalFlagObj1 = response.data;
+        // })
       },
-      showMap(params) {
+      showMap(eventId) {
         this.regionalFlagOpen = true;
         this.$nextTick(() => {
           this.$refs.ISuperMap.initP(this.sign, {
             longitude: undefined,
             latitude: undefined,
-            xiantude: params
-          })
+            xiantude: undefined
+          },eventId)
         })
       },
       send(val) {
@@ -390,11 +389,12 @@
           return;
         }
         if (this.sign === 2 || this.sign === 3) this.regionalFlagObj.latLngs = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+        this.regionalFlagObj.name = val.name;
         addRegionalFlag(this.regionalFlagObj).then(res =>{
           this.$modal.msgSuccess(res.msg);
-          this.getList()
+          this.$refs.ISuperMap.getRegionalFlag();
         });
-        this.regionalFlagOpen = false
+        // this.regionalFlagOpen = false
 
       },
 

+ 27 - 29
data-ui/src/views/data/generalbusiness/importarea/index.vue

@@ -198,7 +198,7 @@
             <el-form-item label="区域名称" prop="areaName">
               <el-input v-model="form.areaName" placeholder="请输入区域名称" maxlength="50"/>
             </el-form-item>
-            <el-form-item label="经度" prop="longitude" @dblclick.native="showMap">
+            <el-form-item label="经度" prop="longitude" @dblclick.native="showMap1">
               <el-input v-model="form.longitude" placeholder="鼠标双击此处以选择经纬度" maxlength="32"/>
             </el-form-item>
             <el-form-item label="绑定设备" prop="deviceList">
@@ -233,7 +233,7 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap">
+            <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap1">
               <el-input v-model="form.latitude" placeholder="鼠标双击此处以选择经纬度" maxlength="32"/>
             </el-form-item>
             <el-form-item label="区域类型" prop="projectType">
@@ -278,7 +278,7 @@
       <el-button type="primary" @click="showLongitude=false">确定</el-button>
     </el-dialog>-->
 
-    <ISuperMap ref="ISuperMap" v-if="ISuperMapvisible" @send="send"/>
+    <ISuperMap ref="ISuperMap1" v-if="ISuperMapvisible" @send="send1"/>
     <!-- 添加区域标记 -->
 <!--    <el-dialog :title="titleLongitude" :visible.sync="regionalFlagOpen" width="1000px">-->
 <!--      <areaSupermap ref="fireAreaSupermap" v-if="regionalFlagOpen" style="width: 100%;height:74vh"-->
@@ -289,21 +289,19 @@
 <!--        <el-button @click="cancelRegionalFlag">取 消</el-button>-->
 <!--      </div>-->
 <!--    </el-dialog>-->
-    <ISuperMapAreaMarker ref="ISuperMap" v-if="regionalFlagOpen" @send="send1"/>
+    <ISuperMapAreaMarker ref="ISuperMap" v-if="regionalFlagOpen" @send="send"/>
   </div>
 </template>
 
 <script>
   import {
     addImportarea,
-    addRegionalFlag,
     delImportarea,
-    delRegionalFlag,
     getImportarea,
-    getRegionalFlag,
     listImportarea,
     updateImportarea
   } from "@/api/data/generalbusiness/importarea/importarea";
+  import { addRegionalFlag} from "@/api/data/digitalresources/info";
   import {selectCenterMonitorlList} from "@/api/data/digitalforest/animal/animal";
   import deptselector from '@/views/components/deptselector.vue'
   import supermap from '@/views/components/supermap.vue'
@@ -326,10 +324,11 @@
           eventId: null,
           latLngs: [],
           type: '0',
+          name:null,
         },
-        sign: 1,
+        sign1: 1,
         ISuperMapvisible: false,
-        sign1:3,
+        sign:3,
         deptOptions: undefined,
         // 信息弹出层上的坐标弹层
         showLongitude: false,
@@ -425,29 +424,27 @@
       /** 区域标记按钮操作 */
       regionalFlagAdd(row) {
         const eventId = row.id;
-        getRegionalFlag(eventId).then(response => {
-          this.regionalFlagObj.eventId = eventId;
-          this.regionalFlagObj.latLngs = response.data.latLngs;
-          this.showMap1(this.regionalFlagObj.latLngs)
-        })
-
-        console.log(this.regionalFlagObj)
+        this.regionalFlagObj.eventId= eventId;
+        this.showMap(eventId)
+        // getRegionalFlag(eventId).then(response => {
+        //   this.regionalFlagObj1 = response.data;
+        // })
       },
-      showMap1(params) {
+      showMap(eventId) {
         this.regionalFlagOpen = true;
         this.$nextTick(() => {
-          this.$refs.ISuperMap.initP(this.sign1, {
+          this.$refs.ISuperMap.initP(this.sign, {
             longitude: undefined,
             latitude: undefined,
-            xiantude: params
-          })
+            xiantude: undefined
+          },eventId)
         })
       },
 
-      showMap() {
+      showMap1() {
         this.ISuperMapvisible = true;
         this.$nextTick(() => {
-          this.$refs.ISuperMap.init(this.sign, {
+          this.$refs.ISuperMap1.init(this.sign1, {
             id: this.form.id,
             longitude: this.form.longitude,
             latitude: this.form.latitude,
@@ -455,30 +452,31 @@
           })
         })
       },
-      send(val) {
+      send1(val) {
         if (val===true){
           this.ISuperMapvisible = false;
           return;
         }
-        if (this.sign === 1) {
+        if (this.sign1 === 1) {
           this.form.longitude = val.longitude;
           this.form.latitude = val.latitude;
         }
-        if (this.sign === 2 || this.sign === 3) this.regionalFlagObj.longitude = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+        if (this.sign1 === 2 || this.sign1 === 3) this.regionalFlagObj.longitude = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
         this.ISuperMapvisible = false
       },
 
-      send1(val) {
+      send(val) {
         if (val===true){
           this.regionalFlagOpen = false;
           return;
         }
-        if (this.sign1 === 2 || this.sign1 === 3) this.regionalFlagObj.latLngs = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+        if (this.sign === 2 || this.sign === 3) this.regionalFlagObj.latLngs = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
+        this.regionalFlagObj.name = val.name;
         addRegionalFlag(this.regionalFlagObj).then(res =>{
           this.$modal.msgSuccess(res.msg);
-          this.getList()
+          this.$refs.ISuperMap.getRegionalFlag();
         });
-        this.regionalFlagOpen = false
+        // this.regionalFlagOpen = false
 
       },
       setDataDeptId(e) {

+ 16 - 0
src/main/java/com/sooka/sponest/data/digitalresource/controller/CenterdataTResourcesLandInfoController.java

@@ -164,4 +164,20 @@ public class CenterdataTResourcesLandInfoController extends BaseController {
     public void delRegionalFlag(@PathVariable("eventId") String eventId) {
         centerdataTResourcesLandInfoService.delRegionalFlag(eventId);
     }
+
+    // 删除区域标记单个删除
+    @ApiOperation(value = "删除区域标记单个删除", notes = "删除区域标记单个删除")
+    @DeleteMapping(value = "/delRegionalFlagByFlagType/{eventId}/{flagType}")
+    public void delRegionalFlagByFlagType(@PathVariable("eventId") String eventId,@PathVariable("flagType") String flagType) {
+        centerdataTResourcesLandInfoService.delRegionalFlagByFlagType(eventId,flagType);
+    }
+    // 修改区域标记名称
+
+    @ApiOperation(value = "修改区域标记名称", notes = "修改区域标记名称")
+    @PutMapping("/updateRegionalFlag")
+    public AjaxResult updateRegionalFlag(@RequestBody RegionalFlag regionalFlag ) {
+        return toAjax(centerdataTResourcesLandInfoService.updateRegionalFlag(regionalFlag));
+    }
+
+
 }

+ 4 - 0
src/main/java/com/sooka/sponest/data/digitalresource/service/ICenterdataTResourcesLandInfoService.java

@@ -65,4 +65,8 @@ public interface ICenterdataTResourcesLandInfoService extends IBaseService {
 
     // 删除区域标记
     void delRegionalFlag(String eventId);
+
+    void delRegionalFlagByFlagType(String eventId, String flagType);
+
+    int updateRegionalFlag(RegionalFlag regionalFlag);
 }

+ 43 - 14
src/main/java/com/sooka/sponest/data/digitalresource/service/impl/CenterdataTResourcesLandInfoServiceImpl.java

@@ -1,7 +1,6 @@
 package com.sooka.sponest.data.digitalresource.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
@@ -14,6 +13,7 @@ import com.sooka.sponest.data.digitalresource.domain.CenterdataTResourcesLandInf
 import com.sooka.sponest.data.digitalresource.mapper.CenterdataTResourcesLandInfoMapper;
 import com.sooka.sponest.data.digitalresource.service.ICenterdataTResourcesLandInfoService;
 import com.sooka.sponest.data.generalbusiness.domain.bo.LatLng;
+import com.sooka.sponest.data.generalbusiness.domain.bo.LatLngAndFlagType;
 import com.sooka.sponest.data.system.areamarking.domain.RegionalFlag;
 import com.sooka.sponest.data.system.areamarking.service.ICenterdataTAreaMarkingService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,6 +21,8 @@ import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * 资源耕地Service业务层处理
@@ -107,10 +109,9 @@ public class CenterdataTResourcesLandInfoServiceImpl extends BaseServiceImpl imp
     @Override
     public AjaxResult addRegionalFlag(RegionalFlag regionalFlag) {
         String type = regionalFlag.getType();
+        Long flagType = centerdataTAreaMarkingService.getRegionalFlagType(regionalFlag);
         if (StringUtils.isNotEmpty(regionalFlag.getLatLngs())) {
             List<LatLng> list = JSONArray.parseArray(regionalFlag.getLatLngs(), LatLng.class);
-            // 删除区域标记
-            centerdataTAreaMarkingService.delRegionalFlag(regionalFlag.getEventId());
             for (int i = 0; i < list.size(); i++) {
                 RegionalFlag regionalFlag1 = new RegionalFlag();
                 regionalFlag1.setId(IdUtils.simpleUUID());
@@ -119,6 +120,8 @@ public class CenterdataTResourcesLandInfoServiceImpl extends BaseServiceImpl imp
                 regionalFlag1.setType(type);
                 regionalFlag1.setLatitude(list.get(i).getLat());
                 regionalFlag1.setLongitude(list.get(i).getLng());
+                regionalFlag1.setFlagType(flagType+1);
+                regionalFlag1.setName(regionalFlag.getName());
                 centerdataTAreaMarkingService.addRegionalFlag(regionalFlag1);
             }
         }else {
@@ -130,24 +133,50 @@ public class CenterdataTResourcesLandInfoServiceImpl extends BaseServiceImpl imp
 
     @Override
     public AjaxResult selectRegionalFlagByEventId(String eventId) {
-        RegionalFlag regionalFlagnew =new RegionalFlag();
+        List<LatLngAndFlagType> list = new ArrayList<>();
 
         List<RegionalFlag> regionalFlags = centerdataTAreaMarkingService.selectRegionalFlagByEventId(eventId);
-        List<LatLng> latLngs = new ArrayList<>();
-        for (RegionalFlag regionalFlag : regionalFlags) {
-            LatLng latLng = new LatLng();
-            latLng.setLng(regionalFlag.getLongitude());
-            latLng.setLat(regionalFlag.getLatitude());
-            latLngs.add(latLng);
+        Map<Long, List<RegionalFlag>> entityMap = regionalFlags.stream()
+                .collect(Collectors.groupingBy(RegionalFlag::getFlagType));//分类
+
+        String name = "";
+        for (Map.Entry<Long, List<RegionalFlag>> entry : entityMap.entrySet()) {
+            List<RegionalFlag> typeEntities = entry.getValue();
+            LatLngAndFlagType latLngAndFlagType = new LatLngAndFlagType();
+            List<String> list1 = new ArrayList<>();
+            for (RegionalFlag entity : typeEntities) {
+                list1.add(entity.getLongitude());
+                list1.add(entity.getLatitude());
+                name = entity.getName();
+            }
+            latLngAndFlagType.setEventId(eventId);
+            latLngAndFlagType.setLatLng(list1);
+            latLngAndFlagType.setName(name);
+            latLngAndFlagType.setFlagType(entry.getKey());
+            list.add(latLngAndFlagType);
         }
-        String latLng = JSONObject.toJSONString(latLngs);
-        regionalFlagnew.setLatLngs(latLng);
-        regionalFlagnew.setEventId(eventId);
-        return AjaxResult.success(regionalFlagnew);
+//        List<LatLng> latLngs = new ArrayList<>();
+//        for (RegionalFlag regionalFlag : regionalFlags) {
+//            LatLng latLng = new LatLng();
+//            latLng.setLng(regionalFlag.getLongitude());
+//            latLng.setLat(regionalFlag.getLatitude());
+//            latLngs.add(latLng);
+//        }
+        return AjaxResult.success(list);
     }
 
     @Override
     public void delRegionalFlag(String eventId ) {
         centerdataTAreaMarkingService.delRegionalFlag(eventId);
     }
+
+    @Override
+    public void delRegionalFlagByFlagType(String eventId, String flagType) {
+        centerdataTAreaMarkingService.delRegionalFlagByFlagType(eventId,flagType);
+    }
+
+    @Override
+    public int updateRegionalFlag(RegionalFlag regionalFlag) {
+        return centerdataTAreaMarkingService.updateRegionalFlag(regionalFlag);
+    }
 }

+ 24 - 0
src/main/java/com/sooka/sponest/data/generalbusiness/domain/bo/LatLngAndFlagType.java

@@ -0,0 +1,24 @@
+package com.sooka.sponest.data.generalbusiness.domain.bo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @program: ruoyi
+ * @description: yy
+ * @author: yy
+ * @create: 2022-07-08 13:54
+ **/
+@Data
+public class LatLngAndFlagType {
+
+
+    private String eventId;
+
+    private Long flagType;
+
+    private List<String> latLng;
+
+    private String name;
+}

+ 6 - 1
src/main/java/com/sooka/sponest/data/system/areamarking/domain/RegionalFlag.java

@@ -20,9 +20,14 @@ public class RegionalFlag {
     private String latitude;
 
     private Integer flag;
-    //区域标记类型 0 是重点区域  1 是资源耕地 2是永久基本农田管理 3摄像头未覆盖区域
+    //区域标记类型 0 是重点区域  1 是资源耕地 2是永久基本农田管理 3摄像头未覆盖区域 4植树造林区域
     private String type;
 
     //落点数据
     private String latLngs;
+
+    private Long flagType;
+
+    private String name;
+
 }

+ 7 - 0
src/main/java/com/sooka/sponest/data/system/areamarking/mapper/CenterdataTAreaMarkingMapper.java

@@ -1,6 +1,7 @@
 package com.sooka.sponest.data.system.areamarking.mapper;
 
 import com.sooka.sponest.data.system.areamarking.domain.RegionalFlag;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -13,4 +14,10 @@ public interface CenterdataTAreaMarkingMapper {
 
     // 删除区域标记
     void delRegionalFlag(String eventId);
+
+    Long getRegionalFlagType(RegionalFlag regionalFlag);
+
+    void delRegionalFlagByFlagType(@Param("eventId") String eventId,@Param("flagType") String flagType);
+
+    int updateRegionalFlag(RegionalFlag regionalFlag);
 }

+ 7 - 0
src/main/java/com/sooka/sponest/data/system/areamarking/service/ICenterdataTAreaMarkingService.java

@@ -13,4 +13,11 @@ public interface ICenterdataTAreaMarkingService {
 
     // 删除区域标记
     void delRegionalFlag(String eventId);
+    //查询区域标记类型同一数据下的类型
+    Long getRegionalFlagType(RegionalFlag regionalFlag);
+
+
+    void delRegionalFlagByFlagType(String eventId, String flagType);
+
+    int updateRegionalFlag(RegionalFlag regionalFlag);
 }

+ 15 - 0
src/main/java/com/sooka/sponest/data/system/areamarking/service/impl/CenterdataTAreaMarkingServiceImpl.java

@@ -29,4 +29,19 @@ public class CenterdataTAreaMarkingServiceImpl extends BaseServiceImpl implement
     public void delRegionalFlag(String eventId) {
         centerdataTAreaMarkingMapper.delRegionalFlag(eventId);
     }
+
+    @Override
+    public Long getRegionalFlagType(RegionalFlag regionalFlag) {
+        return centerdataTAreaMarkingMapper.getRegionalFlagType(regionalFlag);
+    }
+
+    @Override
+    public void delRegionalFlagByFlagType(String eventId, String flagType) {
+        centerdataTAreaMarkingMapper.delRegionalFlagByFlagType(eventId,flagType);
+    }
+
+    @Override
+    public int updateRegionalFlag(RegionalFlag regionalFlag) {
+        return centerdataTAreaMarkingMapper.updateRegionalFlag(regionalFlag);
+    }
 }

+ 17 - 0
src/main/resources/mapper/system/areamarking/CenterdataTAreaMarkingMapper.xml

@@ -12,13 +12,23 @@
         <result property="latitude"    column="latitude"    />
         <result property="flag"    column="flag"    />
         <result property="type"    column="type"    />
+        <result property="flagType"    column="flag_type"    />
+        <result property="name"    column="name"    />
     </resultMap>
+    <update id="updateRegionalFlag">
+        update centerdata_t_regional_flag
+        set name = #{name} where event_id = #{eventId} and flag_type = #{flagType}
+    </update>
 
     <select id="selectRegionalFlagByEventId" parameterType="String" resultMap="RegionalFlagResult">
         SELECT * FROM `centerdata_t_regional_flag`
         where event_id = #{eventId}
         ORDER BY flag
     </select>
+    <select id="getRegionalFlagType" resultType="java.lang.Long">
+        SELECT ifnull(max(flag_type),0) FROM `centerdata_t_regional_flag`
+        where event_id = #{eventId}
+    </select>
 
     <insert id="addRegionalFlag" parameterType="RegionalFlag">
         insert into centerdata_t_regional_flag
@@ -29,6 +39,8 @@
             <if test="latitude != null">latitude,</if>
             <if test="flag != null">flag,</if>
             <if test="type != null">type,</if>
+            <if test="flagType != null">flag_type,</if>
+            <if test="name != null">name,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -37,10 +49,15 @@
             <if test="latitude != null">#{latitude},</if>
             <if test="flag != null">#{flag},</if>
             <if test="type != null">#{type},</if>
+            <if test="flagType != null">#{flagType},</if>
+            <if test="name != null">#{name},</if>
         </trim>
     </insert>
 
     <delete id="delRegionalFlag" parameterType="String">
         delete from centerdata_t_regional_flag where event_id = #{eventId}
     </delete>
+    <delete id="delRegionalFlagByFlagType">
+        delete from centerdata_t_regional_flag where event_id = #{eventId} and flag_type = #{flagType}
+    </delete>
 </mapper>