فهرست منبع

Merge branch 'dev' into dev-2.0_test

# Conflicts:
#	src/main/resources/mapper/digitalforest/ForestViewMapper.xml
lyq 9 ماه پیش
والد
کامیت
f1f2a85e5e
61فایلهای تغییر یافته به همراه4715 افزوده شده و 1219 حذف شده
  1. 53 0
      data-ui/src/api/data/digitalagriculture/collective_farmland/farmland.js
  2. 7 0
      data-ui/src/api/data/generalbusiness/keyProjects/projects.js
  3. 329 295
      data-ui/src/views/data/digitalagriculture/breedingFarm/index.vue
  4. 51 3
      data-ui/src/views/data/digitalagriculture/cesspitCollect/index.vue
  5. 618 0
      data-ui/src/views/data/digitalagriculture/collective_farmland/index.vue
  6. 275 0
      data-ui/src/views/data/digitalagriculture/collective_farmland/standingBook.vue
  7. 377 310
      data-ui/src/views/data/digitalagriculture/garbage_transfer/index.vue
  8. 305 246
      data-ui/src/views/data/digitalagriculture/trash_can/index.vue
  9. 6 2
      data-ui/src/views/data/digitalforest/linleader/index.vue
  10. 243 256
      data-ui/src/views/data/generalbusiness/keyProjects/index.vue
  11. 7 0
      pom.xml
  12. 28 0
      src/main/java/com/sooka/sponest/data/commandcenter/domian/ProjectBody.java
  13. 15 1
      src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmBreedingFarmController.java
  14. 15 1
      src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmCesspitCollectController.java
  15. 116 0
      src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmCollectiveFarmlandController.java
  16. 15 1
      src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmGarbageTransferController.java
  17. 15 1
      src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmTrashCanController.java
  18. 16 1
      src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmBreedingFarm.java
  19. 17 0
      src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmCesspitCollect.java
  20. 175 0
      src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmCollectiveFarmland.java
  21. 17 0
      src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmGarbageTransfer.java
  22. 16 0
      src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmTrashCan.java
  23. 64 0
      src/main/java/com/sooka/sponest/data/digitalagriculture/mapper/CenterdataTFarmCollectiveFarmlandMapper.java
  24. 64 0
      src/main/java/com/sooka/sponest/data/digitalagriculture/service/ICenterdataTFarmCollectiveFarmlandService.java
  25. 28 2
      src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmBreedingFarmServiceImpl.java
  26. 31 1
      src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmCesspitCollectServiceImpl.java
  27. 169 0
      src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmCollectiveFarmlandServiceImpl.java
  28. 28 0
      src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmTrashCanServiceImpl.java
  29. 31 1
      src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/ICenterdataTFarmGarbageTransferServiceImpl.java
  30. 1 1
      src/main/java/com/sooka/sponest/data/digitalenvironment/service/impl/CenterdataTEnvironmentSewageOutletServiceImpl.java
  31. 2 2
      src/main/java/com/sooka/sponest/data/digitalenvironment/service/impl/CenterdataTEnvironmentWaterMonitorServiceImpl.java
  32. 9 2
      src/main/java/com/sooka/sponest/data/digitalforest/controller/ForestViewController.java
  33. 2 0
      src/main/java/com/sooka/sponest/data/digitalforest/domain/vo/ForestCloudMapVO.java
  34. 2 0
      src/main/java/com/sooka/sponest/data/digitalforest/domain/vo/ForestLeaderVO.java
  35. 2 0
      src/main/java/com/sooka/sponest/data/digitalforest/mapper/ForestViewMapper.java
  36. 4 1
      src/main/java/com/sooka/sponest/data/digitalforest/service/IForestViewService.java
  37. 2 2
      src/main/java/com/sooka/sponest/data/digitalforest/service/impl/CenterdataTForestAnimalServiceImpl.java
  38. 14 7
      src/main/java/com/sooka/sponest/data/digitalforest/service/impl/ForestViewServiceImpl.java
  39. 12 0
      src/main/java/com/sooka/sponest/data/digitalwater/controller/WaterViewController.java
  40. 2 0
      src/main/java/com/sooka/sponest/data/digitalwater/domain/WaterConservancyViewBO.java
  41. 2 0
      src/main/java/com/sooka/sponest/data/digitalwater/mapper/WaterConservancyViewMapper.java
  42. 2 0
      src/main/java/com/sooka/sponest/data/digitalwater/service/IWaterViewService.java
  43. 7 0
      src/main/java/com/sooka/sponest/data/digitalwater/service/impl/WaterViewServiceImpl.java
  44. 43 0
      src/main/java/com/sooka/sponest/data/generalbusiness/controller/CenterdataTKeyProjectsController.java
  45. 145 2
      src/main/java/com/sooka/sponest/data/generalbusiness/domain/CenterdataTKeyProjects.java
  46. 698 0
      src/main/java/com/sooka/sponest/data/generalbusiness/domain/CenterdataTKeyProjectsBo.java
  47. 24 0
      src/main/java/com/sooka/sponest/data/generalbusiness/mapper/CenterdataTKeyProjectsMapper.java
  48. 18 0
      src/main/java/com/sooka/sponest/data/generalbusiness/service/ICenterdataTKeyProjectsService.java
  49. 2 2
      src/main/java/com/sooka/sponest/data/generalbusiness/service/impl/CenterdataTForestImportareaServiceImpl.java
  50. 76 2
      src/main/java/com/sooka/sponest/data/generalbusiness/service/impl/CenterdataTKeyProjectsServiceImpl.java
  51. 49 5
      src/main/java/com/sooka/sponest/data/system/attach/controller/CenterdataTAttachController.java
  52. 0 2
      src/main/java/com/sooka/sponest/data/system/attach/service/ICenterdataTAttachService.java
  53. 0 5
      src/main/java/com/sooka/sponest/data/system/attach/service/impl/CenterdataTAttachServiceImpl.java
  54. 10 30
      src/main/java/com/sooka/sponest/data/utils/ScheduleAtachUtil.java
  55. 19 4
      src/main/resources/mapper/commandcenter/CommandCentreMapper.xml
  56. 213 0
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmCollectiveFarmlandMapper.xml
  57. 44 10
      src/main/resources/mapper/digitalforest/ForestViewMapper.xml
  58. 1 1
      src/main/resources/mapper/digitaltraffic/CenterdataTSupermapLevelMapper.xml
  59. 51 15
      src/main/resources/mapper/digitalwater/WaterConservancyViewMapper.xml
  60. 127 4
      src/main/resources/mapper/generalbusiness/CenterdataTKeyProjectsMapper.xml
  61. 1 1
      src/main/resources/mapper/index/IndexViewMapper.xml

+ 53 - 0
data-ui/src/api/data/digitalagriculture/collective_farmland/farmland.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询农村集体耕地列表
+export function listFarmland(query) {
+  return request({
+    url: '/center-data/collectiveFarmland/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询农村集体耕地详细
+export function getFarmland(id) {
+  return request({
+    url: '/center-data/collectiveFarmland/' + id,
+    method: 'get'
+  })
+}
+
+// 新增农村集体耕地
+export function addFarmland(data) {
+  return request({
+    url: '/center-data/collectiveFarmland',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改农村集体耕地
+export function updateFarmland(data) {
+  return request({
+    url: '/center-data/collectiveFarmland',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除农村集体耕地
+export function delFarmland(id) {
+  return request({
+    url: '/center-data/collectiveFarmland/' + id,
+    method: 'delete'
+  })
+}
+
+// 查询农村集体耕地列表
+export function countFarmland(query) {
+  return request({
+    url: '/center-data/collectiveFarmland/countFarmland',
+    method: 'get',
+    params: query
+  })
+}

+ 7 - 0
data-ui/src/api/data/generalbusiness/keyProjects/projects.js

@@ -80,3 +80,10 @@ export function selectPark(data){
     data: data
   })
 }
+
+export function pushMessage(id) {
+  return request({
+    url: '/sooka-sponest-center-data/projects/receivedMessage/' + id,
+    method: 'get'
+  })
+}

+ 329 - 295
data-ui/src/views/data/digitalagriculture/breedingFarm/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="true"  @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="true" @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -15,7 +15,8 @@
           <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
         </template>
         <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
-                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"
+                    style="width: 240px"/>
         <el-input v-model="queryParams.deptName" v-if="false"/>
       </el-form-item>
       <el-form-item>
@@ -103,10 +104,10 @@
       <el-table-column label="死亡情况" align="center" prop="circumstancesOfDeath"/>
       <el-table-column label="处理方式" align="center" prop="processing"/>
       <el-table-column label="所属部门" align="center" prop="deptName"/>
-      <el-table-column label="创建人" align="center" prop="createName" />
-      <el-table-column label="创建时间" align="center" prop="createTime" />
-      <el-table-column label="修改人" align="center" prop="updateName" />
-      <el-table-column label="修改时间" align="center" prop="updateTime" />
+      <el-table-column label="创建人" align="center" prop="createName"/>
+      <el-table-column label="创建时间" align="center" prop="createTime"/>
+      <el-table-column label="修改人" align="center" prop="updateName"/>
+      <el-table-column label="修改时间" align="center" prop="updateTime"/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
         <template slot-scope="scope">
           <el-button
@@ -143,7 +144,8 @@
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="所属部门" prop="deptId" class="form-style">
-              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true" :noResultsText="'空'" :noOptionsText="'空'"
+              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
+                          :noResultsText="'空'" :noOptionsText="'空'"
                           placeholder="请选择部门" @select="hx"/>
             </el-form-item>
           </el-col>
@@ -168,7 +170,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="详细通讯地址" prop="address">
-              <el-input v-model="form.address" placeholder="请输入详细通讯地址"  maxlength="20"/>
+              <el-input v-model="form.address" placeholder="请输入详细通讯地址" maxlength="20"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -187,19 +189,20 @@
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="数量" prop="number">
-              <el-input v-model="form.number" placeholder="请输入数量"  maxlength="20"/>
+              <el-input v-model="form.number" placeholder="请输入数量" maxlength="20"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="备案表" prop="filing">
-              <el-input v-model="form.filing" placeholder="备案表"  maxlength="20"/>
+              <el-input v-model="form.filing" placeholder="备案表" maxlength="20"/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="年份" prop="year" label-width="120px" class="form-style">
-              <el-date-picker v-model="form.year" type="year" placeholder="选择年" value-format="yyyy" :editable="false"></el-date-picker>
+              <el-date-picker v-model="form.year" type="year" placeholder="选择年" value-format="yyyy"
+                              :editable="false"></el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -235,7 +238,7 @@
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="死亡情况" prop="circumstancesOfDeath">
-              <el-input v-model="form.circumstancesOfDeath" placeholder="死亡情况"  maxlength="32"/>
+              <el-input v-model="form.circumstancesOfDeath" placeholder="死亡情况" maxlength="32"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -262,6 +265,27 @@
 
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="绑定设备" prop="deviceList">
+              <el-select v-model="form.deviceList" filterable placeholder="请选择设备" multiple filterable>
+                <el-option
+                  v-for="dict in cameraList"
+                  :key="dict.id"
+                  :label="dict.cameraName"
+                  :value="dict.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="图片" prop="attachPaths">
+              <ImageUpload ref="ImageUpload" :limit="1" :file-type="['png','jpg','jpeg']"
+                           :value="form.attachPaths"
+                           @input="getUrl"></ImageUpload>
+            </el-form-item>
+          </el-col>
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -274,297 +298,307 @@
 </template>
 
 <script>
-  import {
-    listBreedingFarm,
-    getBreedingFarm,
-    delBreedingFarm,
-    addBreedingFarm,
-    updateBreedingFarm
-  } from "@/api/data/digitalagriculture/breedingFarm";
-  import Deptselector from '@/views/components/deptselector';
-  import supermap from '@/views/components/supermap'
-  import {checkLon, checkLat} from "@/api/rules/rules";
-  import {format_date} from "@/views/data/common/dateExport";
-  import { treeselect } from "@/api/system/dept";
-  import Treeselect from '@riophae/vue-treeselect'
-  import '@riophae/vue-treeselect/dist/vue-treeselect.css'
-  import ISuperMap from "@/views/data/common/ISuperMap.vue";
-  import {checkPositiveInteger} from "../../../../api/rules/rules";
-  import {checkPositiveDecimal} from "../../../../api/rules/rules";
-  import {checkNonnegativeInteger} from "../../../../api/rules/rules";
+import {
+  listBreedingFarm,
+  getBreedingFarm,
+  delBreedingFarm,
+  addBreedingFarm,
+  updateBreedingFarm
+} from "@/api/data/digitalagriculture/breedingFarm";
+import Deptselector from '@/views/components/deptselector';
+import supermap from '@/views/components/supermap'
+import {checkLon, checkLat} from "@/api/rules/rules";
+import {format_date} from "@/views/data/common/dateExport";
+import {treeselect} from "@/api/system/dept";
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import ISuperMap from "@/views/data/common/ISuperMap.vue";
+import {checkPositiveInteger} from "../../../../api/rules/rules";
+import {checkPositiveDecimal} from "../../../../api/rules/rules";
+import {checkNonnegativeInteger} from "../../../../api/rules/rules";
+import {selectCenterMonitorlList} from "@/api/data/digitalforest/animal/animal";
+
 
+export default {
+  name: "BreedingFarm",
+  dicts: ['centerdata_breeding_variety', 'sys_dept_type', 'sys_isurge'],
+  components: {ISuperMap, Treeselect, Deptselector, supermap},
+  data() {
+    var circumstancesOfDeath = (rule, value, callback) => {
+      const reg = /^[A-z0-9\u4e00-\u9fa5]*$/;
+      if (!reg.test(value)) {
+        callback(new Error("名称只能包含非负整数、汉字、英文"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      ISuperMapvisible: false,
+      sign: 1,
+      // 部门名称
+      deptName: undefined,
+      // 部门树选项
+      deptOptions: undefined,
+      cameraList: [],//设备集合
+      // 遮罩层
+      loading: true,
+      showLongitude: false,
+      titleLongitude: '经纬度',
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 备案畜禽规模养殖场表格数据
+      breedingFarmList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        year: null,
+        number: null,
+        varieties: null,
+        isUsed: null,
+        assorted: null,
+        licence: null,
+        filing: null,
+        stoolVolume: null,
+        circumstancesOfDeath: null,
+        processing: null,
+        longitude: null,
+        latitude: null,
+        deptId: null,
+        deptName: 0,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        name: [
+          {required: true, message: "名称名称不能为空", trigger: "blur"}
+        ],
+        deptId: [
+          {required: true, message: "所属部门不能为空", trigger: "change"}
+        ],
+        varieties: [
+          {required: true, message: "种类不能为空", trigger: "change"}
 
-  export default {
-    name: "BreedingFarm",
-    dicts: ['centerdata_breeding_variety', 'sys_dept_type', 'sys_isurge'],
-    components: {ISuperMap, Treeselect, Deptselector,supermap},
-    data() {
-      var circumstancesOfDeath = (rule, value, callback) => {
-        const reg= /^[A-z0-9\u4e00-\u9fa5]*$/;
-        if (!reg.test(value)) {
-          callback(new Error("名称只能包含非负整数、汉字、英文"));
-        } else {
-          callback();
-        }};
-      return {
-        ISuperMapvisible: false,
-        sign: 1,
-        // 部门名称
-        deptName: undefined,
-        // 部门树选项
-        deptOptions: undefined,
-        cameraList: [],//设备集合
-        // 遮罩层
-        loading: true,
-        showLongitude: false,
-        titleLongitude: '经纬度',
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        // 备案畜禽规模养殖场表格数据
-        breedingFarmList: [],
-        // 弹出层标题
-        title: "",
-        // 是否显示弹出层
-        open: false,
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          name: null,
-          year: null,
-          number: null,
-          varieties: null,
-          isUsed: null,
-          assorted: null,
-          licence: null,
-          filing: null,
-          stoolVolume: null,
-          circumstancesOfDeath: null,
-          processing: null,
-          longitude: null,
-          latitude: null,
-          deptId: null,
-          deptName: 0,
-        },
-        // 表单参数
-        form: {},
-        // 表单校验
-        rules: {
-          name: [
-            {required: true, message: "名称名称不能为空", trigger: "blur"}
-          ],
-          deptId: [
-            {required: true, message: "所属部门不能为空", trigger: "change"}
-          ],
-          varieties: [
-            {required: true, message: "种类不能为空", trigger: "change"}
+        ],
+        year: [
+          {required: true, message: '年份不能为空', trigger: 'blur'},
+        ],
+        longitude: [
+          {required: true, message: "经度不能为空", trigger: "change"},
+          {validator: checkLon, trigger: 'blur'}
+        ],
+        latitude: [
+          {required: true, message: "纬度不能为空", trigger: "change"},
+          {validator: checkLat, trigger: 'blur'}
+        ],
+        licence: [
+          {validator: checkNonnegativeInteger, trigger: 'blur'}
+        ],
+        filing: [
+          {validator: checkPositiveInteger, trigger: 'blur'}
+        ],
+        stoolVolume: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        // circumstancesOfDeath: [
+        //   { validator: checkNonnegativeInteger,trigger: 'blur'}
+        // ],
+        circumstancesOfDeath: [{validator: circumstancesOfDeath, trigger: "blur"}],
+        number: [
+          {validator: checkPositiveInteger, trigger: 'blur'}
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    showMap() {
+      this.ISuperMapvisible = true;
+      this.$nextTick(() => {
+        this.$refs.ISuperMap.init(this.sign, {
+          id: this.form.id,
+          longitude: this.form.longitude,
+          latitude: this.form.latitude,
 
-          ],
-          year: [
-            {required: true, message: '年份不能为空', trigger: 'blur'},
-          ],
-          longitude: [
-            { required: true, message: "经度不能为空", trigger: "change" },
-            { validator: checkLon,trigger: 'blur'}
-          ],
-          latitude: [
-            { required: true, message: "纬度不能为空", trigger: "change" },
-            { validator: checkLat,trigger: 'blur'}
-          ],
-          licence: [
-            { validator: checkNonnegativeInteger,trigger: 'blur'}
-          ],
-          filing: [
-            { validator: checkPositiveInteger,trigger: 'blur'}
-          ],
-          stoolVolume: [
-            { validator: checkPositiveDecimal,trigger: 'blur'}
-          ],
-          // circumstancesOfDeath: [
-          //   { validator: checkNonnegativeInteger,trigger: 'blur'}
-          // ],
-          circumstancesOfDeath: [ { validator: circumstancesOfDeath , trigger: "blur"} ],
-      number: [
-            { validator: checkPositiveInteger,trigger: 'blur'}
-          ]
-        }
+        })
+      })
+    },
+    getUrl(url) {
+      this.form.attachPaths = url
+    },
+    send(val) {
+      if (val === true) {
+        this.ISuperMapvisible = false;
+        return;
+      }
+      if (this.sign === 1) {
+        this.form.longitude = val.longitude;
+        this.form.latitude = val.latitude;
+      }
+
+      this.ISuperMapvisible = false
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    hx(node) {
+      this.form.dataDeptId = node.id
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField('deptId');
+    },
+    /** 查询养殖场列表 */
+    getList() {
+      this.loading = true;
+      listBreedingFarm(this.queryParams).then(response => {
+        this.breedingFarmList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    setDataDeptId(e) {
+      this.form.deptId = e.deptId;
+      this.form.deptName = e.deptName;
+    },
+    showLatLng: function (lat, lng) {
+      this.form.latitude = lat
+      this.form.longitude = lng
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        name: null,
+        address: null,
+        deptId: null,
+        deptName: null,
+        longitude: null,
+        latitude: null,
+        year: null,
+        number: null,
+        varieties: null,
+        isUsed: null,
+        assorted: null,
+        licence: null,
+        filingForm: null,
+        stoolVolume: null,
+        circumstancesOfDeath: null,
+        processing: null,
+        filing: null
       };
+      this.resetForm("form");
     },
-    created() {
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
       this.getList();
-      this.getTreeselect();
     },
-    methods: {
-      showMap() {
-        this.ISuperMapvisible = true;
-        this.$nextTick(() => {
-          this.$refs.ISuperMap.init(this.sign, {
-            id: this.form.id,
-            longitude: this.form.longitude,
-            latitude: this.form.latitude,
-
-          })
-        })
-      },
-      send(val) {
-        if (val===true){
-          this.ISuperMapvisible = false;
-          return;
-        }
-        if (this.sign === 1) {
-          this.form.longitude = val.longitude;
-          this.form.latitude = val.latitude;
-        }
-
-        this.ISuperMapvisible = false
-      },
-      /** 查询部门下拉树结构 */
-      getTreeselect() {
-        treeselect().then(response => {
-          this.deptOptions = response.data;
-        });
-      },
-      hx(node) {
-        this.form.dataDeptId = node.id
-        this.form.deptId = node.id
-        this.form.deptName = node.label
-        this.$refs.form.validateField('deptId');
-      },
-      /** 查询养殖场列表 */
-      getList() {
-        this.loading = true;
-        listBreedingFarm(this.queryParams).then(response => {
-          this.breedingFarmList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      },
-      setDataDeptId(e) {
-        this.form.deptId = e.deptId;
-        this.form.deptName = e.deptName;
-      },
-      showLatLng: function (lat, lng) {
-        this.form.latitude = lat
-        this.form.longitude = lng
-      },
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          id: null,
-          createBy: null,
-          createName: null,
-          createTime: null,
-          updateBy: null,
-          updateName: null,
-          updateTime: null,
-          name: null,
-          address: null,
-          deptId: null,
-          deptName: null,
-          longitude: null,
-          latitude: null,
-          year: null,
-          number: null,
-          varieties: null,
-          isUsed: null,
-          assorted: null,
-          licence: null,
-          filingForm: null,
-          stoolVolume: null,
-          circumstancesOfDeath: null,
-          processing: null,
-          filing: null
-        };
-        this.resetForm("form");
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.queryParams.deptName = 0;
-        this.resetForm("queryForm");
-        this.handleQuery();
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length !== 1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
-
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.deptName = 0;
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加养殖场";
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
+      getBreedingFarm(id).then(response => {
+        this.form = response.data;
         this.open = true;
-        this.title = "添加养殖场";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        const id = row.id || this.ids
-        getBreedingFarm(id).then(response => {
-          this.form = response.data;
-          this.open = true;
-          this.title = "修改养殖场";
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            if (this.form.id != null) {
-              updateBreedingFarm(this.form).then(response => {
-                this.$modal.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addBreedingFarm(this.form).then(response => {
-                this.$modal.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
+        this.title = "修改养殖场";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateBreedingFarm(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addBreedingFarm(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
           }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids;
-        this.$modal.confirm('是否确认删除已选择的数据项?').then(function () {
-          return delBreedingFarm(ids);
-        }).then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        }).catch(() => {
-        });
-      },
-      /** 导出按钮操作 */
-      handleExport() {
-        this.download('center-data/breedingFarm/export', {
-          ...this.queryParams
-        }, `养殖场_${format_date(new Date())}.xlsx`)
-      },
-      // 点击按钮修改是否只查询本级部门用户
-      changeQueryType() {
-        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
-      }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除已选择的数据项?').then(function () {
+        return delBreedingFarm(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('center-data/breedingFarm/export', {
+        ...this.queryParams
+      }, `养殖场_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
-  };
+  }
+};
 </script>

+ 51 - 3
data-ui/src/views/data/digitalagriculture/cesspitCollect/index.vue

@@ -118,31 +118,68 @@
     />
 
     <!-- 添加或修改粪污收集点对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="550px" class="form-style">
+    <el-dialog :title="title" :visible.sync="open" width="1000px" class="form-style">
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-row :gutter="20">
-          <el-col :span="23">
+        <el-row :gutter="24">
+          <el-col :span="12">
             <el-form-item label="名称" prop="name">
               <el-input v-model="form.name" placeholder="请输入名称" maxlength="20"/>
             </el-form-item>
+          </el-col>
+          <el-col :span="12">
             <el-form-item label="编号" prop="code">
               <el-input v-model="form.code" placeholder="请输入编号" maxlength="20"/>
             </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
             <el-form-item label="经度" prop="longitude" @dblclick.native="showMap">
               <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-input v-model="form.latitude" placeholder="鼠标双击选择经纬度"/>
             </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
             <el-form-item label="覆盖区域" prop="coverage">
               <el-input v-model="form.coverage" placeholder="请输入覆盖区域" maxlength="50"/>
             </el-form-item>
+          </el-col>
+          <el-col :span="12">
             <el-form-item label="所属部门" prop="deptId">
               <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true" :noResultsText="'空'" :noOptionsText="'空'"
                           placeholder="请选择部门" @select="hx"/>
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row :gutter="24">
+          <el-col :span="24">
+            <el-form-item label="绑定设备" prop="deviceList">
+              <el-select v-model="form.deviceList" filterable placeholder="请选择设备" multiple filterable>
+                <el-option
+                  v-for="dict in cameraList"
+                  :key="dict.id"
+                  :label="dict.cameraName"
+                  :value="dict.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="图片" prop="attachPaths">
+              <ImageUpload ref="ImageUpload" :limit="1" :file-type="['png','jpg','jpeg']"
+                           :value="form.attachPaths"
+                           @input="getUrl"></ImageUpload>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -169,6 +206,7 @@ import {
   listCesspitCollect,
   updateCesspitCollect
 } from "@/api/data/digitalagriculture/cesspitCollect/cesspitCollect";
+import {selectCenterMonitorlList} from "@/api/data/digitalforest/animal/animal";
 
 export default {
   name: "cesspitCollect",
@@ -181,6 +219,7 @@ export default {
   data() {
     return {
       ISuperMapvisible: false,
+      cameraList: [],//设备集合
       sign: 1,
       // 遮罩层
       loading: true,
@@ -285,6 +324,9 @@ export default {
       }
       this.ISuperMapvisible = false
     },
+    getUrl(url) {
+      this.form.attachPaths = url
+    },
     /** 查询部门下拉树结构 */
     getTreeselect() {
       treeselect().then(response => {
@@ -351,11 +393,17 @@ export default {
       this.reset();
       this.open = true;
       this.title = "添加粪污收集点";
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
       getCesspitCollect(id).then(response => {
         this.form = response.data;
         this.open = true;

+ 618 - 0
data-ui/src/views/data/digitalagriculture/collective_farmland/index.vue

@@ -0,0 +1,618 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px"
+             @submit.native.prevent>
+      <el-form-item label="名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"
+                    style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['farm:collectiveFarmland:add']"
+        >新增
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['farm:collectiveFarmland:edit']"
+        >修改
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['farm:collectiveFarmland:remove']"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['farm:collectiveFarmland:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="farmlandList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="名称" align="center" prop="name"/>
+      <el-table-column label="类型" align="center" prop="typeLabel"/>
+      <el-table-column label="集体耕地总面积合计(亩)" align="center" prop="collectiveFarmland"/>
+      <el-table-column label="家庭承包面积(亩)" align="center" prop="homeContracting"/>
+      <el-table-column label="其他集体耕地面积合计(亩)" align="center" prop="otherCollectiveFarmland"/>
+      <el-table-column label="经度" align="center" prop="longitude"/>
+      <el-table-column label="纬度" align="center" prop="latitude"/>
+      <el-table-column label="所属部门" align="center" prop="deptName"/>
+      <el-table-column label="创建人" align="center" prop="createName"/>
+      <el-table-column label="创建时间" align="center" prop="createTime"/>
+      <el-table-column label="修改人" align="center" prop="updateName"/>
+      <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-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['farm:collectiveFarmland:edit']"
+          >修改
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['farm:collectiveFarmland:remove']"
+          >删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改农村集体耕地对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="1200px" class="form-style">
+      <el-form ref="form" :model="form" :rules="rules" label-width="240px">
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="名称" prop="name">
+              <el-input v-model="form.name" placeholder="请输入名称" maxlength="20"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="类型" prop="type">
+              <el-select v-model="form.type" placeholder="请选择类型">
+                <el-option
+                  v-for="item in dict.type.centerdata_land_type"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="经度" prop="longitude" @dblclick.native="showMap">
+              <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-input v-model="form.latitude" placeholder="鼠标双击选择经纬度"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="承包地(亩)" prop="contractedLand">
+              <el-input v-model="form.contractedLand" placeholder="请输入承包地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="机动地(亩)" prop="maneuverableLand">
+              <el-input v-model="form.maneuverableLand" placeholder="请输入机动地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="独生子女地(亩)" prop="onlyChildLand">
+              <el-input v-model="form.onlyChildLand" placeholder="请输入独生子女地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="全户消亡地(亩)" prop="extinctionLand">
+              <el-input v-model="form.extinctionLand" placeholder="请输入全户消亡地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="其他集体耕地面积合计(亩)" prop="otherCollectiveFarmland">
+              <el-input v-model="form.otherCollectiveFarmland" placeholder="请输入其他集体耕地面积合计(亩)"
+                        maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="四荒地" prop="fourWastelandsLand">
+              <el-input v-model="form.fourWastelandsLand" placeholder="请输入四荒地" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="集体耕地总面积合计(亩)" prop="collectiveFarmland">
+              <el-input v-model="form.collectiveFarmland" placeholder="请输入集体耕地总面积合计(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="家庭承包面积(亩)" prop="homeContracting">
+              <el-input v-model="form.homeContracting" placeholder="请输入家庭承包面积(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="二轮承包地后开垦地、复垦地(亩)" prop="reclaimLang">
+              <el-input v-model="form.reclaimLang" placeholder="请输入二轮承包地后开垦地、复垦地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="农户交回的家庭承包地(亩)" prop="returnableLand">
+              <el-input v-model="form.returnableLand" placeholder="请输入农户交回的家庭承包地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="校田地" prop="schoolLand">
+              <el-input v-model="form.schoolLand" placeholder="请输入校田地" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="其中:由村经营的校田地" prop="villageSchoolLand">
+              <el-input v-model="form.villageSchoolLand" placeholder="请输入其中:由村经营的校田地" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="水面" prop="waterArea">
+              <el-input v-model="form.waterArea" placeholder="请输入水面" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="林地面积" prop="forestArea">
+              <el-input v-model="form.forestArea" placeholder="请输入林地面积" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="切割地(亩)" prop="dicallyLand">
+              <el-input v-model="form.dicallyLand" placeholder="请输入切割地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="所属部门" prop="deptId">
+              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
+                          :noResultsText="'空'" :noOptionsText="'空'"
+                          placeholder="请选择部门" @select="hx"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="绑定设备" prop="deviceList">
+              <el-select v-model="form.deviceList" filterable placeholder="请选择设备" multiple filterable>
+                <el-option
+                  v-for="dict in cameraList"
+                  :key="dict.id"
+                  :label="dict.cameraName"
+                  :value="dict.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="备注" prop="remark">
+              <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" maxlength="255"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="图片" prop="attachPaths">
+              <ImageUpload ref="ImageUpload" :limit="1" :fileType="['png', 'jpg', 'jpeg']"
+                           :value="form.attachPaths"
+                           @input="getUrl"></ImageUpload>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </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>
+    <ISuperMap ref="ISuperMap" v-if="ISuperMapvisible" @send="send"/>
+  </div>
+</template>
+
+<script>
+import {
+  listFarmland,
+  getFarmland,
+  delFarmland,
+  addFarmland,
+  updateFarmland
+} from "@/api/data/digitalagriculture/collective_farmland/farmland";
+import DataImageUpload from "@/components/ImageUpload/dataUpload.vue";
+import {selectCenterMonitorlList} from "@/api/data/digitalforest/animal/animal";
+import Treeselect from "@riophae/vue-treeselect";
+import {treeselect} from "@/api/system/dept";
+import {format_date} from "@/views/data/common/dateExport";
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import {checkLat, checkLon, checkPositiveDecimal, validPhoneMobile} from "@/api/rules/rules";
+import ISuperMap from "@/views/data/common/ISuperMap.vue";
+
+export default {
+  name: "Farmland",
+  components: {ISuperMap, Treeselect, DataImageUpload},
+  dicts: ['centerdata_land_type'],
+  data() {
+    return {
+      ISuperMapvisible: false,
+      sign: 1,
+      // 部门名称
+      deptName: undefined,
+      // 遮罩层
+      loading: true,
+      cameraList: [],//设备集合
+      // 部门树选项
+      deptOptions: undefined,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 农村集体耕地表格数据
+      farmlandList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        deptId: null,
+        deptName: 0,
+        createName: null,
+        updateName: null,
+        longitude: null,
+        latitude: null,
+        name: null,
+        type: null,
+        collectiveFarmland: null,
+        homeContracting: null,
+        otherCollectiveFarmland: null,
+        maneuverableLand: null,
+        contractedLand: null,
+        extinctionLand: null,
+        onlyChildLand: null,
+        returnableLand: null,
+        reclaimLang: null,
+        fourWastelandsLand: null,
+        schoolLand: null,
+        villageSchoolLand: null,
+        waterArea: null,
+        forestArea: null,
+        dicallyLand: null,
+        remark: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        name: [
+          {required: true, message: "名称不能为空", trigger: "blur"},
+        ],
+        longitude: [
+          {required: true, message: "经度不能为空", trigger: "change"},
+          {validator: checkLon, trigger: 'blur'}
+        ],
+        latitude: [
+          {required: true, message: "纬度不能为空", trigger: "change"},
+          {validator: checkLat, trigger: 'blur'}
+        ],
+        deptId: [
+          {required: true, message: "所属部门不能为空", trigger: "change"},
+        ],
+        phone: [
+          {validator: validPhoneMobile, trigger: 'blur'}
+        ],
+        contractedLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        maneuverableLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        onlyChildLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        extinctionLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        otherCollectiveFarmland: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        fourWastelandsLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        collectiveFarmland: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        homeContracting: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        reclaimLang: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        returnableLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        schoolLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        villageSchoolLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        waterArea: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        forestArea: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        dicallyLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    showMap() {
+      this.ISuperMapvisible = true;
+      this.$nextTick(() => {
+        this.$refs.ISuperMap.init(this.sign, {
+          id: this.form.id,
+          longitude: this.form.longitude,
+          latitude: this.form.latitude,
+          // 对应显示线 或 面
+          // xiantude: this.form.longitude//this.form.longitude换成每个页面对应线或者面对应的字段
+        })
+      })
+    },
+    send(val) {
+      if (val === true) {
+        this.ISuperMapvisible = false;
+        return;
+      }
+      if (this.sign === 1) {
+        this.form.longitude = val.longitude;
+        this.form.latitude = val.latitude;
+      }
+      // if (this.sign === 2 || this.sign === 3) this.form.longitude = val.xiantude;
+      this.ISuperMapvisible = false
+    },
+    hx(node) {
+      this.form.dataDeptId = node.id
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField('deptId');
+    },
+    getUrl(url) {
+      this.form.attachPaths = url
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    /** 查询农村集体耕地列表 */
+    getList() {
+      this.loading = true;
+      listFarmland(this.queryParams).then(response => {
+        this.farmlandList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        deptId: null,
+        deptName: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        longitude: null,
+        latitude: null,
+        name: null,
+        type: null,
+        collectiveFarmland: null,
+        homeContracting: null,
+        otherCollectiveFarmland: null,
+        maneuverableLand: null,
+        contractedLand: null,
+        extinctionLand: null,
+        onlyChildLand: null,
+        returnableLand: null,
+        reclaimLang: null,
+        fourWastelandsLand: null,
+        schoolLand: null,
+        villageSchoolLand: null,
+        waterArea: null,
+        forestArea: null,
+        dicallyLand: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.deptName = 0;
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加农村集体耕地";
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
+      getFarmland(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改农村集体耕地";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateFarmland(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addFarmland(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除选中的数据项?').then(function () {
+        return delFarmland(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('center-data/collectiveFarmland/export', {
+        ...this.queryParams
+      }, `农村集体耕地_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
+    }
+  }
+};
+</script>

+ 275 - 0
data-ui/src/views/data/digitalagriculture/collective_farmland/standingBook.vue

@@ -0,0 +1,275 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="24">
+      <!--部门数据-->
+      <el-col :span="4" :xs="24">
+        <div class="head-container">
+          <el-input
+            v-model="deptName"
+            placeholder="请输入部门名称"
+            clearable
+            size="small"
+            prefix-icon="el-icon-search"
+            style="margin-bottom: 20px"
+          />
+        </div>
+        <div class="head-container" ref="treeContainer" :style="{ height: treeHeight + 'px' } ">
+          <el-tree
+            :data="deptOptions"
+            :props="defaultProps"
+            :expand-on-click-node="false"
+            node-key="id"
+            :default-expanded-keys="[365]"
+            :filter-node-method="filterNode"
+            ref="tree"
+            @node-click="handleNodeClick"
+          />
+        </div>
+      </el-col>
+      <!--用户数据-->
+      <el-col :span="20" :xs="24">
+
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="warning"
+              plain
+              icon="el-icon-download"
+              size="mini"
+              @click="handleExport"
+              v-hasPermi="['StillField:StillField:export']"
+            >导出
+            </el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+
+        <!-- :summary-method="getSummaries" el-table属性:自定义最后一行合计属性 -->
+        <!--:span-method="arraySpanMethod" el-table属性:需要合并单元格时使用-->
+        <!--show-summary el-table属性:最table最后一行增加合计(第一列显示合计,从第二列开始计算,如果内容无法转换数字则最后不显示内容)-->
+        <el-table v-loading="loading" :data="collectiveFarmlandList" show-summary>
+          <el-table-column label="所属部门" align="center" prop="deptName"/>
+          <el-table-column label="承包地(亩)" align="center" prop="contractedLand"/>
+          <el-table-column label="机动地(亩)" align="center" prop="maneuverableLand"/>
+          <el-table-column label="独生子女地(亩)" align="center" prop="onlyChildLand"/>
+          <el-table-column label="全户消亡地(亩)" align="center" prop="extinctionLand"/>
+          <el-table-column label="其他集体耕地面积合计(亩)" align="center" prop="otherCollectiveFarmland"/>
+          <el-table-column label="四荒地(亩)" align="center" prop="fourWastelandsLand"/>
+          <el-table-column label="集体耕地总面积合计(亩)" align="center" prop="collectiveFarmland"/>
+          <el-table-column label="家庭承包面积(亩)" align="center" prop="homeContracting"/>
+          <el-table-column label="二轮整包地后开垦地、复垦地(亩)" align="center" prop="reclaimLang"/>
+          <el-table-column label="农户交回的家庭承包地(亩)" align="center" prop="returnableLand"/>
+          <el-table-column label="校田地(亩)" align="center" prop="schoolLand"/>
+          <el-table-column label="其中:由村经营的校田地(亩)" align="center" prop="villageSchoolLand"/>
+          <el-table-column label="水面(亩)" align="center" prop="waterArea"/>
+          <el-table-column label="林地面积(亩)" align="center" prop="forestArea"/>
+          <el-table-column label="切割地(亩)" align="center" prop="dicallyLand"/>
+        </el-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import {
+  countFarmland,
+} from "@/api/data/digitalagriculture/collective_farmland/farmland";
+import deptselector from '@/views/components/deptselector'
+import {treeselect} from '@/api/system/dept'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import {format_date} from "@/views/data/common/dateExport";
+
+export default {
+  name: "StandingBook",
+  dicts: ['centerdata_land_type'],
+  components: {
+    deptselector,
+    Treeselect,
+  },
+  data() {
+    return {
+      // 树形容器
+      treeContainer: null,
+      // 树形高度
+      treeHeight: 0,
+      // 遮罩层
+      loading: true,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 弹出层宽度
+      labelWidth: '150px',
+      // 文本框宽度
+      inputStyle: 'width: 310px',
+      collectiveFarmlandList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 部门名称
+      deptName: undefined,
+      // 部门树选项
+      deptOptions: undefined,
+      // 路由参数
+      routeParams: {
+        stillFieldType: null
+      },
+      // 查询参数
+      queryParams: {
+        deptId: '',
+        deptName: '',
+        name: null,
+      },
+      defaultProps: {
+        children: 'children',
+        label: 'label'
+      },
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val)
+    }
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+  },
+  mounted() {
+    this.treeContainer = this.$refs.treeContainer
+    window.addEventListener('resize', this.handleResize)
+    this.handleResize()
+  },
+  beforeDestroy() {
+    window.removeEventListener('resize', this.handleResize)
+  },
+  methods: {
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data
+      })
+    },
+    hx(node) {
+      this.form.dataDeptId = node.id
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField('deptId');
+    },
+    handleResize() {
+      this.treeHeight = window.innerHeight - 200// 按需减去其他元素的高度
+    },
+    // 筛选节点
+    filterNode(value, data) {
+      if (!value) return true
+      return data.label.indexOf(value) !== -1
+    },
+    // 节点单击事件
+    handleNodeClick(data) {
+      this.queryParams.deptId = data.id
+      this.handleQuery()
+    },
+    /** 查询农业还田列表 */
+    getList() {
+      this.loading = true;
+      countFarmland(this.queryParams).then(res=>{
+      this.collectiveFarmlandList = res.data;
+      this.loading = false;
+      })
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        stillName: null,
+        stillArea: null,
+        stillType: null,
+        stillAmount: null,
+        stillUserName: null,
+        stillPhone: null,
+        subsidyMoney: null,
+        stillTime: null,
+        city: null,
+        district: null,
+        village: null,
+        landInfoId: null,
+        createBy: null,
+        createDate: null,
+        updateBy: null,
+        updateDate: null,
+        remarks: null,
+        delFlag: null,
+        deptId: null,
+        deptName: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('center-data/collectiveFarmland/export', {
+        ...this.queryParams
+      }, `农村集体耕地_${format_date(new Date())}.xlsx`)
+    },
+
+    /**
+     * 自定义table最后一行合计函数
+     */
+    /*getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计';
+          return;
+        }
+        const values = data.map(item => Number(item[column.property]));
+        if (!values.every(value => isNaN(value))) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[index] += '';
+        } else {
+          sums[index] = '-';
+        }
+      });
+      return sums;
+    }*/
+    /**
+     * 合并单元格
+     */
+    /*arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      //确认哪行需要合并
+      if (row.deptName === '合计') {
+        //确认哪列合并
+        if (columnIndex === 0) {
+          return [1, 2];
+        } else if (columnIndex === 1) {
+          return [0, 0];
+        }
+      }
+    }*/
+  }
+};
+</script>
+
+<style>
+.head-container {
+  overflow-y: auto;
+}
+</style>

+ 377 - 310
data-ui/src/views/data/digitalagriculture/garbage_transfer/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" @submit.native.prevent>
       <el-form-item label-width="100px" label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -16,7 +16,8 @@
           <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
         </template>
         <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
-                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"
+                    style="width: 240px"/>
         <el-input v-model="queryParams.deptName" v-if="false"/>
       </el-form-item>
       <el-form-item>
@@ -33,7 +34,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['garbage_transfer:garbageTransfer:add']"
-        >新增</el-button>
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -44,7 +46,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['garbage_transfer:garbageTransfer:edit']"
-        >修改</el-button>
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -55,7 +58,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['garbage_transfer:garbageTransfer:remove']"
-        >删除</el-button>
+        >删除
+        </el-button>
       </el-col>
       <!--<el-col :span="1.5">
         <el-button
@@ -76,20 +80,21 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['garbage_transfer:garbageTransfer:export']"
-        >导出</el-button>
+        >导出
+        </el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="MachineryInfoList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column type="selection" width="55" align="center"/>
       <!--<el-table-column label="${comment}" align="center" prop="id" />-->
-      <el-table-column label="名称" align="center" prop="name" />
-      <el-table-column label="经度" align="center" prop="longitude" />
-      <el-table-column label="纬度" align="center" prop="latitude" />
-      <el-table-column label="编号" align="center" prop="code" />
-      <el-table-column label="覆盖区域" align="center" prop="coverage" />
-      <el-table-column label="所属部门" align="center" prop="deptName" />
+      <el-table-column label="名称" align="center" prop="name"/>
+      <el-table-column label="经度" align="center" prop="longitude"/>
+      <el-table-column label="纬度" align="center" prop="latitude"/>
+      <el-table-column label="编号" align="center" prop="code"/>
+      <el-table-column label="覆盖区域" align="center" prop="coverage"/>
+      <el-table-column label="所属部门" align="center" prop="deptName"/>
       <el-table-column label="创建人" align="center" prop="createName"/>
       <el-table-column label="创建时间" align="center" prop="createTime"/>
       <el-table-column label="修改人" align="center" prop="updateName"/>
@@ -102,14 +107,16 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['garbage_transfer:garbageTransfer:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['garbage_transfer:garbageTransfer:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -123,42 +130,84 @@
     />
 
     <!-- 添加或修改农机管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" class="form-style">
+    <el-dialog :title="title" :visible.sync="open" width="1000px" class="form-style">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="名称" prop="name">
-          <el-input v-model="form.name" placeholder="请输入名称" maxlength="20"/>
-        </el-form-item>
-        <el-form-item label="覆盖区域" prop="coverage">
-          <el-input v-model="form.coverage" placeholder="请输入覆盖区域" maxlength="20"/>
-        </el-form-item>
-        <el-form-item label="编号" prop="code">
-          <el-input v-model="form.code" placeholder="请输入编号" maxlength="20"/>
-        </el-form-item>
-        <el-form-item label="经度" prop="longitude" @dblclick.native="showMap">
-          <el-input v-model="form.longitude" placeholder="鼠标双击选择经纬度" maxlength="32"/>
-        </el-form-item>
-        <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap">
-          <el-input v-model="form.latitude" placeholder="鼠标双击选择经纬度" maxlength="32"/>
-        </el-form-item>
-        <el-form-item label="所属部门" prop="deptId" class="form-style">
-          <!--              <treeselect-->
-          <!--                v-if="!disable"-->
-          <!--                :flat="false"-->
-          <!--                :allowSelectingDisabledDescendants="true"-->
-          <!--                v-model="form.deptId" :options="deptOptions" :show-count="true"-->
-          <!--                placeholder="请选择所属部门"/>-->
-          <!--              <el-select v-model="form.deptName" placeholder="请选择所属部门" :style="inputStyle" v-if="disable" :disabled="disable">-->
-          <!--                <el-option-->
-          <!--                  v-for="dept in deptOptions"-->
-          <!--                  :key="dept.deptId"-->
-          <!--                  :label="dept.deptName"-->
-          <!--                  :value="dept"-->
-          <!--                />-->
-          <!--              </el-select>-->
-<!--              <deptselector :setValue=setDataDeptId :dataDeptId="form.deptId" v-model="form.deptId"></deptselector>-->
-          <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true" :noResultsText="'空'" :noOptionsText="'空'"
-                      placeholder="请选择部门" @select="hx"/>
-        </el-form-item>
+        <el-row :gutter="24">
+          <el-col :span="12">
+            <el-form-item label="名称" prop="name">
+              <el-input v-model="form.name" placeholder="请输入名称" maxlength="20"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="覆盖区域" prop="coverage">
+              <el-input v-model="form.coverage" placeholder="请输入覆盖区域" maxlength="20"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
+            <el-form-item label="经度" prop="longitude" @dblclick.native="showMap">
+              <el-input v-model="form.longitude" placeholder="鼠标双击选择经纬度" maxlength="32"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap">
+              <el-input v-model="form.latitude" placeholder="鼠标双击选择经纬度" maxlength="32"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
+            <el-form-item label="编号" prop="code">
+              <el-input v-model="form.code" placeholder="请输入编号" maxlength="20"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="所属部门" prop="deptId" class="form-style">
+              <!--              <treeselect-->
+              <!--                v-if="!disable"-->
+              <!--                :flat="false"-->
+              <!--                :allowSelectingDisabledDescendants="true"-->
+              <!--                v-model="form.deptId" :options="deptOptions" :show-count="true"-->
+              <!--                placeholder="请选择所属部门"/>-->
+              <!--              <el-select v-model="form.deptName" placeholder="请选择所属部门" :style="inputStyle" v-if="disable" :disabled="disable">-->
+              <!--                <el-option-->
+              <!--                  v-for="dept in deptOptions"-->
+              <!--                  :key="dept.deptId"-->
+              <!--                  :label="dept.deptName"-->
+              <!--                  :value="dept"-->
+              <!--                />-->
+              <!--              </el-select>-->
+              <!--              <deptselector :setValue=setDataDeptId :dataDeptId="form.deptId" v-model="form.deptId"></deptselector>-->
+              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
+                          :noResultsText="'空'" :noOptionsText="'空'"
+                          placeholder="请选择部门" @select="hx"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="24">
+            <el-form-item label="绑定设备" prop="deviceList">
+              <el-select v-model="form.deviceList" filterable placeholder="请选择设备" multiple filterable>
+                <el-option
+                  v-for="dict in cameraList"
+                  :key="dict.id"
+                  :label="dict.cameraName"
+                  :value="dict.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="图片" prop="attachPaths">
+              <ImageUpload ref="ImageUpload" :limit="1" :file-type="['png','jpg','jpeg']"
+                           :value="form.attachPaths"
+                           @input="getUrl"></ImageUpload>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -170,273 +219,291 @@
 </template>
 
 <script>
-  import { checkLat, checkLon } from '@/api/rules/rules'
-  import { listGarbageTransfer, getGarbageTransfer, delGarbageTransfer, addGarbageTransfer, updateGarbageTransfer } from "@/api/data/digitalagriculture/garbage_transfer/garbageTransfer";
-  import deptselector from '@/views/components/deptselector'
-  import { getToken } from '@/utils/auth'
-  import Treeselect from '@riophae/vue-treeselect'
-  import '@riophae/vue-treeselect/dist/vue-treeselect.css'
-  import {format_date} from "@/views/data/common/dateExport";
-  import ISuperMap from '@/views/data/common/ISuperMap.vue'
-  import { treeselect } from "@/api/system/dept";
+import {checkLat, checkLon} from '@/api/rules/rules'
+import {
+  listGarbageTransfer,
+  getGarbageTransfer,
+  delGarbageTransfer,
+  addGarbageTransfer,
+  updateGarbageTransfer
+} from "@/api/data/digitalagriculture/garbage_transfer/garbageTransfer";
+import deptselector from '@/views/components/deptselector'
+import {getToken} from '@/utils/auth'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import {format_date} from "@/views/data/common/dateExport";
+import ISuperMap from '@/views/data/common/ISuperMap.vue'
+import {treeselect} from "@/api/system/dept";
+import {selectCenterMonitorlList} from "@/api/data/digitalforest/animal/animal";
 
-  export default {
-    name: "garbageTransfer",
-    components: {
-      ISuperMap,
-      deptselector,
-      Treeselect,
-    },
-    data() {
-      return {
-        ISuperMapvisible: false,
-        sign: 1,
-        // 遮罩层
-        loading: true,
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        // 弹出层宽度
-        labelWidth: '150px',
-        // 文本框宽度
-        inputStyle: 'width: 310px',
-        // 农机管理表格数据
-        MachineryInfoList: [],
-        // 弹出层标题
-        title: "",
-        // 是否显示弹出层
+export default {
+  name: "garbageTransfer",
+  components: {
+    ISuperMap,
+    deptselector,
+    Treeselect,
+  },
+  data() {
+    return {
+      ISuperMapvisible: false,
+      cameraList: [],//设备集合
+      sign: 1,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 弹出层宽度
+      labelWidth: '150px',
+      // 文本框宽度
+      inputStyle: 'width: 310px',
+      // 农机管理表格数据
+      MachineryInfoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 部门名称
+      deptName: undefined,
+      // 部门树选项
+      deptOptions: [],
+      // 导入参数
+      upload: {
+        // 是否显示导入弹出层
         open: false,
-        // 部门名称
-        deptName: undefined,
-        // 部门树选项
-        deptOptions: [],
-        // 导入参数
-        upload: {
-          // 是否显示导入弹出层
-          open: false,
-          // 导入弹出层标题
-          title: '',
-          // 是否禁用上传
-          isUploading: false,
-          // 是否更新已经存在的数据
-          updateSupport: 0,
-          // 设置上传的请求头部
-          headers: { Authorization: 'Bearer ' + getToken() },
-          // 上传的地址
-          url: process.env.VUE_APP_BASE_API + '/center-data/MachineryInfo/import/importData'
-        },
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          name: null,
-          longitude: null,
-          latitude: null,
-          createDate: null,
-          updateDate: null,
-          remarks: null,
-          deptId: null,
-          deptName: 0,
-        },
-        // 表单参数
-        form: {},
-        // 表单校验
-        rules: {
-          name: [
-            {required: true, message: "名称不能为空", trigger: "blur"}
-          ],
-          longitude: [
-            { required: true, message: "经度不能为空", trigger: "change" },
-            { validator: checkLon,trigger: 'blur'}
-          ],
-          latitude: [
-            { required: true, message: "纬度不能为空", trigger: "change" },
-            { validator: checkLat,trigger: 'blur'}
-          ],
-          deptId: [
-            { required: true, message: "所属部门不能为空", trigger: "change" },
-          ],
-        }
+        // 导入弹出层标题
+        title: '',
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: 'Bearer ' + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + '/center-data/MachineryInfo/import/importData'
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        longitude: null,
+        latitude: null,
+        createDate: null,
+        updateDate: null,
+        remarks: null,
+        deptId: null,
+        deptName: 0,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        name: [
+          {required: true, message: "名称不能为空", trigger: "blur"}
+        ],
+        longitude: [
+          {required: true, message: "经度不能为空", trigger: "change"},
+          {validator: checkLon, trigger: 'blur'}
+        ],
+        latitude: [
+          {required: true, message: "纬度不能为空", trigger: "change"},
+          {validator: checkLat, trigger: 'blur'}
+        ],
+        deptId: [
+          {required: true, message: "所属部门不能为空", trigger: "change"},
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    showMap() {
+      this.ISuperMapvisible = true;
+      this.$nextTick(() => {
+        this.$refs.ISuperMap.init(this.sign, {
+          id: this.form.id,
+          longitude: this.form.longitude,
+          latitude: this.form.latitude,
+          // 对应显示线 或 面
+          // xiantude: this.form.longitude
+        })
+      })
+    },
+    send(val) {
+      if (val === true) {
+        this.ISuperMapvisible = false;
+        return;
+      }
+      if (this.sign === 1) {
+        this.form.longitude = val.longitude;
+        this.form.latitude = val.latitude;
+      }
+      // if (this.sign === 2 || this.sign === 3) this.form.longitude = val.xiantude;
+      this.ISuperMapvisible = false
+    },
+    setDeptId(deptId) {
+      this.form.deptId = deptId
+    },
+    setDataDeptId(e) {
+      this.form.deptId = e.deptId
+      this.form.deptName = e.deptName
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    getUrl(url) {
+      this.form.attachPaths = url
+    },
+    hx(node) {
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField('deptId');
+    },
+    // 筛选节点
+    filterNode(value, data) {
+      if (!value) return true
+      return data.label.indexOf(value) !== -1
+    },
+    // 节点单击事件
+    handleNodeClick(data) {
+      this.queryParams.deptId = data.id
+      this.handleQuery()
+    },
+    /** 查询垃圾转输站列表 */
+    getList() {
+      this.loading = true;
+      listGarbageTransfer(this.queryParams).then(response => {
+        this.MachineryInfoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        longitude: null,
+        latitude: null,
+        code: null,
+        coverage: null,
+        createBy: null,
+        createDate: null,
+        updateBy: null,
+        updateDate: null,
+        deptId: null
       };
+      this.resetForm("form");
     },
-    created() {
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
       this.getList();
-      this.getTreeselect();
     },
-    methods: {
-      showMap() {
-        this.ISuperMapvisible = true;
-        this.$nextTick(() => {
-          this.$refs.ISuperMap.init(this.sign, {
-            id: this.form.id,
-            longitude: this.form.longitude,
-            latitude: this.form.latitude,
-            // 对应显示线 或 面
-            // xiantude: this.form.longitude
-          })
-        })
-      },
-      send(val) {
-        if (val===true){
-          this.ISuperMapvisible = false;
-          return;
-        }
-        if (this.sign === 1) {
-          this.form.longitude = val.longitude;
-          this.form.latitude = val.latitude;
-        }
-        // if (this.sign === 2 || this.sign === 3) this.form.longitude = val.xiantude;
-        this.ISuperMapvisible = false
-      },
-      setDeptId(deptId) {
-        this.form.deptId = deptId
-      },
-      setDataDeptId(e) {
-        this.form.deptId = e.deptId
-        this.form.deptName = e.deptName
-      },
-      /** 查询部门下拉树结构 */
-      getTreeselect() {
-        treeselect().then(response => {
-          this.deptOptions = response.data;
-        });
-      },
-      hx(node) {
-        this.form.deptId = node.id
-        this.form.deptName = node.label
-        this.$refs.form.validateField('deptId');
-      },
-      // 筛选节点
-      filterNode(value, data) {
-        if (!value) return true
-        return data.label.indexOf(value) !== -1
-      },
-      // 节点单击事件
-      handleNodeClick(data) {
-        this.queryParams.deptId = data.id
-        this.handleQuery()
-      },
-      /** 查询垃圾转输站列表 */
-      getList() {
-        this.loading = true;
-        listGarbageTransfer(this.queryParams).then(response => {
-          this.MachineryInfoList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      },
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          id: null,
-          name: null,
-          longitude: null,
-          latitude: null,
-          code: null,
-          coverage: null,
-          createBy: null,
-          createDate: null,
-          updateBy: null,
-          updateDate: null,
-          deptId: null
-        };
-        this.resetForm("form");
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.queryParams.deptName = 0;
-        this.resetForm("queryForm");
-        this.handleQuery();
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length!==1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.deptName = 0;
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加垃圾转输站";
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      let _this = this;
+      const id = row.id || this.ids
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
+      getGarbageTransfer(id).then(response => {
+        this.form = response.data;
+        this.title = "修改垃圾转输站";
+        // treeselect().then(response => {
+        //   _this.deptOptions = response.data;
+        //   treeselectAll().then(response => {
+        //     addDeptToTreeSelect(_this.form.deptId, _this.deptOptions, response.data[0]);
         this.open = true;
-        this.title = "添加垃圾转输站";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        let _this = this;
-        const id = row.id || this.ids
-        getGarbageTransfer(id).then(response => {
-          this.form = response.data;
-          this.title = "修改垃圾转输站";
-          // treeselect().then(response => {
-          //   _this.deptOptions = response.data;
-          //   treeselectAll().then(response => {
-          //     addDeptToTreeSelect(_this.form.deptId, _this.deptOptions, response.data[0]);
-              this.open = true;
-          //   });
-          // });
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            // this.form.deptName = this.deptOptions.filter((item) => {
-            //   return this.form.deptId == item.id;
-            // })[0].label;
-            if (this.form.id != null) {
-              updateGarbageTransfer(this.form).then(response => {
-                this.$modal.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addGarbageTransfer(this.form).then(response => {
-                this.$modal.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
+        //   });
+        // });
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          // this.form.deptName = this.deptOptions.filter((item) => {
+          //   return this.form.deptId == item.id;
+          // })[0].label;
+          if (this.form.id != null) {
+            updateGarbageTransfer(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addGarbageTransfer(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
           }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids;
-        this.$modal.confirm('是否删除选中的数据?').then(function() {
-          return delGarbageTransfer(ids);
-        }).then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        }).catch(() => {});
-      },
-      /** 导出按钮操作 */
-      handleExport() {
-        this.download('/center-data/garbageTransfer/export', {
-          ...this.queryParams
-        }, `垃圾转输站_${format_date(new Date())}.xlsx`)
-      },
-      // 点击按钮修改是否只查询本级部门用户
-      changeQueryType() {
-        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
-      }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否删除选中的数据?').then(function () {
+        return delGarbageTransfer(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('/center-data/garbageTransfer/export', {
+        ...this.queryParams
+      }, `垃圾转输站_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
-  };
+  }
+};
 </script>

+ 305 - 246
data-ui/src/views/data/digitalagriculture/trash_can/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -23,17 +23,18 @@
           <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
         </template>
         <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
-                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"
+                    style="width: 240px"/>
         <el-input v-model="queryParams.deptName" v-if="false"/>
       </el-form-item>
-     <!-- <el-form-item label="培训时间" prop="cultivateTime">
-        <el-date-picker clearable
-                        v-model="queryParams.cultivateTime"
-                        type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择培训时间">
-        </el-date-picker>
-      </el-form-item>-->
+      <!-- <el-form-item label="培训时间" prop="cultivateTime">
+         <el-date-picker clearable
+                         v-model="queryParams.cultivateTime"
+                         type="date"
+                         value-format="yyyy-MM-dd"
+                         placeholder="选择培训时间">
+         </el-date-picker>
+       </el-form-item>-->
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -103,10 +104,10 @@
         </template>
       </el-table-column>
       <el-table-column label="所属部门" align="center" prop="deptName"/>
-      <el-table-column label="创建人" align="center" prop="createName" />
-      <el-table-column label="创建时间" align="center" prop="createTime" />
-      <el-table-column label="修改人" align="center" prop="updateName" />
-      <el-table-column label="修改时间" align="center" prop="updateTime" />
+      <el-table-column label="创建人" align="center" prop="createName"/>
+      <el-table-column label="创建时间" align="center" prop="createTime"/>
+      <el-table-column label="修改人" align="center" prop="updateName"/>
+      <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
@@ -138,20 +139,34 @@
     />
 
     <!-- 添加或修改垃圾桶对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" class="form-style">
+    <el-dialog :title="title" :visible.sync="open" width="1000px" class="form-style">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-row :gutter="24">
+          <el-col :span="12">
             <el-form-item label="名称" prop="name">
               <el-input v-model="form.name" placeholder="请输入名称" maxlength="32"/>
             </el-form-item>
+          </el-col>
+          <el-col :span="12">
             <el-form-item label="编号" prop="code">
               <el-input v-model="form.code" placeholder="请输入编码" maxlength="32"/>
             </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
             <el-form-item label="经度" prop="longitude" @dblclick.native="showMap">
               <el-input v-model="form.longitude" placeholder="鼠标双击选择经纬度" maxlength="32"/>
             </el-form-item>
+          </el-col>
+          <el-col :span="12">
             <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap">
               <el-input v-model="form.latitude" placeholder="鼠标双击选择经纬度" maxlength="32"/>
             </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
             <el-form-item label="覆盖区域" prop="coverage">
               <el-select v-model="form.coverage" placeholder="请选择覆盖区域" filterable>
                 <el-option
@@ -162,10 +177,38 @@
                 ></el-option>
               </el-select>
             </el-form-item>
+          </el-col>
+          <el-col :span="12">
             <el-form-item label="所属部门" prop="deptId" class="form-style">
-              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true" :noResultsText="'空'" :noOptionsText="'空'"
+              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
+                          :noResultsText="'空'" :noOptionsText="'空'"
                           placeholder="请选择部门" @select="hx"/>
             </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="24">
+            <el-form-item label="绑定设备" prop="deviceList">
+              <el-select v-model="form.deviceList" filterable placeholder="请选择设备" multiple filterable>
+                <el-option
+                  v-for="dict in cameraList"
+                  :key="dict.id"
+                  :label="dict.cameraName"
+                  :value="dict.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="图片" prop="attachPaths">
+              <ImageUpload ref="ImageUpload" :limit="1" :file-type="['png','jpg','jpeg']"
+                           :value="form.attachPaths"
+                           @input="getUrl"></ImageUpload>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -177,242 +220,258 @@
 </template>
 
 <script>
-  import {listTrashCan, getTrashCan, delTrashCan, addTrashCan, updateTrashCan} from "@/api/data/digitalagriculture/trashcan";
-  import Deptselector from '@/views/components/deptselector';
-  import {checkPositiveInteger} from "@/api/rules/rules";
-  import {checkPositiveDecimal, checkLon, checkLat, validPhoneMobile} from "@/api/rules/rules";
-  import { treeselect } from "@/api/system/dept";
-  import Treeselect from '@riophae/vue-treeselect'
-  import '@riophae/vue-treeselect/dist/vue-treeselect.css'
-  import ISuperMap from "@/views/data/common/ISuperMap";
-  import {format_date} from "@/views/data/common/dateExport";
+import {
+  listTrashCan,
+  getTrashCan,
+  delTrashCan,
+  addTrashCan,
+  updateTrashCan
+} from "@/api/data/digitalagriculture/trashcan";
+import Deptselector from '@/views/components/deptselector';
+import {checkLon, checkLat} from "@/api/rules/rules";
+import {treeselect} from "@/api/system/dept";
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import ISuperMap from "@/views/data/common/ISuperMap";
+import {format_date} from "@/views/data/common/dateExport";
+import {selectCenterMonitorlList} from "@/api/data/digitalforest/animal/animal";
 
-  export default {
-    name: "Trash",
-    dicts: ['sys_coverage_type'],
-    components: {Deptselector, ISuperMap,Treeselect},
-    data() {
-      return {
-        sign: 1,
-        ISuperMapvisible: false,
-        // 部门名称
-        deptName: undefined,
-        // 部门树选项
-        deptOptions: [],
-        // 遮罩层
-        loading: true,
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        // 垃圾桶表格数据
-        trashList: [],
-        // 弹出层标题
-        title: "",
-        // 是否显示弹出层
-        open: false,
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          deptId: null,
-          deptName: 0,
-          longitude: null,
-          latitude: null,
-          name:null,
-          code:null,
-          coverage:null,
-        },
-        // 表单参数
-        form: {},
-        // 表单校验
-        rules: {
-          deptId: [
-            {required: true, message: "所属部门不能为空", trigger: "change"}
-          ],
-          name: [
-            {required: true, message: "名称不能为空", trigger: "blur"}
-          ],
-          code: [
-            {required: true, message: "编号不能为空", trigger: "blur"}
-          ],
-          coverage: [
-            {required: true, message: "覆盖区域不能为空", trigger: "blur"}
-          ],
-          longitude: [
-            { required: true, message: "经度不能为空", trigger: ["blur" , "change"] },
-            { validator: checkLon,trigger: 'blur'}
-          ],
-          latitude: [
-            { required: true, message: "纬度不能为空", trigger: ["blur" , "change"] },
-            { validator: checkLat,trigger: 'blur'}
-          ],
-        },
-        showLongitude: false
+export default {
+  name: "Trash",
+  dicts: ['sys_coverage_type'],
+  components: { Deptselector, ISuperMap, Treeselect},
+  data() {
+    return {
+      sign: 1,
+      ISuperMapvisible: false,
+      cameraList: [],//设备集合
+      // 部门名称
+      deptName: undefined,
+      // 部门树选项
+      deptOptions: [],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 垃圾桶表格数据
+      trashList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        deptId: null,
+        deptName: 0,
+        longitude: null,
+        latitude: null,
+        name: null,
+        code: null,
+        coverage: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        deptId: [
+          {required: true, message: "所属部门不能为空", trigger: "change"}
+        ],
+        name: [
+          {required: true, message: "名称不能为空", trigger: "blur"}
+        ],
+        code: [
+          {required: true, message: "编号不能为空", trigger: "blur"}
+        ],
+        coverage: [
+          {required: true, message: "覆盖区域不能为空", trigger: "blur"}
+        ],
+        longitude: [
+          {required: true, message: "经度不能为空", trigger: ["blur", "change"]},
+          {validator: checkLon, trigger: 'blur'}
+        ],
+        latitude: [
+          {required: true, message: "纬度不能为空", trigger: ["blur", "change"]},
+          {validator: checkLat, trigger: 'blur'}
+        ],
+      },
+      showLongitude: false
+    };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    hx(node) {
+      this.form.dataDeptId = node.id
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField('deptId');
+    },
+    /** 查询垃圾桶列表 */
+    getList() {
+      this.loading = true;
+      listTrashCan(this.queryParams).then(response => {
+        this.trashList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    showMap() {
+      this.ISuperMapvisible = true;
+      this.$nextTick(() => {
+        this.$refs.ISuperMap.init(this.sign, {
+          id: this.form.id,
+          longitude: this.form.longitude,
+          latitude: this.form.latitude,
+          xiantude: this.form.longitude//this.form.longitude换成每个页面对应线或者面对应的字段
+        })
+      })
+    },
+    send(val) {
+      if (val === true) {
+        this.ISuperMapvisible = false;
+        return;
+      }
+      if (this.sign === 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 换成对应的线或区域的字段
+      this.ISuperMapvisible = false
+    },
+    getUrl(url) {
+      this.form.attachPaths = url
+    },
+    /* showLatLng: function (lat, lng) {
+       this.form.latitude = lat
+       this.form.longitude = lng
+     },
+     showLatLng: function (lat, lng) {
+       this.form.latitude = lat;
+       this.form.longitude = lng;
+     },*/
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        deptId: null,
+        deptName: null,
+        longitude: null,
+        latitude: null,
+        name: null,
+        code: null,
+        coverage: null
       };
+      this.resetForm("form");
     },
-    created() {
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
       this.getList();
-      this.getTreeselect();
     },
-    methods: {
-      /** 查询部门下拉树结构 */
-      getTreeselect() {
-        treeselect().then(response => {
-          this.deptOptions = response.data;
-        });
-      },
-      hx(node) {
-        this.form.dataDeptId = node.id
-        this.form.deptId = node.id
-        this.form.deptName = node.label
-        this.$refs.form.validateField('deptId');
-      },
-      /** 查询垃圾桶列表 */
-      getList() {
-        this.loading = true;
-        listTrashCan(this.queryParams).then(response => {
-          this.trashList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      },
-      showMap() {
-        this.ISuperMapvisible = true;
-        this.$nextTick(() => {
-          this.$refs.ISuperMap.init(this.sign, {
-            id: this.form.id,
-            longitude: this.form.longitude,
-            latitude: this.form.latitude,
-            xiantude: this.form.longitude//this.form.longitude换成每个页面对应线或者面对应的字段
-          })
-        })
-      },
-      send(val) {
-        if (val===true){
-          this.ISuperMapvisible = false;
-          return;
-        }
-        if (this.sign === 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 换成对应的线或区域的字段
-        this.ISuperMapvisible = false
-      },
-     /* showLatLng: function (lat, lng) {
-        this.form.latitude = lat
-        this.form.longitude = lng
-      },
-      showLatLng: function (lat, lng) {
-        this.form.latitude = lat;
-        this.form.longitude = lng;
-      },*/
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          id: null,
-          createBy: null,
-          createName: null,
-          createTime: null,
-          updateBy: null,
-          updateName: null,
-          updateTime: null,
-          deptId: null,
-          deptName: null,
-          longitude: null,
-          latitude: null,
-          name: null,
-          code: null,
-          coverage: null
-        };
-        this.resetForm("form");
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.queryParams.deptName = 0;
-        this.resetForm("queryForm");
-        this.handleQuery();
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length !== 1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.deptName = 0;
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加垃圾桶";
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      selectCenterMonitorlList(this.queryParams).then(response => {
+        this.cameraList = response.data;
+      });
+      getTrashCan(id).then(response => {
+        this.form = response.data;
         this.open = true;
-        this.title = "添加垃圾桶";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        const id = row.id || this.ids
-        getTrashCan(id).then(response => {
-          this.form = response.data;
-          this.open = true;
-          this.title = "修改垃圾桶";
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            if (this.form.id != null) {
-              updateTrashCan(this.form).then(response => {
-                this.$modal.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addTrashCan(this.form).then(response => {
-                this.$modal.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
+        this.title = "修改垃圾桶";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateTrashCan(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTrashCan(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
           }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids;
-        this.$modal.confirm('是否确认删除已选择的数据项?').then(function () {
-          return delTrashCan(ids);
-        }).then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        }).catch(() => {
-        });
-      },
-      /** 导出按钮操作 */
-      handleExport() {
-        this.download('center-data/trash/export', {
-          ...this.queryParams
-        },  `垃圾桶_${format_date(new Date())}.xlsx`)
-      },
-      // 点击按钮修改是否只查询本级部门用户
-      changeQueryType() {
-        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
-      }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除已选择的数据项?').then(function () {
+        return delTrashCan(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('center-data/trash/export', {
+        ...this.queryParams
+      }, `垃圾桶_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
-  };
+  }
+};
 </script>

+ 6 - 2
data-ui/src/views/data/digitalforest/linleader/index.vue

@@ -523,13 +523,17 @@
       },
       /** 搜索按钮操作 */
       handleQuery() {
-        this.queryParams.deptId = null
+        this.queryParams.pageNum = 1;
+        if(!this.queryThisLevel){
+          this.queryParams.deptName = 0
+        }else {
+          this.queryParams.deptName = null
+        }
         this.queryParams.pageNum = 1;
         this.getList();
       },
       /** 重置按钮操作 */
       resetQuery() {
-        this.queryParams.deptId = null
         this.resetForm("queryForm");
         this.handleQuery();
       },

+ 243 - 256
data-ui/src/views/data/generalbusiness/keyProjects/index.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px"
-             @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" @submit.native.prevent>
       <el-form-item label="项目名称" prop="projectName">
         <el-input
           v-model="queryParams.projectName"
@@ -11,15 +10,13 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="属地辖区" prop="territoriality">
-        <el-select v-model="queryParams.territoriality" placeholder="请选择属地辖区" clearable size="small">
-          <el-option
-            v-for="item in options"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
-        </el-select>
+      <el-form-item label="开复工时间" prop="startTime">
+        <el-date-picker
+          v-model="queryParams.startTime"
+          type="month"
+          value-format="yyyy-MM"
+          placeholder="请选择开复工时间">
+        </el-date-picker>
       </el-form-item>
       <el-form-item label="所属开发区" prop="park">
         <el-select v-model="queryParams.park" placeholder="请选择所属开发区">
@@ -31,6 +28,15 @@
           ></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -38,17 +44,18 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
+      <!--<el-col :span="1.5">
         <el-button
           type="primary"
           plain
           icon="el-icon-plus"
           size="mini"
+
           @click="handleAdd"
           v-hasPermi="['forest:keyProjects:add']"
         >新增
         </el-button>
-      </el-col>
+      </el-col>-->
       <el-col :span="1.5">
         <el-button
           type="success"
@@ -96,6 +103,18 @@
         >上传
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="multiple"
+          @click="pushMessage"
+          v-hasPermi="['forest:keyProjects:edit']"
+        >推送
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -208,17 +227,17 @@
 
     <!-- 添加或修改重点工程对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="1000px" class="form-style">
-      <el-form ref="form" :model="form" :rules="rules" label-width="160px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="180px">
         <el-row :gutter="24">
           <el-col :span="12">
             <el-form-item label="项目名称" prop="projectName">
-              <el-input v-model="form.projectName" placeholder="请输入项目名称" maxlength="50"/>
+              <el-input v-model="form.projectName" placeholder="" maxlength="50" readonly/>
             </el-form-item>
             <el-form-item label="经度" prop="longitude" @dblclick.native="showMap">
-              <el-input v-model="form.longitude" placeholder="鼠标双击选择经度" maxlength="32"/>
+              <el-input v-model="form.longitude" placeholder="鼠标双击选择经度" maxlength="32"/>
             </el-form-item>
-            <el-form-item label="属地辖区" prop="territoriality">
-              <el-select v-model="form.territoriality" placeholder="请输入属地辖区" maxlength="32">
+            <!--<el-form-item label="属地辖区" prop="territoriality">
+              <el-select v-model="form.territoriality" placeholder="请输入属地辖区" maxlength="32" readonly>
                 <el-option
                   v-for="item in options"
                   :key="item.value"
@@ -226,45 +245,56 @@
                   :value="item.value"
                 ></el-option>
               </el-select>
-            </el-form-item>
-            <!--<el-form-item label="工程属地" prop="projectLevel">
-              <el-select v-model="form.projectLevel" placeholder="请选择工程属地">
-                <el-option
-                  v-for="dict in dict.type.centerdata_project_level"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="建设单位" prop="constructionUnit">
-              <el-input v-model="form.constructionUnit" placeholder="请输入建设单位" maxlength="50"/>
             </el-form-item>-->
+            <el-form-item label="属地辖区" prop="territoriality">
+              <el-input v-model="form.territoriality" maxlength="32" readonly/>
+            </el-form-item>
             <el-form-item label="负责人" prop="principal">
-              <el-input v-model="form.principal" placeholder="请输入负责人" maxlength="20"/>
+              <el-input v-model="form.principal" placeholder="" maxlength="20" readonly/>
             </el-form-item>
-            <el-form-item label="开发区中心点经度" prop="parkLongitude" @dblclick.native="showMaptwo">
-              <el-input v-model="form.parkLongitude" placeholder="鼠标双击选择经度" maxlength="32"/>
+            <el-form-item label="开发区中心点经度" prop="parkLongitude" >
+              <el-input v-model="form.parkLongitude" placeholder="" maxlength="32" readonly/>
             </el-form-item>
             <el-form-item label="开复工时间" prop="startTime">
-              <el-date-picker clearable
-                              v-model="form.startTime"
-                              type="month"
-                              value-format="yyyy-MM"
-                              placeholder="请选择开复工时间">
-              </el-date-picker>
+              <el-input v-model="form.startTime" readonly/>
             </el-form-item>
             <el-form-item label="建设地点" prop="constructionSite">
-              <el-input v-model="form.constructionSite" placeholder="请输入建设地点" maxlength="255"/>
+              <el-input v-model="form.constructionSite" placeholder="" maxlength="255" readonly/>
             </el-form-item>
             <el-form-item label="总投资(万元)" prop="totalInvest">
-              <el-input v-model="form.totalInvest" placeholder="请输入总投资" maxlength="32"/>
+              <el-input v-model="form.totalInvest" placeholder="" maxlength="32" readonly/>
             </el-form-item>
             <el-form-item label="法人单位" prop="legalUnit">
-              <el-input v-model="form.legalUnit" placeholder="请输入法人单位" maxlength="32"/>
+              <el-input v-model="form.legalUnit" placeholder="" maxlength="32" readonly/>
             </el-form-item>
             <el-form-item label="项目秘书职务" prop="secretaryDuties">
-              <el-input v-model="form.secretaryDuties" placeholder="请输入项目秘书职务" maxlength="32"/>
+              <el-input v-model="form.secretaryDuties" placeholder="" maxlength="32" readonly/>
+            </el-form-item>
+            <el-form-item label="续建项目去年底前累计投资" prop="continuationProjectInvest">
+              <el-input v-model="form.continuationProjectInvest" placeholder="" maxlength="32" readonly/>
+            </el-form-item>
+            <el-form-item label="续建项目首次开工时间" prop="continuationProjectStartTime">
+              <el-input v-model="form.continuationProjectStartTime" placeholder=""  readonly/>
+            </el-form-item>
+            <el-form-item label="是否入统计库" prop="joinStatisticalBank">
+              <el-select v-model="form.joinStatisticalBank" placeholder="" disabled>
+                <el-option
+                  v-for="dict in joinStatistical"
+                  :key="dict.value"
+                  :label="dict.name"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="是否入统" prop="joinStatistical">
+              <el-select v-model="form.joinStatistical" placeholder="" disabled>
+                <el-option
+                  v-for="dict in joinStatistical"
+                  :key="dict.value"
+                  :label="dict.name"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
             </el-form-item>
             <el-form-item label="所属部门" prop="deptId">
               <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
@@ -276,8 +306,8 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="项目环境" prop="environment">
-
-              <el-select v-model="form.environment" placeholder="请选择项目环境">
+              <el-select v-model="form.environment" ref="selectRef5" @blur="addClick()" @click.native="addClick()"
+                         placeholder="">
                 <el-option
                   v-for="dict in dict.type.centerdata_environment"
                   :key="dict.value"
@@ -286,11 +316,11 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap">
-              <el-input v-model="form.latitude" placeholder="鼠标双击选择纬度" maxlength="32"/>
+            <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap" >
+              <el-input v-model="form.latitude" placeholder="鼠标双击选择纬度" maxlength="32"/>
             </el-form-item>
             <el-form-item label="所属开发区" prop="park">
-              <el-select v-model="form.park" placeholder="请选择所属开发区">
+              <el-select v-model="form.park" placeholder="请选择所属开发区" >
                 <el-option
                   v-for="item in deptOptionsPark"
                   :key="item.deptId"
@@ -300,21 +330,18 @@
               </el-select>
             </el-form-item>
             <el-form-item label="联系电话" prop="phone">
-              <el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="13"/>
+              <el-input v-model="form.phone" placeholder="" maxlength="13" readonly/>
             </el-form-item>
-            <el-form-item label="开发区中心点纬度" prop="parkLatitude" @dblclick.native="showMaptwo">
-              <el-input v-model="form.parkLatitude" placeholder="鼠标双击选择纬度" maxlength="32"/>
+            <el-form-item label="开发区中心点纬度" prop="parkLatitude">
+              <el-input v-model="form.parkLatitude" placeholder="" maxlength="32" readonly/>
             </el-form-item>
+
             <el-form-item label="计划竣工时间" prop="endTime">
-              <el-date-picker clearable
-                              v-model="form.endTime"
-                              type="month"
-                              value-format="yyyy-MM"
-                              placeholder="请选择计划竣工时间">
-              </el-date-picker>
+              <el-input v-model="form.endTime" readonly/>
             </el-form-item>
             <el-form-item label="在建性质" prop="nature">
-              <el-select v-model="form.nature" placeholder="请选择在建性质">
+              <el-select v-model="form.nature" ref="selectRef6" @blur="addClick()" @click.native="addClick()"
+                         placeholder="">
                 <el-option
                   v-for="dict in dict.type.centerdata_zj_nature"
                   :key="dict.value"
@@ -324,16 +351,17 @@
               </el-select>
             </el-form-item>
             <el-form-item label="年度计划投资(万元)" prop="yearInvest">
-              <el-input v-model="form.yearInvest" placeholder="请输入年度计划投资" maxlength="32"/>
+              <el-input v-model="form.yearInvest" placeholder="" maxlength="32" readonly/>
             </el-form-item>
             <el-form-item label="项目秘书" prop="secretary">
-              <el-input v-model="form.secretary" placeholder="请输入项目秘书" maxlength="32"/>
+              <el-input v-model="form.secretary" placeholder="" maxlength="32" readonly/>
             </el-form-item>
             <el-form-item label="项目秘书手机" prop="secretaryPhone">
-              <el-input v-model="form.secretaryPhone" placeholder="请输入项目秘书手机" maxlength="13"/>
+              <el-input v-model="form.secretaryPhone" placeholder="" maxlength="13" readonly/>
             </el-form-item>
             <el-form-item label="产业类别" prop="industryType">
-              <el-select v-model="form.industryType" placeholder="请选择产业类别">
+              <el-select v-model="form.industryType" ref="selectRef7" @blur="addClick()" @click.native="addClick()"
+                         placeholder="">
                 <el-option
                   v-for="dict in dict.type.centerdata_industry_type"
                   :key="dict.value"
@@ -342,29 +370,42 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <!--<el-form-item label="工程目标" prop="projectTarget">
-              <el-input v-model="form.projectTarget" placeholder="请输入工程目标" maxlength="255"/>
+            <el-form-item label="1-N月入统投资" prop="joinStatisticalInvest">
+              <el-input v-model="form.joinStatisticalInvest"  readonly/>
             </el-form-item>
-            <el-form-item label="建筑面积" prop="constructionArea">
-              <el-input v-model="form.constructionArea" placeholder="请输入建筑面积" maxlength="50"/>
+            <el-form-item label="今年实际累计完成投资" prop="thisYearCumulativeInvestment">
+              <el-input v-model="form.thisYearCumulativeInvestment" readonly/>
             </el-form-item>
-            <el-form-item label="所属分类" prop="cameraSystem">
-              <el-select v-model="form.cameraSystem" placeholder="请选择所属分类">
+            <el-form-item label="实际竣工时间" prop="realityCompletedTime">
+              <el-input v-model="form.realityCompletedTime" readonly/>
+            </el-form-item>
+            <el-form-item label="是否春季集中开复工项目" prop="springStartProject">
+              <el-select v-model="form.springStartProject" placeholder="" disabled>
                 <el-option
-                  v-for="dict in dict.type.camera_system"
+                  v-for="dict in joinStatistical"
                   :key="dict.value"
-                  :label="dict.label"
+                  :label="dict.name"
                   :value="dict.value"
                 ></el-option>
               </el-select>
-            </el-form-item>-->
+            </el-form-item>
+            <el-form-item label="所属行政区" prop="administrativeRegion">
+              <el-select v-model="form.administrativeRegion" placeholder="请选择所属行政区" >
+                <el-option
+                  v-for="item in regionList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="24">
             <el-form-item label="建设内容" prop="introduction">
-              <el-input v-model="form.introduction" type="textarea" placeholder="请输入建设内容" maxlength="500"
-                        :autosize="{ minRows: 5, maxRows: 5}"/>
+              <el-input v-model="form.introduction" type="textarea" placeholder="" maxlength="500"
+                        :autosize="{ minRows: 5, maxRows: 5}" readonly/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -429,142 +470,9 @@
       </el-form>
     </el-dialog>
 
-    <el-dialog :title="title" :visible.sync="scheduleHistory" width="900px" class="form-style">
-      <!-- 修改内容回显开始 -->
-      <!--<el-form ref="form" :model="form" :rules="rules" label-width="150px">
-        <ul class="xg_cont">
-            <li>
-              <el-form-item label="年度计划投资(万元)" prop="yearInvest">
-                <el-input v-model="form.yearInvest" placeholder="请输入年度计划投资" maxlength="32" disabled/>
-              </el-form-item>
-            </li>
-            <li>
-             &lt;!&ndash; <h4 class="sjxtitle">项目环境</h4>
-              <span class="sjx_cont">
-                <dict-tag :options="dict.type.centerdata_environment" :value="form.environment"/>
-              </span>&ndash;&gt;
-
-              <el-form-item label="项目环境" prop="environment">
-                <el-select v-model="form.environment" placeholder="请选择项目环境" disabled>
-                  <el-option
-                    v-for="dict in dict.type.centerdata_environment"
-                    :key="dict.value"
-                    :label="dict.label"
-                    :value="dict.value"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-            </li>
-            <li>
-              <h4 class="sjxtitle">经度</h4>
-              <span class="sjx_cont">{{form.longitude}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">纬度</h4>
-              <span class="sjx_cont">{{form.latitude}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">属地辖区</h4>
-              <span class="sjx_cont">{{form.territoriality}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">所属开发区</h4>
-              <span class="sjx_cont">{{form.parkName}}</span>
-            </li>
-          <li>
-            <h4 class="sjxtitle">负责人</h4>
-            <span class="sjx_cont">{{form.principal}}</span>
-          </li>
-          <li>
-            <h4 class="sjxtitle">联系电话</h4>
-            <span class="sjx_cont">{{form.phone}}</span>
-          </li>
-            <li>
-              <h4 class="sjxtitle">开发区中心点经度</h4>
-              <span class="sjx_cont">{{form.parkLongitude}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">开发区中心点纬度</h4>
-              <span class="sjx_cont">{{form.parkLatitude}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">开复工时间</h4>
-              <span class="sjx_cont">{{form.startTime}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">计划竣工时间</h4>
-              <span class="sjx_cont">{{form.endTime}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">建设地点</h4>
-              <span class="sjx_cont">{{form.constructionSite}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">在建性质</h4>
-              <span class="sjx_cont">
-                <dict-tag :options="dict.type.centerdata_zj_nature" :value="form.nature"/>
-              </span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">总投资(万元)</h4>
-              <span class="sjx_cont">{{form.totalInvest}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">年度计划投资(万元)</h4>
-              <span class="sjx_cont">{{form.yearInvest}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">法人单位</h4>
-              <span class="sjx_cont">{{form.legalUnit}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">项目秘书</h4>
-              <span class="sjx_cont">{{form.secretary}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">项目秘书职务</h4>
-              <span class="sjx_cont">{{form.secretaryDuties}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">项目秘书手机</h4>
-              <span class="sjx_cont">{{form.secretaryPhone}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">所属部门</h4>
-              <span class="sjx_cont">{{form.deptName}}</span>
-            </li>
-            <li>
-              <h4 class="sjxtitle">产业类别</h4>
-              <span class="sjx_cont">
-                <dict-tag :options="dict.type.centerdata_industry_type" :value="form.industryType"/>
-              </span>
-            </li>
-            <li class="jiansheCont">
-              <h4 class="sjxtitle">绑定设备</h4>
-              <span class="sjx_cont" >
-                <span v-for="(list,index) in form.deviceList">
-                  <span v-for="dict in cameraList" v-if="list == dict.id">
-                    {{ dict.cameraName }}<span v-if="index!=form.deviceList.length-1" >,</span>
-                  </span>
-                </span>
-              </span>
-            </li>
-            <li class="jiansheCont">
-              <h4 class="sjxtitle">建设内容</h4>
-              <span class="sjx_cont js_cont">{{form.introduction}}</span>
-            </li>
-            <li class="jiansheCont">
-              <h4 class="sjxtitle">封面</h4>
-              <el-image v-if="form.photoId!=null"
-                :src="form.photoId" style="width:150px;height:150px;"
-                :preview-src-list="[form.photoId]">
-              </el-image>
-            </li>
-
-        </ul>
-      </el-form>-->
-
-      <el-form ref="form" :model="form" :rules="rules" label-width="160px">
+    <el-dialog :title="title" :visible.sync="scheduleHistory" width="1000px" class="form-style">
+      <!-- 详情内容回显开始 -->
+      <el-form ref="form" :model="form" :rules="rules" label-width="180px">
         <el-row :gutter="24">
           <el-col :span="12">
             <el-form-item label="项目名称" prop="projectName">
@@ -579,7 +487,7 @@
             <el-form-item label="负责人" prop="principal">
               <el-input v-model="form.principal" maxlength="20" readonly/>
             </el-form-item>
-            <el-form-item label="开发区中心点经度" prop="parkLongitude" @dblclick.native="showMaptwo">
+            <el-form-item label="开发区中心点经度" prop="parkLongitude">
               <el-input v-model="form.parkLongitude" maxlength="32" readonly/>
             </el-form-item>
             <el-form-item label="开复工时间" prop="startTime">
@@ -597,6 +505,32 @@
             <el-form-item label="项目秘书职务" prop="secretaryDuties">
               <el-input v-model="form.secretaryDuties" maxlength="32" readonly/>
             </el-form-item>
+            <el-form-item label="续建项目去年底前累计投资" prop="continuationProjectInvest">
+              <el-input v-model="form.continuationProjectInvest" placeholder="" maxlength="32" readonly/>
+            </el-form-item>
+            <el-form-item label="续建项目首次开工时间" prop="continuationProjectStartTime">
+              <el-input v-model="form.continuationProjectStartTime" placeholder=""  readonly/>
+            </el-form-item>
+            <el-form-item label="是否入统计库" prop="joinStatisticalBank">
+              <el-select v-model="form.joinStatisticalBank" placeholder="" disabled>
+                <el-option
+                  v-for="dict in joinStatistical"
+                  :key="dict.value"
+                  :label="dict.name"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="是否入统" prop="joinStatistical">
+              <el-select v-model="form.joinStatistical" placeholder="" disabled>
+                <el-option
+                  v-for="dict in joinStatistical"
+                  :key="dict.value"
+                  :label="dict.name"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
             <el-form-item label="所属部门" prop="deptId">
               <el-input v-model="form.deptName" readonly/>
             </el-form-item>
@@ -616,7 +550,7 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap">
+            <el-form-item label="纬度" prop="latitude">
               <el-input v-model="form.latitude" maxlength="32" readonly/>
             </el-form-item>
             <el-form-item label="所属开发区" prop="park">
@@ -633,7 +567,7 @@
             <el-form-item label="联系电话" prop="phone">
               <el-input v-model="form.phone" maxlength="13" readonly/>
             </el-form-item>
-            <el-form-item label="开发区中心点纬度" prop="parkLatitude" @dblclick.native="showMaptwo">
+            <el-form-item label="开发区中心点纬度" prop="parkLatitude">
               <el-input v-model="form.parkLatitude" maxlength="32" readonly/>
             </el-form-item>
             <el-form-item label="计划竣工时间" prop="endTime">
@@ -670,6 +604,35 @@
                 ></el-option>
               </el-select>
             </el-form-item>
+            <el-form-item label="1-N月入统投资" prop="joinStatisticalInvest">
+              <el-input v-model="form.joinStatisticalInvest"  readonly/>
+            </el-form-item>
+            <el-form-item label="今年实际累计完成投资" prop="thisYearCumulativeInvestment">
+              <el-input v-model="form.thisYearCumulativeInvestment" readonly/>
+            </el-form-item>
+            <el-form-item label="实际竣工时间" prop="realityCompletedTime">
+              <el-input v-model="form.realityCompletedTime" readonly/>
+            </el-form-item>
+            <el-form-item label="是否春季集中开复工项目" prop="springStartProject">
+              <el-select v-model="form.springStartProject" placeholder="" disabled>
+                <el-option
+                  v-for="dict in joinStatistical"
+                  :key="dict.value"
+                  :label="dict.name"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="所属行政区" prop="administrativeRegion">
+              <el-select v-model="form.administrativeRegion" placeholder="" disabled>
+                <el-option
+                  v-for="item in regionList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
           </el-col>
         </el-row>
         <el-row>
@@ -749,7 +712,7 @@
 <script>
 import {
   addProjects,
-  delProjects,
+  delProjects,pushMessage,
   getProjects, getProjectsSchedule,
   listProjects,
   updateProjects, addProjectsScheduleInfo, getHistoryByTime, deleteSchedule, selectPark
@@ -796,6 +759,39 @@ export default {
       projectsList: [],
       // 弹出层标题
       title: "",
+      joinStatistical:[
+        {
+          name:'是',
+          value:'1'
+        },
+        {
+          name:'否',
+          value:'0'
+        }
+      ],
+      regionList:[
+        {
+          id:'双辽市',
+          name:'双辽市'
+        },
+        {
+          id:'伊通县',
+          name:'伊通县'
+        },
+        {
+          id:'梨树县',
+          name:'梨树县'
+        },
+        {
+          id:'铁东区',
+          name:'铁东区'
+        },
+        {
+          id:'铁西区',
+          name:'铁西区'
+        },
+      ],
+
       // 是否显示弹出层
       open: false,
       scheduleUpload: false,
@@ -823,35 +819,18 @@ export default {
         latitude: null,
         cameraSystem: null,
         deptId: null,
+        deptName: 0,
         introduction: null,
         parkLongitude: null,
         parkLatitude: null,
-        parkLabel:null
+        parkLabel:null,
+        startTime:null
       },
       historyQueryParams: {
         startTIme: null,
         endTime: null,
         keyProjectsId: null,
       },
-      options: [{
-        value: '市本级',
-        label: '市本级'
-      }, {
-        value: '铁东区',
-        label: '铁东区'
-      }, {
-        value: '铁西区',
-        label: '铁西区'
-      }, {
-        value: '梨树县',
-        label: '梨树县'
-      }, {
-        value: '双辽市',
-        label: '双辽市'
-      }, {
-        value: '伊通县',
-        label: '伊通县'
-      }],
       // 表单参数
       form: {},
       // 表单校验
@@ -862,24 +841,9 @@ export default {
         projectName: [
           {required: true, message: "项目名称不能为空", trigger: "blur"}
         ],
-        territoriality: [
-          {required: true, message: "属地辖区不能为空", trigger: ["blur", "change"]}
-        ],
-        principal: [
-          {required: true, message: "负责人不能为空", trigger: "blur"}
-        ],
-        constructionSite: [
-          {required: true, message: "建设地点不能为空", trigger: "blur"}
-        ],
         nature: [
           {required: true, message: "在建性质不能为空", trigger: "blur"}
         ],
-        /*    projectTarget: [
-              {required: true, message: "工程目标不能为空", trigger: "blur"}
-            ],
-            projectLevel: [
-              {required: true, message: "工程属地不能为空", trigger: "change"}
-            ],*/
         longitude: [
           {required: true, message: "经度不能为空", trigger: ["blur", "change"]},
           {validator: checkLon, trigger: 'blur'}
@@ -894,14 +858,10 @@ export default {
         parkLatitude: [
           {validator: checkLat, trigger: ["blur", "change"]}
         ],
-        introduction: [
-          {required: true, message: "建设内容不能为空", trigger: "blur"}
-        ],
         cameraSystem: [
           {required: true, message: "所属分类不能为空", trigger: "change"}
         ],
         phone: [
-          {required: true, message: "联系电话不能为空", trigger: "blur"},
           {validator: validPhoneMobile, trigger: 'blur'}
         ],
         totalInvest: [
@@ -941,8 +901,10 @@ export default {
       this.$refs.selectRef3.blur();
       this.$refs.selectRef4.blur();
     },
-    handleClick() {
-      alert('button click');
+    addClick(){
+      this.$refs.selectRef5.blur();
+      this.$refs.selectRef6.blur();
+      this.$refs.selectRef7.blur();
     },
     // 更多操作触发
     handleCommand(command, row) {
@@ -1103,7 +1065,17 @@ export default {
         yearInvest: null,
         secretary: null,
         parkLatitude: null,
-        secretaryPhone: null
+        secretaryPhone: null,
+        continuationProjectInvest: null,
+        continuationProjectStartTime: null,
+        joinStatisticalBank: null,
+        joinStatistical: null,
+        joinStatisticalInvest: null,
+        thisYearCumulativeInvestment: null,
+        realityCompletedTime: null,
+        springStartProject: null,
+        startTime: null,
+        administrativeRegion: null
       };
       this.resetForm("form");
     },
@@ -1123,9 +1095,14 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
+    },
     resetHistoryQuery() {
       this.resetForm("historyForm");
       this.handleHistoryQuery();
@@ -1163,6 +1140,16 @@ export default {
       this.title = "进度上传";
       this.scheduleUpload = true;
     },
+    /*推送图片*/
+    pushMessage(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否推送选中数据的进度图?').then(function () {
+        return pushMessage(ids);
+      }).then(() => {
+        this.$modal.msgSuccess("推送成功");
+      }).catch(() => {
+      });
+    },
     /** 历史进度查看 */
     getScheduleHistory(row) {
       this.keyProjectsId = row.id || this.ids

+ 7 - 0
pom.xml

@@ -87,6 +87,13 @@
             <version>3.4.0</version>
         </dependency>
 
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>sooka-sponest-api-exchange</artifactId>
+            <version>3.4.0</version>
+            <scope>compile</scope>
+        </dependency>
+
     </dependencies>
 
     <build>

+ 28 - 0
src/main/java/com/sooka/sponest/data/commandcenter/domian/ProjectBody.java

@@ -111,6 +111,34 @@ public class ProjectBody {
 
     private String cameraCode;
 
+    //续建项目去年底前累计投资(万元)
+    private String continuationProjectInvest;
+
+    //续建项目首次开工时间
+    @JsonFormat(pattern = "yyyy-MM")
+    private Date continuationProjectStartTime;
+
+    //是否入统计库
+    private String joinStatisticalBank;
+
+    //是否入统
+    private String joinStatistical;
+
+    //1-N月入统投资
+    private String joinStatisticalInvest;
+
+    //今年实际累计完成投资
+    private String thisYearCumulativeInvestment;
+
+    //实际竣工时间
+    @JsonFormat(pattern = "yyyy-MM")
+    private Date realityCompletedTime;
+
+    //是否春季集中开复工项目
+    private String springStartProject;
+
+    private String administrativeRegion;
+
     /**
      * 进度图片列表
      */

+ 15 - 1
src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmBreedingFarmController.java

@@ -1,13 +1,18 @@
 package com.sooka.sponest.data.digitalagriculture.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.core.constant.DocumentNameConstants;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.sooka.sponest.data.base.domain.ESVo;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmBreedingFarm;
 import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmBreedingFarmService;
+import com.sooka.sponest.data.utils.DataAttachUtil;
+import com.sooka.sponest.data.utils.DataProducerUtil;
 import com.sooka.sponest.data.utils.ExcelUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -16,6 +21,7 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -64,7 +70,9 @@ public class CenterdataTFarmBreedingFarmController extends BaseController {
     @RequiresPermissions("digitalagriculture:breedingFarm:query")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id) {
-        return AjaxResult.success(centerdataTFarmBreedingFarmService.selectCenterdataTFarmBreedingFarmById(id));
+        CenterdataTFarmBreedingFarm centerdataTFarmBreedingFarm = centerdataTFarmBreedingFarmService.selectCenterdataTFarmBreedingFarmById(id);
+        centerdataTFarmBreedingFarm.setAttachPaths(DataAttachUtil.getDataAttachUpload(id));
+        return AjaxResult.success(centerdataTFarmBreedingFarm);
     }
 
     /**
@@ -76,6 +84,8 @@ public class CenterdataTFarmBreedingFarmController extends BaseController {
     @PostMapping
     public AjaxResult add(@Validated @RequestBody CenterdataTFarmBreedingFarm centerdataTFarmBreedingFarm) {
         int result = centerdataTFarmBreedingFarmService.insertCenterdataTFarmBreedingFarm(centerdataTFarmBreedingFarm);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmBreedingFarm.getId(), centerdataTFarmBreedingFarm.getAttachPaths(), DocumentNameConstants.FARM_BREEDING_FARM, centerdataTFarmBreedingFarm.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_BREEDING_FARM, BusinessType.INSERT, JSON.toJSONString(centerdataTFarmBreedingFarm)));
         return toAjax(result);
     }
 
@@ -88,6 +98,8 @@ public class CenterdataTFarmBreedingFarmController extends BaseController {
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody CenterdataTFarmBreedingFarm centerdataTFarmBreedingFarm) {
         int result = centerdataTFarmBreedingFarmService.updateCenterdataTFarmBreedingFarm(centerdataTFarmBreedingFarm);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmBreedingFarm.getId(), centerdataTFarmBreedingFarm.getAttachPaths(), DocumentNameConstants.FARM_BREEDING_FARM, centerdataTFarmBreedingFarm.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_BREEDING_FARM, BusinessType.UPDATE, JSON.toJSONString(centerdataTFarmBreedingFarm)));
         return toAjax(result);
     }
 
@@ -100,6 +112,8 @@ public class CenterdataTFarmBreedingFarmController extends BaseController {
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable String[] ids) {
         int result = centerdataTFarmBreedingFarmService.deleteCenterdataTFarmBreedingFarmByIds(ids);
+        List<String> idList = Arrays.asList(ids);
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_BREEDING_FARM, BusinessType.DELETE, JSON.toJSONString(idList)));
         return toAjax(result);
     }
 }

+ 15 - 1
src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmCesspitCollectController.java

@@ -1,5 +1,7 @@
 package com.sooka.sponest.data.digitalagriculture.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.core.constant.DocumentNameConstants;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -7,15 +9,19 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.sooka.sponest.data.base.domain.ESVo;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmCesspitCollect;
 import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmCesspitCollectService;
+import com.sooka.sponest.data.utils.DataAttachUtil;
 import com.sooka.sponest.data.utils.DataConstants;
+import com.sooka.sponest.data.utils.DataProducerUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -47,7 +53,9 @@ public class CenterdataTFarmCesspitCollectController extends BaseController {
     @RequiresPermissions("cesspitCollect:cesspitCollect:query")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id) {
-        return AjaxResult.success(centerdataTFarmCesspitCollectService.selectCenterdataTFarmCesspitCollectById(id));
+        CenterdataTFarmCesspitCollect centerdataTFarmCesspitCollect = centerdataTFarmCesspitCollectService.selectCenterdataTFarmCesspitCollectById(id);
+        centerdataTFarmCesspitCollect.setAttachPaths(DataAttachUtil.getDataAttachUpload(id));
+        return AjaxResult.success(centerdataTFarmCesspitCollect);
     }
 
     /**
@@ -65,6 +73,8 @@ public class CenterdataTFarmCesspitCollectController extends BaseController {
             return AjaxResult.error(DataConstants.ERROR_MSG);
         }
         int result = centerdataTFarmCesspitCollectService.insertCenterdataTFarmCesspitCollect(centerdataTFarmCesspitCollect);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmCesspitCollect.getId(), centerdataTFarmCesspitCollect.getAttachPaths(), DocumentNameConstants.FARM_CESSPIT_COLLECT, centerdataTFarmCesspitCollect.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_CESSPIT_COLLECT, BusinessType.INSERT, JSON.toJSONString(centerdataTFarmCesspitCollect)));
         return toAjax(result);
     }
     /**
@@ -82,6 +92,8 @@ public class CenterdataTFarmCesspitCollectController extends BaseController {
             return AjaxResult.error(DataConstants.ERROR_MSG);
         }
         int result = centerdataTFarmCesspitCollectService.updateCenterdataTFarmCesspitCollect(centerdataTFarmCesspitCollect);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmCesspitCollect.getId(), centerdataTFarmCesspitCollect.getAttachPaths(), DocumentNameConstants.FARM_CESSPIT_COLLECT, centerdataTFarmCesspitCollect.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_CESSPIT_COLLECT, BusinessType.UPDATE, JSON.toJSONString(centerdataTFarmCesspitCollect)));
         return toAjax(result);
     }
 
@@ -94,6 +106,8 @@ public class CenterdataTFarmCesspitCollectController extends BaseController {
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable String[] ids) {
         int result = centerdataTFarmCesspitCollectService.deleteCenterdataTFarmCesspitCollectByIds(ids);
+        List<String> idList = Arrays.asList(ids);
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_CESSPIT_COLLECT, BusinessType.DELETE, JSON.toJSONString(idList)));
         return toAjax(result);
     }
     /**

+ 116 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmCollectiveFarmlandController.java

@@ -0,0 +1,116 @@
+package com.sooka.sponest.data.digitalagriculture.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.core.constant.DocumentNameConstants;
+import com.ruoyi.common.core.constant.HttpStatus;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.sooka.sponest.data.base.domain.ESVo;
+import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmCollectiveFarmland;
+import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmCollectiveFarmlandService;
+import com.sooka.sponest.data.utils.DataAttachUtil;
+import com.sooka.sponest.data.utils.DataProducerUtil;
+import com.sooka.sponest.data.utils.ExcelUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 农村集体耕地Controller
+ *
+ * @author 韩福成
+ * @date 2024-06-07
+ */
+@RestController
+@RequestMapping("/collectiveFarmland")
+public class CenterdataTFarmCollectiveFarmlandController extends BaseController {
+    @Autowired
+    private ICenterdataTFarmCollectiveFarmlandService centerdataTFarmCollectiveFarmlandService;
+
+    /**
+     * 查询农村集体耕地列表
+     */
+    @RequiresPermissions("farm:collectiveFarmland:list")
+    @GetMapping("/list")
+    public TableDataInfo list(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland) {
+        startPage();
+        List<CenterdataTFarmCollectiveFarmland> list = centerdataTFarmCollectiveFarmlandService.selectCenterdataTFarmCollectiveFarmlandList(centerdataTFarmCollectiveFarmland);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出农村集体耕地列表
+     */
+    @RequiresPermissions("farm:collectiveFarmland:export")
+    @Log(title = "农村集体耕地", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland) {
+        List<CenterdataTFarmCollectiveFarmland> list = centerdataTFarmCollectiveFarmlandService.selectCenterdataTFarmCollectiveFarmlandList(centerdataTFarmCollectiveFarmland);
+        ExcelUtil<CenterdataTFarmCollectiveFarmland> util = new ExcelUtil<>(CenterdataTFarmCollectiveFarmland.class);
+        util.exportExcel(response, list, "农村集体耕地数据");
+    }
+
+    /**
+     * 获取农村集体耕地详细信息
+     */
+    @RequiresPermissions("farm:collectiveFarmland:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id) {
+        CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland = centerdataTFarmCollectiveFarmlandService.selectCenterdataTFarmCollectiveFarmlandById(id);
+        centerdataTFarmCollectiveFarmland.setAttachPaths(DataAttachUtil.getDataAttachUpload(id));
+        return AjaxResult.success(centerdataTFarmCollectiveFarmland);
+    }
+
+    /**
+     * 新增农村集体耕地
+     */
+    @RequiresPermissions("farm:collectiveFarmland:add")
+    @Log(title = "农村集体耕地", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland) {
+        int result = centerdataTFarmCollectiveFarmlandService.insertCenterdataTFarmCollectiveFarmland(centerdataTFarmCollectiveFarmland);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmCollectiveFarmland.getId(), centerdataTFarmCollectiveFarmland.getAttachPaths(), DocumentNameConstants.FARM_COLLECTIVE_FARMLAND, centerdataTFarmCollectiveFarmland.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_COLLECTIVE_FARMLAND,BusinessType.INSERT, JSON.toJSONString(centerdataTFarmCollectiveFarmland)));
+        return toAjax(result);
+    }
+
+    /**
+     * 修改农村集体耕地
+     */
+    @RequiresPermissions("farm:collectiveFarmland:edit")
+    @Log(title = "农村集体耕地", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland) {
+        int result = centerdataTFarmCollectiveFarmlandService.updateCenterdataTFarmCollectiveFarmland(centerdataTFarmCollectiveFarmland);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmCollectiveFarmland.getId(), centerdataTFarmCollectiveFarmland.getAttachPaths(), DocumentNameConstants.FARM_COLLECTIVE_FARMLAND, centerdataTFarmCollectiveFarmland.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_COLLECTIVE_FARMLAND,BusinessType.UPDATE, JSON.toJSONString(centerdataTFarmCollectiveFarmland)));
+        return toAjax(result);
+    }
+
+    /**
+     * 删除农村集体耕地
+     */
+    @RequiresPermissions("farm:collectiveFarmland:remove")
+    @Log(title = "农村集体耕地", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids) {
+        int result = centerdataTFarmCollectiveFarmlandService.deleteCenterdataTFarmCollectiveFarmlandByIds(ids);
+        List<String> idList = Arrays.asList(ids);
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_COLLECTIVE_FARMLAND,BusinessType.DELETE, JSON.toJSONString(idList)));
+        return toAjax(result);
+    }
+
+    @GetMapping("/countFarmland")
+    public AjaxResult countFarmland(CenterdataTFarmCollectiveFarmland vo){
+        return AjaxResult.success(centerdataTFarmCollectiveFarmlandService.countFarmland(vo));
+    }
+}

+ 15 - 1
src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmGarbageTransferController.java

@@ -1,13 +1,18 @@
 package com.sooka.sponest.data.digitalagriculture.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.core.constant.DocumentNameConstants;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.sooka.sponest.data.base.domain.ESVo;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmGarbageTransfer;
 import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmGarbageTransferService;
+import com.sooka.sponest.data.utils.DataAttachUtil;
+import com.sooka.sponest.data.utils.DataProducerUtil;
 import com.sooka.sponest.data.utils.ExcelUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -16,6 +21,7 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -77,7 +83,9 @@ public class CenterdataTFarmGarbageTransferController extends BaseController {
     @RequiresPermissions("garbage_transfer:garbageTransfer:query")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id) {
-        return AjaxResult.success(centerdataTFarmGarbageTransferService.selectCenterdataTFarmGarbageTransferById(id));
+        CenterdataTFarmGarbageTransfer centerdataTFarmGarbageTransfer = centerdataTFarmGarbageTransferService.selectCenterdataTFarmGarbageTransferById(id);
+        centerdataTFarmGarbageTransfer.setAttachPaths(DataAttachUtil.getDataAttachUpload(id));
+        return AjaxResult.success(centerdataTFarmGarbageTransfer);
     }
 
     /**
@@ -95,6 +103,8 @@ public class CenterdataTFarmGarbageTransferController extends BaseController {
             return AjaxResult.error("垃圾转输站名称已存在");
         }
         int result = centerdataTFarmGarbageTransferService.insertCenterdataTFarmCenterdataTFarmGarbageTransfer(centerdataTFarmGarbageTransfer);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmGarbageTransfer.getId(), centerdataTFarmGarbageTransfer.getAttachPaths(), DocumentNameConstants.FARM_GARBAGE_TRANSFER, centerdataTFarmGarbageTransfer.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_GARBAGE_TRANSFER, BusinessType.INSERT, JSON.toJSONString(centerdataTFarmGarbageTransfer)));
         return toAjax(result);
     }
 
@@ -113,6 +123,8 @@ public class CenterdataTFarmGarbageTransferController extends BaseController {
             return AjaxResult.error("垃圾转输站名称已存在");
         }
         int result = centerdataTFarmGarbageTransferService.updateCenterdataTFarmCenterdataTFarmGarbageTransfer(centerdataTFarmGarbageTransfer);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmGarbageTransfer.getId(), centerdataTFarmGarbageTransfer.getAttachPaths(), DocumentNameConstants.FARM_GARBAGE_TRANSFER, centerdataTFarmGarbageTransfer.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_GARBAGE_TRANSFER, BusinessType.UPDATE, JSON.toJSONString(centerdataTFarmGarbageTransfer)));
         return toAjax(result);
     }
 
@@ -126,6 +138,8 @@ public class CenterdataTFarmGarbageTransferController extends BaseController {
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable String[] ids) {
         int result = centerdataTFarmGarbageTransferService.deleteCenterdataTFarmCenterdataTFarmGarbageTransfer(ids);
+        List<String> idList = Arrays.asList(ids);
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_BREEDING_FARM, BusinessType.DELETE, JSON.toJSONString(idList)));
         return toAjax(result);
     }
 

+ 15 - 1
src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmTrashCanController.java

@@ -1,5 +1,7 @@
 package com.sooka.sponest.data.digitalagriculture.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.core.constant.DocumentNameConstants;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
@@ -7,9 +9,12 @@ import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
 import com.ruoyi.common.security.utils.DictUtils;
+import com.sooka.sponest.data.base.domain.ESVo;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmTrashCan;
 import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmTrashCanService;
+import com.sooka.sponest.data.utils.DataAttachUtil;
 import com.sooka.sponest.data.utils.DataConstants;
+import com.sooka.sponest.data.utils.DataProducerUtil;
 import com.sooka.sponest.data.utils.ExcelUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -17,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -62,7 +68,9 @@ public class CenterdataTFarmTrashCanController extends BaseController {
     @RequiresPermissions("digitalagriculture:trash:query")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id) {
-        return AjaxResult.success(centerdataTFarmTrashCanService.selectCenterdataTFarmTrashCanById(id));
+        CenterdataTFarmTrashCan centerdataTFarmTrashCan = centerdataTFarmTrashCanService.selectCenterdataTFarmTrashCanById(id);
+        centerdataTFarmTrashCan.setAttachPaths(DataAttachUtil.getDataAttachUpload(id));
+        return AjaxResult.success(centerdataTFarmTrashCan);
     }
 
     /**
@@ -81,6 +89,8 @@ public class CenterdataTFarmTrashCanController extends BaseController {
         }
         centerdataTFarmTrashCan.setCoverageLabel(DictUtils.getDictDataByValue("sys_coverage_type",centerdataTFarmTrashCan.getCoverage()));
         int result = centerdataTFarmTrashCanService.insertCenterdataTFarmTrashCan(centerdataTFarmTrashCan);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmTrashCan.getId(), centerdataTFarmTrashCan.getAttachPaths(), DocumentNameConstants.FARM_TRASHCAN, centerdataTFarmTrashCan.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_TRASHCAN, BusinessType.INSERT, JSON.toJSONString(centerdataTFarmTrashCan)));
         return toAjax(result);
     }
 
@@ -100,6 +110,8 @@ public class CenterdataTFarmTrashCanController extends BaseController {
         }
         centerdataTFarmTrashCan.setCoverageLabel(DictUtils.getDictDataByValue("sys_coverage_type",centerdataTFarmTrashCan.getCoverage()));
         int result = centerdataTFarmTrashCanService.updateCenterdataTFarmTrashCan(centerdataTFarmTrashCan);
+        DataAttachUtil.dataAttachUpload(centerdataTFarmTrashCan.getId(), centerdataTFarmTrashCan.getAttachPaths(), DocumentNameConstants.FARM_TRASHCAN, centerdataTFarmTrashCan.getBusSource());
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_TRASHCAN, BusinessType.UPDATE, JSON.toJSONString(centerdataTFarmTrashCan)));
         return toAjax(result);
     }
 
@@ -112,6 +124,8 @@ public class CenterdataTFarmTrashCanController extends BaseController {
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable String[] ids) {
         int result = centerdataTFarmTrashCanService.deleteCenterdataTFarmTrashCanByIds(ids);
+        List<String> idList = Arrays.asList(ids);
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.FARM_TRASHCAN, BusinessType.DELETE, JSON.toJSONString(idList)));
         return toAjax(result);
     }
 }

+ 16 - 1
src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmBreedingFarm.java

@@ -9,6 +9,7 @@ import lombok.EqualsAndHashCode;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
+import java.util.List;
 
 /**
  * 养殖场 centerdata_t_farm_breeding_farm
@@ -167,6 +168,20 @@ public class CenterdataTFarmBreedingFarm extends BaseBusinessEntity {
     @Excel(name = "备案表")
     private String filing;
 
-
+    /**
+     * 设备中间表主键
+     */
+    @ApiModelProperty(value = "设备中间表主键", required = false)
+    private List<String> deviceList;
+    /**
+     * 图片上传路径
+     */
+    @ApiModelProperty(value = "图片上传路径",required = false)
+    private String attachPaths;
+    /**
+     * 图片来源
+     */
+    @ApiModelProperty(value = "图片来源",required = false)
+    private String busSource;
 
 }

+ 17 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmCesspitCollect.java

@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import javax.validation.constraints.NotNull;
+import java.util.List;
 
 /**
  * 粪污收集点  centerdata_t_farm_cesspit_collect
@@ -70,4 +71,20 @@ public class CenterdataTFarmCesspitCollect extends BaseBusinessEntity {
     @ApiModelProperty(value = "所属部门", required = false)
     @Excel(name = "所属部门")
     private String deptName;
+
+    /**
+     * 设备中间表主键
+     */
+    @ApiModelProperty(value = "设备中间表主键", required = false)
+    private List<String> deviceList;
+    /**
+     * 图片上传路径
+     */
+    @ApiModelProperty(value = "图片上传路径",required = false)
+    private String attachPaths;
+    /**
+     * 图片来源
+     */
+    @ApiModelProperty(value = "图片来源",required = false)
+    private String busSource;
 }

+ 175 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmCollectiveFarmland.java

@@ -0,0 +1,175 @@
+package com.sooka.sponest.data.digitalagriculture.domain;
+
+import com.ruoyi.common.core.annotation.Excel;
+import com.sooka.sponest.data.base.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 农村集体耕地对象 centerdata_t_farm_collective_farmland
+ *
+ * @author 韩福成
+ * @date 2024-06-07
+ */
+@Data
+public class CenterdataTFarmCollectiveFarmland extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private String id;
+
+    /**
+     * 部门id
+     */
+    private Long deptId;
+
+    /**
+     * 部门名称
+     */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /**
+     * 经度
+     */
+    @Excel(name = "经度")
+    private String longitude;
+
+    /**
+     * 纬度
+     */
+    @Excel(name = "纬度")
+    private String latitude;
+
+    /**
+     * 名称
+     */
+    @Excel(name = "名称")
+    private String name;
+
+    /**
+     * 类型
+     */
+    @Excel(name = "类型", dictType = "centerdata_land_type")
+    private String type;
+
+    private String typeLabel;
+
+    /**
+     * 集体耕地总面积合计(亩)
+     */
+    @Excel(name = "集体耕地总面积合计(亩)")
+    private String collectiveFarmland;
+
+    /**
+     * 家庭承包面积(亩)
+     */
+    @Excel(name = "家庭承包面积(亩)")
+    private String homeContracting;
+
+    /**
+     * 其他集体耕地面积合计(亩)
+     */
+    @Excel(name = "其他集体耕地面积合计(亩)")
+    private String otherCollectiveFarmland;
+
+    /**
+     * 机动地(亩)
+     */
+    @Excel(name = "机动地(亩)")
+    private String maneuverableLand;
+
+    /**
+     * 承包地(亩)
+     */
+    @Excel(name = "承包地(亩)")
+    private String contractedLand;
+
+    /**
+     * 全户消亡地(亩)
+     */
+    @Excel(name = "全户消亡地(亩)")
+    private String extinctionLand;
+
+    /**
+     * 独生子女地(亩)
+     */
+    @Excel(name = "独生子女地(亩)")
+    private String onlyChildLand;
+
+    /**
+     * 农户交回的家庭承包地(亩)
+     */
+    @Excel(name = "农户交回的家庭承包地(亩)")
+    private String returnableLand;
+
+    /**
+     * 二轮承包地后开垦地、复垦地(亩)
+     */
+    @Excel(name = "二轮承包地后开垦地、复垦地(亩)")
+    private String reclaimLang;
+
+    /**
+     * 四荒地
+     */
+    @Excel(name = "四荒地")
+    private String fourWastelandsLand;
+
+    /**
+     * 校田地
+     */
+    @Excel(name = "校田地")
+    private String schoolLand;
+
+    /**
+     * 切割地(亩)
+     */
+    @Excel(name = "切割地(亩)")
+    private String dicallyLand;
+
+    /**
+     * 其中:由村经营的校田地
+     */
+    @Excel(name = "其中:由村经营的校田地")
+    private String villageSchoolLand;
+
+    /**
+     * 水面
+     */
+    @Excel(name = "水面")
+    private String waterArea;
+
+    /**
+     * 林地面积
+     */
+    @Excel(name = "林地面积")
+    private String forestArea;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String remark;
+
+    /**
+     * 设备中间表主键
+     */
+    @ApiModelProperty(value = "设备中间表主键", required = false)
+    private List<String> deviceList;
+
+    /**
+     * 图片上传路径
+     */
+    @ApiModelProperty(value = "图片上传路径",required = false)
+    private String attachPaths;
+    /**
+     * 图片来源
+     */
+    @ApiModelProperty(value = "图片来源",required = false)
+    private String busSource;
+
+}

+ 17 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmGarbageTransfer.java

@@ -7,6 +7,7 @@ import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
+import java.util.List;
 
 /**
  * 垃圾转输站对象 centerdata_t_farm_garbage_transfer
@@ -72,4 +73,20 @@ public class CenterdataTFarmGarbageTransfer extends BaseBusinessEntity {
     @NotBlank(message = "部门名称不能为空")
     private String deptName;
 
+    /**
+     * 设备中间表主键
+     */
+    @ApiModelProperty(value = "设备中间表主键", required = false)
+    private List<String> deviceList;
+    /**
+     * 图片上传路径
+     */
+    @ApiModelProperty(value = "图片上传路径",required = false)
+    private String attachPaths;
+    /**
+     * 图片来源
+     */
+    @ApiModelProperty(value = "图片来源",required = false)
+    private String busSource;
+
 }

+ 16 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmTrashCan.java

@@ -8,6 +8,7 @@ import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
+import java.util.List;
 
 
 /**
@@ -84,5 +85,20 @@ public class CenterdataTFarmTrashCan extends BaseBusinessEntity {
     @Excel(name = "所属部门")
     private String deptName;
 
+    /**
+     * 设备中间表主键
+     */
+    @ApiModelProperty(value = "设备中间表主键", required = false)
+    private List<String> deviceList;
+    /**
+     * 图片上传路径
+     */
+    @ApiModelProperty(value = "图片上传路径",required = false)
+    private String attachPaths;
+    /**
+     * 图片来源
+     */
+    @ApiModelProperty(value = "图片来源",required = false)
+    private String busSource;
 
 }

+ 64 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/mapper/CenterdataTFarmCollectiveFarmlandMapper.java

@@ -0,0 +1,64 @@
+package com.sooka.sponest.data.digitalagriculture.mapper;
+
+import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmCollectiveFarmland;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 农村集体耕地Mapper接口
+ *
+ * @author 韩福成
+ * @date 2024-06-07
+ */
+public interface CenterdataTFarmCollectiveFarmlandMapper {
+    /**
+     * 查询农村集体耕地
+     *
+     * @param id 农村集体耕地主键
+     * @return 农村集体耕地
+     */
+    public CenterdataTFarmCollectiveFarmland selectCenterdataTFarmCollectiveFarmlandById(String id);
+
+    /**
+     * 查询农村集体耕地列表
+     *
+     * @param centerdataTFarmCollectiveFarmland 农村集体耕地
+     * @return 农村集体耕地集合
+     */
+    public List<CenterdataTFarmCollectiveFarmland> selectCenterdataTFarmCollectiveFarmlandList(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland);
+
+    /**
+     * 新增农村集体耕地
+     *
+     * @param centerdataTFarmCollectiveFarmland 农村集体耕地
+     * @return 结果
+     */
+    public int insertCenterdataTFarmCollectiveFarmland(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland);
+
+    /**
+     * 修改农村集体耕地
+     *
+     * @param centerdataTFarmCollectiveFarmland 农村集体耕地
+     * @return 结果
+     */
+    public int updateCenterdataTFarmCollectiveFarmland(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland);
+
+    /**
+     * 删除农村集体耕地
+     *
+     * @param id 农村集体耕地主键
+     * @return 结果
+     */
+    public int deleteCenterdataTFarmCollectiveFarmlandById(String id);
+
+    /**
+     * 批量删除农村集体耕地
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCenterdataTFarmCollectiveFarmlandByIds(String[] ids);
+
+    List<Map<String, Object>> countFarmland(CenterdataTFarmCollectiveFarmland vo);
+}

+ 64 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/service/ICenterdataTFarmCollectiveFarmlandService.java

@@ -0,0 +1,64 @@
+package com.sooka.sponest.data.digitalagriculture.service;
+
+import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmCollectiveFarmland;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 农村集体耕地Service接口
+ *
+ * @author 韩福成
+ * @date 2024-06-07
+ */
+public interface ICenterdataTFarmCollectiveFarmlandService {
+    /**
+     * 查询农村集体耕地
+     *
+     * @param id 农村集体耕地主键
+     * @return 农村集体耕地
+     */
+    public CenterdataTFarmCollectiveFarmland selectCenterdataTFarmCollectiveFarmlandById(String id);
+
+    /**
+     * 查询农村集体耕地列表
+     *
+     * @param centerdataTFarmCollectiveFarmland 农村集体耕地
+     * @return 农村集体耕地集合
+     */
+    public List<CenterdataTFarmCollectiveFarmland> selectCenterdataTFarmCollectiveFarmlandList(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland);
+
+    /**
+     * 新增农村集体耕地
+     *
+     * @param centerdataTFarmCollectiveFarmland 农村集体耕地
+     * @return 结果
+     */
+    public int insertCenterdataTFarmCollectiveFarmland(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland);
+
+    /**
+     * 修改农村集体耕地
+     *
+     * @param centerdataTFarmCollectiveFarmland 农村集体耕地
+     * @return 结果
+     */
+    public int updateCenterdataTFarmCollectiveFarmland(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland);
+
+    /**
+     * 批量删除农村集体耕地
+     *
+     * @param ids 需要删除的农村集体耕地主键集合
+     * @return 结果
+     */
+    public int deleteCenterdataTFarmCollectiveFarmlandByIds(String[] ids);
+
+    /**
+     * 删除农村集体耕地信息
+     *
+     * @param id 农村集体耕地主键
+     * @return 结果
+     */
+    public int deleteCenterdataTFarmCollectiveFarmlandById(String id);
+
+    List<Map<String, Object>> countFarmland(CenterdataTFarmCollectiveFarmland vo);
+}

+ 28 - 2
src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmBreedingFarmServiceImpl.java

@@ -1,6 +1,7 @@
 package com.sooka.sponest.data.digitalagriculture.service.impl;
 
 import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.security.utils.DictUtils;
@@ -9,6 +10,8 @@ import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmBreedingFarm;
 import com.sooka.sponest.data.digitalagriculture.mapper.CenterdataTFarmBreedingFarmMapper;
 import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmBreedingFarmService;
+import com.sooka.sponest.data.system.equipment.domain.CenterdataTEquipmentCamera;
+import com.sooka.sponest.data.system.equipment.service.ICenterdataTEquipmentCameraService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -27,6 +30,9 @@ public class CenterdataTFarmBreedingFarmServiceImpl extends BaseServiceImpl impl
     @Autowired
     private CenterdataTFarmBreedingFarmMapper centerdataTFarmBreedingFarmMapper;
 
+    @Autowired
+    private ICenterdataTEquipmentCameraService centerdataTEquipmentCameraService;
+
     private static final String SYS_ISURGE = "sys_isurge";
 
     /**
@@ -62,6 +68,7 @@ public class CenterdataTFarmBreedingFarmServiceImpl extends BaseServiceImpl impl
         data.setVarietiesLabel(DictUtils.getDictDataByValue("centerdata_breeding_variety",data.getVarieties()));
         data.setAssortedLabel(DictUtils.getDictDataByValue(SYS_ISURGE,data.getAssorted()));
         data.setIsUsedLabel(DictUtils.getDictDataByValue(SYS_ISURGE,data.getIsUsed()));
+        data.setDeviceList(centerdataTEquipmentCameraService.selectCenterdataTEquipmentCameraByBusinessId(id));
         return data;
     }
 
@@ -77,7 +84,16 @@ public class CenterdataTFarmBreedingFarmServiceImpl extends BaseServiceImpl impl
         centerdataTFarmBreedingFarm.setCreateBy(SecurityUtils.getUserId().toString());
         centerdataTFarmBreedingFarm.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         centerdataTFarmBreedingFarm.setCreateTime(DateUtils.getNowDate());
-
+        if (StringUtils.isNotEmpty(centerdataTFarmBreedingFarm.getDeviceList())) {
+            centerdataTFarmBreedingFarm.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_breeding_farm");
+                camera.setBusinessId(centerdataTFarmBreedingFarm.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
         return centerdataTFarmBreedingFarmMapper.insertCenterdataTFarmBreedingFarm(centerdataTFarmBreedingFarm);
     }
 
@@ -92,7 +108,17 @@ public class CenterdataTFarmBreedingFarmServiceImpl extends BaseServiceImpl impl
         centerdataTFarmBreedingFarm.setUpdateBy(SecurityUtils.getLoginUser().getUserid());
         centerdataTFarmBreedingFarm.setUpdateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         centerdataTFarmBreedingFarm.setUpdateTime(DateUtils.getNowDate());
-
+        centerdataTEquipmentCameraService.deleteCenterdataTEquipmentCameraByBusinessId(centerdataTFarmBreedingFarm.getId());
+        if (StringUtils.isNotEmpty(centerdataTFarmBreedingFarm.getDeviceList())) {
+            centerdataTFarmBreedingFarm.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_breeding_farm");
+                camera.setBusinessId(centerdataTFarmBreedingFarm.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
         return centerdataTFarmBreedingFarmMapper.updateCenterdataTFarmBreedingFarm(centerdataTFarmBreedingFarm);
     }
 

+ 31 - 1
src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmCesspitCollectServiceImpl.java

@@ -1,6 +1,8 @@
 package com.sooka.sponest.data.digitalagriculture.service.impl;
 
 import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.common.core.utils.uuid.UUID;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.security.utils.SecurityUtils;
@@ -8,6 +10,8 @@ import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmCesspitCollect;
 import com.sooka.sponest.data.digitalagriculture.mapper.CenterdataTFarmCesspitCollectMapper;
 import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmCesspitCollectService;
+import com.sooka.sponest.data.system.equipment.domain.CenterdataTEquipmentCamera;
+import com.sooka.sponest.data.system.equipment.service.ICenterdataTEquipmentCameraService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -23,6 +27,9 @@ public class CenterdataTFarmCesspitCollectServiceImpl extends BaseServiceImpl im
     @Autowired
     private CenterdataTFarmCesspitCollectMapper centerdataTFarmCesspitCollectMapper;
 
+    @Autowired
+    private ICenterdataTEquipmentCameraService centerdataTEquipmentCameraService;
+
     /**
      * 查询粪污收集点列表
      * @param centerdataTFarmCesspitCollect 粪污收集点对象
@@ -46,6 +53,16 @@ public class CenterdataTFarmCesspitCollectServiceImpl extends BaseServiceImpl im
         centerdataTFarmCesspitCollect.setCreateBy(SecurityUtils.getUserId().toString());
         centerdataTFarmCesspitCollect.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         centerdataTFarmCesspitCollect.setCreateTime(DateUtils.getNowDate());
+        if (StringUtils.isNotEmpty(centerdataTFarmCesspitCollect.getDeviceList())) {
+            centerdataTFarmCesspitCollect.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_cesspit_collect");
+                camera.setBusinessId(centerdataTFarmCesspitCollect.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
         return centerdataTFarmCesspitCollectMapper.insertCenterdataTFarmCesspitCollect(centerdataTFarmCesspitCollect);
     }
     /**
@@ -56,7 +73,9 @@ public class CenterdataTFarmCesspitCollectServiceImpl extends BaseServiceImpl im
      */
     @Override
     public CenterdataTFarmCesspitCollect selectCenterdataTFarmCesspitCollectById(String id) {
-        return centerdataTFarmCesspitCollectMapper.selectCenterdataTFarmCesspitCollectById(id);
+        CenterdataTFarmCesspitCollect centerdataTFarmCesspitCollect = centerdataTFarmCesspitCollectMapper.selectCenterdataTFarmCesspitCollectById(id);
+        centerdataTFarmCesspitCollect.setDeviceList(centerdataTEquipmentCameraService.selectCenterdataTEquipmentCameraByBusinessId(id));
+        return centerdataTFarmCesspitCollect;
     }
     /**
      * 修改粪污收集点
@@ -69,6 +88,17 @@ public class CenterdataTFarmCesspitCollectServiceImpl extends BaseServiceImpl im
         centerdataTFarmCesspitCollect.setUpdateBy(SecurityUtils.getUserId());
         centerdataTFarmCesspitCollect.setUpdateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         centerdataTFarmCesspitCollect.setUpdateTime(DateUtils.getNowDate());
+        centerdataTEquipmentCameraService.deleteCenterdataTEquipmentCameraByBusinessId(centerdataTFarmCesspitCollect.getId());
+        if (StringUtils.isNotEmpty(centerdataTFarmCesspitCollect.getDeviceList())) {
+            centerdataTFarmCesspitCollect.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_cesspit_collect");
+                camera.setBusinessId(centerdataTFarmCesspitCollect.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
         return centerdataTFarmCesspitCollectMapper.updateCenterdataTFarmCesspitCollect(centerdataTFarmCesspitCollect);
     }
     /**

+ 169 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmCollectiveFarmlandServiceImpl.java

@@ -0,0 +1,169 @@
+package com.sooka.sponest.data.digitalagriculture.service.impl;
+
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
+import com.ruoyi.common.security.utils.DictUtils;
+import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.utils.DeptLevelUtil;
+import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
+import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmCollectiveFarmland;
+import com.sooka.sponest.data.digitalagriculture.mapper.CenterdataTFarmCollectiveFarmlandMapper;
+import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmCollectiveFarmlandService;
+import com.sooka.sponest.data.system.equipment.domain.CenterdataTEquipmentCamera;
+import com.sooka.sponest.data.system.equipment.service.ICenterdataTEquipmentCameraService;
+import org.apache.commons.collections4.MapUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 农村集体耕地Service业务层处理
+ *
+ * @author 韩福成
+ * @date 2024-06-07
+ */
+@Service
+public class CenterdataTFarmCollectiveFarmlandServiceImpl extends BaseServiceImpl implements ICenterdataTFarmCollectiveFarmlandService {
+    @Autowired
+    private CenterdataTFarmCollectiveFarmlandMapper centerdataTFarmCollectiveFarmlandMapper;
+
+    @Autowired
+    private ICenterdataTEquipmentCameraService centerdataTEquipmentCameraService;
+
+    @Resource
+    private DeptLevelUtil deptLevelUtil;
+
+    /**
+     * 查询农村集体耕地
+     *
+     * @param id 农村集体耕地主键
+     * @return 农村集体耕地
+     */
+    @Override
+    public CenterdataTFarmCollectiveFarmland selectCenterdataTFarmCollectiveFarmlandById(String id) {
+        CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland = centerdataTFarmCollectiveFarmlandMapper.selectCenterdataTFarmCollectiveFarmlandById(id);
+        centerdataTFarmCollectiveFarmland.setTypeLabel(DictUtils.getDictDataByValue("centerdata_land_type",centerdataTFarmCollectiveFarmland.getType()));
+        centerdataTFarmCollectiveFarmland.setDeviceList(centerdataTEquipmentCameraService.selectCenterdataTEquipmentCameraByBusinessId(id));
+        return centerdataTFarmCollectiveFarmland;
+    }
+
+    /**
+     * 查询农村集体耕地列表
+     *
+     * @param centerdataTFarmCollectiveFarmland 农村集体耕地
+     * @return 农村集体耕地
+     */
+    @Override
+    @DataScopeMutiDept(deptAlias = "d")
+    public List<CenterdataTFarmCollectiveFarmland> selectCenterdataTFarmCollectiveFarmlandList(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland) {
+        setSookaDataBase(centerdataTFarmCollectiveFarmland);
+        List<CenterdataTFarmCollectiveFarmland> list = centerdataTFarmCollectiveFarmlandMapper.selectCenterdataTFarmCollectiveFarmlandList(centerdataTFarmCollectiveFarmland);
+        list.forEach(item -> {
+            item.setTypeLabel(DictUtils.getDictDataByValue("centerdata_land_type",item.getType()));
+        });
+        return list;
+    }
+
+    /**
+     * 新增农村集体耕地
+     *
+     * @param centerdataTFarmCollectiveFarmland 农村集体耕地
+     * @return 结果
+     */
+    @Override
+    public int insertCenterdataTFarmCollectiveFarmland(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland) {
+        centerdataTFarmCollectiveFarmland.setId(IdUtils.simpleUUID());
+        centerdataTFarmCollectiveFarmland.setCreateBy(SecurityUtils.getUserId().toString());
+        centerdataTFarmCollectiveFarmland.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+        centerdataTFarmCollectiveFarmland.setCreateTime(DateUtils.getNowDate());
+        if (StringUtils.isNotEmpty(centerdataTFarmCollectiveFarmland.getDeviceList())) {
+            centerdataTFarmCollectiveFarmland.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_collective_farmland");
+                camera.setBusinessId(centerdataTFarmCollectiveFarmland.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
+        return centerdataTFarmCollectiveFarmlandMapper.insertCenterdataTFarmCollectiveFarmland(centerdataTFarmCollectiveFarmland);
+    }
+
+    /**
+     * 修改农村集体耕地
+     *
+     * @param centerdataTFarmCollectiveFarmland 农村集体耕地
+     * @return 结果
+     */
+    @Override
+    public int updateCenterdataTFarmCollectiveFarmland(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland) {
+        centerdataTFarmCollectiveFarmland.setUpdateBy(SecurityUtils.getLoginUser().getUserid());
+        centerdataTFarmCollectiveFarmland.setUpdateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+        centerdataTFarmCollectiveFarmland.setUpdateTime(DateUtils.getNowDate());
+        centerdataTEquipmentCameraService.deleteCenterdataTEquipmentCameraByBusinessId(centerdataTFarmCollectiveFarmland.getId());
+        if (StringUtils.isNotEmpty(centerdataTFarmCollectiveFarmland.getDeviceList())) {
+            centerdataTFarmCollectiveFarmland.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_collective_farmland");
+                camera.setBusinessId(centerdataTFarmCollectiveFarmland.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
+        return centerdataTFarmCollectiveFarmlandMapper.updateCenterdataTFarmCollectiveFarmland(centerdataTFarmCollectiveFarmland);
+    }
+
+    /**
+     * 批量删除农村集体耕地
+     *
+     * @param ids 需要删除的农村集体耕地主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCenterdataTFarmCollectiveFarmlandByIds(String[] ids) {
+        for (String id : ids) {
+            centerdataTEquipmentCameraService.deleteCenterdataTEquipmentCameraByBusinessId(id);
+        }
+        return centerdataTFarmCollectiveFarmlandMapper.deleteCenterdataTFarmCollectiveFarmlandByIds(ids);
+    }
+
+    /**
+     * 删除农村集体耕地信息
+     *
+     * @param id 农村集体耕地主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCenterdataTFarmCollectiveFarmlandById(String id) {
+        return centerdataTFarmCollectiveFarmlandMapper.deleteCenterdataTFarmCollectiveFarmlandById(id);
+    }
+
+    @Override
+    @DataScopeMutiDept(deptAlias = "d")
+    public List<Map<String, Object>> countFarmland(CenterdataTFarmCollectiveFarmland vo) {
+        setSookaDataBase(vo);
+        String deptId = null == vo.getDeptId() ? SecurityUtils.getLoginUser().getSysUser().getDeptId().toString() : vo.getDeptId().toString();
+        vo.setDeptId(Long.valueOf(deptId));
+        List<Map<String, Object>> busList = centerdataTFarmCollectiveFarmlandMapper.countFarmland(vo);
+        List<String> addKeys = Arrays.asList("collectiveFarmland", "homeContracting", "otherCollectiveFarmland", "maneuverableLand", "contractedLand", "extinctionLand", "onlyChildLand", "returnableLand", "reclaimLang", "fourWastelandsLand", "schoolLand", "villageSchoolLand", "waterArea", "forestArea", "dicallyLand");
+
+        //后端计算合计方法,如果没有部门信息,仍然会在前端显示合计数据
+        /*List<Map<String, Object>> resultDataList = deptLevelUtil.getDeptLevel(deptId, busList, addKeys);
+        return deptLevelUtil.sumColumnsTotal(resultDataList, addKeys, "deptName");*/
+
+        //前端计算合计,只需要返回业务数据即可
+        return deptLevelUtil.getDeptLevel(deptId, busList, addKeys);
+    }
+
+
+}

+ 28 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmTrashCanServiceImpl.java

@@ -1,6 +1,7 @@
 package com.sooka.sponest.data.digitalagriculture.service.impl;
 
 import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.security.utils.DictUtils;
@@ -9,6 +10,8 @@ import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmTrashCan;
 import com.sooka.sponest.data.digitalagriculture.mapper.CenterdataTFarmTrashCanMapper;
 import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmTrashCanService;
+import com.sooka.sponest.data.system.equipment.domain.CenterdataTEquipmentCamera;
+import com.sooka.sponest.data.system.equipment.service.ICenterdataTEquipmentCameraService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -24,6 +27,9 @@ public class CenterdataTFarmTrashCanServiceImpl extends BaseServiceImpl implemen
 
     @Autowired
     private CenterdataTFarmTrashCanMapper centerdataTFarmTrashCanMapper;
+
+    @Autowired
+    private ICenterdataTEquipmentCameraService centerdataTEquipmentCameraService;
     /**
      * 查询垃圾桶列表
      *
@@ -46,6 +52,7 @@ public class CenterdataTFarmTrashCanServiceImpl extends BaseServiceImpl implemen
     @Override
     public CenterdataTFarmTrashCan selectCenterdataTFarmTrashCanById(String id) {
         CenterdataTFarmTrashCan data = centerdataTFarmTrashCanMapper.selectCenterdataTFarmTrashCanById(id);
+        data.setDeviceList(centerdataTEquipmentCameraService.selectCenterdataTEquipmentCameraByBusinessId(id));
         data.setCoverageLabel(DictUtils.getDictDataByValue("sys_coverage_type",data.getCoverage()));
         return data;
     }
@@ -62,6 +69,16 @@ public class CenterdataTFarmTrashCanServiceImpl extends BaseServiceImpl implemen
         centerdataTFarmTrashCan.setCreateBy(SecurityUtils.getUserId().toString());
         centerdataTFarmTrashCan.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         centerdataTFarmTrashCan.setCreateTime(DateUtils.getNowDate());
+        if (StringUtils.isNotEmpty(centerdataTFarmTrashCan.getDeviceList())) {
+            centerdataTFarmTrashCan.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_trashcan");
+                camera.setBusinessId(centerdataTFarmTrashCan.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
         return centerdataTFarmTrashCanMapper.insertCenterdataTFarmTrashCan(centerdataTFarmTrashCan);
     }
 
@@ -77,6 +94,17 @@ public class CenterdataTFarmTrashCanServiceImpl extends BaseServiceImpl implemen
         centerdataTFarmTrashCan.setUpdateBy(SecurityUtils.getLoginUser().getUserid());
         centerdataTFarmTrashCan.setUpdateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         centerdataTFarmTrashCan.setUpdateTime(DateUtils.getNowDate());
+        centerdataTEquipmentCameraService.deleteCenterdataTEquipmentCameraByBusinessId(centerdataTFarmTrashCan.getId());
+        if (StringUtils.isNotEmpty(centerdataTFarmTrashCan.getDeviceList())) {
+            centerdataTFarmTrashCan.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_trashcan");
+                camera.setBusinessId(centerdataTFarmTrashCan.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
         return centerdataTFarmTrashCanMapper.updateCenterdataTFarmTrashCan(centerdataTFarmTrashCan);
     }
 

+ 31 - 1
src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/ICenterdataTFarmGarbageTransferServiceImpl.java

@@ -1,6 +1,8 @@
 package com.sooka.sponest.data.digitalagriculture.service.impl;
 
 import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.common.core.utils.uuid.UUID;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.security.utils.SecurityUtils;
@@ -8,6 +10,8 @@ import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmGarbageTransfer;
 import com.sooka.sponest.data.digitalagriculture.mapper.CenterdataTFarmGarbageTransferMapper;
 import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmGarbageTransferService;
+import com.sooka.sponest.data.system.equipment.domain.CenterdataTEquipmentCamera;
+import com.sooka.sponest.data.system.equipment.service.ICenterdataTEquipmentCameraService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -19,6 +23,9 @@ public class ICenterdataTFarmGarbageTransferServiceImpl extends BaseServiceImpl
         @Autowired
         private CenterdataTFarmGarbageTransferMapper centerdataTFarmGarbageTransferMapper;
 
+    @Autowired
+    private ICenterdataTEquipmentCameraService centerdataTEquipmentCameraService;
+
     @Override
     @DataScopeMutiDept(deptAlias = "d")
     public List<CenterdataTFarmGarbageTransfer> selectCenterdataTFarmGarbageTransferList(CenterdataTFarmGarbageTransfer centerdataTFarmGarbageTransfer) {
@@ -28,7 +35,9 @@ public class ICenterdataTFarmGarbageTransferServiceImpl extends BaseServiceImpl
 
     @Override
     public CenterdataTFarmGarbageTransfer selectCenterdataTFarmGarbageTransferById(String id) {
-        return centerdataTFarmGarbageTransferMapper.selectCenterdataTFarmGarbageTransferById(id);
+        CenterdataTFarmGarbageTransfer data = centerdataTFarmGarbageTransferMapper.selectCenterdataTFarmGarbageTransferById(id);
+        data.setDeviceList(centerdataTEquipmentCameraService.selectCenterdataTEquipmentCameraByBusinessId(id));
+        return data;
     }
 
     @Override
@@ -37,6 +46,16 @@ public class ICenterdataTFarmGarbageTransferServiceImpl extends BaseServiceImpl
         centerdataTFarmGarbageTransfer.setCreateBy(SecurityUtils.getUserId().toString());
         centerdataTFarmGarbageTransfer.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         centerdataTFarmGarbageTransfer.setCreateTime(DateUtils.getNowDate());
+        if (StringUtils.isNotEmpty(centerdataTFarmGarbageTransfer.getDeviceList())) {
+            centerdataTFarmGarbageTransfer.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_garbage_transfer");
+                camera.setBusinessId(centerdataTFarmGarbageTransfer.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
         return centerdataTFarmGarbageTransferMapper.insertCenterdataTFarmCenterdataTFarmGarbageTransfer(centerdataTFarmGarbageTransfer);
     }
 
@@ -45,6 +64,17 @@ public class ICenterdataTFarmGarbageTransferServiceImpl extends BaseServiceImpl
         centerdataTFarmGarbageTransfer.setUpdateBy(SecurityUtils.getUserId());
         centerdataTFarmGarbageTransfer.setUpdateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         centerdataTFarmGarbageTransfer.setUpdateTime(DateUtils.getNowDate());
+        centerdataTEquipmentCameraService.deleteCenterdataTEquipmentCameraByBusinessId(centerdataTFarmGarbageTransfer.getId());
+        if (StringUtils.isNotEmpty(centerdataTFarmGarbageTransfer.getDeviceList())) {
+            centerdataTFarmGarbageTransfer.getDeviceList().forEach(item -> {
+                CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
+                camera.setId(IdUtils.fastSimpleUUID());
+                camera.setCameraId(item);
+                camera.setType("centerdata_t_farm_garbage_transfer");
+                camera.setBusinessId(centerdataTFarmGarbageTransfer.getId());
+                centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
+            });
+        }
         return centerdataTFarmGarbageTransferMapper.updateCenterdataTFarmCenterdataTFarmGarbageTransfer(centerdataTFarmGarbageTransfer);
     }
 

+ 1 - 1
src/main/java/com/sooka/sponest/data/digitalenvironment/service/impl/CenterdataTEnvironmentSewageOutletServiceImpl.java

@@ -109,7 +109,7 @@ public class CenterdataTEnvironmentSewageOutletServiceImpl extends BaseServiceIm
                 CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
                 camera.setId(IdUtils.fastSimpleUUID());
                 camera.setCameraId(item);
-                camera.setType("environmental_outfall;");
+                camera.setType("environmental_outfall");
                 camera.setBusinessId(centerdataTEnvironmentSewageOutlet.getId());
                 centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
             });

+ 2 - 2
src/main/java/com/sooka/sponest/data/digitalenvironment/service/impl/CenterdataTEnvironmentWaterMonitorServiceImpl.java

@@ -80,7 +80,7 @@ public class CenterdataTEnvironmentWaterMonitorServiceImpl extends BaseServiceIm
                 CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
                 camera.setId(IdUtils.fastSimpleUUID());
                 camera.setCameraId(item);
-                camera.setType("environmental_outfall");
+                camera.setType("environment_water_monitor");
                 camera.setBusinessId(centerdataTHydraulicWaterMonitor.getId());
                 centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
             });
@@ -106,7 +106,7 @@ public class CenterdataTEnvironmentWaterMonitorServiceImpl extends BaseServiceIm
                 CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
                 camera.setId(IdUtils.fastSimpleUUID());
                 camera.setCameraId(item);
-                camera.setType("environmental_outfall;");
+                camera.setType("environment_water_monitor");
                 camera.setBusinessId(centerdataTHydraulicWaterMonitor.getId());
                 centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
             });

+ 9 - 2
src/main/java/com/sooka/sponest/data/digitalforest/controller/ForestViewController.java

@@ -5,6 +5,7 @@ import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.sooka.sponest.data.digitalfirecontrol.domain.bo.FireControlViewBO;
 import com.sooka.sponest.data.digitalfirecontrol.service.IFireControlViewService;
+import com.sooka.sponest.data.digitalforest.domain.bo.ForestCloudRYBO;
 import com.sooka.sponest.data.digitalforest.domain.bo.ForestCloudRyZxBO;
 import com.sooka.sponest.data.digitalforest.domain.bo.ForestLeaderBO;
 import com.sooka.sponest.data.digitalforest.domain.bo.ForestViewBO;
@@ -99,7 +100,7 @@ public class ForestViewController extends BaseController {
 
     @ApiOperation(value = "林场查询总人数用户Id", notes = "林场查询总人数用户Id")
     @PostMapping("/getRyList")
-    public R<ForestCloudRYList> getRyList(@RequestBody ForestCloudMapVO forestCloudMapVO) {
+    public R<List<ForestCloudRYBO>> getRyList(@RequestBody ForestCloudMapVO forestCloudMapVO) {
         return R.ok(forestViewService.getRyList(forestCloudMapVO));
     }
 
@@ -108,4 +109,10 @@ public class ForestViewController extends BaseController {
     public R<List<ForestLeaderBO>> getForestLeader(@RequestBody ForestLeaderVO vo) {
         return R.ok(forestViewService.getForestLeader(vo));
     }
-}
+
+    @ApiOperation(value = "按级别统计林长人数", notes = "按级别统计林长人数")
+    @GetMapping("/getNumByLevel")
+    public R<List<Map<String,Object>>> getNumByLevel(ForestLeaderVO vo) {
+        return R.ok(forestViewService.getNumByLevel(vo));
+    }
+}

+ 2 - 0
src/main/java/com/sooka/sponest/data/digitalforest/domain/vo/ForestCloudMapVO.java

@@ -40,4 +40,6 @@ public class ForestCloudMapVO extends BaseBusinessEntity {
 
     @ApiModelProperty(value = "所属系统", required = false)
     private String availableSystem;
+
+    private String level;
 }

+ 2 - 0
src/main/java/com/sooka/sponest/data/digitalforest/domain/vo/ForestLeaderVO.java

@@ -19,4 +19,6 @@ public class ForestLeaderVO extends BaseBusinessEntity {
     private String deptId;
 
     private String name;
+
+    private String level;
 }

+ 2 - 0
src/main/java/com/sooka/sponest/data/digitalforest/mapper/ForestViewMapper.java

@@ -18,4 +18,6 @@ public interface ForestViewMapper {
     public  List<ForestCloudRyZxUerIdBO> selectZXRSUerId(ForestCloudMapVO forestCloudMapVO);
 
     public List<ForestLeaderBO> getForestLeader(ForestLeaderVO vo);
+
+    public List<Map<String,Object>> getNumByLevel(ForestLeaderVO vo);
 }

+ 4 - 1
src/main/java/com/sooka/sponest/data/digitalforest/service/IForestViewService.java

@@ -1,6 +1,7 @@
 package com.sooka.sponest.data.digitalforest.service;
 
 import com.sooka.sponest.data.base.service.IBaseService;
+import com.sooka.sponest.data.digitalforest.domain.bo.ForestCloudRYBO;
 import com.sooka.sponest.data.digitalforest.domain.bo.ForestCloudRyZxBO;
 import com.sooka.sponest.data.digitalforest.domain.bo.ForestLeaderBO;
 import com.sooka.sponest.data.digitalforest.domain.bo.ForestViewBO;
@@ -27,7 +28,9 @@ public interface IForestViewService extends IBaseService {
 
     List<Map<String, Object>> dataFilter(List<Map<String, Object>> pointList);
     public ForestCloudRyZxBO selectZXRS(ForestCloudMapVO forestCloudMapVO);
-    public ForestCloudRYList getRyList(ForestCloudMapVO forestCloudMapVO);
+    public List<ForestCloudRYBO> getRyList(ForestCloudMapVO forestCloudMapVO);
 
     public List<ForestLeaderBO> getForestLeader(ForestLeaderVO vo);
+
+    public List<Map<String,Object>> getNumByLevel(ForestLeaderVO vo);
 }

+ 2 - 2
src/main/java/com/sooka/sponest/data/digitalforest/service/impl/CenterdataTForestAnimalServiceImpl.java

@@ -153,7 +153,7 @@ public class CenterdataTForestAnimalServiceImpl extends BaseServiceImpl implemen
                 CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
                 camera.setId(IdUtils.fastSimpleUUID());
                 camera.setCameraId(item);
-                camera.setType("4");
+                camera.setType("forest_animal");
                 camera.setBusinessId(centerdataTForestAnimal.getId());
                 centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
             });
@@ -179,7 +179,7 @@ public class CenterdataTForestAnimalServiceImpl extends BaseServiceImpl implemen
                 CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
                 camera.setId(IdUtils.fastSimpleUUID());
                 camera.setCameraId(item);
-                camera.setType("4");
+                camera.setType("forest_animal");
                 camera.setBusinessId(centerdataTForestAnimal.getId());
                 centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
             });

+ 14 - 7
src/main/java/com/sooka/sponest/data/digitalforest/service/impl/ForestViewServiceImpl.java

@@ -81,14 +81,14 @@ public class ForestViewServiceImpl extends BaseServiceImpl implements IForestVie
 
     @Override
     @DataScopeMutiDept(deptAlias = "d", userAlias = "u")
-    public ForestCloudRYList getRyList(ForestCloudMapVO forestCloudMapVO) {
+    public List<ForestCloudRYBO> getRyList(ForestCloudMapVO forestCloudMapVO) {
         setSookaDataBase(forestCloudMapVO);
-        List<ForestCloudRYBO> visuForestCloudRYBO = forestViewMapper.selectVisualRy(forestCloudMapVO);
-        List<ForestCloudRyZxUerIdBO> userList = forestViewMapper.selectZXRSUerId(forestCloudMapVO);
-        ForestCloudRYList forestCloudRYList = new ForestCloudRYList();
-        forestCloudRYList.setUserList(userList);
-        forestCloudRYList.setVisuForestCloudRYBO(visuForestCloudRYBO);
-        return forestCloudRYList;
+        //在线人数
+//        List<ForestCloudRyZxUerIdBO> userList = forestViewMapper.selectZXRSUerId(forestCloudMapVO);
+//        ForestCloudRYList forestCloudRYList = new ForestCloudRYList();
+//        forestCloudRYList.setUserList(userList);
+//        forestCloudRYList.setVisuForestCloudRYBO(visuForestCloudRYBO);
+        return forestViewMapper.selectVisualRy(forestCloudMapVO);
     }
 
     @Override
@@ -97,4 +97,11 @@ public class ForestViewServiceImpl extends BaseServiceImpl implements IForestVie
         setSookaDataBase(vo);
         return forestViewMapper.getForestLeader(vo);
     }
+
+    @Override
+    @DataScopeMutiDept(deptAlias = "d", userAlias = "u")
+    public List<Map<String,Object>> getNumByLevel(ForestLeaderVO vo) {
+        setSookaDataBase(vo);
+        return forestViewMapper.getNumByLevel(vo);
+    }
 }

+ 12 - 0
src/main/java/com/sooka/sponest/data/digitalwater/controller/WaterViewController.java

@@ -61,6 +61,18 @@ public class WaterViewController extends BaseController {
         return AjaxResult.success(waterViewService.getPointByDeptId(waterConservancyViewBO));
     }
 
+    /*
+    * 按级别获取人数(河长、路长、田长)
+    *
+    * @author 韩福成
+    * @date 2024/7/16 上午8:55
+    */
+    @ApiOperation(value = "按级别获取人数(河长、路长、田长)", notes = "按级别获取人数(河长、路长、田长)")
+    @GetMapping("/getNumByLevel")
+    public AjaxResult getNumByLevel(WaterConservancyViewBO waterConservancyViewBO) {
+        return AjaxResult.success(waterViewService.getNumByLevel(waterConservancyViewBO));
+    }
+
     /**
      * 获取人员信息(河长、路长、田长)可视化端
      *

+ 2 - 0
src/main/java/com/sooka/sponest/data/digitalwater/domain/WaterConservancyViewBO.java

@@ -48,6 +48,8 @@ public class WaterConservancyViewBO extends BaseBusinessEntity {
     @ApiModelProperty(value = "类型(2.河长 3.路长 6.田长)", required = false)
     private String leadType;
 
+    private String level;
+
     //字典项
     @ApiModelProperty(value = "字典项", required = false,hidden = true)
     private String dictType;

+ 2 - 0
src/main/java/com/sooka/sponest/data/digitalwater/mapper/WaterConservancyViewMapper.java

@@ -25,4 +25,6 @@ public interface WaterConservancyViewMapper {
     List<Map<String, Object>> getFarmLandList(WaterConservancyViewBO waterConservancyViewBO);
 
     List<RegionalFlag> getFlagList(WaterConservancyViewBO waterConservancyViewBO);
+
+    List<Map<String, Object>> getNumByLevel(WaterConservancyViewBO waterConservancyViewBO);
 }

+ 2 - 0
src/main/java/com/sooka/sponest/data/digitalwater/service/IWaterViewService.java

@@ -21,6 +21,8 @@ public interface IWaterViewService extends IBaseService {
 
     List<Map<String, Object>> getPointByDeptId(WaterConservancyViewBO waterConservancyViewBO);
 
+    List<Map<String, Object>> getNumByLevel(WaterConservancyViewBO waterConservancyViewBO);
+
     Map<String, Object> getRyList(WaterConservancyViewBO waterConservancyViewBO);
 
     List<Map<String, Object>> getRyListByJob(WaterConservancyViewBO waterConservancyViewBO);

+ 7 - 0
src/main/java/com/sooka/sponest/data/digitalwater/service/impl/WaterViewServiceImpl.java

@@ -67,6 +67,13 @@ public class WaterViewServiceImpl extends BaseServiceImpl implements IWaterViewS
         return pointList;
     }
 
+    @DataScopeMutiDept(deptAlias = "d")
+    @Override
+    public List<Map<String, Object>> getNumByLevel(WaterConservancyViewBO waterConservancyViewBO) {
+        setSookaDataBase(waterConservancyViewBO);
+        return waterConservancyViewMapper.getNumByLevel(waterConservancyViewBO);
+    }
+
     private void getCameraLists(List<Map<String, Object>> pointList) {
         List<String> ids = pointList.stream().map(item -> MapUtils.getString(item, "id")).collect(Collectors.toList());
         List<Map<String, Object>> cameraList = this.getCameraList(ids);

+ 43 - 0
src/main/java/com/sooka/sponest/data/generalbusiness/controller/CenterdataTKeyProjectsController.java

@@ -1,5 +1,7 @@
 package com.sooka.sponest.data.generalbusiness.controller;
 
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
@@ -151,4 +153,45 @@ public class CenterdataTKeyProjectsController extends BaseController {
     public AjaxResult remove(@PathVariable String[] ids) {
         return toAjax(centerdataTKeyProjectsService.deleteCenterdataTKeyProjectsByIds(ids));
     }
+
+    /**
+     * 接受报文
+     */
+    @ApiOperation(value = "接受报文", notes = "接受报文")
+    @Log(title = "接受报文", businessType = BusinessType.INSERT)
+    @PostMapping("/receivedMessage")
+    public AjaxResult receivedMessage(@RequestBody List<CenterdataTKeyProjects> centerdataTKeyProjects) {
+        for (CenterdataTKeyProjects projects : centerdataTKeyProjects){
+            if (StringUtils.isEmpty(projects.getProjectId())||StringUtils.isEmpty(projects.getProjectName())||StringUtils.isEmpty(projects.getLongitude())||
+                    StringUtils.isEmpty(projects.getLatitude())|| StringUtils.isEmpty(projects.getNature())){
+                return AjaxResult.error(5002, "缺少必要参数");
+            }
+            if (projects.getEndTime()!=null&&projects.getStartTime()!=null){
+                if (projects.getEndTime().compareTo(projects.getStartTime())<0){
+                    return AjaxResult.error(5003,"计划竣工时间不能小于开复工时间");
+                }
+            }
+        }
+        int result;
+        try {
+            result = centerdataTKeyProjectsService.receivedMessage(centerdataTKeyProjects);
+        }catch (Exception e){
+            logger.error(e.getMessage());
+            return AjaxResult.error("数据格式错误");
+        }
+        return toAjax(result);
+    }
+
+    /*
+    * 推送报文
+    *
+    * @author 韩福成
+    * @date 2024/1/18 14:58
+    */
+    @ApiOperation(value = "推送报文", notes = "推送报文")
+    @GetMapping("/receivedMessage/{ids}")
+    public R pushMessage(@PathVariable String[] ids) {
+        return centerdataTKeyProjectsService.pushMessage(ids);
+    }
+
 }

+ 145 - 2
src/main/java/com/sooka/sponest/data/generalbusiness/domain/CenterdataTKeyProjects.java

@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import javax.validation.constraints.NotBlank;
 import java.util.Date;
@@ -33,6 +34,7 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
      */
     @ApiModelProperty(value = "属地辖区", required = false)
     @Excel(name = "属地辖区")
+//    @NotBlank(message = "属地辖区不能为空")
     private String territoriality;
 
     /**
@@ -118,6 +120,7 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
      */
     @ApiModelProperty(value = "负责人", required = false)
     @Excel(name = "负责人")
+//    @NotBlank(message = "负责人不能为空")
     private String principal;
 
     /**
@@ -125,11 +128,13 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
      */
     @ApiModelProperty(value = "联系电话", required = false)
     @Excel(name = "联系电话")
+//    @NotBlank(message = "联系电话不能为空")
     private String phone;
 
     /**
      * 开复工时间
      */
+    @DateTimeFormat(pattern = "yyyy-MM")
     @JsonFormat(pattern = "yyyy-MM")
     @Excel(name = "开复工时间",dateFormat = "yyyy-MM")
     private Date startTime;
@@ -137,6 +142,7 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
     /**
      * 计划竣工时间
      */
+    @DateTimeFormat(pattern = "yyyy-MM")
     @JsonFormat(pattern = "yyyy-MM")
     @Excel(name = "计划竣工时间",dateFormat = "yyyy-MM")
     private Date endTime;
@@ -146,6 +152,7 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
      */
     @ApiModelProperty(value = "建设地点", required = false)
     @Excel(name = "建设地点")
+//    @NotBlank(message = "建设地点不能为空")
     private String constructionSite;
 
     /**
@@ -153,6 +160,7 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
      */
     @ApiModelProperty(value = "在建性质", required = false)
     @Excel(name = "在建性质",dictType = "centerdata_zj_nature")
+    @NotBlank(message = "在建性质不能为空")
     private String nature;
 
     /**
@@ -238,7 +246,7 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
      */
     @ApiModelProperty(value = "建设内容", required = false)
     @Excel(name = "建设内容")
-    @NotBlank(message = "建设内容不能为空")
+//    @NotBlank(message = "建设内容不能为空")
     private String introduction;
 
     public Long getDeptId() {
@@ -259,7 +267,7 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
      */
     @ApiModelProperty(value = "所属部门", required = false)
     @Excel(name = "所属部门")
-    @NotBlank(message = "所属部门不能为空")
+//    @NotBlank(message = "所属部门不能为空")
     private String deptName;
 
     /**
@@ -268,6 +276,141 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
     @ApiModelProperty(value = "附件", required = false)
     private String photoId;
 
+    @ApiModelProperty(value = "续建项目去年底前累计投资(万元)", required = false)
+    @Excel(name = "续建项目去年底前累计投资(万元)")
+    private String continuationProjectInvest;
+
+    @DateTimeFormat(pattern = "yyyy-MM")
+    @JsonFormat(pattern = "yyyy-MM")
+    @ApiModelProperty(value = "续建项目首次开工时间", required = false)
+    @Excel(name = "续建项目首次开工时间",dateFormat = "yyyy-MM")
+    private Date continuationProjectStartTime;
+
+    @ApiModelProperty(value = "是否入统计库", required = false)
+    @Excel(name = "是否入统计库",readConverterExp="0=否,1=是")
+    private String joinStatisticalBank;
+
+    @ApiModelProperty(value = "是否入统", required = false)
+    @Excel(name = "是否入统",readConverterExp="0=否,1=是")
+    private String joinStatistical;
+
+    @ApiModelProperty(value = "1-N月入统投资", required = false)
+    @Excel(name = "1-N月入统投资")
+    private String joinStatisticalInvest;
+
+    @ApiModelProperty(value = "今年实际累计完成投资", required = false)
+    @Excel(name = "今年实际累计完成投资")
+    private String thisYearCumulativeInvestment;
+
+    @DateTimeFormat(pattern = "yyyy-MM")
+    @JsonFormat(pattern = "yyyy-MM")
+    @ApiModelProperty(value = "实际竣工时间", required = false)
+    @Excel(name = "实际竣工时间",dateFormat = "yyyy-MM")
+    private Date realityCompletedTime;
+
+    @ApiModelProperty(value = "是否春季集中开复工项目", required = false)
+    @Excel(name = "是否春季集中开复工项目",readConverterExp="0=否,1=是")
+    private String springStartProject;
+
+    @ApiModelProperty(value = "所属行政区", required = false)
+    @Excel(name = "所属行政区",readConverterExp="369=双辽市,370=伊通县,371=梨树县,372=铁东区,373=铁西区")
+    private String administrativeRegion;
+
+    @ApiModelProperty(value = "报文", required = false)
+    private String message;
+
+    @ApiModelProperty(value = "项目id", required = false)
+    @NotBlank(message = "项目id不能为空")
+    private String projectId;
+
+    public String getAdministrativeRegion() {
+        return administrativeRegion;
+    }
+
+    public void setAdministrativeRegion(String administrativeRegion) {
+        this.administrativeRegion = administrativeRegion;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String getJoinStatisticalBank() {
+        return joinStatisticalBank;
+    }
+
+    public void setJoinStatisticalBank(String joinStatisticalBank) {
+        this.joinStatisticalBank = joinStatisticalBank;
+    }
+
+    public String getJoinStatistical() {
+        return joinStatistical;
+    }
+
+    public void setJoinStatistical(String joinStatistical) {
+        this.joinStatistical = joinStatistical;
+    }
+
+    public String getJoinStatisticalInvest() {
+        return joinStatisticalInvest;
+    }
+
+    public void setJoinStatisticalInvest(String joinStatisticalInvest) {
+        this.joinStatisticalInvest = joinStatisticalInvest;
+    }
+
+    public String getThisYearCumulativeInvestment() {
+        return thisYearCumulativeInvestment;
+    }
+
+    public void setThisYearCumulativeInvestment(String thisYearCumulativeInvestment) {
+        this.thisYearCumulativeInvestment = thisYearCumulativeInvestment;
+    }
+
+    public String getSpringStartProject() {
+        return springStartProject;
+    }
+
+    public void setSpringStartProject(String springStartProject) {
+        this.springStartProject = springStartProject;
+    }
+
+    public String getContinuationProjectInvest() {
+        return continuationProjectInvest;
+    }
+
+    public void setContinuationProjectInvest(String continuationProjectInvest) {
+        this.continuationProjectInvest = continuationProjectInvest;
+    }
+
+    public Date getContinuationProjectStartTime() {
+        return continuationProjectStartTime;
+    }
+
+    public void setContinuationProjectStartTime(Date continuationProjectStartTime) {
+        this.continuationProjectStartTime = continuationProjectStartTime;
+    }
+
+    public Date getRealityCompletedTime() {
+        return realityCompletedTime;
+    }
+
+    public void setRealityCompletedTime(Date realityCompletedTime) {
+        this.realityCompletedTime = realityCompletedTime;
+    }
+
     public String getTerritoriality() {
         return territoriality;
     }

+ 698 - 0
src/main/java/com/sooka/sponest/data/generalbusiness/domain/CenterdataTKeyProjectsBo.java

@@ -0,0 +1,698 @@
+package com.sooka.sponest.data.generalbusiness.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.annotation.Excel;
+import com.sooka.sponest.data.base.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 重点工程对象 centerdata_t_key_projects
+ *
+ * @author ruoyi
+ * @date 2023-04-23
+ */
+@ApiModel(description = "数据中心重点工程实体类对象")
+public class CenterdataTKeyProjectsBo extends BaseBusinessEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private String id;
+
+    /**
+     * 属地辖区
+     */
+    @ApiModelProperty(value = "属地辖区", required = false)
+    @Excel(name = "属地辖区")
+    @NotBlank(message = "属地辖区不能为空")
+    private String territoriality;
+
+    /**
+     * 所属开发区
+     */
+    @ApiModelProperty(value = "所属开发区", required = false)
+   // @Excel(name = "所属开发区",dictType = "centerdata_park")
+    private String park;
+
+
+
+    @Excel(name = "所属开发区")
+    private String parkLabel;
+
+    /**
+     * 开发区中心点经度
+     */
+    @ApiModelProperty(value = "开发区中心点经度", required = false)
+    @Excel(name = "开发区中心点经度")
+    private String parkLongitude;
+
+    /**
+     * 开发区中心点纬度
+     */
+    @ApiModelProperty(value = "开发区中心点纬度", required = false)
+    @Excel(name = "开发区中心点纬度")
+    private String parkLatitude;
+
+    /**
+     * 项目名称
+     */
+    @ApiModelProperty(value = "项目名称", required = false)
+    @Excel(name = "项目名称")
+    @NotBlank(message = "项目名称不能为空")
+    private String projectName;
+
+    /**
+     * 项目环境
+     */
+    @ApiModelProperty(value = "项目环境", required = false)
+    @Excel(name = "项目环境",dictType = "centerdata_environment")
+    private String environment;
+
+    /**
+     * 法人单位
+     */
+    @ApiModelProperty(value = "法人单位", required = false)
+    @Excel(name = "法人单位")
+    private String legalUnit;
+
+    /**
+     * 工程目标
+     */
+    @ApiModelProperty(value = "工程目标", required = false)
+//    @Excel(name = "工程目标")
+//    @NotBlank(message = "工程目标不能为空")
+    private String projectTarget;
+
+    /**
+     * 工程类型
+     */
+    @ApiModelProperty(value = "工程类型", required = false)
+//    @Excel(name = "工程类型")
+    private String projectType;
+
+    /**
+     * 工程属地
+     */
+    @ApiModelProperty(value = "工程属地", required = false)
+//    @Excel(name = "工程属地" , dictType = "forest_lin_level")
+//    @NotBlank(message = "工程属地不能为空")
+    private String projectLevel;
+
+    /**
+     * 建设单位
+     */
+    @ApiModelProperty(value = "建设单位", required = false)
+//    @Excel(name = "建设单位")
+    private String constructionUnit;
+
+    /**
+     * 负责人
+     */
+    @ApiModelProperty(value = "负责人", required = false)
+    @Excel(name = "负责人")
+    @NotBlank(message = "负责人不能为空")
+    private String principal;
+
+    /**
+     * 联系电话
+     */
+    @ApiModelProperty(value = "联系电话", required = false)
+    @Excel(name = "联系电话")
+    @NotBlank(message = "联系电话不能为空")
+    private String phone;
+
+    /**
+     * 开复工时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM")
+    @JsonFormat(pattern = "yyyy-MM")
+    @Excel(name = "开复工时间",dateFormat = "yyyy-MM")
+    private String startTime;
+
+    /**
+     * 计划竣工时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM")
+    @JsonFormat(pattern = "yyyy-MM")
+    @Excel(name = "计划竣工时间",dateFormat = "yyyy-MM")
+    private String endTime;
+
+    /**
+     * 建设地点
+     */
+    @ApiModelProperty(value = "建设地点", required = false)
+    @Excel(name = "建设地点")
+    @NotBlank(message = "建设地点不能为空")
+    private String constructionSite;
+
+    /**
+     * 在建性质
+     */
+    @ApiModelProperty(value = "在建性质", required = false)
+    @Excel(name = "在建性质",dictType = "centerdata_zj_nature")
+    @NotBlank(message = "在建性质不能为空")
+    private String nature;
+
+    /**
+     * 总投资
+     */
+    @ApiModelProperty(value = "总投资", required = false)
+    @Excel(name = "总投资(万元)")
+    private String totalInvest;
+
+    /**
+     * 年度计划投资
+     */
+    @ApiModelProperty(value = "年度计划投资", required = false)
+    @Excel(name = "年度计划投资(万元)")
+    private String yearInvest;
+
+    /**
+     * 产业类别
+     */
+    @ApiModelProperty(value = "产业类别", required = false)
+    @Excel(name = "产业类别",dictType = "centerdata_industry_type")
+    private String industryType;
+
+    /**
+     * 项目秘书
+     */
+    @ApiModelProperty(value = "项目秘书", required = false)
+    @Excel(name = "项目秘书")
+    private String secretary;
+
+    /**
+     * 项目秘书职务
+     */
+    @ApiModelProperty(value = "项目秘书职务", required = false)
+    @Excel(name = "项目秘书职务")
+    private String secretaryDuties;
+
+    /**
+     * 项目秘书手机
+     */
+    @ApiModelProperty(value = "项目秘书手机", required = false)
+    @Excel(name = "项目秘书手机")
+    private String secretaryPhone;
+
+    /**
+     * 建筑面积
+     */
+    @ApiModelProperty(value = "建筑面积", required = false)
+//    @Excel(name = "建筑面积")
+    private String constructionArea;
+
+    /**
+     * 经度
+     */
+    @ApiModelProperty(value = "经度", required = false)
+    @Excel(name = "经度")
+    @NotBlank(message = "经度不能为空")
+    private String longitude;
+
+    /**
+     * 纬度
+     */
+    @ApiModelProperty(value = "纬度", required = false)
+    @Excel(name = "纬度")
+    @NotBlank(message = "纬度不能为空")
+    private String latitude;
+
+    /**
+     * 所属分类
+     */
+    @ApiModelProperty(value = "所属分类", required = false)
+//    @Excel(name = "所属分类" , dictType = "camera_system")
+//    @NotBlank(message = "所属分类不能为空")
+    private String cameraSystem;
+
+    /**
+     * 显示排序
+     */
+    private Long orderNum;
+
+    /**
+     * 工程简介
+     */
+    @ApiModelProperty(value = "建设内容", required = false)
+    @Excel(name = "建设内容")
+    @NotBlank(message = "建设内容不能为空")
+    private String introduction;
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    /**
+     * 所属部门id
+     */
+    private Long deptId;
+
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门", required = false)
+    @Excel(name = "所属部门")
+//    @NotBlank(message = "所属部门不能为空")
+    private String deptName;
+
+    /**
+     * 图片地址
+     */
+    @ApiModelProperty(value = "附件", required = false)
+    private String photoId;
+
+    @ApiModelProperty(value = "续建项目去年底前累计投资(万元)", required = false)
+    @Excel(name = "续建项目去年底前累计投资(万元)")
+    private String continuationProjectInvest;
+
+    @DateTimeFormat(pattern = "yyyy-MM")
+    @JsonFormat(pattern = "yyyy-MM")
+    @ApiModelProperty(value = "续建项目首次开工时间", required = false)
+    @Excel(name = "续建项目首次开工时间")
+    private String continuationProjectStartTime;
+
+    @ApiModelProperty(value = "是否入统计库", required = false)
+    @Excel(name = "是否入统计库")
+    private String joinStatisticalBank;
+
+    @ApiModelProperty(value = "是否入统", required = false)
+    @Excel(name = "是否入统")
+    private String joinStatistical;
+
+    @ApiModelProperty(value = "1-N月入统投资", required = false)
+    @Excel(name = "1-N月入统投资")
+    private String joinStatisticalInvest;
+
+    @ApiModelProperty(value = "今年实际累计完成投资", required = false)
+    @Excel(name = "今年实际累计完成投资")
+    private String thisYearCumulativeInvestment;
+
+    @DateTimeFormat(pattern = "yyyy-MM")
+    @JsonFormat(pattern = "yyyy-MM")
+    @ApiModelProperty(value = "实际竣工时间", required = false)
+    @Excel(name = "实际竣工时间")
+    private String realityCompletedTime;
+
+    @ApiModelProperty(value = "是否春季集中开复工项目", required = false)
+    @Excel(name = "是否春季集中开复工项目")
+    private String springStartProject;
+
+    @ApiModelProperty(value = "报文", required = false)
+    private String message;
+
+    @ApiModelProperty(value = "项目id", required = false)
+    @NotBlank(message = "项目id不能为空")
+    private String projectId;
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String getJoinStatisticalBank() {
+        return joinStatisticalBank;
+    }
+
+    public void setJoinStatisticalBank(String joinStatisticalBank) {
+        this.joinStatisticalBank = joinStatisticalBank;
+    }
+
+    public String getJoinStatistical() {
+        return joinStatistical;
+    }
+
+    public void setJoinStatistical(String joinStatistical) {
+        this.joinStatistical = joinStatistical;
+    }
+
+    public String getJoinStatisticalInvest() {
+        return joinStatisticalInvest;
+    }
+
+    public void setJoinStatisticalInvest(String joinStatisticalInvest) {
+        this.joinStatisticalInvest = joinStatisticalInvest;
+    }
+
+    public String getThisYearCumulativeInvestment() {
+        return thisYearCumulativeInvestment;
+    }
+
+    public void setThisYearCumulativeInvestment(String thisYearCumulativeInvestment) {
+        this.thisYearCumulativeInvestment = thisYearCumulativeInvestment;
+    }
+
+    public String getSpringStartProject() {
+        return springStartProject;
+    }
+
+    public void setSpringStartProject(String springStartProject) {
+        this.springStartProject = springStartProject;
+    }
+
+    public String getContinuationProjectInvest() {
+        return continuationProjectInvest;
+    }
+
+    public void setContinuationProjectInvest(String continuationProjectInvest) {
+        this.continuationProjectInvest = continuationProjectInvest;
+    }
+
+    public String getContinuationProjectStartTime() {
+        return continuationProjectStartTime;
+    }
+
+    public void setContinuationProjectStartTime(String continuationProjectStartTime) {
+        this.continuationProjectStartTime = continuationProjectStartTime;
+    }
+
+    public String getRealityCompletedTime() {
+        return realityCompletedTime;
+    }
+
+    public void setRealityCompletedTime(String realityCompletedTime) {
+        this.realityCompletedTime = realityCompletedTime;
+    }
+
+    public String getTerritoriality() {
+        return territoriality;
+    }
+
+    public void setTerritoriality(String territoriality) {
+        this.territoriality = territoriality;
+    }
+
+    public String getPark() {
+        return park;
+    }
+
+    public void setPark(String park) {
+        this.park = park;
+    }
+
+    public String getParkLongitude() {
+        return parkLongitude;
+    }
+
+    public void setParkLongitude(String parkLongitude) {
+        this.parkLongitude = parkLongitude;
+    }
+
+    public String getParkLatitude() {
+        return parkLatitude;
+    }
+
+    public void setParkLatitude(String parkLatitude) {
+        this.parkLatitude = parkLatitude;
+    }
+
+    public String getEnvironment() {
+        return environment;
+    }
+
+    public void setEnvironment(String environment) {
+        this.environment = environment;
+    }
+
+    public String getLegalUnit() {
+        return legalUnit;
+    }
+
+    public void setLegalUnit(String legalUnit) {
+        this.legalUnit = legalUnit;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getNature() {
+        return nature;
+    }
+
+    public void setNature(String nature) {
+        this.nature = nature;
+    }
+
+    public String getTotalInvest() {
+        return totalInvest;
+    }
+
+    public void setTotalInvest(String totalInvest) {
+        this.totalInvest = totalInvest;
+    }
+
+    public String getYearInvest() {
+        return yearInvest;
+    }
+
+    public void setYearInvest(String yearInvest) {
+        this.yearInvest = yearInvest;
+    }
+
+    public String getIndustryType() {
+        return industryType;
+    }
+
+    public void setIndustryType(String industryType) {
+        this.industryType = industryType;
+    }
+
+    public String getSecretary() {
+        return secretary;
+    }
+
+    public void setSecretary(String secretary) {
+        this.secretary = secretary;
+    }
+
+    public String getSecretaryDuties() {
+        return secretaryDuties;
+    }
+
+    public void setSecretaryDuties(String secretaryDuties) {
+        this.secretaryDuties = secretaryDuties;
+    }
+
+    public String getSecretaryPhone() {
+        return secretaryPhone;
+    }
+
+    public void setSecretaryPhone(String secretaryPhone) {
+        this.secretaryPhone = secretaryPhone;
+    }
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    private List<String> deviceList;
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectTarget(String projectTarget) {
+        this.projectTarget = projectTarget;
+    }
+
+    public String getProjectTarget() {
+        return projectTarget;
+    }
+
+    public void setProjectType(String projectType) {
+        this.projectType = projectType;
+    }
+
+    public String getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectLevel(String projectLevel) {
+        this.projectLevel = projectLevel;
+    }
+
+    public String getProjectLevel() {
+        return projectLevel;
+    }
+
+    public void setConstructionUnit(String constructionUnit) {
+        this.constructionUnit = constructionUnit;
+    }
+
+    public String getConstructionUnit() {
+        return constructionUnit;
+    }
+
+    public void setPrincipal(String principal) {
+        this.principal = principal;
+    }
+
+    public String getPrincipal() {
+        return principal;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhotoId(String photoId) {
+        this.photoId = photoId;
+    }
+
+    public String getPhotoId() {
+        return photoId;
+    }
+
+    public void setConstructionSite(String constructionSite) {
+        this.constructionSite = constructionSite;
+    }
+
+    public String getConstructionSite() {
+        return constructionSite;
+    }
+
+    public void setConstructionArea(String constructionArea) {
+        this.constructionArea = constructionArea;
+    }
+
+    public String getConstructionArea() {
+        return constructionArea;
+    }
+
+    public void setLongitude(String longitude) {
+        this.longitude = longitude;
+    }
+
+    public String getLongitude() {
+        return longitude;
+    }
+
+    public void setLatitude(String latitude) {
+        this.latitude = latitude;
+    }
+
+    public String getLatitude() {
+        return latitude;
+    }
+
+    public void setCameraSystem(String cameraSystem) {
+        this.cameraSystem = cameraSystem;
+    }
+
+    public String getCameraSystem() {
+        return cameraSystem;
+    }
+
+    public Long getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(Long orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    public void setIntroduction(String introduction) {
+        this.introduction = introduction;
+    }
+
+    public String getIntroduction() {
+        return introduction;
+    }
+
+    public List<String> getDeviceList() {
+        return deviceList;
+    }
+
+    public void setDeviceList(List<String> deviceList) {
+        this.deviceList = deviceList;
+    }
+
+    public String getParkLabel() {
+        return parkLabel;
+    }
+
+    public void setParkLabel(String parkLabel) {
+        this.parkLabel = parkLabel;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("projectName", getProjectName())
+                .append("projectTarget", getProjectTarget())
+                .append("projectType", getProjectType())
+                .append("projectLevel", getProjectLevel())
+                .append("constructionUnit", getConstructionUnit())
+                .append("principal", getPrincipal())
+                .append("phone", getPhone())
+                .append("constructionSite", getConstructionSite())
+                .append("constructionArea", getConstructionArea())
+                .append("longitude", getLongitude())
+                .append("latitude", getLatitude())
+                .append("cameraSystem", getCameraSystem())
+                .append("deptId", getDeptId())
+                .append("deptName", getDeptName())
+                .append("introduction", getIntroduction())
+                .append("photoId", getPhotoId())
+                .toString();
+    }
+}

+ 24 - 0
src/main/java/com/sooka/sponest/data/generalbusiness/mapper/CenterdataTKeyProjectsMapper.java

@@ -51,4 +51,28 @@ public interface CenterdataTKeyProjectsMapper {
      * @return 结果
      */
     int deleteCenterdataTKeyProjectsByIds(String[] ids);
+
+    /*
+    * 按重点工程id查询最新一条进度图
+    *
+    * @author 韩福成
+    * @date 2024/1/18 15:23
+    */
+    String getSelectScheduleById(String id);
+
+    /*
+    * 查询项目id集合
+    *
+    * @author 韩福成
+    * @date 2024/4/2 9:56
+    */
+    List<String> getProjectId();
+
+    /*
+    * 按项目id修改重点工程
+    *
+    * @author 韩福成
+    * @date 2024/4/2 10:06
+    */
+    int updateByProjectId(CenterdataTKeyProjects centerdataTKeyProjects);
 }

+ 18 - 0
src/main/java/com/sooka/sponest/data/generalbusiness/service/ICenterdataTKeyProjectsService.java

@@ -1,5 +1,7 @@
 package com.sooka.sponest.data.generalbusiness.service;
 
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.system.api.domain.SysUser;
 import com.sooka.sponest.data.generalbusiness.domain.CenterdataTKeyProjects;
 
 import java.util.List;
@@ -51,4 +53,20 @@ public interface ICenterdataTKeyProjectsService {
      * @return 结果
      */
     int deleteCenterdataTKeyProjectsByIds(String[] ids);
+
+    /*
+    * 接收报文
+    *
+    * @author 韩福成
+    * @date 2024/1/18 14:45
+    */
+    int receivedMessage(List<CenterdataTKeyProjects> centerdataTKeyProjects);
+
+    /*
+    * 推送报文
+    *
+    * @author 韩福成
+    * @date 2024/1/18 15:19
+    */
+    R pushMessage(String[] ids);
 }

+ 2 - 2
src/main/java/com/sooka/sponest/data/generalbusiness/service/impl/CenterdataTForestImportareaServiceImpl.java

@@ -84,7 +84,7 @@ public class CenterdataTForestImportareaServiceImpl extends BaseServiceImpl impl
                 CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
                 camera.setId(IdUtils.fastSimpleUUID());
                 camera.setCameraId(item);
-                camera.setType("1");
+                camera.setType("forest_importarea");
                 camera.setBusinessId(centerdataTForestImportarea.getId());
                 centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
             });
@@ -109,7 +109,7 @@ public class CenterdataTForestImportareaServiceImpl extends BaseServiceImpl impl
                 CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
                 camera.setId(IdUtils.fastSimpleUUID());
                 camera.setCameraId(item);
-                camera.setType("1");
+                camera.setType("forest_importarea");
                 camera.setBusinessId(centerdataTForestImportarea.getId());
                 centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
             });

+ 76 - 2
src/main/java/com/sooka/sponest/data/generalbusiness/service/impl/CenterdataTKeyProjectsServiceImpl.java

@@ -1,20 +1,29 @@
 package com.sooka.sponest.data.generalbusiness.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
+import com.ruoyi.common.security.service.TokenService;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.domain.SysUser;
 import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.generalbusiness.domain.CenterdataTKeyProjects;
 import com.sooka.sponest.data.generalbusiness.mapper.CenterdataTKeyProjectsMapper;
 import com.sooka.sponest.data.generalbusiness.service.ICenterdataTKeyProjectsService;
 import com.sooka.sponest.data.system.equipment.domain.CenterdataTEquipmentCamera;
 import com.sooka.sponest.data.system.equipment.service.ICenterdataTEquipmentCameraService;
+import com.sooka.sponest.exchange.api.RemoteExchangeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 重点工程Service业务层处理
@@ -74,7 +83,7 @@ public class CenterdataTKeyProjectsServiceImpl extends BaseServiceImpl implement
                 CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
                 camera.setId(IdUtils.fastSimpleUUID());
                 camera.setCameraId(item);
-                camera.setType("0");
+                camera.setType("key_projects");
                 camera.setBusinessId(centerdataTKeyProjects.getId());
                 centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
             });
@@ -99,7 +108,7 @@ public class CenterdataTKeyProjectsServiceImpl extends BaseServiceImpl implement
                 CenterdataTEquipmentCamera camera = new CenterdataTEquipmentCamera();
                 camera.setId(IdUtils.fastSimpleUUID());
                 camera.setCameraId(item);
-                camera.setType("0");
+                camera.setType("key_projects");
                 camera.setBusinessId(centerdataTKeyProjects.getId());
                 centerdataTEquipmentCameraService.insertCenterdataTEquipmentCamera(camera);
             });
@@ -120,4 +129,69 @@ public class CenterdataTKeyProjectsServiceImpl extends BaseServiceImpl implement
         }
         return centerdataTKeyProjectsMapper.deleteCenterdataTKeyProjectsByIds(ids);
     }
+
+    /*
+    * 接收报文
+    *
+    * @author 韩福成
+    * @date 2024/1/18 14:45
+    */@Override
+    public int receivedMessage(List<CenterdataTKeyProjects> centerdataTKeyProjects) {
+        logger.info("token=========================="+ SecurityUtils.getToken());
+        List<String> project = centerdataTKeyProjectsMapper.getProjectId();
+        int i = 0;
+//        LoginUser user = tokenService.getLoginUser(SecurityUtils.getToken());
+        logger.info("user=========================="+ SecurityUtils.getLoginUser());
+        for (CenterdataTKeyProjects projects : centerdataTKeyProjects){
+            projects.setMessage(JSON.toJSONString(projects));
+            if (project.contains(projects.getProjectId())){
+                //需求要求建设地点为空不修改
+                boolean matches = projects.getConstructionSite().matches("\\s+");
+                if (matches){
+                    projects.setConstructionSite(null);
+                }
+                projects.setUpdateBy(SecurityUtils.getUserId());
+                projects.setUpdateTime(DateUtils.getNowDate());
+                projects.setUpdateName( SecurityUtils.getLoginUser().getSysUser().getNickName());
+                i = centerdataTKeyProjectsMapper.updateByProjectId(projects);
+            }else {
+                projects.setId(IdUtils.fastUUID());
+                projects.setDeptId(SecurityUtils.getLoginUser().getSysUser().getDeptId());
+                projects.setDeptName(SecurityUtils.getLoginUser().getSysUser().getDeptNames());
+                projects.setCreateBy(SecurityUtils.getUserId().toString());
+                projects.setCreateName( SecurityUtils.getLoginUser().getSysUser().getNickName());
+                projects.setCreateTime(DateUtils.getNowDate());
+                i = centerdataTKeyProjectsMapper.insertCenterdataTKeyProjects(projects);
+            }
+        }
+        return i;
+    }
+
+    /*
+    * 推送报文
+    *
+    * @author 韩福成
+    * @date 2024/1/18 15:19
+    */
+    @Override
+    public R pushMessage(String[] ids) {
+        List<Map<String,Object>> list = new ArrayList<>();
+        for (String id : ids) {
+            Map<String,Object> map = new HashMap<>();
+            CenterdataTKeyProjects centerdataTKeyProjects = centerdataTKeyProjectsMapper.selectCenterdataTKeyProjectsById(id);
+            String schedulePictures = centerdataTKeyProjectsMapper.getSelectScheduleById(id);
+            List<String> schedule = new ArrayList<>();
+            if (schedulePictures!=null){
+                String[] schedules = schedulePictures.split(",");
+                for (String pictures : schedules){
+                    String picture = pictures.substring(pictures.indexOf("group1"));
+                    schedule.add(picture);
+                }
+            }
+            map.put("schedulePictures", schedule);
+            map.put("projectId",centerdataTKeyProjects.getProjectId());
+            list.add(map);
+        }
+        return SpringUtils.getBean(RemoteExchangeService.class).pushMessage(list);
+    }
 }

+ 49 - 5
src/main/java/com/sooka/sponest/data/system/attach/controller/CenterdataTAttachController.java

@@ -2,8 +2,15 @@ package com.sooka.sponest.data.system.attach.controller;
 
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.SpringUtils;
+import com.ruoyi.common.core.utils.file.FilePrefixUtils;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.redis.service.RedisService;
+import com.ruoyi.system.api.RemoteConfigService;
+import com.ruoyi.system.api.RemoteFileService;
+import com.ruoyi.system.api.domain.SysFile;
 import com.sooka.sponest.data.system.attach.domain.CenterdataTAttach;
 import com.sooka.sponest.data.system.attach.mapper.CenterdataTAttachMapper;
 import com.sooka.sponest.data.system.attach.service.ICenterdataTAttachService;
@@ -11,10 +18,13 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.collections4.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 import springfox.documentation.annotations.ApiIgnore;
 
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
@@ -35,6 +45,16 @@ public class CenterdataTAttachController extends BaseController {
     @Autowired
     private CenterdataTAttachMapper centerdataTAttachMapper;
 
+    @Autowired
+    private RedisService redisService;
+
+    // 文件前缀
+    public static final String FILE_PREFIX_LOCAL = "fileUrl";
+    public static final String FILE_PREFIX_HIK1 = "HIK_1";
+    public static final String FILE_PREFIX_HIK2 = "HIK_2";
+    public static final String FILE_PREFIX_DH1 = "DH_1";
+    public static final String FILE_PREFIX_DH2 = "DH_2";
+
     /**
      * 数据中心远端调用附件表查询列表
      * 手机模块远程调用 应急作废
@@ -92,11 +112,6 @@ public class CenterdataTAttachController extends BaseController {
         centerdataTAttachService.updateEventAttach(paramMap);
     }
 
-    @PostMapping("/updateEventAttacHandle")
-    public void updateEventAttacHandle(@RequestBody CenterdataTAttach centerdataTAttach) {
-        centerdataTAttachService.updateEventAttach(centerdataTAttach);
-    }
-
     /**
      * 数字林业 远端调用
      * 数字环保 远端调用
@@ -135,4 +150,33 @@ public class CenterdataTAttachController extends BaseController {
         centerdataTAttachService.deleteCenterdataTAttachByBusId(attaches.get(0).getBusId());
         return R.ok(centerdataTAttachService.insertListCenterdataTAttach(attaches));
     }
+
+    //每周的周日晚上8点开始运行
+//    @Scheduled(cron = "0 0 20 ? * 1")
+    @GetMapping("/urlToMultipartFile")
+    public void urlToMultipartFile() {
+        Map<String, String> paramMap = SpringUtils.getBean(RemoteConfigService.class).remotegetConfigMap(Arrays.asList(FILE_PREFIX_LOCAL, FILE_PREFIX_HIK1, FILE_PREFIX_HIK2, FILE_PREFIX_DH1, FILE_PREFIX_DH2)).getData();
+        List<Map<String, Object>> attaches = centerdataTAttachService.selectFailUpattah();
+        for (Map<String, Object> item : attaches) {
+            paramMap.put("token", redisService.getCacheObject("DH_TOKEN"));// 大华token
+            String url = "";
+            if ("DH_1".equals(item.get("BusSource"))) {
+                url = FilePrefixUtils.getUrlPrefix(item.get("BusSource").toString(), paramMap) + item.get("url") + "?token=" + MapUtils.getString(paramMap, "token");
+            } else {
+                url = FilePrefixUtils.getUrlPrefix(item.get("BusSource").toString(), paramMap) + item.get("url");
+            }
+            MultipartFile multipartFile = FilePrefixUtils.urlToMultipartFile(url, System.currentTimeMillis() + ".jpg");
+            if (null != multipartFile) {
+                SysFile sysFile = SpringUtils.getBean(RemoteFileService.class).upload(multipartFile).getData();
+                try {
+                    Thread.sleep(30000);
+                } catch (InterruptedException e) {
+                    logger.error(e.getMessage());
+                    Thread.currentThread().interrupt();
+                }
+                centerdataTAttachService.updateEventAttachSchedule(item, sysFile);
+            }
+        }
+        logger.info(DateUtils.getDate() + "处理异常数据:" + attaches.size());
+    }
 }

+ 0 - 2
src/main/java/com/sooka/sponest/data/system/attach/service/ICenterdataTAttachService.java

@@ -58,8 +58,6 @@ public interface ICenterdataTAttachService {
 
     void updateEventAttach(Map<String, String> paramMap);
 
-    void updateEventAttach(CenterdataTAttach centerdataTAttach);
-
     //新增附件List
     int insertListCenterdataTAttach(List<CenterdataTAttach> list);
 

+ 0 - 5
src/main/java/com/sooka/sponest/data/system/attach/service/impl/CenterdataTAttachServiceImpl.java

@@ -149,11 +149,6 @@ public class CenterdataTAttachServiceImpl extends BaseServiceImpl implements ICe
     }
 
     @Override
-    public void updateEventAttach(CenterdataTAttach centerdataTAttach) {
-        centerdataTAttachMapper.updateEventAttach(centerdataTAttach);
-    }
-
-    @Override
     public int insertListCenterdataTAttach(List<CenterdataTAttach> list) {
         return centerdataTAttachMapper.insertListCenterdataTAttach(list);
     }

+ 10 - 30
src/main/java/com/sooka/sponest/data/utils/ScheduleAtachUtil.java

@@ -1,5 +1,6 @@
 package com.sooka.sponest.data.utils;
 
+import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.file.FilePrefixUtils;
 import com.ruoyi.common.redis.service.RedisService;
@@ -11,23 +12,19 @@ import org.apache.commons.collections4.MapUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.io.File;
-import java.net.HttpURLConnection;
-import java.net.URL;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
-@Configuration
-@EnableScheduling
-//@RestController
-//@RequestMapping("/testattach")
+//@Configuration
+//@EnableScheduling
+@RestController
+@RequestMapping("/testattach")
 public class ScheduleAtachUtil {
 
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
@@ -58,38 +55,20 @@ public class ScheduleAtachUtil {
     }
 
     //每周的周日晚上8点开始运行
-    @Scheduled(cron = "0 0 20 ? * 1")
+//    @Scheduled(cron = "0 0 20 ? * 1")
     @GetMapping("/urlToMultipartFile")
     public void urlToMultipartFile() {
         Map<String, String> paramMap = SpringUtils.getBean(RemoteConfigService.class).remotegetConfigMap(Arrays.asList(FILE_PREFIX_LOCAL, FILE_PREFIX_HIK1, FILE_PREFIX_HIK2, FILE_PREFIX_DH1, FILE_PREFIX_DH2)).getData();
         List<Map<String, Object>> attaches = centerdataTAttachService.selectFailUpattah();
         for (Map<String, Object> item : attaches) {
             paramMap.put("token", redisService.getCacheObject("DH_TOKEN"));// 大华token
-            File file = null;
-            MultipartFile multipartFile = null;
             String url = "";
             if ("DH_1".equals(item.get("BusSource"))) {
                 url = FilePrefixUtils.getUrlPrefix(item.get("BusSource").toString(), paramMap) + item.get("url") + "?token=" + MapUtils.getString(paramMap, "token");
             } else {
                 url = FilePrefixUtils.getUrlPrefix(item.get("BusSource").toString(), paramMap) + item.get("url");
             }
-            HttpURLConnection httpUrl = null;
-            try {
-                httpUrl = (HttpURLConnection) new URL(url).openConnection();
-                // 设置连接超时时间为5秒
-                httpUrl.setConnectTimeout(5000);
-                // 设置读取超时时间为10秒
-                httpUrl.setReadTimeout(10000);
-                httpUrl.connect();
-                file = FilePrefixUtils.inputStreamToFile(httpUrl.getInputStream(), System.currentTimeMillis() + ".jpg");
-                multipartFile = FilePrefixUtils.fileToMultipartFile(file);
-            } catch (Exception e) {
-                logger.info(e.getMessage());
-            } finally {
-                if (null != httpUrl) {
-                    httpUrl.disconnect();
-                }
-            }
+            MultipartFile multipartFile = FilePrefixUtils.urlToMultipartFile(url, System.currentTimeMillis() + ".jpg");
             if (null != multipartFile) {
                 SysFile sysFile = SpringUtils.getBean(RemoteFileService.class).upload(multipartFile).getData();
                 try {
@@ -101,5 +80,6 @@ public class ScheduleAtachUtil {
                 centerdataTAttachService.updateEventAttachSchedule(item, sysFile);
             }
         }
+        logger.info(DateUtils.getDate() + "处理异常数据:" + attaches.size());
     }
 }

+ 19 - 4
src/main/resources/mapper/commandcenter/CommandCentreMapper.xml

@@ -123,6 +123,7 @@
         a.id projectId,
         a.longitude,
         a.latitude,
+        a.administrative_region administrativeRegion,
         project_name projectName,
         project_target projectTarget,
         project_type projectType,
@@ -153,11 +154,19 @@
         secretary_phone secretaryPhone,
         a.dept_id deptId,
         d.dept_name deptName,
+        continuation_project_invest continuationProjectInvest,
+        continuation_project_start_time continuationProjectStartTime,
+        CASE join_statistical_bank WHEN '1' THEN '是' when '0' then '否' END joinStatisticalBank,
+        CASE join_statistical WHEN '1' THEN '是' when '0' then '否' END joinStatistical,
+        join_statistical_invest joinStatisticalInvest,
+        thisyear_cumulative_investment thisYearCumulativeInvestment,
+        reality_completed_time realityCompletedTime,
+        CASE spring_start_project WHEN '1' THEN '是' when '0' then '否' END springStartProject,
         GROUP_CONCAT(c.camera_code) cameraCode
         FROM centerdata_t_key_projects a
         LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
         LEFT JOIN ${database_system}.sys_dept b ON b.dept_id = a.park
-        LEFT JOIN centerdata_t_equipment_camera c ON c.business_id = a.id
+        LEFT JOIN centerdata_t_equipment_camera c ON c.business_id = a.id AND `type` = 'key_projects'
         <where>
             <choose>
                 <when test="deptId != null and deptId != ''">and FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )</when>
@@ -166,17 +175,23 @@
             <if test="params.projectName != null and params.projectName != ''"><!--工程名称-->
                 AND project_name like concat('%', #{params.projectName}, '%')
             </if>
+            <if test="params.administrativeRegion != null and params.administrativeRegion != ''"><!--所属行政区-->
+                AND administrative_region = #{params.administrativeRegion}
+            </if>
             <if test="params.park != null and params.park != ''"><!--所属开发区(园区)-->
                 AND park = #{params.park}
             </if>
             <if test="params.territoriality != null and params.territoriality != ''"><!--属地辖区-->
-                AND territoriality = #{params.territoriality}
+                AND territoriality like concat('%', #{params.territoriality}, '%')
             </if>
             <if test="params.projectLevel != null and params.projectLevel != ''"><!--工程级别-->
                 AND project_level = #{params.projectLevel}
             </if>
             <if test="params.nature != null and params.nature != ''"><!--在建性质-->
-                AND nature in (${params.nature})
+                AND nature = #{params.nature}
+            </if>
+            <if test="params.startTime != null and params.startTime != ''"><!--开复工时间-->
+                AND DATE_FORMAT(start_time,'%Y-%m') = #{params.startTime}
             </if>
         </where>
         GROUP BY a.id
@@ -231,7 +246,7 @@
         cameraFactory,b.longitude,b.latitude,b.camera_radius cameraRadius
         FROM centerdata_t_equipment_camera a
         LEFT JOIN ${database_monitor}.centermonitor_t_camera b ON b.id = a.camera_id
-        where a.type = '1'
+        where a.type = 'forest_importarea'
         <if test="params.projectIds != null and params.projectIds.size > 0">
             AND a.business_id IN
             <foreach item="areaid" collection="params.areaIds" open="(" separator="," close=")">

+ 213 - 0
src/main/resources/mapper/digitalagriculture/CenterdataTFarmCollectiveFarmlandMapper.xml

@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sooka.sponest.data.digitalagriculture.mapper.CenterdataTFarmCollectiveFarmlandMapper">
+
+    <resultMap type="CenterdataTFarmCollectiveFarmland" id="CenterdataTFarmCollectiveFarmlandResult">
+        <result property="id"    column="id"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createName"    column="create_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateName"    column="update_name"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="longitude"    column="longitude"    />
+        <result property="latitude"    column="latitude"    />
+        <result property="name"    column="name"    />
+        <result property="type"    column="type"    />
+        <result property="collectiveFarmland"    column="collective_farmland"    />
+        <result property="homeContracting"    column="home_contracting"    />
+        <result property="otherCollectiveFarmland"    column="other_collective_farmland"    />
+        <result property="maneuverableLand"    column="maneuverable_land"    />
+        <result property="contractedLand"    column="contracted_land"    />
+        <result property="extinctionLand"    column="extinction_land"    />
+        <result property="onlyChildLand"    column="only_child_land"    />
+        <result property="returnableLand"    column="returnable_land"    />
+        <result property="reclaimLang"    column="reclaim_lang"    />
+        <result property="fourWastelandsLand"    column="four_wastelands_land"    />
+        <result property="schoolLand"    column="school_land"    />
+        <result property="villageSchoolLand"    column="village_school_land"    />
+        <result property="waterArea"    column="water_area"    />
+        <result property="forestArea"    column="forest_area"    />
+        <result property="remark"    column="remark"    />
+        <result property="dicallyLand"    column="dically_land"    />
+    </resultMap>
+
+    <sql id="selectCenterdataTFarmCollectiveFarmlandVo">
+        select a.id, a.dept_id, a.dept_name, a.create_by, a.create_name, a.create_time, a.update_by,a.update_name, a.update_time, a.longitude, a.latitude, a.name,
+        a.type, a.collective_farmland, a.home_contracting, a.other_collective_farmland, a.maneuverable_land,a.contracted_land,a.extinction_land,a.only_child_land,a.returnable_land,
+        a.reclaim_lang,a.four_wastelands_land,a.school_land,a.village_school_land,a.water_area,a.forest_area,a.remark, a.dically_land from centerdata_t_farm_collective_farmland a
+    </sql>
+
+    <select id="selectCenterdataTFarmCollectiveFarmlandList" parameterType="CenterdataTFarmCollectiveFarmland" resultMap="CenterdataTFarmCollectiveFarmlandResult">
+        <include refid="selectCenterdataTFarmCollectiveFarmlandVo"/>
+        left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
+        <where>
+            <if test="name != null  and name != ''"> and a.name like concat('%', #{name}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
+            ${params.dataScope}
+        </where>
+        order by a.create_time  desc
+    </select>
+
+    <select id="selectCenterdataTFarmCollectiveFarmlandById" parameterType="String" resultMap="CenterdataTFarmCollectiveFarmlandResult">
+        <include refid="selectCenterdataTFarmCollectiveFarmlandVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertCenterdataTFarmCollectiveFarmland" parameterType="CenterdataTFarmCollectiveFarmland">
+        insert into centerdata_t_farm_collective_farmland
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createName != null">create_name,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateName != null">update_name,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="longitude != null">longitude,</if>
+            <if test="latitude != null">latitude,</if>
+            <if test="name != null">name,</if>
+            <if test="type != null">type,</if>
+            <if test="collectiveFarmland != null">collective_farmland,</if>
+            <if test="homeContracting != null">home_contracting,</if>
+            <if test="otherCollectiveFarmland != null">other_collective_farmland,</if>
+            <if test="maneuverableLand != null">maneuverable_land,</if>
+            <if test="contractedLand != null">contracted_land,</if>
+            <if test="extinctionLand != null">extinction_land,</if>
+            <if test="onlyChildLand != null">only_child_land,</if>
+            <if test="returnableLand != null">returnable_land,</if>
+            <if test="reclaimLang != null">reclaim_lang,</if>
+            <if test="fourWastelandsLand != null">four_wastelands_land,</if>
+            <if test="schoolLand != null">school_land,</if>
+            <if test="villageSchoolLand != null">village_school_land,</if>
+            <if test="waterArea != null">water_area,</if>
+            <if test="forestArea != null">forest_area,</if>
+            <if test="remark != null">remark,</if>
+            <if test="dicallyLand != null">dically_land,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createName != null">#{createName},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateName != null">#{updateName},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="longitude != null">#{longitude},</if>
+            <if test="latitude != null">#{latitude},</if>
+            <if test="name != null">#{name},</if>
+            <if test="type != null">#{type},</if>
+            <if test="collectiveFarmland != null">#{collectiveFarmland},</if>
+            <if test="homeContracting != null">#{homeContracting},</if>
+            <if test="otherCollectiveFarmland != null">#{otherCollectiveFarmland},</if>
+            <if test="maneuverableLand != null">#{maneuverableLand},</if>
+            <if test="contractedLand != null">#{contractedLand},</if>
+            <if test="extinctionLand != null">#{extinctionLand},</if>
+            <if test="onlyChildLand != null">#{onlyChildLand},</if>
+            <if test="returnableLand != null">#{returnableLand},</if>
+            <if test="reclaimLang != null">#{reclaimLang},</if>
+            <if test="fourWastelandsLand != null">#{fourWastelandsLand},</if>
+            <if test="schoolLand != null">#{schoolLand},</if>
+            <if test="villageSchoolLand != null">#{villageSchoolLand},</if>
+            <if test="waterArea != null">#{waterArea},</if>
+            <if test="forestArea != null">#{forestArea},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="dicallyLand != null">#{dicallyLand},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCenterdataTFarmCollectiveFarmland" parameterType="CenterdataTFarmCollectiveFarmland">
+        update centerdata_t_farm_collective_farmland
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createName != null">create_name = #{createName},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateName != null">update_name = #{updateName},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="longitude != null">longitude = #{longitude},</if>
+            <if test="latitude != null">latitude = #{latitude},</if>
+            <if test="name != null">name = #{name},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="collectiveFarmland != null">collective_farmland = #{collectiveFarmland},</if>
+            <if test="homeContracting != null">home_contracting = #{homeContracting},</if>
+            <if test="otherCollectiveFarmland != null">other_collective_farmland = #{otherCollectiveFarmland},</if>
+            <if test="maneuverableLand != null">maneuverable_land = #{maneuverableLand},</if>
+            <if test="contractedLand != null">contracted_land = #{contractedLand},</if>
+            <if test="extinctionLand != null">extinction_land = #{extinctionLand},</if>
+            <if test="onlyChildLand != null">only_child_land = #{onlyChildLand},</if>
+            <if test="returnableLand != null">returnable_land = #{returnableLand},</if>
+            <if test="reclaimLang != null">reclaim_lang = #{reclaimLang},</if>
+            <if test="fourWastelandsLand != null">four_wastelands_land = #{fourWastelandsLand},</if>
+            <if test="schoolLand != null">school_land = #{schoolLand},</if>
+            <if test="villageSchoolLand != null">village_school_land = #{villageSchoolLand},</if>
+            <if test="waterArea != null">water_area = #{waterArea},</if>
+            <if test="forestArea != null">forest_area = #{forestArea},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="dicallyLand != null">dically_land = #{dicallyLand},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCenterdataTFarmCollectiveFarmlandById" parameterType="String">
+        delete from centerdata_t_farm_collective_farmland where id = #{id}
+    </delete>
+
+    <delete id="deleteCenterdataTFarmCollectiveFarmlandByIds" parameterType="String">
+        delete from centerdata_t_farm_collective_farmland where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="countFarmland" parameterType="CenterdataTFarmCollectiveFarmland" resultType="map">
+        select
+            fcf.dept_id deptId,
+            fcf.dept_name deptName,
+            d.ancestors ancestors,
+            fcf.type,
+            IFNULL(SUM(fcf.collective_farmland), 0) collectiveFarmland,
+            IFNULL(SUM(fcf.home_contracting), 0) homeContracting,
+            IFNULL(SUM(fcf.other_collective_farmland), 0) otherCollectiveFarmland,
+            IFNULL(SUM(fcf.maneuverable_land), 0) maneuverableLand,
+            IFNULL(SUM(fcf.contracted_land), 0) contractedLand,
+            IFNULL(SUM(fcf.extinction_land), 0) extinctionLand,
+            IFNULL(SUM(fcf.only_child_land), 0) onlyChildLand,
+            IFNULL(SUM(fcf.returnable_land), 0) returnableLand,
+            IFNULL(SUM(fcf.reclaim_lang), 0) reclaimLang,
+            IFNULL(SUM(fcf.four_wastelands_land), 0) fourWastelandsLand,
+            IFNULL(SUM(fcf.school_land), 0) schoolLand,
+            IFNULL(SUM(fcf.village_school_land), 0) villageSchoolLand,
+            IFNULL(SUM(fcf.water_area), 0) waterArea,
+            IFNULL(SUM(fcf.forest_area), 0) forestArea,
+            IFNULL(SUM(fcf.dically_land), 0) dicallyLand
+        FROM centerdata_t_farm_collective_farmland fcf
+        LEFT JOIN ${database_system}.sys_dept d ON fcf.dept_id = d.dept_id
+        <where>
+            <choose>
+                <when test="deptId != null and deptId != ''">
+                    and FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,",",d.dept_id) )
+                </when>
+                <otherwise>${params.dataScope}</otherwise>
+            </choose>
+        </where>
+        GROUP BY fcf.dept_id
+    </select>
+</mapper>

+ 44 - 10
src/main/resources/mapper/digitalforest/ForestViewMapper.xml

@@ -47,16 +47,25 @@
     </select>
 
     <select id="selectVisualRy" parameterType="ForestCloudMapVO" resultType="ForestCloudRYBO">
-        SELECT
-        a.dict_label as job ,a.dict_value as jobValue ,count(b.user_id) as number ,'' as jobType,a.dict_sort
-        FROM
-        ( SELECT dict_label, dict_value,dict_sort FROM ${database_system}.sys_dict_data WHERE dict_type = 'forest_lin_job' and
-        status='0'	) a
-        LEFT JOIN ( SELECT DISTINCT a.user_id,a.lin_job FROM  ${database_data}.centerdata_t_forest_linleader  a left join ${database_system}.sys_dept d on a.dept_id=d.dept_id where 1=1 ${params.dataScope}) b ON a.dict_value = b.lin_job
-        GROUP BY
-        a.dict_value
-        ORDER BY
-	    a.dict_sort
+        SELECT a.dict_label     as job,
+               a.dict_value     as jobValue,
+               count(b.user_id) as number,
+               ''               as jobType,
+               a.dict_sort
+        FROM (SELECT dict_label, dict_value, dict_sort
+              FROM ${database_system}.sys_dict_data
+              WHERE dict_type = 'forest_lin_job'
+                and status = '0') a
+                 LEFT JOIN (SELECT DISTINCT a.user_id, a.lin_job
+                            FROM ${database_data}.centerdata_t_forest_linleader a
+                                     left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
+                            <where>
+                            <if test="level != null  and level != ''">and a.lin_level = #{level}</if>
+                            ${params.dataScope}
+                            </where>
+                            ) b ON a.dict_value = b.lin_job
+        GROUP BY a.dict_value
+        ORDER BY a.dict_sort
     </select>
 
     <select id="selectZXRS" parameterType="ForestCloudMapVO" resultType="ForestCloudRyZxBO">
@@ -102,6 +111,9 @@
         <if test="name != null and name != ''">
             and a.lin_name like concat('%', #{name}, '%')
         </if>
+        <if test="level != null  and level != ''">
+            and a.lin_level = #{level}
+        </if>
         <choose>
             <when test="deptId != null  and deptId != ''">
                 and FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )
@@ -112,4 +124,26 @@
         </choose>
         order by a.num,a.create_time desc
     </select>
+
+    <select id="getNumByLevel" parameterType="ForestLeaderVO" resultType="map">
+        SELECT
+            a.dict_label name,
+            a.dict_value level,
+            IFNULL(b.num,0) num
+        FROM
+            ${database_system}.sys_dict_data a
+            LEFT JOIN (
+                SELECT
+                    a.lin_level,
+                    count( a.id ) num
+                FROM
+                    centerdata_t_forest_linleader a
+                        LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
+                where 1= 1 ${params.dataScope}
+                GROUP BY
+                    a.lin_level
+            ) b ON a.dict_value = b.lin_level
+        WHERE
+            a.dict_type = 'forest_lin_level'
+    </select>
 </mapper>

+ 1 - 1
src/main/resources/mapper/digitaltraffic/CenterdataTSupermapLevelMapper.xml

@@ -132,7 +132,7 @@
         LEFT JOIN ${database_monitor}.centermonitor_t_camera b ON b.id = eq.camera_id
         <where>
             <if test="mapData != null  and mapData != ''">and map_data = #{mapData}</if>
-            <if test="mapName != null  and mapName != ''">and map_name like concat('%', #{mapName}, '%')</if>
+            <if test="mapName != null  and mapName != ''">and map_name = #{mapName}</if>
         </where>
     </select>
 </mapper>

+ 51 - 15
src/main/resources/mapper/digitalwater/WaterConservancyViewMapper.xml

@@ -68,6 +68,7 @@
                 LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
             WHERE
                 a.type = #{leadType}
+        <if test="level != null  and level != ''">AND a.lin_level = #{level}</if>
         <choose>
             <when test="deptId != null and deptId != ''">and FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )</when>
             <otherwise>${params.dataScope}</otherwise>
@@ -118,6 +119,7 @@
                 a.type = #{leadType}
                 <if test="dictType != null  and dictType != ''">AND a.post = #{dictType}</if>
                 <if test="name != null  and name != ''">AND a.name like concat('%', #{name}, '%')</if>
+                <if test="level != null  and level != ''">AND a.lin_level = #{level}</if>
                 <choose>
                     <when test="deptId != null and deptId != ''">and FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )</when>
                     <otherwise>${params.dataScope}</otherwise>
@@ -130,25 +132,38 @@
 
     <select id="getTianList" parameterType="WaterConservancyViewBO" resultType="map">
         SELECT
-            GROUP_CONCAT( a.gridId ) gridId, `name`,  phone, id,sort,create_time createTime
+            t.id,
+            t.userId,
+            t.name,
+            t.phone,
+            t.gridId,
+            t.sort,
+            t.createTime,
+            REPLACE ( group_concat( dept_name ORDER BY find_in_set( d.dept_id, t.ancestors ) ), ',', '' ) deptName
         FROM(
             SELECT
                 DISTINCT a.user_id userId,
                 a.id,
-                a.`name`,
-                a.phone,
+                a.`name` AS name,
+                d.dept_name AS deptName,
+                a.phone AS phone,
+                a.post post,
+                a.grid_id gridId,
                 a.sort,
-                a.create_time,
-                a.grid_id gridId
-            FROM
-                centerdata_t_hydraulic_river_length a
-                LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
-            WHERE
-                a.type = #{leadType} ${params.dataScope}
-            ) a
-        GROUP BY
-            a.userId
-        order by a.sort asc,a.create_time desc
+                a.create_time createTime,
+                SUBSTR( CONCAT( d.ancestors, ',', a.dept_id ), 7 ) ancestors
+            FROM centerdata_t_hydraulic_river_length a
+            LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
+            <where>
+                <if test="leadType != null and leadType != ''">
+                    a.type = #{leadType}
+                </if>
+                ${params.dataScope}
+            </where>
+        ) t
+        LEFT JOIN ${database_system}.sys_dept d ON find_in_set( d.dept_id, t.ancestors )
+        GROUP BY t.name
+        order by t.sort, t.createTime desc
     </select>
 
     <select id="getGridList" parameterType="WaterConservancyViewBO" resultType="map">
@@ -194,4 +209,25 @@
         WHERE
             event_id = #{id} ORDER by flag
     </select>
-</mapper>
+
+    <select id="getNumByLevel" parameterType="WaterConservancyViewBO" resultType="map">
+        SELECT
+            a.dict_value level,
+            a.dict_label name,
+            IFNULL(b.num,0) num
+        FROM
+            ${database_system}.sys_dict_data a
+            LEFT JOIN (
+            SELECT
+                a.lin_level,
+                count( a.id ) num
+            FROM
+                centerdata_t_hydraulic_river_length a
+                    LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
+            where a.type = #{leadType}
+                ${params.dataScope}
+            GROUP BY a.lin_level
+            ) b ON a.dict_value = b.lin_level
+        WHERE a.dict_type = 'forest_lin_level'
+    </select>
+</mapper>

+ 127 - 4
src/main/resources/mapper/generalbusiness/CenterdataTKeyProjectsMapper.xml

@@ -46,12 +46,24 @@
         <result property="secretaryDuties" column="secretary_duties"/>
         <result property="secretaryPhone" column="secretary_phone"/>
         <result property="parkLabel" column="parkLabel"/>
+        <result property="continuationProjectInvest" column="continuation_project_invest"/>
+        <result property="continuationProjectStartTime" column="continuation_project_start_time"/>
+        <result property="joinStatisticalBank" column="join_statistical_bank"/>
+        <result property="joinStatistical" column="join_statistical"/>
+        <result property="joinStatisticalInvest" column="join_statistical_invest"/>
+        <result property="thisYearCumulativeInvestment" column="thisyear_cumulative_investment"/>
+        <result property="realityCompletedTime" column="reality_completed_time"/>
+        <result property="springStartProject" column="spring_start_project"/>
+        <result property="administrativeRegion" column="administrative_region"/>
+        <result property="projectId" column="project_id"/>
     </resultMap>
 
     <sql id="selectCenterdataTKeyProjectsVo">
         select id, project_name, project_target, project_type, project_level, construction_unit, principal, phone, construction_site, construction_area, longitude, latitude, camera_system, dept_id, dept_name, order_num, introduction,
         photo_id, create_time, create_by, create_name, update_time, update_by, update_name, territoriality, park, park_longitude, park_latitude, environment, legal_unit, start_time, end_time, nature, total_invest, year_invest, industry_type,
-        secretary, secretary_duties, secretary_phone from centerdata_t_key_projects
+        secretary, secretary_duties, secretary_phone,project_id,continuation_project_invest,continuation_project_start_time,join_statistical_bank,join_statistical,join_statistical_invest,thisyear_cumulative_investment,reality_completed_time,
+        spring_start_project,administrative_region
+        from centerdata_t_key_projects
     </sql>
 
     <select id="selectCenterdataTKeyProjectsList" parameterType="CenterdataTKeyProjects"
@@ -80,10 +92,18 @@
             <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="cameraSystem != null  and cameraSystem != ''">and camera_system = #{cameraSystem}</if>
-            <if test="deptId != null  and deptId != ''">and dept_id = #{deptId}</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="introduction != null  and introduction != ''">and introduction = #{introduction}</if>
-            <if test="territoriality != null  and territoriality != ''">and territoriality = #{territoriality}</if>
+            <if test="territoriality != null  and territoriality != ''">and territoriality like concat('%', #{territoriality},'%')</if>
             <if test="park != null  and park != ''">and park = #{park}</if>
+            <if test="startTime != null">and DATE_FORMAT(start_time,'%Y-%m')  = DATE_FORMAT( #{startTime}, '%Y-%m' )</if>
             ${params.dataScope}
         </where>
         order by a.order_num,a.create_time desc
@@ -136,6 +156,17 @@
             <if test="secretary != null">secretary,</if>
             <if test="secretaryDuties != null">secretary_duties,</if>
             <if test="secretaryPhone != null">secretary_phone,</if>
+            <if test="message != null">message,</if>
+            <if test="continuationProjectInvest != null">continuation_project_invest,</if>
+            <if test="continuationProjectStartTime != null">continuation_project_start_time,</if>
+            <if test="joinStatisticalBank != null">join_statistical_bank,</if>
+            <if test="joinStatistical != null">join_statistical,</if>
+            <if test="joinStatisticalInvest != null">join_statistical_invest,</if>
+            <if test="thisYearCumulativeInvestment != null">thisyear_cumulative_investment,</if>
+            <if test="realityCompletedTime != null">reality_completed_time,</if>
+            <if test="springStartProject != null">spring_start_project,</if>
+            <if test="administrativeRegion != null">administrative_region,</if>
+            <if test="projectId != null">project_id,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -177,6 +208,17 @@
             <if test="secretary != null">#{secretary},</if>
             <if test="secretaryDuties != null">#{secretaryDuties},</if>
             <if test="secretaryPhone != null">#{secretaryPhone},</if>
+            <if test="message != null">#{message},</if>
+            <if test="continuationProjectInvest != null">#{continuationProjectInvest},</if>
+            <if test="continuationProjectStartTime != null">#{continuationProjectStartTime},</if>
+            <if test="joinStatisticalBank != null">#{joinStatisticalBank},</if>
+            <if test="joinStatistical != null">#{joinStatistical},</if>
+            <if test="joinStatisticalInvest != null">#{joinStatisticalInvest},</if>
+            <if test="thisYearCumulativeInvestment != null">#{thisYearCumulativeInvestment},</if>
+            <if test="realityCompletedTime != null">#{realityCompletedTime},</if>
+            <if test="springStartProject != null">#{springStartProject},</if>
+            <if test="administrativeRegion != null">#{administrativeRegion},</if>
+            <if test="projectId != null">#{projectId},</if>
         </trim>
     </insert>
 
@@ -221,6 +263,16 @@
             <if test="secretary != null">secretary = #{secretary},</if>
             <if test="secretaryDuties != null">secretary_duties = #{secretaryDuties},</if>
             <if test="secretaryPhone != null">secretary_phone = #{secretaryPhone},</if>
+            <if test="message != null">message = #{message},</if>
+            <if test="continuationProjectInvest != null">continuation_project_invest = #{continuationProjectInvest},</if>
+            <if test="continuationProjectStartTime != null">continuation_project_start_time = #{continuationProjectStartTime},</if>
+            <if test="joinStatisticalBank != null">join_statistical_bank = #{joinStatisticalBank},</if>
+            <if test="joinStatistical != null">join_statistical = #{joinStatistical},</if>
+            <if test="joinStatisticalInvest != null">join_statistical_invest = #{joinStatisticalInvest},</if>
+            <if test="thisYearCumulativeInvestment != null">thisyear_cumulative_investment = #{thisYearCumulativeInvestment},</if>
+            <if test="realityCompletedTime != null">reality_completed_time = #{realityCompletedTime},</if>
+            <if test="springStartProject != null">spring_start_project = #{springStartProject},</if>
+            <if test="administrativeRegion != null">administrative_region = #{administrativeRegion},</if>
         </trim>
         where id = #{id}
     </update>
@@ -231,4 +283,75 @@
             #{id}
         </foreach>
     </delete>
-</mapper>
+
+    <select id="getSelectScheduleById" parameterType="String" resultType="java.lang.String">
+        SELECT
+            GROUP_CONCAT( a.schedule_pictures ) schedulePictures
+        FROM
+            centerdata_t_key_projects_schedule a
+        WHERE
+            a.key_projects_id = #{id}
+        GROUP BY
+            a.schedule_time
+        ORDER BY
+            a.schedule_time DESC
+            LIMIT 1
+    </select>
+
+    <select id="getProjectId" parameterType="String" resultType="java.lang.String">
+        SELECT project_id projectId from centerdata_t_key_projects
+    </select>
+
+    <update id="updateByProjectId" parameterType="CenterdataTKeyProjects">
+        update centerdata_t_key_projects
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="projectName != null">project_name = #{projectName},</if>
+            <if test="projectTarget != null">project_target = #{projectTarget},</if>
+            <if test="projectType != null">project_type = #{projectType},</if>
+            <if test="projectLevel != null">project_level = #{projectLevel},</if>
+            <if test="constructionUnit != null">construction_unit = #{constructionUnit},</if>
+            <if test="principal != null">principal = #{principal},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="constructionSite != null and constructionSite != ''">construction_site = #{constructionSite},</if>
+            <if test="constructionArea != null">construction_area = #{constructionArea},</if>
+            <if test="cameraSystem != null">camera_system = #{cameraSystem},</if>
+            <if test="deptId != null and deptId != ''">dept_id = #{deptId},</if>
+            <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
+            <if test="photoId != null">photo_id = #{photoId},</if>
+            <if test="orderNum != null">order_num = #{orderNum},</if>
+            <if test="introduction != null">introduction = #{introduction},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createName != null">create_name = #{createName},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateName != null">update_name = #{updateName},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="territoriality != null">territoriality = #{territoriality},</if>
+            <if test="park != null">park = #{park},</if>
+            <if test="parkLongitude != null">park_longitude = #{parkLongitude},</if>
+            <if test="parkLatitude != null">park_latitude = #{parkLatitude},</if>
+            <if test="environment != null">environment = #{environment},</if>
+            <if test="legalUnit != null">legal_unit = #{legalUnit},</if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="endTime != null">end_time = #{endTime},</if>
+            <if test="nature != null">nature = #{nature},</if>
+            <if test="totalInvest != null">total_invest = #{totalInvest},</if>
+            <if test="yearInvest != null">year_invest = #{yearInvest},</if>
+            <if test="industryType != null">industry_type = #{industryType},</if>
+            <if test="secretary != null">secretary = #{secretary},</if>
+            <if test="secretaryDuties != null">secretary_duties = #{secretaryDuties},</if>
+            <if test="secretaryPhone != null">secretary_phone = #{secretaryPhone},</if>
+            <if test="message != null">message = #{message},</if>
+            <if test="continuationProjectInvest != null">continuation_project_invest = #{continuationProjectInvest},</if>
+            <if test="continuationProjectStartTime != null">continuation_project_start_time = #{continuationProjectStartTime},</if>
+            <if test="joinStatisticalBank != null">join_statistical_bank = #{joinStatisticalBank},</if>
+            <if test="joinStatistical != null">join_statistical = #{joinStatistical},</if>
+            <if test="joinStatisticalInvest != null">join_statistical_invest = #{joinStatisticalInvest},</if>
+            <if test="thisYearCumulativeInvestment != null">thisyear_cumulative_investment = #{thisYearCumulativeInvestment},</if>
+            <if test="realityCompletedTime != null">reality_completed_time = #{realityCompletedTime},</if>
+            <if test="springStartProject != null">spring_start_project = #{springStartProject},</if>
+            <if test="administrativeRegion != null">administrative_region = #{administrativeRegion},</if>
+        </trim>
+        where project_id = #{projectId}
+    </update>
+</mapper>

+ 1 - 1
src/main/resources/mapper/index/IndexViewMapper.xml

@@ -212,7 +212,7 @@
         union all
         select '林长' name,'linzhang',count(distinct user_id)
         from centerdata_t_forest_linleader
-        where lin_job != 'forest_lin_jy'
+        where lin_job in ('forest_lin_zonglinzhang','forest_lin_fuzonglinzhang','forest_lin_linzhang','forest_lin_fulinzhang','forest_lin_wgz')
     </select>
 
     <select id="getAllData" resultType="map">