提升机调度相关逻辑
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.device.tsj.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.tsj.domain.DeviceTsj;
|
||||
import com.ruoyi.device.tsj.service.IDeviceTsjService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 提升机设备Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/device/tsj")
|
||||
public class DeviceTsjController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDeviceTsjService deviceTsjService;
|
||||
|
||||
/**
|
||||
* 查询提升机设备列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:tsj:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DeviceTsj deviceTsj)
|
||||
{
|
||||
startPage();
|
||||
List<DeviceTsj> list = deviceTsjService.selectDeviceTsjList(deviceTsj);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出提升机设备列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:tsj:export')")
|
||||
@Log(title = "提升机设备", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DeviceTsj deviceTsj)
|
||||
{
|
||||
List<DeviceTsj> list = deviceTsjService.selectDeviceTsjList(deviceTsj);
|
||||
ExcelUtil<DeviceTsj> util = new ExcelUtil<DeviceTsj>(DeviceTsj.class);
|
||||
util.exportExcel(response, list, "提升机设备数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提升机设备详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:tsj:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(deviceTsjService.selectDeviceTsjById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增提升机设备
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:tsj:add')")
|
||||
@Log(title = "提升机设备", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DeviceTsj deviceTsj)
|
||||
{
|
||||
return toAjax(deviceTsjService.insertDeviceTsj(deviceTsj));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提升机设备
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:tsj:edit')")
|
||||
@Log(title = "提升机设备", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DeviceTsj deviceTsj)
|
||||
{
|
||||
return toAjax(deviceTsjService.updateDeviceTsj(deviceTsj));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除提升机设备
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:tsj:remove')")
|
||||
@Log(title = "提升机设备", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(deviceTsjService.deleteDeviceTsjByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -1,87 +1,120 @@
|
||||
package com.ruoyi.device.tsj.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;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 输送机对象 device_ssj
|
||||
* 提升机设备对象 device_tsj
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-04
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class DeviceTsj extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 设备唯一编码 */
|
||||
@Excel(name = "设备唯一编码")
|
||||
private String deviceCode ;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String name ;
|
||||
private String name;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
/** ip */
|
||||
@Excel(name = "ip")
|
||||
private String ip;
|
||||
|
||||
/** 设备IP */
|
||||
@Excel(name = "设备IP")
|
||||
private String ipAddress;
|
||||
/** 端口 */
|
||||
@Excel(name = "端口")
|
||||
private String port;
|
||||
|
||||
/** PLC读取地址 */
|
||||
@Excel(name = "PLC读取地址")
|
||||
/** plc读取地址 */
|
||||
@Excel(name = "plc读取地址")
|
||||
private String plcDbReadAddress;
|
||||
|
||||
/** 0-F 1-T */
|
||||
@Excel(name = "0-F 1-T")
|
||||
private String isActive;
|
||||
|
||||
/** PLC写入地址 */
|
||||
@Excel(name = "PLC写入地址")
|
||||
/** plc写入地址 */
|
||||
@Excel(name = "plc写入地址")
|
||||
private String plcDbWriteAddress;
|
||||
|
||||
/** 入库请求 */
|
||||
@Excel(name = "入库请求")
|
||||
private int rkqq;
|
||||
|
||||
/** 空闲 */
|
||||
@Excel(name = "空闲")
|
||||
private int kx;
|
||||
|
||||
/** 到位 */
|
||||
@Excel(name = "到位")
|
||||
private int dw;
|
||||
|
||||
/** 条码 */
|
||||
@Excel(name = "条码")
|
||||
private String trayCode;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private int taskNo;
|
||||
private Long rwh;
|
||||
|
||||
@Excel(name = "异常")
|
||||
private int exception;
|
||||
/** 执行阶段 */
|
||||
@Excel(name = "执行阶段")
|
||||
private Integer jdbz;
|
||||
|
||||
@Excel(name = "托盘尺寸")
|
||||
private int traySize;
|
||||
/** 设备状态 */
|
||||
@Excel(name = "设备状态")
|
||||
private Integer sbzt;
|
||||
|
||||
@Excel(name="允许放货")
|
||||
private int allowPut;
|
||||
/** 触发方式 */
|
||||
@Excel(name = "触发方式")
|
||||
private Integer czfs;
|
||||
|
||||
@Excel(name="输送线模式 1-入库 2-出库")
|
||||
private int model;
|
||||
/** 允许下发 */
|
||||
@Excel(name = "允许下发")
|
||||
private Integer yxxf;
|
||||
|
||||
/** 原排 */
|
||||
@Excel(name = "原排")
|
||||
private Integer yph;
|
||||
|
||||
/** 原列 */
|
||||
@Excel(name = "原列")
|
||||
private Integer ylh;
|
||||
|
||||
/** 原层 */
|
||||
@Excel(name = "原层")
|
||||
private Integer ych;
|
||||
|
||||
/** 目标排 */
|
||||
@Excel(name = "目标排")
|
||||
private Integer mbph;
|
||||
|
||||
/** 目标列 */
|
||||
@Excel(name = "目标列")
|
||||
private Integer mblh;
|
||||
|
||||
/** 目标层 */
|
||||
@Excel(name = "目标层")
|
||||
private Integer mbch;
|
||||
|
||||
/** 心跳信号 */
|
||||
@Excel(name = "心跳信号")
|
||||
private Integer xtxh;
|
||||
|
||||
/** 当前层数 */
|
||||
@Excel(name = "当前层数")
|
||||
private Integer dqcs;
|
||||
|
||||
/** 载货状态 */
|
||||
@Excel(name = "载货状态")
|
||||
private Integer hczt;
|
||||
|
||||
/** 备用1 */
|
||||
@Excel(name = "备用1")
|
||||
private Integer spare1;
|
||||
|
||||
/** 备用2 */
|
||||
@Excel(name = "备用2")
|
||||
private Integer spare2;
|
||||
|
||||
/** 备用3 */
|
||||
@Excel(name = "备用3")
|
||||
private Integer spare3;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.device.tsj.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.device.tsj.domain.DeviceTsj;
|
||||
|
||||
/**
|
||||
* 提升机设备Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
public interface DeviceTsjMapper
|
||||
{
|
||||
/**
|
||||
* 查询提升机设备
|
||||
*
|
||||
* @param id 提升机设备主键
|
||||
* @return 提升机设备
|
||||
*/
|
||||
public DeviceTsj selectDeviceTsjById(Long id);
|
||||
|
||||
/**
|
||||
* 查询提升机设备列表
|
||||
*
|
||||
* @param deviceTsj 提升机设备
|
||||
* @return 提升机设备集合
|
||||
*/
|
||||
public List<DeviceTsj> selectDeviceTsjList(DeviceTsj deviceTsj);
|
||||
|
||||
/**
|
||||
* 新增提升机设备
|
||||
*
|
||||
* @param deviceTsj 提升机设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceTsj(DeviceTsj deviceTsj);
|
||||
|
||||
/**
|
||||
* 修改提升机设备
|
||||
*
|
||||
* @param deviceTsj 提升机设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceTsj(DeviceTsj deviceTsj);
|
||||
|
||||
/**
|
||||
* 删除提升机设备
|
||||
*
|
||||
* @param id 提升机设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceTsjById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除提升机设备
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceTsjByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.device.tsj.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.device.tsj.domain.DeviceTsj;
|
||||
|
||||
/**
|
||||
* 提升机设备Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
public interface IDeviceTsjService
|
||||
{
|
||||
/**
|
||||
* 查询提升机设备
|
||||
*
|
||||
* @param id 提升机设备主键
|
||||
* @return 提升机设备
|
||||
*/
|
||||
public DeviceTsj selectDeviceTsjById(Long id);
|
||||
|
||||
/**
|
||||
* 查询提升机设备列表
|
||||
*
|
||||
* @param deviceTsj 提升机设备
|
||||
* @return 提升机设备集合
|
||||
*/
|
||||
public List<DeviceTsj> selectDeviceTsjList(DeviceTsj deviceTsj);
|
||||
|
||||
/**
|
||||
* 新增提升机设备
|
||||
*
|
||||
* @param deviceTsj 提升机设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceTsj(DeviceTsj deviceTsj);
|
||||
|
||||
/**
|
||||
* 修改提升机设备
|
||||
*
|
||||
* @param deviceTsj 提升机设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceTsj(DeviceTsj deviceTsj);
|
||||
|
||||
/**
|
||||
* 批量删除提升机设备
|
||||
*
|
||||
* @param ids 需要删除的提升机设备主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceTsjByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除提升机设备信息
|
||||
*
|
||||
* @param id 提升机设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceTsjById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.device.tsj.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.device.tsj.mapper.DeviceTsjMapper;
|
||||
import com.ruoyi.device.tsj.domain.DeviceTsj;
|
||||
import com.ruoyi.device.tsj.service.IDeviceTsjService;
|
||||
|
||||
/**
|
||||
* 提升机设备Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
@Service
|
||||
public class DeviceTsjServiceImpl implements IDeviceTsjService
|
||||
{
|
||||
@Autowired
|
||||
private DeviceTsjMapper deviceTsjMapper;
|
||||
|
||||
/**
|
||||
* 查询提升机设备
|
||||
*
|
||||
* @param id 提升机设备主键
|
||||
* @return 提升机设备
|
||||
*/
|
||||
@Override
|
||||
public DeviceTsj selectDeviceTsjById(Long id)
|
||||
{
|
||||
return deviceTsjMapper.selectDeviceTsjById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询提升机设备列表
|
||||
*
|
||||
* @param deviceTsj 提升机设备
|
||||
* @return 提升机设备
|
||||
*/
|
||||
@Override
|
||||
public List<DeviceTsj> selectDeviceTsjList(DeviceTsj deviceTsj)
|
||||
{
|
||||
return deviceTsjMapper.selectDeviceTsjList(deviceTsj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增提升机设备
|
||||
*
|
||||
* @param deviceTsj 提升机设备
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDeviceTsj(DeviceTsj deviceTsj)
|
||||
{
|
||||
return deviceTsjMapper.insertDeviceTsj(deviceTsj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提升机设备
|
||||
*
|
||||
* @param deviceTsj 提升机设备
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDeviceTsj(DeviceTsj deviceTsj)
|
||||
{
|
||||
return deviceTsjMapper.updateDeviceTsj(deviceTsj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除提升机设备
|
||||
*
|
||||
* @param ids 需要删除的提升机设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceTsjByIds(Long[] ids)
|
||||
{
|
||||
return deviceTsjMapper.deleteDeviceTsjByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除提升机设备信息
|
||||
*
|
||||
* @param id 提升机设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceTsjById(Long id)
|
||||
{
|
||||
return deviceTsjMapper.deleteDeviceTsjById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user