Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

86173 1 tahun lalu
induk
melakukan
32ec2dec11

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

TEMPAT SAMPAH
data-ui/public/favicon.ico


TEMPAT SAMPAH
data-ui/src/assets/logo.png


+ 282 - 80
data-ui/src/views/data/generalbusiness/keyProjects/index.vue

@@ -102,20 +102,20 @@
     <el-table v-loading="loading" :data="projectsList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="70" align="center"/>
       <el-table-column label="属地辖区" align="center" prop="territoriality"/>
-      <el-table-column label="所属开发区" align="center" prop="park">
+      <el-table-column label="所属开发区" align="center" prop="park" :show-overflow-tooltip="true">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.centerdata_park" :value="scope.row.park"/>
         </template>
       </el-table-column>
-      <el-table-column label="开发区中心点经度" align="center" prop="parkLongitude"/>
-      <el-table-column label="开发区中心点纬度" align="center" prop="parkLatitude"/>
-      <el-table-column label="项目名称" align="center" prop="projectName" width="150"/>
-      <el-table-column label="项目环境" align="center" prop="environment">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.centerdata_environment" :value="scope.row.environment"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="法人单位" align="center" prop="legalUnit"/>
+<!--      <el-table-column label="开发区中心点经度" align="center" prop="parkLongitude"/>-->
+<!--      <el-table-column label="开发区中心点纬度" align="center" prop="parkLatitude"/>-->
+      <el-table-column label="项目名称" align="center" prop="projectName" width="150" :show-overflow-tooltip="true"/>
+<!--      <el-table-column label="项目环境" align="center" prop="environment">-->
+<!--        <template slot-scope="scope">-->
+<!--          <dict-tag :options="dict.type.centerdata_environment" :value="scope.row.environment"/>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="法人单位" align="center" prop="legalUnit"/>-->
 <!--      <el-table-column label="工程目标" align="center" prop="projectTarget"/>-->
 <!--      <el-table-column label="工程属地" align="center" prop="projectLevel">-->
 <!--        <template slot-scope="scope">-->
@@ -128,59 +128,76 @@
       <el-table-column label="开复工时间" align="center" prop="startTime"/>
       <el-table-column label="计划竣工时间" align="center" prop="endTime"/>
 <!--      <el-table-column label="联系电话" align="center" prop="phone"/>-->
-      <el-table-column label="建设地点" align="center" prop="constructionSite"/>
-      <el-table-column label="在建性质" align="center" prop="nature">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.centerdata_zj_nature" :value="scope.row.nature"/>
-        </template>
-      </el-table-column>
+<!--      <el-table-column label="建设地点" align="center" prop="constructionSite"/>-->
+<!--      <el-table-column label="在建性质" align="center" prop="nature">-->
+<!--        <template slot-scope="scope">-->
+<!--          <dict-tag :options="dict.type.centerdata_zj_nature" :value="scope.row.nature"/>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
       <el-table-column label="总投资(万元)" align="center" prop="totalInvest" width="120"/>
       <el-table-column label="年度计划投资(万元)" align="center" prop="yearInvest" width="100"/>
-      <el-table-column label="产业类别" align="center" prop="industryType">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.centerdata_industry_type" :value="scope.row.industryType"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="项目秘书" align="center" prop="secretary"/>
-      <el-table-column label="项目秘书职务" align="center" prop="secretaryDuties"/>
-      <el-table-column label="项目秘书手机" align="center" prop="secretaryPhone"/>
+<!--      <el-table-column label="产业类别" align="center" prop="industryType">-->
+<!--        <template slot-scope="scope">-->
+<!--          <dict-tag :options="dict.type.centerdata_industry_type" :value="scope.row.industryType"/>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="项目秘书" align="center" prop="secretary"/>-->
+<!--      <el-table-column label="项目秘书职务" align="center" prop="secretaryDuties"/>-->
+<!--      <el-table-column label="项目秘书手机" align="center" prop="secretaryPhone"/>-->
 <!--      <el-table-column label="建筑面积" align="center" prop="constructionArea"/>
       <el-table-column label="所属分类" align="center" prop="cameraSystem">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.camera_system" :value="scope.row.cameraSystem"/>
         </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="deptName" />
+      <el-table-column label="创建人" align="center" prop="createName" :show-overflow-tooltip="true"/>
+      <el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
+      <el-table-column label="修改人" align="center" prop="updateName" :show-overflow-tooltip="true"/>
+      <el-table-column label="修改时间" align="center" prop="updateTime" :show-overflow-tooltip="true"/>
       <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="['forest:keyProjects:edit']"
-          >修改
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['forest:keyProjects:remove']"
-          >删除
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
+            icon="el-icon-info"
             @click="getScheduleHistory(scope.row)"
             v-hasPermi="['forest:keyProjects:edit']"
-          >进度
+          >详情
           </el-button>
+          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"
+                       v-hasPermi="['system:role:edit']">
+            <span class="el-dropdown-link">
+              <i class="el-icon-d-arrow-right el-icon--right"></i>更多
+            </span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="edit" icon="el-icon-edit"
+                                v-hasPermi="['forest:keyProjects:edit']">修改
+              </el-dropdown-item>
+              <el-dropdown-item command="remove" icon="el-icon-delete"
+                                v-hasPermi="['forest:keyProjects:remove']">删除
+              </el-dropdown-item>
+<!--              <el-dropdown-item command="details" icon="el-icon-info"-->
+<!--                                v-hasPermi="['forest:keyProjects:edit']">详情-->
+<!--              </el-dropdown-item>-->
+<!--              <el-button-->
+<!--                size="mini"-->
+<!--                type="text"-->
+<!--                icon="el-icon-edit"-->
+<!--                @click="handleUpdate(scope.row)"-->
+<!--                v-hasPermi="['forest:keyProjects:edit']"-->
+<!--              >修改-->
+<!--              </el-button>-->
+<!--              <el-button-->
+<!--                size="mini"-->
+<!--                type="text"-->
+<!--                icon="el-icon-delete"-->
+<!--                @click="handleDelete(scope.row)"-->
+<!--                v-hasPermi="['forest:keyProjects:remove']"-->
+<!--              >删除-->
+<!--              </el-button>-->
+            </el-dropdown-menu>
+          </el-dropdown>
         </template>
       </el-table-column>
     </el-table>
@@ -367,7 +384,7 @@
         </el-row>
         <el-row>
           <el-col :span="24">
-            <el-form-item label="附件" prop="photoId">
+            <el-form-item label="封面" prop="photoId">
               <ImageUpload ref="ImageUpload" :limit="1" :fileType="['png', 'jpg', 'jpeg']" :value="form.photoId"
                            @input="getUrl"></ImageUpload>
             </el-form-item>
@@ -411,38 +428,153 @@
     </el-dialog>
 
     <el-dialog :title="title" :visible.sync="scheduleHistory" width="900px" class="form-style">
-      <el-form ref="historyForm" :inline="true" :model="historyQueryParams" :rules="rules" label-width="80px">
-        <el-form-item label="起始时间" prop="startTime">
-          <el-date-picker clearable size="small"
-                          :disabled="!scheduleHistory"
-                          v-model="historyQueryParams.startTime"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          placeholder="选择起始时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="终止时间" prop="endTime">
-          <el-date-picker clearable size="small"
-                          :disabled="!scheduleHistory"
-                          v-model="historyQueryParams.endTime"
-                          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="handleHistoryQuery">搜索</el-button>
-          <el-button icon="el-icon-refresh" size="mini" @click="resetHistoryQuery">重置</el-button>
-        </el-form-item>
+      <!-- 修改内容回显开始 -->
+      <el-form ref="form" :model="form" :rules="rules" label-width="150px">
+        <ul class="xg_cont">
+            <li>
+              <h4 class="sjxtitle">项目名称</h4>
+              <span class="sjx_cont">{{form.projectName}}</span>
+            </li>
+            <li>
+              <h4 class="sjxtitle">项目环境</h4>
+              <span class="sjx_cont">
+                <dict-tag :options="dict.type.centerdata_environment" :value="form.environment"/>
+              </span>
+            </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">
+                <dict-tag :options="dict.type.centerdata_park" :value="form.park"/>
+              </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
+                :src="form.photoId" style="width:150px;height:150px;"
+                :preview-src-list="[form.photoId]">
+              </el-image>
+            </li>
+
+        </ul>
       </el-form>
+      <!-- 修改内容回显结束 -->
+<!--      <el-form ref="historyForm" :inline="true" :model="historyQueryParams" :rules="rules" label-width="80px">-->
+<!--        <el-form-item label="起始时间" prop="startTime">-->
+<!--          <el-date-picker clearable size="small"-->
+<!--                          :disabled="!scheduleHistory"-->
+<!--                          v-model="historyQueryParams.startTime"-->
+<!--                          type="date"-->
+<!--                          value-format="yyyy-MM-dd"-->
+<!--                          placeholder="选择起始时间">-->
+<!--          </el-date-picker>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="终止时间" prop="endTime">-->
+<!--          <el-date-picker clearable size="small"-->
+<!--                          :disabled="!scheduleHistory"-->
+<!--                          v-model="historyQueryParams.endTime"-->
+<!--                          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="handleHistoryQuery" :loading="loading1">搜索</el-button>-->
+<!--          <el-button icon="el-icon-refresh" size="mini" @click="resetHistoryQuery">重置</el-button>-->
+<!--        </el-form-item>-->
+<!--      </el-form>-->
       <b>{{ this.keyProjectsName }}</b><br><br>
-      <div class="block" style="height: 700px; overflow: auto;">
+      <div class="block" style="overflow: auto;">
         <el-timeline :reverse="!scheduleHistory">
           <el-timeline-item
             v-for="(activity, index) in activities"
             :key="index"
             :timestamp="activity.scheduleTime" placement="top">
-
             <div>
               <span>{{ activity.deptName }} -- {{ activity.createName }}</span>
               <el-button
@@ -460,13 +592,14 @@
             </div>
             <div v-if="activity.schedulePictures !== null">
               <template v-for="(imageUrl, imgIndex) in activity.schedulePictures.split(',')">
-                <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px">
+                <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px" :preview-src-list="[imageUrl]">
                 </el-image>
               </template>
             </div>
           </el-timeline-item>
         </el-timeline>
       </div>
+
     </el-dialog>
 
     <ISuperMap ref="ISuperMap" v-if="ISuperMapvisible" @send="send"/>
@@ -490,12 +623,13 @@ 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 TreeDept from "../../../../components/treeDept";
 
 
 export default {
   name: "Projects",
   dicts: ['project_type', "camera_system", 'centerdata_project_level','centerdata_zj_nature','centerdata_industry_type','centerdata_environment','centerdata_park'],
-  components: {deptselector, supermap, Treeselect, ISuperMap},
+  components: {TreeDept, deptselector, supermap, Treeselect, ISuperMap},
   data() {
     return {
       sign: 1,
@@ -505,6 +639,7 @@ export default {
       disabled:true,
       // 遮罩层
       loading: true,
+      loading1: false,
       // 选中数组
       ids: [],
       titleLongitude: '经纬度',
@@ -639,6 +774,7 @@ export default {
         ]
       },
       cameraList: [],
+      cameraNameList: [],
     };
   },
   created() {
@@ -649,6 +785,26 @@ export default {
     });
   },
   methods: {
+    handleClick() {
+      alert('button click');
+    },
+    // 更多操作触发
+    handleCommand(command, row) {
+      switch (command) {
+        case 'edit':
+          this.handleUpdate(row)
+          break
+        case 'remove':
+          this.handleDelete(row)
+          break
+        // case 'details':
+        //   this.getScheduleHistory(row)
+        //   break
+        default:
+          break
+      }
+
+    },
     /** 查询部门下拉树结构 */
     getTreeselect() {
       treeselect().then(response => {
@@ -783,11 +939,11 @@ export default {
     },
     /** 历史进度记录搜索按钮操作 */
     handleHistoryQuery() {
-      this.historyQueryParams.keyProjectsId = this.activities[0].keyProjectsId;
-      this.loading = true;
+      this.historyQueryParams.keyProjectsId = this.form.id;
+      this.loading1 = true;
       getHistoryByTime(this.historyQueryParams).then(response => {
         this.activities = response.data;
-        this.loading = false;
+        this.loading1 = false;
       });
     },
     /** 重置按钮操作 */
@@ -836,8 +992,13 @@ export default {
       getProjectsSchedule(this.keyProjectsId).then(response => {
         this.activities = response.data;
         this.scheduleHistory = true;
-        this.title = "历史进度";
+        this.title = "详情";
       })
+      this.reset();
+      const id = row.id || this.ids
+      getProjects(id).then(response => {
+        this.form = response.data;
+      });
     },
     /** 提交按钮 */
     submitForm() {
@@ -910,11 +1071,52 @@ export default {
   justify-content: space-between;
   align-items: center;
   padding: 20px;
-//background-color: #f5f7fa; //border-bottom: 1px solid #ebeef5;
+/* background-color: #f5f7fa; border-bottom: 1px solid #ebeef5; */
 }
 
 .dialog-header span {
   font-size: 18px;
   font-weight: bold;
 }
+h4,ul,li{
+  margin: 0;
+  padding: 0;
+}
+.xg_cont{
+  padding:0;
+  color: #606266;
+  font-size: 14px;
+  word-break: break-all;
+  overflow: hidden;
+}
+.xg_cont li{
+  list-style: none;
+  width: 50%;
+  float: left;
+  margin:0 0 10px 0;
+}
+.xg_cont li.jiansheCont{
+  width:100%;
+}
+.sjxtitle{
+  width: 160px;
+  line-height: 36px !important;
+  font-weight: 700;
+  float: left;
+  text-align: right;
+  white-space: nowrap;
+  font-size: 14px;
+  vertical-align: top;
+}
+.sjx_cont{
+  color: #909295;
+  line-height: 36px;
+  width: 63%;
+  display: block;
+  margin: 0 0 0 170px;
+  vertical-align: top;
+}
+.js_cont{
+  width: 81%;
+}
 </style>

+ 8 - 0
src/main/java/com/sooka/sponest/data/app/service/impl/AppDailyServiceImpl.java

@@ -1,5 +1,8 @@
 package com.sooka.sponest.data.app.service.impl;
 
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.security.utils.SecurityUtils;
 import com.sooka.sponest.data.app.domain.AppDailyBO;
 import com.sooka.sponest.data.app.domain.AppDailyVO;
 import com.sooka.sponest.data.app.mapper.AppDailyMapper;
@@ -8,6 +11,7 @@ import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -19,6 +23,10 @@ public class AppDailyServiceImpl extends BaseServiceImpl implements AppDailyServ
 
     @Override
     public int addDaily(AppDailyBO bo) {
+        bo.setId(IdUtils.simpleUUID());
+        bo.setCreateBy(SecurityUtils.getUserId().toString());
+        bo.setCreateTime(DateUtils.getNowDate());
+        bo.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         return appDailyMapper.appinsertCenterdataTDaily(bo);
     }
 

+ 7 - 0
src/main/java/com/sooka/sponest/data/app/service/impl/AppLeaveServiceImpl.java

@@ -1,5 +1,8 @@
 package com.sooka.sponest.data.app.service.impl;
 
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.security.utils.SecurityUtils;
 import com.sooka.sponest.data.app.domain.AppLeaveBo;
 import com.sooka.sponest.data.app.mapper.AppLeaveMapper;
 import com.sooka.sponest.data.app.service.AppLeaveService;
@@ -19,6 +22,10 @@ public class AppLeaveServiceImpl extends BaseServiceImpl implements AppLeaveServ
 
     @Override
     public int addLeave(AppLeaveBo bo) {
+        bo.setId(IdUtils.simpleUUID());
+        bo.setCreateBy(SecurityUtils.getUserId().toString());
+        bo.setCreateTime(DateUtils.getNowDate());
+        bo.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
         return appLeaveMapper.insertCenterdataTLeave(bo);
 
     }

+ 2 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmCesspitCollectServiceImpl.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.data.digitalagriculture.service.impl;
 
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.uuid.UUID;
+import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmCesspitCollect;
@@ -28,6 +29,7 @@ public class CenterdataTFarmCesspitCollectServiceImpl extends BaseServiceImpl im
      * @return 粪污收集点集合
      */
     @Override
+    @DataScopeMutiDept(deptAlias = "d")
     public List<CenterdataTFarmCesspitCollect> selectCenterdataTFarmCesspitCollectList(CenterdataTFarmCesspitCollect centerdataTFarmCesspitCollect) {
         setSookaDataBase(centerdataTFarmCesspitCollect);
         return centerdataTFarmCesspitCollectMapper.selectCenterdataTFarmCesspitCollectList(centerdataTFarmCesspitCollect);

+ 2 - 0
src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/ICenterdataTFarmGarbageTransferServiceImpl.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.data.digitalagriculture.service.impl;
 
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.uuid.UUID;
+import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmGarbageTransfer;
@@ -19,6 +20,7 @@ public class ICenterdataTFarmGarbageTransferServiceImpl extends BaseServiceImpl
         private CenterdataTFarmGarbageTransferMapper centerdataTFarmGarbageTransferMapper;
 
     @Override
+    @DataScopeMutiDept(deptAlias = "d")
     public List<CenterdataTFarmGarbageTransfer> selectCenterdataTFarmGarbageTransferList(CenterdataTFarmGarbageTransfer centerdataTFarmGarbageTransfer) {
         setSookaDataBase(centerdataTFarmGarbageTransfer);
         return centerdataTFarmGarbageTransferMapper.selectCenterdataTFarmGarbageTransferList(centerdataTFarmGarbageTransfer);

+ 39 - 0
src/main/java/com/sooka/sponest/data/index/domain/MenuInfo.java

@@ -0,0 +1,39 @@
+package com.sooka.sponest.data.index.domain;
+
+import com.sooka.sponest.data.base.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 菜单信息对象
+ */
+@Data
+@ApiModel(description = "菜单信息对象")
+public class MenuInfo extends BaseBusinessEntity {
+
+    /**
+     * 菜单信息
+     */
+    @ApiModelProperty(value = "分类信息", required = false)
+    private String subclassS;
+
+    /**
+     * 表名和类型
+     */
+    @ApiModelProperty(value = "表名和类型", required = false)
+    private String tableNameAndType;
+
+    /**
+     * 菜单信息
+     */
+    @ApiModelProperty(value = "表名", required = false)
+    private String tableName;
+
+    /**
+     * 菜单信息
+     */
+    @ApiModelProperty(value = "类型", required = false)
+    private String type;
+
+}

+ 10 - 58
src/main/java/com/sooka/sponest/data/index/mapper/IndexViewMapper.java

@@ -1,6 +1,6 @@
 package com.sooka.sponest.data.index.mapper;
 
-import com.sooka.sponest.data.index.domain.IndexViewInfo;
+import com.sooka.sponest.data.index.domain.MenuInfo;
 
 import java.util.List;
 import java.util.Map;
@@ -12,7 +12,15 @@ public interface IndexViewMapper {
      *
      * @return
      */
-    Long getBasicDataList(IndexViewInfo menuId);
+    List<MenuInfo> getBasicDataList(MenuInfo menuInfo);
+
+    /**
+     * 获取基础数据条数
+     *
+     * @param menuInfo
+     * @return
+     */
+    Long getBasicDataCount(MenuInfo menuInfo);
 
     /**
      * 获取林业数据
@@ -64,62 +72,6 @@ public interface IndexViewMapper {
     List<Map<String, Object>> getFire();
 
     /**
-     * 获取林业数据条数
-     *
-     * @return
-     */
-    Long getForestCount();
-
-    /**
-     * 获取应急数据条数
-     *
-     * @return
-     */
-    Long getEmergencyCount();
-
-    /**
-     * 获取环保数据条数
-     *
-     * @return
-     */
-    Long getEnvironmentCount();
-
-    /**
-     * 获取消防数据条数
-     *
-     * @return
-     */
-    Long getFirecontrolCount();
-
-    /**
-     * 获取农业数据条数
-     *
-     * @return
-     */
-    Long getFarmCount();
-
-    /**
-     * 获取交通数据条数
-     *
-     * @return
-     */
-    Long getTrafficCount();
-
-    /**
-     * 获取资源数据条数
-     *
-     * @return
-     */
-    Long getResourcesCount();
-
-    /**
-     * 获取水利数据条数
-     *
-     * @return
-     */
-    Long getHydraulicCount();
-
-    /**
      * 获取一网通办数据列表
      *
      * @return

+ 102 - 69
src/main/java/com/sooka/sponest/data/index/service/impl/IndexViewServiceImpl.java

@@ -4,6 +4,7 @@ import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.commandcenter.domian.CommandCenterBO;
 import com.sooka.sponest.data.commandcenter.service.ICommandCenterService;
 import com.sooka.sponest.data.index.domain.IndexViewInfo;
+import com.sooka.sponest.data.index.domain.MenuInfo;
 import com.sooka.sponest.data.index.mapper.IndexViewMapper;
 import com.sooka.sponest.data.index.service.IndexViewService;
 import org.apache.commons.collections4.MapUtils;
@@ -65,84 +66,116 @@ public class IndexViewServiceImpl extends BaseServiceImpl implements IndexViewSe
      *
      * @return
      */
-    @Override
     public List<IndexViewInfo> getBasicDataList() {
-        List<IndexViewInfo> basicDataList = new ArrayList<>();
-        // 通过菜单表查询各个小类 菜单ID林业 1089 应急 1680 环保 2073 消防 2074 农业 2357 交通 2360 资源 2386 水利 2456
-        Map<String, Integer> menuIdMap = new LinkedHashMap<>();
-        menuIdMap.put("林业", 1089);
-        menuIdMap.put("农业", 2357);
-        menuIdMap.put("水利", 2456);
-        menuIdMap.put("环保", 2073);
-        menuIdMap.put("应急", 1680);
-        menuIdMap.put("交通", 2360);
-        menuIdMap.put("资源", 2386);
-        menuIdMap.put("消防", 2074);
-        Set<String> keyset = menuIdMap.keySet();
-        for (String key : keyset) {
-            IndexViewInfo indexViewInfo = new IndexViewInfo();
-            setSookaDataBase(indexViewInfo);
-            indexViewInfo.setCategory(key);
-            indexViewInfo.setMenuId(menuIdMap.get(key));
-            indexViewInfo.setSubclass(indexViewMapper.getBasicDataList(indexViewInfo));
-            // 查询各个行管局的所有表统计数据量     查询的表写死,后续加表需要改sql
-            switch (key) {
-                case "林业":
-                    indexViewInfo.setCategory("林业基础数据");
-                    indexViewInfo.setCount(indexViewMapper.getForestCount());
-                    break;
-                case "应急":
-                    indexViewInfo.setCategory("应急基础数据");
-                    indexViewInfo.setCount(indexViewMapper.getEmergencyCount());
-                    break;
-                case "环保":
-                    indexViewInfo.setCategory("环保基础数据");
-                    indexViewInfo.setCount(indexViewMapper.getEnvironmentCount());
-                    break;
-                case "消防":
-                    indexViewInfo.setCategory("消防基础数据");
-                    // 消防在原有的基础上将基础数据-取水口、水鹤、消火栓纳入消防,现将菜单小类固定+3
-                    indexViewInfo.setSubclass(indexViewInfo.getSubclass() + 3);
-                    indexViewInfo.setCount(indexViewMapper.getFirecontrolCount());
-                    break;
-                case "农业":
-                    indexViewInfo.setCategory("农业基础数据");
-                    indexViewInfo.setCount(indexViewMapper.getFarmCount());
-                    break;
-                case "交通":
-                    indexViewInfo.setCategory("交通基础数据");
-                    indexViewInfo.setCount(indexViewMapper.getTrafficCount());
-                    break;
-                case "资源":
-                    indexViewInfo.setCategory("自然资源基础数据");
-                    indexViewInfo.setCount(indexViewMapper.getResourcesCount());
-                    break;
-                default:
-                    indexViewInfo.setCategory("水利基础数据");
-                    indexViewInfo.setCount(indexViewMapper.getHydraulicCount());
-                    break;
+        MenuInfo menu = new MenuInfo();
+        setSookaDataBase(menu);
+        List<IndexViewInfo> basicList = new ArrayList<>();
+
+// 获取菜单信息
+        List<MenuInfo> basicDataList = indexViewMapper.getBasicDataList(menu);
+
+// 存储小类计数信息,key值为小类,value为小类数
+        Map<String, Long> subclassCount = new TreeMap<>();
+        Map<String, List<MenuInfo>> resultMap = new HashMap<>();
+
+        for (MenuInfo item : basicDataList) {
+            String[] subclassS = item.getSubclassS().split(",");
+            String[] tableNameAndType = item.getTableNameAndType().split("/");
+
+            // 小类的统计次数
+            for (String subclass : subclassS) {
+                subclassCount.merge(subclass, 1L, Long::sum);
+            }
+
+            for (String subclass : subclassS) {
+                // 检查resultMap中是否已经存在对应subclass的键
+                if (!resultMap.containsKey(subclass)) {
+                    resultMap.put(subclass, new ArrayList<>());
+                }
+                // 将当前的item添加到对应subclass的列表中
+                resultMap.get(subclass).add(item);
+            }
+
+            // 将tableName和type放入MenuInfo对象中
+            item.setTableName(tableNameAndType[0]);
+            if (tableNameAndType.length > 1) {
+                item.setType(tableNameAndType[1]);
             }
-            basicDataList.add(indexViewInfo);
         }
-        // 根据查询的数据进行统计
-        Long subclass = 0L;
-        Long count = 0L;
-        for (IndexViewInfo indexViewInfo : basicDataList) {
-            Long num = indexViewInfo.getSubclass();
-            subclass += num;
+
+        for (Map.Entry<String, List<MenuInfo>> entry : resultMap.entrySet()) {
+            String subclass = entry.getKey();
+            IndexViewInfo indexViewInfo = new IndexViewInfo();
+            indexViewInfo.setCount(0L);
+
+            // 分类名称映射
+            Map<String, String> categoryMap = new HashMap<>();
+            categoryMap.put("forest", "林业基础数据");
+            categoryMap.put("emergency", "应急基础数据");
+            categoryMap.put("environment", "环保基础数据");
+            categoryMap.put("firecontrol", "消防基础数据");
+            categoryMap.put("farm", "农业基础数据");
+            categoryMap.put("traffic", "交通基础数据");
+            categoryMap.put("resources", "自然资源基础数据");
+            categoryMap.put("water", "水利基础数据");
+
+            indexViewInfo.setCategory(categoryMap.get(subclass));
+            indexViewInfo.setSubclass(subclassCount.get(subclass));
+
+            List<MenuInfo> menuInfos = entry.getValue();
+            for (MenuInfo menuInfo : menuInfos) {
+                Long dataCount = indexViewMapper.getBasicDataCount(menuInfo);
+                indexViewInfo.setCount(indexViewInfo.getCount() + dataCount);
+            }
+            basicList.add(indexViewInfo);
         }
-        for (IndexViewInfo indexViewInfo : basicDataList) {
-            Long num = indexViewInfo.getCount();
-            count += num;
+
+// 统计总的数据数量
+        long totalCount = 0;
+        for (IndexViewInfo info : basicList) {
+            totalCount += info.getCount();
         }
+
         IndexViewInfo indexViewInfo = new IndexViewInfo();
         indexViewInfo.setCategory("共有基础数据类型");
-        indexViewInfo.setSubclass(subclass);
-        indexViewInfo.setCount(count);
-        basicDataList.add(indexViewInfo);
-        return basicDataList;
+        indexViewInfo.setSubclass((long) basicDataList.size());
+        indexViewInfo.setCount(totalCount);
+        basicList.add(indexViewInfo);
+
+// 使用自定义的 Comparator 对 basicList 进行排序
+        basicList.sort(customComparator);
+        return basicList;
     }
 
+    //排序
+    Comparator<IndexViewInfo> customComparator = (info1, info2) -> {
+        // 按照顺序进行比较
+        List<String> order = Arrays.asList(
+                "林业基础数据",
+                "农业基础数据",
+                "水利基础数据",
+                "环保基础数据",
+                "应急基础数据",
+                "交通基础数据",
+                "自然资源基础数据",
+                "消防基础数据",
+                "共有基础数据类型"
+        );
+
+        int index1 = order.indexOf(info1.getCategory());
+        int index2 = order.indexOf(info2.getCategory());
+
+        if (index1 < index2) {
+            return -1;
+        } else if (index1 > index2) {
+            return 1;
+        } else {
+            // 如果类别相同,按照数据数量降序排列
+            return info2.getCount().compareTo(info1.getCount());
+        }
+    };
+
+
     /**
      * 获取一网通办数据
      *

+ 2 - 0
src/main/resources/mapper/appbigdata/AppDailyMapper.xml

@@ -18,6 +18,7 @@
             <if test="id != null">id,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
+            <if test="createName != null and createName != ''">create_name,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="dataStatus != null">data_status,</if>
@@ -33,6 +34,7 @@
             <if test="id != null">#{id},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
+            <if test="createName != null and createName != ''">#{createName},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="dataStatus != null">#{dataStatus},</if>

+ 4 - 0
src/main/resources/mapper/appbigdata/AppLeaveMapper.xml

@@ -11,8 +11,10 @@
             <if test="id != null">id,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
+            <if test="createName != null">create_name,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
+            <if test="updateName != null">update_name,</if>
             <if test="dataStatus != null">data_status,</if>
             <if test="dataDeptId != null">data_dept_id,</if>
             <if test="leaveStartTime != null">leave_start_time,</if>
@@ -28,8 +30,10 @@
             <if test="id != null">#{id},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
+            <if test="createName != null">#{createName},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateName != null">#{updateName},</if>
             <if test="dataStatus != null">#{dataStatus},</if>
             <if test="dataDeptId != null">#{dataDeptId},</if>
             <if test="leaveStartTime != null">#{leaveStartTime},</if>

+ 7 - 4
src/main/resources/mapper/digitalagriculture/centerdataTFarmCesspitCollectMapper.xml

@@ -24,10 +24,13 @@
         from centerdata_t_farm_cesspit_collect a
     </sql>
     <select id="selectCenterdataTFarmCesspitCollectList" parameterType="CenterdataTFarmCesspitCollect" resultMap="CenterdataTFarmCesspitCollectResult">
-        <include refid="selectCenterdataTFarmCesspitCollectVo"/>
-       <where>
-           <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
-       </where>
+        select a.id, a.name, a.longitude, a.latitude, a.code, a.coverage, a.create_by, a.create_name, a.create_time,a.update_by, a.update_name, a.update_time, a.dept_id ,a.dept_name
+        from centerdata_t_farm_cesspit_collect a
+        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>
+            ${params.dataScope}
+        </where>
         order by a.create_time desc
     </select>
 

+ 2 - 2
src/main/resources/mapper/generalbusiness/CenterdataTLeaveMapper.xml

@@ -160,8 +160,8 @@
         <where>
             <if test="dataStatus != null  and dataStatus != ''">and data_status = #{dataStatus}</if>
             <if test="dataDeptId != null ">and data_dept_id = #{dataDeptId}</if>
-            <if test="leaveStartTime != null ">and leave_start_time = #{leaveStartTime}</if>
-            <if test="leaveEndTime != null ">and leave_end_time = #{leaveEndTime}</if>
+            <if test="leaveStartTime != null ">and leave_start_time &gt;=  #{leaveStartTime}</if>
+            <if test="leaveEndTime != null ">and leave_end_time &lt;=  #{leaveEndTime}</if>
             <if test="forestLeaveStatus != null  and forestLeaveStatus != ''">and forest_leave_status =
                 #{forestLeaveStatus}
             </if>

+ 18 - 174
src/main/resources/mapper/index/IndexViewMapper.xml

@@ -4,185 +4,29 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.sooka.sponest.data.index.mapper.IndexViewMapper">
 
-    <resultMap id="IndexViewInfoResultMap" type="com.sooka.sponest.data.index.domain.IndexViewInfo">
-        <result property="category" column="category"/>
-        <result property="subclass" column="subclass"/>
-        <result property="count" column="count"/>
+    <resultMap id="MenuInfoResultMap" type="com.sooka.sponest.data.index.domain.MenuInfo">
+        <result property="subclassS" column="subclassS"/>
+        <result property="tableNameAndType" column="tableNameAndType"/>
     </resultMap>
-
-    <select id="getBasicDataList" parameterType="String" resultType="Long">
-        SELECT count(u2.menu_id) AS subclass
-        FROM(
-                SELECT
-                    @ids AS parent_id,
-                    (SELECT @ids := GROUP_CONCAT(menu_id) FROM ${database_system}.sys_menu WHERE FIND_IN_SET(parent_id, @ids)) AS c_ids,
-            @l := @l+1 AS LEVEL
-        FROM ${database_system}.sys_menu, (SELECT @ids := #{menuId}, @l := 0 ) b
-        WHERE @ids IS NOT NULL
-            ) u1
-            JOIN ${database_system}.sys_menu u2
-        ON FIND_IN_SET(u2.menu_id, u1.parent_id) where u2.menu_id != #{menuId} AND u2.menu_type = 'C' AND STATUS = 0 AND front_type = 'front_type_data' AND u2.menu_name NOT LIKE '%统计%' AND u2.menu_name NOT LIKE '%台账%'
-        <!-- 排除林业林业巡查计划、任务、轨迹,植树造林区域、计划、任务管理、任务反馈、工作统计,野生动物统计、监测台账、林业网格层级、林长管理、林班数据图层层级、林班数据图层 -->
-        <if test="menuId == 1089">AND u2.menu_id NOT IN (2745,2751,2903,1121,1127,2608,2602,2629,2676,2675,2776,1199,2891,2897)</if>
-        <!-- 排除农业秸秆还田统计、台账 -->
-        <if test="menuId == 2357">AND u2.menu_id NOT IN (1903,1904)</if>
-        <!-- 排除水利巡查计划、任务、轨迹、督导检查、保洁员、网格、河长名录 -->
-        <if test="menuId == 2456">AND u2.menu_id NOT IN (2560,2566,3157,2677,2542,3095,2554)</if>
-        <!-- 排除环保巡查计划、任务、轨迹、环保人员,秸秆离田台账、统计 -->
-        <if test="menuId == 2073">AND u2.menu_id NOT IN (2702,2708,3193,2770,1906,1907)</if>
-        <!-- 排除交通巡查计划、任务、轨迹、交通人员、网格、路长 -->
-        <if test="menuId == 2360">AND u2.menu_id NOT IN (2688,2694,3163,2758,3101,2873)</if>
-        <!-- 排除资源巡查计划、任务、轨迹、资源人员、田长制-网格、田长 -->
-        <if test="menuId == 2386">AND u2.menu_id NOT IN (2730,2736,3169,2596,2432,2444)</if>
-        <!-- 排除消防巡查计划、任务、轨迹、消防人员 -->
-        <if test="menuId == 2074">AND u2.menu_id NOT IN (2716,2722,3187,2762)</if>
-    </select>
-
-    <!-- 林业数据条数 -->
-    <select id="getForestCount" resultType="Long">
-        SELECT
-            sum( a ) count
-        FROM
-            ( SELECT count(*) a FROM centerdata_t_forest_animal
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_resources
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_landing
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_channel
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_fireteam
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_trees
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_changbrand
-            UNION ALL SELECT count(*) a FROM centerdata_t_supermap_level WHERE type = '1'
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_keyfireproofplots
-            ) AS temporary_tables;
-    </select>
-
-    <!-- 应急数据条数 -->
-    <select id="getEmergencyCount" resultType="Long">
-        SELECT
-            sum( a ) count
-        FROM
-            ( SELECT count(*) a FROM centerdata_t_emergency_material
-            UNION ALL SELECT count(*) a FROM centerdata_t_emergency_team
-            UNION ALL SELECT count(*) a FROM centerdata_t_emergency_warehouse
-            UNION ALL SELECT count(*) a FROM centerdata_t_emergency_idlh_enterprises
-            ) AS temporary_tables;
-    </select>
-
-    <!-- 环保数据条数 -->
-    <select id="getEnvironmentCount" resultType="Long">
-        SELECT
-            sum( a ) count
-        FROM
-            ( SELECT count(*) a FROM centerdata_t_environment_source_pollution
-            UNION ALL SELECT count(*) a FROM centerdata_t_environment_key_enterprise
-            UNION ALL SELECT count(*) a FROM centerdata_t_environment_source_pollution
-            UNION ALL SELECT count(*) a FROM centerdata_t_environment_sewage_outlet
-            UNION ALL SELECT count(*) a FROM centerdata_t_environment_water_monitor
-            UNION ALL SELECT count(*) a FROM centerdata_t_straw_leave_field WHERE del_flag = '0'
-            ) AS temporary_tables;
-    </select>
-
-    <!-- 消防数据条数 -->
-    <select id="getFirecontrolCount" resultType="Long">
+    <select id="getBasicDataList" parameterType="String" resultMap="MenuInfoResultMap">
         SELECT
-            sum( a ) count
+            SUBSTRING_INDEX(center_type, ':', 1) AS subclassS,
+            SUBSTRING_INDEX(center_type, ':', -1) AS tableNameAndType
         FROM
-            ( SELECT count(*) a FROM centerdata_t_firecontrol_fire_force
-            UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_fire_key_places
-            UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_fire_pressure_sensor
-            UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_other_linkage_force
-            UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_basic_linkage_force
-            UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_foam_liquid
-            UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_fulltime_station
-            <!-- 消防在原有的基础上将基础数据-取水口、水鹤、消火栓纳入消防 -->
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_waterintake
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_watercrane
-            UNION ALL SELECT count(*) a FROM centerdata_t_forest_firehydrant
-            ) AS temporary_tables;
+            ${database_system}.sys_menu
+        WHERE
+            menu_type = 'C'
+          AND status = 0
+          AND front_type = 'front_type_data'
+          AND center_type IS NOT NULL;
     </select>
 
-    <!-- 农业数据条数 -->
-    <select id="getFarmCount" resultType="Long">
-        SELECT
-            sum( a ) count
-        FROM
-            ( SELECT count(*) a FROM centerdata_t_straw_still_field
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_agricultural_cooperatives WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_botany_protect_info WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_seed_info WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_chemical_fertilizer_info WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_plant_info WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_subsidy_info WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_contract_management WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_foodstuff_along
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_enterprise
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_filings_livestock
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_pesticide_information
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_livestock
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_village_animal_prevention
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_autumn_harvest_schedule
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_seeding_progress
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_seedling_progress
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_sowing_schedule
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_agricultural_supervise
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_technology_train
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_excrement_dispose WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_complex_modification WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_greenhouse_film WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_trashcan
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_garbage_transfer
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_cesspit_collect
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_breeding_farm
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_agricultural_machinery_info WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_machinery_info WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_implements_info WHERE del_flag = '0'
-            ) AS temporary_tables;
-    </select>
-
-    <!-- 交通数据条数 -->
-    <select id="getTrafficCount" resultType="Long">
-        SELECT
-            sum( a ) count
-        FROM
-            ( SELECT count(*) a FROM centerdata_t_traffic_warning_sign
-            UNION ALL SELECT count(*) a FROM centerdata_t_traffic_transportation_hub
-            UNION ALL SELECT count(*) a FROM centerdata_t_traffic_bridge
-            UNION ALL SELECT count(*) a FROM centerdata_t_traffic_culvert
-            UNION ALL SELECT count(*) a FROM centerdata_t_supermap_level WHERE type = '3'
-            ) AS temporary_tables;
-    </select>
-
-    <!-- 资源数据条数 -->
-    <select id="getResourcesCount" resultType="Long">
-        SELECT
-            sum( a ) count
-        FROM
-            ( SELECT count(*) a FROM centerdata_t_resources_illegal_construction
-            UNION ALL SELECT count(*) a FROM centerdata_t_resources_geologic_hazard
-            UNION ALL SELECT count(*) a FROM centerdata_t_resources_deposit
-            UNION ALL SELECT count(*) a FROM centerdata_t_farm_basic_farmland WHERE del_flag = '0'
-            UNION ALL SELECT count(*) a FROM centerdata_t_resources_land_info
-            UNION ALL SELECT count(*) a FROM centerdata_t_supermap_level WHERE type = '6'
-            ) AS temporary_tables;
-    </select>
-
-    <!-- 水利数据条数 -->
-    <select id="getHydraulicCount" resultType="Long">
-        SELECT
-            sum( a ) count
-        FROM
-            ( SELECT count(*) a FROM centerdata_t_hydraulic_channel_blueline
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_battlefield
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_garbage_station
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_reach
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_reservoir
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_river
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_outlet_sewage
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_wade_bridge_culvert
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_water_gate
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_water_project
-            UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_river_hechang
-            UNION ALL SELECT count(*) a FROM centerdata_t_supermap_level WHERE type = '2'
-            ) AS temporary_tables;
+    <select id="getBasicDataCount" parameterType="MenuInfo" resultType="Long">
+        SELECT count(*) FROM
+        ${tableName}
+        <where>
+            <if test="type != null and type != ''">and type = #{type}</if>
+        </where>
     </select>
 
     <!--一网通办统计数据-->