浏览代码

森林管理

wangzhe 4 年之前
父节点
当前提交
56cb4f36b2

+ 7 - 0
mybusiness/src/main/java/com/business/slfh/manager/stationforestmanager/domain/TResStationforest.java

@@ -2,6 +2,8 @@ package com.business.slfh.manager.stationforestmanager.domain;
 
 import com.sooka.common.annotation.Excel;
 import com.sooka.common.core.domain.BaseEntity;
+import lombok.Getter;
+import lombok.Setter;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -11,10 +13,15 @@ import org.apache.commons.lang3.builder.ToStringStyle;
  * @author lei
  * @date 2021-05-11
  */
+
+@Getter
+@Setter
 public class TResStationforest extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
+    private String forestType;//森林类型(1林业局 2林场)
+
     /** $column.columnComment */
     private String id;
 

+ 6 - 1
mybusiness/src/main/resources/mapper/grid/manager/TResStationforestMapper.xml

@@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="contactPhone"    column="contact_phone"    />
         <result property="deptId"    column="dept_id"    />
         <result property="createUserId"    column="create_user_id"    />
+        <result property="forestType"    column="forest_type"    />
     </resultMap>
 
     <sql id="selectTResStationforestVo">
-        select id, status, remark, del_flag, create_by, create_time, update_by, update_time, name, longitude, latitude, address, contact_user, contact_phone, dept_id, create_user_id from t_res_stationforest
+        select forest_type, id, status, remark, del_flag, create_by, create_time, update_by, update_time, name, longitude, latitude, address, contact_user, contact_phone, dept_id, create_user_id from t_res_stationforest
     </sql>
 
     <select id="selectTResStationforestList" parameterType="TResStationforest" resultMap="TResStationforestResult">
@@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="contactPhone != null  and contactPhone != ''"> and contact_phone = #{contactPhone}</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
+            <if test="forestType != null "> and forest_type = #{forestType}</if>
         </where>
     </select>
     
@@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="contactPhone != null">contact_phone,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="createUserId != null">create_user_id,</if>
+            <if test="forestType != null">forest_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null and id != ''">#{id},</if>
@@ -84,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="contactPhone != null">#{contactPhone},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="createUserId != null">#{createUserId},</if>
+            <if test="forestType != null">#{forestType},</if>
          </trim>
     </insert>
 
@@ -105,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="contactPhone != null">contact_phone = #{contactPhone},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="createUserId != null">create_user_id = #{createUserId},</if>
+            <if test="forestType != null">forest_type = #{forestType},</if>
         </trim>
         where id = #{id}
     </update>

+ 10 - 0
mybusiness/src/main/resources/templates/business/manager/stationforestmanager/index.html

@@ -14,6 +14,10 @@
                                 <label>名称:</label>
                                 <input type="text" name="name"/>
                             </li>
+                            <li>
+                                <label>森林类型:</label>
+                                <input type="text" name="name"/>
+                            </li>
                             <!--<li>
                                 <label>地址:</label>
                                 <input type="text" name="address"/>
@@ -81,6 +85,12 @@
                     title: '名称'
                 },
                 {
+                    field: 'forestTypeStr',
+                    title: '森林类型',formatter: function(value, row, index) {
+                        return value==1?"林业局":"林场";
+                    }
+                },
+                {
                     field: 'longitude',
                     title: '经度'
                 },