Jelajahi Sumber

辉南林业

Wubaozaizhong 2 tahun lalu
induk
melakukan
9345a17d6f

+ 127 - 0
mybusiness/src/main/java/com/business/slfh/manager/waterintake/controller/TResWaterintakeController.java

@@ -0,0 +1,127 @@
+package com.business.slfh.manager.waterintake.controller;
+
+import java.util.List;
+
+import com.sooka.common.core.controller.BaseController;
+import com.sooka.common.core.domain.AjaxResult;
+import com.sooka.common.core.page.TableDataInfo;
+import com.sooka.common.enums.BusinessType;
+import com.sooka.common.utils.poi.ExcelUtil;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.business.slfh.manager.waterintake.domain.TResWaterintake;
+import com.business.slfh.manager.waterintake.service.ITResWaterintakeService;
+
+
+/**
+ * 取水口Controller
+ * 
+ * @author lei
+ * @date 2022-10-14
+ */
+@Controller
+@RequestMapping("/business/manager/waterintake")
+public class TResWaterintakeController extends BaseController
+{
+    private String prefix = "/business/manager/waterintake";
+
+    @Autowired
+    private ITResWaterintakeService tResWaterintakeService;
+
+    //@RequiresPermissions("waterintake:waterintake:view")
+    @GetMapping()
+    public String waterintake()
+    {
+        return prefix + "/index";
+    }
+
+    /**
+     * 查询取水口列表
+     */
+    //@RequiresPermissions("waterintake:waterintake:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(TResWaterintake tResWaterintake)
+    {
+        startPage();
+        List<TResWaterintake> list = tResWaterintakeService.selectTResWaterintakeList(tResWaterintake);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出取水口列表
+     */
+    //@RequiresPermissions("waterintake:waterintake:export")
+    //@Log(title = "取水口", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(TResWaterintake tResWaterintake)
+    {
+        List<TResWaterintake> list = tResWaterintakeService.selectTResWaterintakeList(tResWaterintake);
+        ExcelUtil<TResWaterintake> util = new ExcelUtil<TResWaterintake>(TResWaterintake.class);
+        return util.exportExcel(list, "waterintake");
+    }
+
+    /**
+     * 新增取水口
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存取水口
+     */
+    //@RequiresPermissions("waterintake:waterintake:add")
+    //@Log(title = "取水口", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(TResWaterintake tResWaterintake)
+    {
+        return toAjax(tResWaterintakeService.insertTResWaterintake(tResWaterintake));
+    }
+
+    /**
+     * 修改取水口
+     */
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") String id, ModelMap mmap)
+    {
+        TResWaterintake tResWaterintake = tResWaterintakeService.selectTResWaterintakeById(id);
+        mmap.put("tResWaterintake", tResWaterintake);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存取水口
+     */
+    //@RequiresPermissions("waterintake:waterintake:edit")
+    //@Log(title = "取水口", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(TResWaterintake tResWaterintake)
+    {
+        return toAjax(tResWaterintakeService.updateTResWaterintake(tResWaterintake));
+    }
+
+    /**
+     * 删除取水口
+     */
+    //@RequiresPermissions("waterintake:waterintake:remove")
+    //@Log(title = "取水口", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(tResWaterintakeService.deleteTResWaterintakeByIds(ids));
+    }
+}

+ 210 - 0
mybusiness/src/main/java/com/business/slfh/manager/waterintake/domain/TResWaterintake.java

@@ -0,0 +1,210 @@
+package com.business.slfh.manager.waterintake.domain;
+
+import com.sooka.common.annotation.Excel;
+import com.sooka.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+
+/**
+ * 取水口对象 t_res_waterintake
+ * 
+ * @author lei
+ * @date 2022-10-14
+ */
+public class TResWaterintake extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** null */
+    private String id;
+
+    /** null */
+    @Excel(name = "null")
+    private String status;
+
+    /** null */
+    private String delFlag;
+
+    /** 名称 */
+    @Excel(name = "名称")
+    private String name;
+
+    /** 经度 */
+    @Excel(name = "经度")
+    private String longitude;
+
+    /** 纬度 */
+    @Excel(name = "纬度")
+    private String latitude;
+
+    /** 地址 */
+    @Excel(name = "地址")
+    private String address;
+
+    /** 联系人 */
+    @Excel(name = "联系人")
+    private String contactUser;
+
+    /** 电话 */
+    @Excel(name = "电话")
+    private String contactPhone;
+
+    /** null */
+    @Excel(name = "null")
+    private Long deptId;
+
+    /** null */
+    @Excel(name = "null")
+    private Long createUserId;
+
+    /** null */
+    @Excel(name = "null")
+    private String filename;
+
+    /** null */
+    @Excel(name = "null")
+    private String deptName;
+
+    public void setId(String id) 
+    {
+        this.id = id;
+    }
+
+    public String getId() 
+    {
+        return id;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    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 setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+    public void setContactUser(String contactUser) 
+    {
+        this.contactUser = contactUser;
+    }
+
+    public String getContactUser() 
+    {
+        return contactUser;
+    }
+    public void setContactPhone(String contactPhone) 
+    {
+        this.contactPhone = contactPhone;
+    }
+
+    public String getContactPhone() 
+    {
+        return contactPhone;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+    public void setCreateUserId(Long createUserId) 
+    {
+        this.createUserId = createUserId;
+    }
+
+    public Long getCreateUserId() 
+    {
+        return createUserId;
+    }
+    public void setFilename(String filename) 
+    {
+        this.filename = filename;
+    }
+
+    public String getFilename() 
+    {
+        return filename;
+    }
+    public void setDeptName(String deptName) 
+    {
+        this.deptName = deptName;
+    }
+
+    public String getDeptName() 
+    {
+        return deptName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("status", getStatus())
+            .append("remark", getRemark())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("name", getName())
+            .append("longitude", getLongitude())
+            .append("latitude", getLatitude())
+            .append("address", getAddress())
+            .append("contactUser", getContactUser())
+            .append("contactPhone", getContactPhone())
+            .append("deptId", getDeptId())
+            .append("createUserId", getCreateUserId())
+            .append("filename", getFilename())
+            .append("deptName", getDeptName())
+            .toString();
+    }
+}

+ 61 - 0
mybusiness/src/main/java/com/business/slfh/manager/waterintake/mapper/TResWaterintakeMapper.java

@@ -0,0 +1,61 @@
+package com.business.slfh.manager.waterintake.mapper;
+
+import java.util.List;
+import com.business.slfh.manager.waterintake.domain.TResWaterintake;
+
+/**
+ * 取水口Mapper接口
+ * 
+ * @author lei
+ * @date 2022-10-14
+ */
+public interface TResWaterintakeMapper 
+{
+    /**
+     * 查询取水口
+     * 
+     * @param id 取水口ID
+     * @return 取水口
+     */
+    public TResWaterintake selectTResWaterintakeById(String id);
+
+    /**
+     * 查询取水口列表
+     * 
+     * @param tResWaterintake 取水口
+     * @return 取水口集合
+     */
+    public List<TResWaterintake> selectTResWaterintakeList(TResWaterintake tResWaterintake);
+
+    /**
+     * 新增取水口
+     * 
+     * @param tResWaterintake 取水口
+     * @return 结果
+     */
+    public int insertTResWaterintake(TResWaterintake tResWaterintake);
+
+    /**
+     * 修改取水口
+     * 
+     * @param tResWaterintake 取水口
+     * @return 结果
+     */
+    public int updateTResWaterintake(TResWaterintake tResWaterintake);
+
+    /**
+     * 删除取水口
+     * 
+     * @param id 取水口ID
+     * @return 结果
+     */
+    public int deleteTResWaterintakeById(String id);
+
+    /**
+     * 批量删除取水口
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTResWaterintakeByIds(String[] ids);
+}

+ 61 - 0
mybusiness/src/main/java/com/business/slfh/manager/waterintake/service/ITResWaterintakeService.java

@@ -0,0 +1,61 @@
+package com.business.slfh.manager.waterintake.service;
+
+import java.util.List;
+import com.business.slfh.manager.waterintake.domain.TResWaterintake;
+
+/**
+ * 取水口Service接口
+ * 
+ * @author lei
+ * @date 2022-10-14
+ */
+public interface ITResWaterintakeService 
+{
+    /**
+     * 查询取水口
+     * 
+     * @param id 取水口ID
+     * @return 取水口
+     */
+    public TResWaterintake selectTResWaterintakeById(String id);
+
+    /**
+     * 查询取水口列表
+     * 
+     * @param tResWaterintake 取水口
+     * @return 取水口集合
+     */
+    public List<TResWaterintake> selectTResWaterintakeList(TResWaterintake tResWaterintake);
+
+    /**
+     * 新增取水口
+     * 
+     * @param tResWaterintake 取水口
+     * @return 结果
+     */
+    public int insertTResWaterintake(TResWaterintake tResWaterintake);
+
+    /**
+     * 修改取水口
+     * 
+     * @param tResWaterintake 取水口
+     * @return 结果
+     */
+    public int updateTResWaterintake(TResWaterintake tResWaterintake);
+
+    /**
+     * 批量删除取水口
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTResWaterintakeByIds(String ids);
+
+    /**
+     * 删除取水口信息
+     * 
+     * @param id 取水口ID
+     * @return 结果
+     */
+    public int deleteTResWaterintakeById(String id);
+}

+ 98 - 0
mybusiness/src/main/java/com/business/slfh/manager/waterintake/service/impl/TResWaterintakeServiceImpl.java

@@ -0,0 +1,98 @@
+package com.business.slfh.manager.waterintake.service.impl;
+
+import java.util.List;
+
+import com.business.slfh.manager.waterintake.mapper.TResWaterintakeMapper;
+import com.sooka.common.core.text.Convert;
+import com.sooka.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.business.slfh.manager.waterintake.domain.TResWaterintake;
+import com.business.slfh.manager.waterintake.service.ITResWaterintakeService;
+
+/**
+ * 取水口Service业务层处理
+ * 
+ * @author lei
+ * @date 2022-10-14
+ */
+@Service
+public class TResWaterintakeServiceImpl implements ITResWaterintakeService 
+{
+    @Autowired
+    private TResWaterintakeMapper tResWaterintakeMapper;
+
+    /**
+     * 查询取水口
+     * 
+     * @param id 取水口ID
+     * @return 取水口
+     */
+    @Override
+    public TResWaterintake selectTResWaterintakeById(String id)
+    {
+        return tResWaterintakeMapper.selectTResWaterintakeById(id);
+    }
+
+    /**
+     * 查询取水口列表
+     * 
+     * @param tResWaterintake 取水口
+     * @return 取水口
+     */
+    @Override
+    public List<TResWaterintake> selectTResWaterintakeList(TResWaterintake tResWaterintake)
+    {
+        return tResWaterintakeMapper.selectTResWaterintakeList(tResWaterintake);
+    }
+
+    /**
+     * 新增取水口
+     * 
+     * @param tResWaterintake 取水口
+     * @return 结果
+     */
+    @Override
+    public int insertTResWaterintake(TResWaterintake tResWaterintake)
+    {
+        tResWaterintake.setCreateTime(DateUtils.getNowDate());
+        return tResWaterintakeMapper.insertTResWaterintake(tResWaterintake);
+    }
+
+    /**
+     * 修改取水口
+     * 
+     * @param tResWaterintake 取水口
+     * @return 结果
+     */
+    @Override
+    public int updateTResWaterintake(TResWaterintake tResWaterintake)
+    {
+        tResWaterintake.setUpdateTime(DateUtils.getNowDate());
+        return tResWaterintakeMapper.updateTResWaterintake(tResWaterintake);
+    }
+
+    /**
+     * 删除取水口对象
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTResWaterintakeByIds(String ids)
+    {
+        return tResWaterintakeMapper.deleteTResWaterintakeByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除取水口信息
+     * 
+     * @param id 取水口ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTResWaterintakeById(String id)
+    {
+        return tResWaterintakeMapper.deleteTResWaterintakeById(id);
+    }
+}

+ 136 - 0
mybusiness/src/main/resources/mapper/grid/manager/TResWaterintakeMapper.xml

@@ -0,0 +1,136 @@
+<?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.business.slfh.manager.waterintake.mapper.TResWaterintakeMapper">
+    
+    <resultMap type="TResWaterintake" id="TResWaterintakeResult">
+        <result property="id"    column="id"    />
+        <result property="status"    column="status"    />
+        <result property="remark"    column="remark"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="name"    column="name"    />
+        <result property="longitude"    column="longitude"    />
+        <result property="latitude"    column="latitude"    />
+        <result property="address"    column="address"    />
+        <result property="contactUser"    column="contact_user"    />
+        <result property="contactPhone"    column="contact_phone"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="createUserId"    column="create_user_id"    />
+        <result property="filename"    column="filename"    />
+        <result property="deptName"    column="dept_name"    />
+    </resultMap>
+
+    <sql id="selectTResWaterintakeVo">
+        select t.dept_id,
+        (select dept_name from sys_dept where dept_id=t.dept_id) dept_name,
+        t.create_user_id,
+        t.id, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time, t.name, t.longitude, t.latitude, t.address, t.contact_user, t.contact_phone from t_res_waterintake t
+    </sql>
+
+    <select id="selectTResWaterintakeList" parameterType="TResWaterintake" resultMap="TResWaterintakeResult">
+        <include refid="selectTResWaterintakeVo"/>
+        <where>  
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
+            <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="contactUser != null  and contactUser != ''"> and contact_user = #{contactUser}</if>
+            <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="filename != null  and filename != ''"> and filename like concat('%', #{filename}, '%')</if>
+            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selectTResWaterintakeById" parameterType="String" resultMap="TResWaterintakeResult">
+        <include refid="selectTResWaterintakeVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTResWaterintake" parameterType="TResWaterintake">
+        insert into t_res_waterintake
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">id,</if>
+            <if test="status != null">status,</if>
+            <if test="remark != null">remark,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="name != null">name,</if>
+            <if test="longitude != null">longitude,</if>
+            <if test="latitude != null">latitude,</if>
+            <if test="address != null">address,</if>
+            <if test="contactUser != null">contact_user,</if>
+            <if test="contactPhone != null">contact_phone,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="createUserId != null">create_user_id,</if>
+            <if test="filename != null">filename,</if>
+            <if test="deptName != null">dept_name,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">#{id},</if>
+            <if test="status != null">#{status},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="name != null">#{name},</if>
+            <if test="longitude != null">#{longitude},</if>
+            <if test="latitude != null">#{latitude},</if>
+            <if test="address != null">#{address},</if>
+            <if test="contactUser != null">#{contactUser},</if>
+            <if test="contactPhone != null">#{contactPhone},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="createUserId != null">#{createUserId},</if>
+            <if test="filename != null">#{filename},</if>
+            <if test="deptName != null">#{deptName},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTResWaterintake" parameterType="TResWaterintake">
+        update t_res_waterintake
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="status != null">status = #{status},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="name != null">name = #{name},</if>
+            <if test="longitude != null">longitude = #{longitude},</if>
+            <if test="latitude != null">latitude = #{latitude},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="contactUser != null">contact_user = #{contactUser},</if>
+            <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="filename != null">filename = #{filename},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTResWaterintakeById" parameterType="String">
+        delete from t_res_waterintake where id = #{id}
+    </delete>
+
+    <delete id="deleteTResWaterintakeByIds" parameterType="String">
+        delete from t_res_waterintake where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 90 - 0
mybusiness/src/main/resources/templates/business/manager/waterintake/add.html

@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增【取水口管理】')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-waterintake-add">
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">名称:</label>
+                <div class="col-sm-8">
+                    <input name="name" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label" style="cursor: pointer" onclick="choseLatLng()">经度:</label>
+                <div class="col-sm-8">
+                    <input maxlength="100" name="longitude" id="longitude" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label" style="cursor: pointer" onclick="choseLatLng()">纬度:</label>
+                <div class="col-sm-8">
+                    <input maxlength="100" name="latitude" id="latitude" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">地址:</label>
+                <div class="col-sm-8">
+                    <input name="address" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">联系人:</label>
+                <div class="col-sm-8">
+                    <input name="contactUser" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">电话:</label>
+                <div class="col-sm-8">
+                    <input name="contactPhone" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "business/manager/waterintake"
+        $("#form-stationland-add").validate({
+            focusCleanup: true,
+            rules:{
+                contactPhone:{
+                    isPhone:true
+                }
+            }
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-stationland-add').serialize());
+            }
+        }
+
+        function choseLatLng() {
+            var options = {
+                url: ctx + "business/manager/superMap/choseLatLng",
+                callBack: doLatLngSubmit
+            };
+            $.modal.openOptions(options);
+        }
+        function doLatLngSubmit(index, layero){
+
+            var body = layer.getChildFrame('body', index);
+            var longitude = body.find('#longitude').val();
+            var latitude = body.find('#latitude').val();
+
+            if (longitude.length === 0 || latitude.length === 0) {
+                $.modal.alertWarning("请选择坐标点");
+                return;
+            }
+
+            $("#longitude").val(longitude);
+            $("#latitude").val(latitude);
+
+            layer.close(index);
+        }
+    </script>
+</body>
+</html>

+ 91 - 0
mybusiness/src/main/resources/templates/business/manager/waterintake/edit.html

@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改取水口')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-waterintake-edit" th:object="${tResWaterintake}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">名称:</label>
+                <div class="col-sm-8">
+                    <input name="name" th:field="*{name}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label" style="cursor: pointer" onclick="choseLatLng()">经度:</label>
+                <div class="col-sm-8">
+                    <input maxlength="100" name="longitude" id="longitude" th:field="*{longitude}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label" style="cursor: pointer" onclick="choseLatLng()">纬度:</label>
+                <div class="col-sm-8">
+                    <input maxlength="100" name="latitude" id="latitude" th:field="*{latitude}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">地址:</label>
+                <div class="col-sm-8">
+                    <input name="address" th:field="*{address}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">联系人:</label>
+                <div class="col-sm-8">
+                    <input name="contactUser" th:field="*{contactUser}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">电话:</label>
+                <div class="col-sm-8">
+                    <input name="contactPhone" th:field="*{contactPhone}" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "business/manager/waterintake";
+        $("#form-stationland-edit").validate({
+            focusCleanup: true,
+            rules:{
+                contactPhone:{
+                    isPhone:true
+                }
+            }
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-stationland-edit').serialize());
+            }
+        }
+
+        function choseLatLng() {
+            var options = {
+                url: ctx + "business/manager/superMap/choseLatLng",
+                callBack: doLatLngSubmit
+            };
+            $.modal.openOptions(options);
+        }
+        function doLatLngSubmit(index, layero){
+
+            var body = layer.getChildFrame('body', index);
+            var longitude = body.find('#longitude').val();
+            var latitude = body.find('#latitude').val();
+
+            if (longitude.length === 0 || latitude.length === 0) {
+                $.modal.alertWarning("请选择坐标点");
+                return;
+            }
+
+            $("#longitude").val(longitude);
+            $("#latitude").val(latitude);
+
+            layer.close(index);
+        }
+    </script>
+</body>
+</html>

+ 146 - 0
mybusiness/src/main/resources/templates/business/manager/waterintake/index.html

@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('【取水口管理】列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>名称:</label>
+                                <input type="text" name="name"/>
+                            </li>
+                            <li>
+                                <label>联系人:</label>
+                                <input type="text" name="contactUser"/>
+                            </li>
+                            <li>
+                                <label>电话:</label>
+                                <input type="text" name="contactPhone"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="waterintake:waterintake:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="waterintake:waterintake:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="waterintake:waterintake:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <input style="display: none" type="file" name="file" id="fileField" onchange="importExcel(document.getElementById('fileField').value)">
+                <a class="btn btn-warning" shiro:hasPermission="system:forestdevice:export" onclick="fileField.click()">
+                    <i class="fa fa-download"></i> 导入
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('waterintake:waterintake:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('waterintake:waterintake:remove')}]];
+        var prefix = ctx + "/business/manager/waterintake";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "【取水口管理】",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field: 'id',
+                    title: 'ID',
+                    visible:false
+                },
+                {
+                    field: 'name',
+                    title: '名称'
+                },
+                {
+                    field: 'longitude',
+                    title: '经度'
+                },
+                {
+                    field: 'latitude',
+                    title: '纬度'
+                },
+                {
+                    field: 'address',
+                    title: '地址'
+                },
+                {
+                    field: 'contactUser',
+                    title: '联系人'
+                },
+                {
+                    field: 'contactPhone',
+                    title: '电话'
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+
+        function importExcel(filename) {
+            String.prototype.endWith=function(endStr){
+                var d=this.length-endStr.length;
+                return (d>=0&&this.lastIndexOf(endStr)==d)
+            }
+            if(!filename.endWith(".xls")){
+                $.modal.alert("请上传.xls文件!")
+                setTimeout("window.location.reload()",1000);
+                return;
+            }
+            //alert(filename)
+            var obj = new Object();
+            obj.filename = filename
+            $.ajax({
+                url : prefix + "/importExcel",
+                method : 'post',
+                data : obj,
+                success : function (e) {
+                    //console.log(e,"=e")
+                    if(e.code == 0){
+                        //alert("success")
+                        $.modal.alert(e.msg)
+                        setTimeout("window.location.reload()",1000);
+                    }else {
+                        $.modal.alert(e.msg)
+                        setTimeout("window.location.reload()",1000);
+                    }
+                }
+            });
+        }
+    </script>
+</body>
+</html>