小车设备表初始化
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.device.srgv.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.device.srgv.domain.DeviceSrgv;
|
||||
import com.ruoyi.device.srgv.service.IDeviceSrgvService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 四向小车设备表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/device/srgv")
|
||||
public class DeviceSrgvController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDeviceSrgvService deviceSrgvService;
|
||||
|
||||
/**
|
||||
* 查询四向小车设备表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:srgv:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DeviceSrgv deviceSrgv)
|
||||
{
|
||||
startPage();
|
||||
List<DeviceSrgv> list = deviceSrgvService.selectDeviceSrgvList(deviceSrgv);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出四向小车设备表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:srgv:export')")
|
||||
@Log(title = "四向小车设备表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DeviceSrgv deviceSrgv)
|
||||
{
|
||||
List<DeviceSrgv> list = deviceSrgvService.selectDeviceSrgvList(deviceSrgv);
|
||||
ExcelUtil<DeviceSrgv> util = new ExcelUtil<DeviceSrgv>(DeviceSrgv.class);
|
||||
util.exportExcel(response, list, "四向小车设备表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取四向小车设备表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:srgv:query')")
|
||||
@GetMapping(value = "/{guid}")
|
||||
public AjaxResult getInfo(@PathVariable("guid") String guid)
|
||||
{
|
||||
return success(deviceSrgvService.selectDeviceSrgvByGuid(guid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增四向小车设备表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:srgv:add')")
|
||||
@Log(title = "四向小车设备表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DeviceSrgv deviceSrgv)
|
||||
{
|
||||
return toAjax(deviceSrgvService.insertDeviceSrgv(deviceSrgv));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改四向小车设备表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:srgv:edit')")
|
||||
@Log(title = "四向小车设备表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DeviceSrgv deviceSrgv)
|
||||
{
|
||||
return toAjax(deviceSrgvService.updateDeviceSrgv(deviceSrgv));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除四向小车设备表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:srgv:remove')")
|
||||
@Log(title = "四向小车设备表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{guids}")
|
||||
public AjaxResult remove(@PathVariable String[] guids)
|
||||
{
|
||||
return toAjax(deviceSrgvService.deleteDeviceSrgvByGuids(guids));
|
||||
}
|
||||
}
|
||||
@@ -1,58 +1,174 @@
|
||||
package com.ruoyi.device.srgv.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 输送机对象 device_ssj
|
||||
* 四向小车设备表对象 device_srgv
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-04
|
||||
* @date 2025-11-21
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class DeviceSrgv extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*
|
||||
* 实时数据
|
||||
* */
|
||||
private int taskNo;//任务号
|
||||
private String srcSite;//原地址
|
||||
private String tarSite;//目标地址
|
||||
private String currSite;//当期地址
|
||||
|
||||
private int taskType;//任务类型
|
||||
/** 唯一id */
|
||||
private String guid;
|
||||
|
||||
private int battery;//电量
|
||||
private int workMode;//工作模式
|
||||
private int alarm;//报警
|
||||
private int status;//车状态
|
||||
private int finish;//接收完成标志 1接收完成
|
||||
private int chargeFlag;//充电标志 todo 充电状态值确认
|
||||
private int workPhase;//工作阶段
|
||||
private int errorMsg;//异常信息
|
||||
private int deviceRequest;//输送机对接请求
|
||||
private int changeLayer;//换层标志
|
||||
private int cargoFlag;//载货 0未知 1空载 2载货
|
||||
private int manualCharge;//手动充电 0未知 1充电
|
||||
/** 设备id */
|
||||
@Excel(name = "设备id")
|
||||
private Integer deviceId;
|
||||
|
||||
private int undefined1;//
|
||||
private int undefined2;//
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
private String path;//路径
|
||||
/** ip */
|
||||
@Excel(name = "ip")
|
||||
private String ip;
|
||||
|
||||
//其他属性
|
||||
private int currFloor;//当前层
|
||||
/** 端口 */
|
||||
@Excel(name = "端口")
|
||||
private Integer port;
|
||||
|
||||
private String spaceArea;//当前库存 01小库 02大库
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
|
||||
private int allowSend;//1允许下发
|
||||
/** 设置层 */
|
||||
@Excel(name = "设置层")
|
||||
private Integer setFloor;
|
||||
|
||||
/** 上次充电时间 */
|
||||
@Excel(name = "上次充电时间")
|
||||
private String powerTime;
|
||||
|
||||
/** 最后任务时间 */
|
||||
@Excel(name = "最后任务时间")
|
||||
private String lastTime;
|
||||
|
||||
/** 0 初始化 1正常 */
|
||||
@Excel(name = "0 初始化 1正常")
|
||||
private String agvStatus;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private Integer taskNo;
|
||||
|
||||
/** 原位置 */
|
||||
@Excel(name = "原位置")
|
||||
private String srcSite;
|
||||
|
||||
/** 目标位置 */
|
||||
@Excel(name = "目标位置")
|
||||
private String tarSite;
|
||||
|
||||
/** 当前位置 */
|
||||
@Excel(name = "当前位置")
|
||||
private String currSite;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型")
|
||||
private Integer taskType;
|
||||
|
||||
/** 电量 */
|
||||
@Excel(name = "电量")
|
||||
private Integer battery;
|
||||
|
||||
/** 工作模式 */
|
||||
@Excel(name = "工作模式")
|
||||
private Integer workMode;
|
||||
|
||||
/** 报警 */
|
||||
@Excel(name = "报警")
|
||||
private Integer alarm;
|
||||
|
||||
/** 车状态 */
|
||||
@Excel(name = "车状态")
|
||||
private Integer status;
|
||||
|
||||
/** 完成下发标志 */
|
||||
@Excel(name = "完成下发标志")
|
||||
private Integer finish;
|
||||
|
||||
/** 充电标志 */
|
||||
@Excel(name = "充电标志")
|
||||
private Integer chargeFlag;
|
||||
|
||||
/** 执行阶段 */
|
||||
@Excel(name = "执行阶段")
|
||||
private Integer workPhase;
|
||||
|
||||
/** 异常信息 */
|
||||
@Excel(name = "异常信息")
|
||||
private Integer errMsg;
|
||||
|
||||
/** 输送机请求 */
|
||||
@Excel(name = "输送机请求")
|
||||
private Integer ssjRequest;
|
||||
|
||||
/** 换层标志 */
|
||||
@Excel(name = "换层标志")
|
||||
private Integer changeLayer;
|
||||
|
||||
/** 载货标志 */
|
||||
@Excel(name = "载货标志")
|
||||
private Integer cargoFlag;
|
||||
|
||||
/** 手动充电 */
|
||||
@Excel(name = "手动充电")
|
||||
private Integer manualCharge;
|
||||
|
||||
/** 路径 */
|
||||
@Excel(name = "路径")
|
||||
private String path;
|
||||
|
||||
/** 允许下发 */
|
||||
@Excel(name = "允许下发")
|
||||
private Integer allowSend;
|
||||
|
||||
/** 当前层数 */
|
||||
@Excel(name = "当前层数")
|
||||
private Integer currFloor;
|
||||
|
||||
/** 离线站点 */
|
||||
@Excel(name = "离线站点")
|
||||
private String offlineSite;
|
||||
|
||||
/** 车辆锁 */
|
||||
@Excel(name = "车辆锁")
|
||||
private Integer locked;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private String spare1;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private String spare2;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private String spare3;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private String spare4;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private String spare5;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.device.srgv.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.device.srgv.domain.DeviceSrgv;
|
||||
|
||||
/**
|
||||
* 四向小车设备表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-21
|
||||
*/
|
||||
public interface DeviceSrgvMapper
|
||||
{
|
||||
/**
|
||||
* 查询四向小车设备表
|
||||
*
|
||||
* @param guid 四向小车设备表主键
|
||||
* @return 四向小车设备表
|
||||
*/
|
||||
public DeviceSrgv selectDeviceSrgvByGuid(String guid);
|
||||
|
||||
/**
|
||||
* 查询四向小车设备表列表
|
||||
*
|
||||
* @param deviceSrgv 四向小车设备表
|
||||
* @return 四向小车设备表集合
|
||||
*/
|
||||
public List<DeviceSrgv> selectDeviceSrgvList(DeviceSrgv deviceSrgv);
|
||||
|
||||
/**
|
||||
* 新增四向小车设备表
|
||||
*
|
||||
* @param deviceSrgv 四向小车设备表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceSrgv(DeviceSrgv deviceSrgv);
|
||||
|
||||
/**
|
||||
* 修改四向小车设备表
|
||||
*
|
||||
* @param deviceSrgv 四向小车设备表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceSrgv(DeviceSrgv deviceSrgv);
|
||||
|
||||
/**
|
||||
* 删除四向小车设备表
|
||||
*
|
||||
* @param guid 四向小车设备表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceSrgvByGuid(String guid);
|
||||
|
||||
/**
|
||||
* 批量删除四向小车设备表
|
||||
*
|
||||
* @param guids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceSrgvByGuids(String[] guids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.device.srgv.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.device.srgv.domain.DeviceSrgv;
|
||||
|
||||
/**
|
||||
* 四向小车设备表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-21
|
||||
*/
|
||||
public interface IDeviceSrgvService
|
||||
{
|
||||
/**
|
||||
* 查询四向小车设备表
|
||||
*
|
||||
* @param guid 四向小车设备表主键
|
||||
* @return 四向小车设备表
|
||||
*/
|
||||
public DeviceSrgv selectDeviceSrgvByGuid(String guid);
|
||||
|
||||
/**
|
||||
* 查询四向小车设备表列表
|
||||
*
|
||||
* @param deviceSrgv 四向小车设备表
|
||||
* @return 四向小车设备表集合
|
||||
*/
|
||||
public List<DeviceSrgv> selectDeviceSrgvList(DeviceSrgv deviceSrgv);
|
||||
|
||||
/**
|
||||
* 新增四向小车设备表
|
||||
*
|
||||
* @param deviceSrgv 四向小车设备表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceSrgv(DeviceSrgv deviceSrgv);
|
||||
|
||||
/**
|
||||
* 修改四向小车设备表
|
||||
*
|
||||
* @param deviceSrgv 四向小车设备表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceSrgv(DeviceSrgv deviceSrgv);
|
||||
|
||||
/**
|
||||
* 批量删除四向小车设备表
|
||||
*
|
||||
* @param guids 需要删除的四向小车设备表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceSrgvByGuids(String[] guids);
|
||||
|
||||
/**
|
||||
* 删除四向小车设备表信息
|
||||
*
|
||||
* @param guid 四向小车设备表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceSrgvByGuid(String guid);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.device.srgv.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.device.srgv.mapper.DeviceSrgvMapper;
|
||||
import com.ruoyi.device.srgv.domain.DeviceSrgv;
|
||||
import com.ruoyi.device.srgv.service.IDeviceSrgvService;
|
||||
|
||||
/**
|
||||
* 四向小车设备表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-21
|
||||
*/
|
||||
@Service
|
||||
public class DeviceSrgvServiceImpl implements IDeviceSrgvService
|
||||
{
|
||||
@Autowired
|
||||
private DeviceSrgvMapper deviceSrgvMapper;
|
||||
|
||||
/**
|
||||
* 查询四向小车设备表
|
||||
*
|
||||
* @param guid 四向小车设备表主键
|
||||
* @return 四向小车设备表
|
||||
*/
|
||||
@Override
|
||||
public DeviceSrgv selectDeviceSrgvByGuid(String guid)
|
||||
{
|
||||
return deviceSrgvMapper.selectDeviceSrgvByGuid(guid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询四向小车设备表列表
|
||||
*
|
||||
* @param deviceSrgv 四向小车设备表
|
||||
* @return 四向小车设备表
|
||||
*/
|
||||
@Override
|
||||
public List<DeviceSrgv> selectDeviceSrgvList(DeviceSrgv deviceSrgv)
|
||||
{
|
||||
return deviceSrgvMapper.selectDeviceSrgvList(deviceSrgv);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增四向小车设备表
|
||||
*
|
||||
* @param deviceSrgv 四向小车设备表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDeviceSrgv(DeviceSrgv deviceSrgv)
|
||||
{
|
||||
return deviceSrgvMapper.insertDeviceSrgv(deviceSrgv);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改四向小车设备表
|
||||
*
|
||||
* @param deviceSrgv 四向小车设备表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDeviceSrgv(DeviceSrgv deviceSrgv)
|
||||
{
|
||||
return deviceSrgvMapper.updateDeviceSrgv(deviceSrgv);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除四向小车设备表
|
||||
*
|
||||
* @param guids 需要删除的四向小车设备表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceSrgvByGuids(String[] guids)
|
||||
{
|
||||
return deviceSrgvMapper.deleteDeviceSrgvByGuids(guids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除四向小车设备表信息
|
||||
*
|
||||
* @param guid 四向小车设备表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceSrgvByGuid(String guid)
|
||||
{
|
||||
return deviceSrgvMapper.deleteDeviceSrgvByGuid(guid);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user