增加 桩位i
parent
fd34ece36f
commit
a529fb202f
@ -0,0 +1,125 @@
|
||||
package com.ruoyi.device.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.device.domain.BaseLocation;
|
||||
import com.ruoyi.device.service.IBaseLocationService;
|
||||
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.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 桩位信息维护Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/device/base_location")
|
||||
public class BaseLocationController extends BaseController
|
||||
{
|
||||
private String prefix = "device/base_location";
|
||||
|
||||
@Autowired
|
||||
private IBaseLocationService baseLocationService;
|
||||
|
||||
@RequiresPermissions("device:base_location:view")
|
||||
@GetMapping()
|
||||
public String base_location()
|
||||
{
|
||||
return prefix + "/base_location";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询桩位信息维护列表
|
||||
*/
|
||||
@RequiresPermissions("device:base_location:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BaseLocation baseLocation)
|
||||
{
|
||||
startPage();
|
||||
List<BaseLocation> list = baseLocationService.selectBaseLocationList(baseLocation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出桩位信息维护列表
|
||||
*/
|
||||
@RequiresPermissions("device:base_location:export")
|
||||
@Log(title = "桩位信息维护", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseLocation baseLocation)
|
||||
{
|
||||
List<BaseLocation> list = baseLocationService.selectBaseLocationList(baseLocation);
|
||||
ExcelUtil<BaseLocation> util = new ExcelUtil<BaseLocation>(BaseLocation.class);
|
||||
return util.exportExcel(list, "桩位信息维护数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增桩位信息维护
|
||||
*/
|
||||
@RequiresPermissions("device:base_location:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存桩位信息维护
|
||||
*/
|
||||
@RequiresPermissions("device:base_location:add")
|
||||
@Log(title = "桩位信息维护", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BaseLocation baseLocation)
|
||||
{
|
||||
return toAjax(baseLocationService.insertBaseLocation(baseLocation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改桩位信息维护
|
||||
*/
|
||||
@RequiresPermissions("device:base_location:edit")
|
||||
@GetMapping("/edit/{locationId}")
|
||||
public String edit(@PathVariable("locationId") Long locationId, ModelMap mmap)
|
||||
{
|
||||
BaseLocation baseLocation = baseLocationService.selectBaseLocationByLocationId(locationId);
|
||||
mmap.put("baseLocation", baseLocation);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存桩位信息维护
|
||||
*/
|
||||
@RequiresPermissions("device:base_location:edit")
|
||||
@Log(title = "桩位信息维护", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BaseLocation baseLocation)
|
||||
{
|
||||
return toAjax(baseLocationService.updateBaseLocation(baseLocation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除桩位信息维护
|
||||
*/
|
||||
@RequiresPermissions("device:base_location:remove")
|
||||
@Log(title = "桩位信息维护", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(baseLocationService.deleteBaseLocationByLocationIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.ruoyi.device.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 桩位信息维护对象 device_base_location
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
public class BaseLocation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 桩位主键 */
|
||||
private Long locationId;
|
||||
|
||||
/** 桩位编码 */
|
||||
@Excel(name = "桩位编码")
|
||||
private String rfidCode;
|
||||
|
||||
/** 桩位名称 */
|
||||
@Excel(name = "桩位名称")
|
||||
private String locationName;
|
||||
|
||||
/** 所属机坪 */
|
||||
@Excel(name = "所属机坪")
|
||||
private String airLocation;
|
||||
|
||||
/** 安装位置 */
|
||||
@Excel(name = "安装位置")
|
||||
private String installPosition;
|
||||
|
||||
public Long getLocationId()
|
||||
{
|
||||
return locationId;
|
||||
}
|
||||
|
||||
public void setLocationId(Long locationId)
|
||||
{
|
||||
this.locationId = locationId;
|
||||
}
|
||||
|
||||
public String getRfidCode()
|
||||
{
|
||||
return rfidCode;
|
||||
}
|
||||
|
||||
public void setRfidCode(String rfidCode)
|
||||
{
|
||||
this.rfidCode = rfidCode;
|
||||
}
|
||||
|
||||
public String getLocationName()
|
||||
{
|
||||
return locationName;
|
||||
}
|
||||
|
||||
public void setLocationName(String locationName)
|
||||
{
|
||||
this.locationName = locationName;
|
||||
}
|
||||
|
||||
public String getAirLocation()
|
||||
{
|
||||
return airLocation;
|
||||
}
|
||||
|
||||
public void setAirLocation(String airLocation)
|
||||
{
|
||||
this.airLocation = airLocation;
|
||||
}
|
||||
|
||||
public String getInstallPosition()
|
||||
{
|
||||
return installPosition;
|
||||
}
|
||||
|
||||
public void setInstallPosition(String installPosition)
|
||||
{
|
||||
this.installPosition = installPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("locationId", getLocationId())
|
||||
.append("rfidCode", getRfidCode())
|
||||
.append("locationName", getLocationName())
|
||||
.append("airLocation", getAirLocation())
|
||||
.append("remark", getRemark())
|
||||
.append("installPosition", getInstallPosition())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.ruoyi.device.mapper;
|
||||
|
||||
import com.ruoyi.device.domain.BaseLocation;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 桩位信息维护Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
@Repository
|
||||
public interface BaseLocationMapper
|
||||
{
|
||||
/**
|
||||
* 查询桩位信息维护
|
||||
*
|
||||
* @param locationId 桩位信息维护主键
|
||||
* @return 桩位信息维护
|
||||
*/
|
||||
public BaseLocation selectBaseLocationByLocationId(Long locationId);
|
||||
|
||||
/**
|
||||
* 查询桩位信息维护列表
|
||||
*
|
||||
* @param baseLocation 桩位信息维护
|
||||
* @return 桩位信息维护集合
|
||||
*/
|
||||
public List<BaseLocation> selectBaseLocationList(BaseLocation baseLocation);
|
||||
|
||||
/**
|
||||
* 新增桩位信息维护
|
||||
*
|
||||
* @param baseLocation 桩位信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseLocation(BaseLocation baseLocation);
|
||||
|
||||
/**
|
||||
* 修改桩位信息维护
|
||||
*
|
||||
* @param baseLocation 桩位信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseLocation(BaseLocation baseLocation);
|
||||
|
||||
/**
|
||||
* 删除桩位信息维护
|
||||
*
|
||||
* @param locationId 桩位信息维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseLocationByLocationId(Long locationId);
|
||||
|
||||
/**
|
||||
* 批量删除桩位信息维护
|
||||
*
|
||||
* @param locationIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseLocationByLocationIds(String[] locationIds);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.device.service;
|
||||
|
||||
import com.ruoyi.device.domain.BaseLocation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 桩位信息维护Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
public interface IBaseLocationService
|
||||
{
|
||||
/**
|
||||
* 查询桩位信息维护
|
||||
*
|
||||
* @param locationId 桩位信息维护主键
|
||||
* @return 桩位信息维护
|
||||
*/
|
||||
public BaseLocation selectBaseLocationByLocationId(Long locationId);
|
||||
|
||||
/**
|
||||
* 查询桩位信息维护列表
|
||||
*
|
||||
* @param baseLocation 桩位信息维护
|
||||
* @return 桩位信息维护集合
|
||||
*/
|
||||
public List<BaseLocation> selectBaseLocationList(BaseLocation baseLocation);
|
||||
|
||||
/**
|
||||
* 新增桩位信息维护
|
||||
*
|
||||
* @param baseLocation 桩位信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseLocation(BaseLocation baseLocation);
|
||||
|
||||
/**
|
||||
* 修改桩位信息维护
|
||||
*
|
||||
* @param baseLocation 桩位信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseLocation(BaseLocation baseLocation);
|
||||
|
||||
/**
|
||||
* 批量删除桩位信息维护
|
||||
*
|
||||
* @param locationIds 需要删除的桩位信息维护主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseLocationByLocationIds(String locationIds);
|
||||
|
||||
/**
|
||||
* 删除桩位信息维护信息
|
||||
*
|
||||
* @param locationId 桩位信息维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseLocationByLocationId(Long locationId);
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.ruoyi.device.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.device.domain.BaseLocation;
|
||||
import com.ruoyi.device.mapper.BaseLocationMapper;
|
||||
import com.ruoyi.device.service.IBaseLocationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 桩位信息维护Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
@Service
|
||||
public class BaseLocationServiceImpl implements IBaseLocationService
|
||||
{
|
||||
@Autowired
|
||||
private BaseLocationMapper baseLocationMapper;
|
||||
|
||||
/**
|
||||
* 查询桩位信息维护
|
||||
*
|
||||
* @param locationId 桩位信息维护主键
|
||||
* @return 桩位信息维护
|
||||
*/
|
||||
@Override
|
||||
public BaseLocation selectBaseLocationByLocationId(Long locationId)
|
||||
{
|
||||
return baseLocationMapper.selectBaseLocationByLocationId(locationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询桩位信息维护列表
|
||||
*
|
||||
* @param baseLocation 桩位信息维护
|
||||
* @return 桩位信息维护
|
||||
*/
|
||||
@Override
|
||||
public List<BaseLocation> selectBaseLocationList(BaseLocation baseLocation)
|
||||
{
|
||||
return baseLocationMapper.selectBaseLocationList(baseLocation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增桩位信息维护
|
||||
*
|
||||
* @param baseLocation 桩位信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseLocation(BaseLocation baseLocation)
|
||||
{
|
||||
baseLocation.setCreateTime(DateUtils.getNowDate());
|
||||
baseLocation.setCreateBy(ShiroUtils.getLoginName());
|
||||
return baseLocationMapper.insertBaseLocation(baseLocation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改桩位信息维护
|
||||
*
|
||||
* @param baseLocation 桩位信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseLocation(BaseLocation baseLocation)
|
||||
{
|
||||
baseLocation.setUpdateTime(DateUtils.getNowDate());
|
||||
baseLocation.setUpdateBy(ShiroUtils.getLoginName());
|
||||
return baseLocationMapper.updateBaseLocation(baseLocation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除桩位信息维护
|
||||
*
|
||||
* @param locationIds 需要删除的桩位信息维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseLocationByLocationIds(String locationIds)
|
||||
{
|
||||
return baseLocationMapper.deleteBaseLocationByLocationIds(Convert.toStrArray(locationIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除桩位信息维护信息
|
||||
*
|
||||
* @param locationId 桩位信息维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseLocationByLocationId(Long locationId)
|
||||
{
|
||||
return baseLocationMapper.deleteBaseLocationByLocationId(locationId);
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
<?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.ruoyi.device.mapper.BaseLocationMapper">
|
||||
|
||||
<resultMap type="BaseLocation" id="BaseLocationResult">
|
||||
<result property="locationId" column="location_id" />
|
||||
<result property="rfidCode" column="rfid_code" />
|
||||
<result property="locationName" column="location_name" />
|
||||
<result property="airLocation" column="air_location" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="installPosition" column="install_position" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseLocationVo">
|
||||
select location_id, rfid_code, location_name, air_location, remark, install_position, create_by, create_time, update_by, update_time from device_base_location
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseLocationList" parameterType="BaseLocation" resultMap="BaseLocationResult">
|
||||
<include refid="selectBaseLocationVo"/>
|
||||
<where>
|
||||
<if test="rfidCode != null and rfidCode != ''"> and rfid_code = #{rfidCode}</if>
|
||||
<if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if>
|
||||
<if test="airLocation != null and airLocation != ''"> and air_location = #{airLocation}</if>
|
||||
<if test="installPosition != null and installPosition != ''"> and install_position = #{installPosition}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseLocationByLocationId" parameterType="Long" resultMap="BaseLocationResult">
|
||||
<include refid="selectBaseLocationVo"/>
|
||||
where location_id = #{locationId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseLocation" parameterType="BaseLocation" useGeneratedKeys="true" keyProperty="locationId">
|
||||
insert into device_base_location
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="rfidCode != null">rfid_code,</if>
|
||||
<if test="locationName != null">location_name,</if>
|
||||
<if test="airLocation != null">air_location,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="installPosition != null">install_position,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rfidCode != null">#{rfidCode},</if>
|
||||
<if test="locationName != null">#{locationName},</if>
|
||||
<if test="airLocation != null">#{airLocation},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="installPosition != null">#{installPosition},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseLocation" parameterType="BaseLocation">
|
||||
update device_base_location
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="rfidCode != null">rfid_code = #{rfidCode},</if>
|
||||
<if test="locationName != null">location_name = #{locationName},</if>
|
||||
<if test="airLocation != null">air_location = #{airLocation},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="installPosition != null">install_position = #{installPosition},</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>
|
||||
</trim>
|
||||
where location_id = #{locationId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseLocationByLocationId" parameterType="Long">
|
||||
delete from device_base_location where location_id = #{locationId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseLocationByLocationIds" parameterType="String">
|
||||
delete from device_base_location where location_id in
|
||||
<foreach item="locationId" collection="array" open="(" separator="," close=")">
|
||||
#{locationId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,22 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('桩位信息维护', '2000', '1', '/device/base_location', 'C', '0', 'device:base_location:view', '#', 'admin', sysdate(), '', null, '桩位信息维护菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('桩位信息维护查询', @parentId, '1', '#', 'F', '0', 'device:base_location:list', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('桩位信息维护新增', @parentId, '2', '#', 'F', '0', 'device:base_location:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('桩位信息维护修改', @parentId, '3', '#', 'F', '0', 'device:base_location:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('桩位信息维护删除', @parentId, '4', '#', 'F', '0', 'device:base_location:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('桩位信息维护导出', @parentId, '5', '#', 'F', '0', 'device:base_location:export', '#', 'admin', sysdate(), '', null, '');
|
@ -0,0 +1,67 @@
|
||||
<!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-base_location-add">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">桩位编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" name="rfidCode" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">桩位名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" name="locationName" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">所属机坪:</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control" name="airLocation" th:with="type=${@lundang.selectLundangBaseStoreList()}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.storeName}" th:value="${dict.storeName}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" name="remark" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">安装位置:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" name="installPosition" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "device/base_location"
|
||||
$("#form-base_location-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-base_location-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:th="http://www.thymeleaf.org">
|
||||
<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 name="rfidCode" type="text"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>桩位名称:</label>
|
||||
<input name="locationName" type="text"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>所属机坪:</label>
|
||||
<select name="airLocation" th:with="type=${@lundang.selectLundangBaseStoreList()}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.storeName}" th:value="${dict.storeName}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>安装位置:</label>
|
||||
<input name="installPosition" type="text"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</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="device:base_location:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="device:base_location:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="device:base_location:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="device:base_location:export">
|
||||
<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('device:base_location:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('device:base_location:remove')}]];
|
||||
var airLocationDatas = [[${@dict.getType('sys_user_sex')}]];
|
||||
var prefix = ctx + "device/base_location";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "桩位信息维护",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'locationId',
|
||||
title: '桩位主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'rfidCode',
|
||||
title: '桩位编码'
|
||||
},
|
||||
{
|
||||
field: 'locationName',
|
||||
title: '桩位名称'
|
||||
},
|
||||
{
|
||||
field: 'airLocation',
|
||||
title: '所属机坪',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(airLocationDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '说明'
|
||||
},
|
||||
{
|
||||
field: 'installPosition',
|
||||
title: '安装位置'
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '创建人'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
field: 'updateBy',
|
||||
title: '更新人'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
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.locationId + '\')"><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.locationId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,68 @@
|
||||
<!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-base_location-edit" th:object="${baseLocation}">
|
||||
<input name="locationId" th:field="*{locationId}" type="hidden">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">桩位编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" name="rfidCode" th:field="*{rfidCode}" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">桩位名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" name="locationName" th:field="*{locationName}" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">所属机坪:</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control" name="airLocation" th:with="type=${@lundang.selectLundangBaseStoreList()}">
|
||||
<option th:each="dict : ${type}" th:field="*{airLocation}" th:text="${dict.storeName}" th:value="${dict.storeName}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" name="remark" th:field="*{remark}" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">安装位置:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" name="installPosition" th:field="*{installPosition}" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "device/base_location";
|
||||
$("#form-base_location-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-base_location-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue