Jelajahi Sumber

新增面积,新增护林员

zhaowenrui 1 tahun lalu
induk
melakukan
e74e15b461

+ 11 - 3
data-ui/src/views/data/digitalforest/resources/index.vue

@@ -85,6 +85,7 @@
         </template>
       </el-table-column>
       <el-table-column label="公顷株数" align="center" prop="hectareTrees"/>
+      <el-table-column label="面积" align="center" prop="forestryArea"/>
       <el-table-column label="森林类别" align="center" prop="forestCategory">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.forest_category" :value="scope.row.forestCategory"/>
@@ -162,6 +163,10 @@
             <el-form-item label="公顷株数" prop="hectareTrees">
               <el-input v-model="form.hectareTrees" placeholder="请输入公顷株数数量" maxlength="15"/>
             </el-form-item>
+            <el-form-item label="所属部门" prop="deptId">
+              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
+                          placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"/>
+            </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="森林类别" prop="forestCategory">
@@ -186,9 +191,8 @@
                   :aria-readonly="!disabled"/>
               </el-select>
             </el-form-item>
-            <el-form-item label="所属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
-                          placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"/>
+            <el-form-item label="面积" prop="forestryArea">
+              <el-input v-model="form.forestryArea" placeholder="请输入面积" maxlength="15"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -274,6 +278,10 @@
             {required: true, message: '公顷株数不能为空', trigger: 'blur'},
             {validator: checkNonnegativeInteger, trigger: 'blur'}
           ],
+          forestryArea: [
+            {required: true, message: '面积不能为空', trigger: 'blur'},
+            {validator: checkPositiveDecimal, trigger: 'blur'}
+          ],
           dominantTreeSpecies: [
             {required: true, message: '优势树种不能为空', trigger: 'blur'}
           ],

+ 7 - 0
src/main/java/com/sooka/sponest/data/digitalforest/domain/CenterdataTForestResources.java

@@ -71,6 +71,13 @@ public class CenterdataTForestResources extends BaseBusinessEntity {
     @NotBlank(message = "公顷株数不能为空")
     private String hectareTrees;
 
+    /**
+     * 面积
+     */
+    @ApiModelProperty(value = "面积",required = true)
+    @Excel(name = "面积")
+    @NotBlank(message = "面积不能为空")
+    private String forestryArea;
 
     /**
      * 所属部门ID

+ 6 - 4
src/main/resources/mapper/digitalforest/CenterdataTForestResourcesMapper.xml

@@ -11,6 +11,7 @@
         <result property="forestCategory" column="forest_category"/>
         <result property="groundClass" column="ground_class"/>
         <result property="hectareTrees" column="hectare_trees"/>
+        <result property="forestryArea" column="forestry_area"/>
         <result property="deptId" column="dept_id"/>
         <result property="deptName" column="dept_name"/>
         <result property="createBy" column="create_by"/>
@@ -23,12 +24,12 @@
     </resultMap>
 
     <sql id="selectCenterdataTForestResourcesVo">
-        select id, forest_tenure, dominant_tree_species, forest_category, ground_class, hectare_trees, dept_id, dept_name, create_by, create_time,create_name,update_name, update_by, update_time, data_status from centerdata_t_forest_resources
+        select id, forest_tenure, dominant_tree_species, forest_category, ground_class, hectare_trees,forestry_area, dept_id, dept_name, create_by, create_time,create_name,update_name, update_by, update_time, data_status from centerdata_t_forest_resources
     </sql>
 
     <select id="selectCenterdataTForestResourcesList" parameterType="CenterdataTForestResources"
             resultMap="CenterdataTForestResourcesResult">
-        select a.id, a.forest_tenure, a.dominant_tree_species, a.forest_category, a.ground_class, a.hectare_trees, a.dept_id, a.dept_name, a.create_by, a.create_time,a.create_name,a.update_name, a.update_by, a.update_time,a.data_status
+        select a.id, a.forest_tenure, a.dominant_tree_species, a.forest_category, a.ground_class, a.hectare_trees,a.forestry_area, a.dept_id, a.dept_name, a.create_by, a.create_time,a.create_name,a.update_name, a.update_by, a.update_time,a.data_status
         from centerdata_t_forest_resources a
         left join ${database_system}.sys_dept d on a.dept_id=d.dept_id
         <where>
@@ -62,7 +63,7 @@
             <if test="forestCategory != null">forest_category,</if>
             <if test="groundClass != null">ground_class,</if>
             <if test="hectareTrees != null">hectare_trees,</if>
-
+            <if test="forestryArea != null">forestry_area,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="deptName != null">dept_name,</if>
             <if test="createBy != null">create_by,</if>
@@ -81,7 +82,7 @@
             <if test="forestCategory != null">#{forestCategory},</if>
             <if test="groundClass != null">#{groundClass},</if>
             <if test="hectareTrees != null">#{hectareTrees},</if>
-
+            <if test="forestryArea != null">#{forestryArea},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="deptName != null">#{deptName},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -102,6 +103,7 @@
             <if test="forestCategory != null">forest_category = #{forestCategory},</if>
             <if test="groundClass != null">ground_class = #{groundClass},</if>
             <if test="hectareTrees != null">hectare_trees = #{hectareTrees},</if>
+            <if test="forestryArea != null">forestry_area = #{forestryArea},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="deptName != null">dept_name = #{deptName},</if>
             <if test="createBy != null">create_by = #{createBy},</if>

+ 3 - 1
src/main/resources/mapper/digitalforest/ForestBigDataMapper.xml

@@ -201,13 +201,15 @@
     </select>
 
     <select id="linLeaderCount" resultType="map">
-        SELECT COUNT(lin_job) as VALUE ,  '三员[治安员,卫生员,技术员]' name FROM `centerdata_t_forest_linleader` WHERE lin_job = "forest_lin_jy"
+        SELECT COUNT(lin_job) as VALUE ,  '三员[治安员,卫生员,技术员]' name FROM `centerdata_t_forest_linleader` WHERE lin_job in ( "forest_lin_jy", "forest_lin_wsy", "forest_lin_jsy")
         UNION all
         SELECT COUNT(lin_job) as VALUE ,  '村级林长' name FROM `centerdata_t_forest_linleader` WHERE lin_job = "forest_lin_linzhang" and lin_level = "forest_lin_sq"
         UNION all
         SELECT COUNT(lin_job) as VALUE ,  '乡镇街林长' name FROM `centerdata_t_forest_linleader` WHERE lin_job = "forest_lin_linzhang" and lin_level = "forest_lin_xz"
         UNION all
         SELECT COUNT(lin_job) as VALUE ,  '县区林长' name FROM `centerdata_t_forest_linleader` WHERE lin_job = "forest_lin_linzhang" and lin_level = "forest_lin_xq"
+        UNION all
+        SELECT COUNT(lin_job) as VALUE ,  '护林员' name FROM `centerdata_t_forest_linleader` WHERE   lin_job = "forest_lin_hly"
     </select>