提升机调度相关逻辑
This commit is contained in:
@@ -32,23 +32,37 @@ public class TaskStatusCode {
|
||||
/**
|
||||
* 任务执行阶段 AGV
|
||||
*/
|
||||
public static final String TASK_EP_AGV = "1";
|
||||
public static final String TASK_EP_SRGV_KC_TSJ_RK = "1";
|
||||
public static final String TASK_EP_TJS_KC_UNLOAD = "2";
|
||||
public static final String TASK_EP_SRGV_KC_TSJ = "3";
|
||||
public static final String TASK_EP_TJS_KC_LOAD = "4";
|
||||
public static final String TASK_EP_SRGV_KC_TSJ_CK = "5";
|
||||
public static final String TASK_EP_SRGV_QH = "6";
|
||||
public static final String TASK_EP_SRGV_MC_TSJ_RK = "7";
|
||||
public static final String TASK_EP_TJS_MC_UNLOAD = "8";
|
||||
public static final String TASK_EP_SRGV_MC_TSJ = "9";
|
||||
public static final String TASK_EP_TJS_MC_LOAD = "10";
|
||||
public static final String TASK_EP_SRGV_MC_TSJ_CK = "11";
|
||||
public static final String TASK_EP_SRGV_FH = "12";
|
||||
public static final String TASK_EP_SSJ = "13";
|
||||
public static final String TASK_EP_CK = "14";
|
||||
|
||||
/**
|
||||
* 任务执行阶段 入口输送机
|
||||
*/
|
||||
public static final String TASK_EP_SSJ = "2";
|
||||
//public static final String TASK_EP_SSJ = "2";
|
||||
/**
|
||||
* 任务执行阶段 巷道口
|
||||
*/
|
||||
public static final String TASK_EP_ROADWAY_SSJ = "3";
|
||||
//public static final String TASK_EP_ROADWAY_SSJ = "3";
|
||||
/**
|
||||
* 任务执行阶段 堆垛机
|
||||
*/
|
||||
public static final String TASK_EP_DDJ = "4";
|
||||
//public static final String TASK_EP_DDJ = "4";
|
||||
|
||||
/**
|
||||
* 任务执行阶段 回传wms完成
|
||||
*/
|
||||
public static final String TASK_EP_WMS_FINISH = "5";
|
||||
//public static final String TASK_EP_WMS_FINISH = "5";
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class JobCallBackController extends BaseController
|
||||
return toAjax(jobCallBackService.deleteJobCallBackByIds(ids));
|
||||
}
|
||||
|
||||
@Scheduled(fixedDelay=1500)
|
||||
//@Scheduled(fixedDelay=1500)
|
||||
public void jobCallBack() {
|
||||
jobCallBackService.jobCallBack();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.queue.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.queue.tsj.domain.TsjDeviceExecutionQueue;
|
||||
import com.ruoyi.queue.tsj.service.ITsjDeviceExecutionQueueService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 提升机执行队列Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/queue/tsj")
|
||||
public class TsjDeviceExecutionQueueController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITsjDeviceExecutionQueueService tsjDeviceExecutionQueueService;
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsj:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TsjDeviceExecutionQueue tsjDeviceExecutionQueue)
|
||||
{
|
||||
startPage();
|
||||
List<TsjDeviceExecutionQueue> list = tsjDeviceExecutionQueueService.selectTsjDeviceExecutionQueueList(tsjDeviceExecutionQueue);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出提升机执行队列列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsj:export')")
|
||||
@Log(title = "提升机执行队列", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TsjDeviceExecutionQueue tsjDeviceExecutionQueue)
|
||||
{
|
||||
List<TsjDeviceExecutionQueue> list = tsjDeviceExecutionQueueService.selectTsjDeviceExecutionQueueList(tsjDeviceExecutionQueue);
|
||||
ExcelUtil<TsjDeviceExecutionQueue> util = new ExcelUtil<TsjDeviceExecutionQueue>(TsjDeviceExecutionQueue.class);
|
||||
util.exportExcel(response, list, "提升机执行队列数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提升机执行队列详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsj:query')")
|
||||
@GetMapping(value = "/{guid}")
|
||||
public AjaxResult getInfo(@PathVariable("guid") String guid)
|
||||
{
|
||||
return success(tsjDeviceExecutionQueueService.selectTsjDeviceExecutionQueueByGuid(guid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增提升机执行队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsj:add')")
|
||||
@Log(title = "提升机执行队列", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TsjDeviceExecutionQueue tsjDeviceExecutionQueue)
|
||||
{
|
||||
return toAjax(tsjDeviceExecutionQueueService.insertTsjDeviceExecutionQueue(tsjDeviceExecutionQueue));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提升机执行队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsj:edit')")
|
||||
@Log(title = "提升机执行队列", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TsjDeviceExecutionQueue tsjDeviceExecutionQueue)
|
||||
{
|
||||
return toAjax(tsjDeviceExecutionQueueService.updateTsjDeviceExecutionQueue(tsjDeviceExecutionQueue));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除提升机执行队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsj:remove')")
|
||||
@Log(title = "提升机执行队列", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{guids}")
|
||||
public AjaxResult remove(@PathVariable String[] guids)
|
||||
{
|
||||
return toAjax(tsjDeviceExecutionQueueService.deleteTsjDeviceExecutionQueueByGuids(guids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.queue.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.queue.tsj.domain.TsjDeviceExecutionQueueFinish;
|
||||
import com.ruoyi.queue.tsj.service.ITsjDeviceExecutionQueueFinishService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 提升机执行队列Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/queue/tsjFinish")
|
||||
public class TsjDeviceExecutionQueueFinishController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITsjDeviceExecutionQueueFinishService tsjDeviceExecutionQueueFinishService;
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsjFinish:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish)
|
||||
{
|
||||
startPage();
|
||||
List<TsjDeviceExecutionQueueFinish> list = tsjDeviceExecutionQueueFinishService.selectTsjDeviceExecutionQueueFinishList(tsjDeviceExecutionQueueFinish);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出提升机执行队列列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsjFinish:export')")
|
||||
@Log(title = "提升机执行队列", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish)
|
||||
{
|
||||
List<TsjDeviceExecutionQueueFinish> list = tsjDeviceExecutionQueueFinishService.selectTsjDeviceExecutionQueueFinishList(tsjDeviceExecutionQueueFinish);
|
||||
ExcelUtil<TsjDeviceExecutionQueueFinish> util = new ExcelUtil<TsjDeviceExecutionQueueFinish>(TsjDeviceExecutionQueueFinish.class);
|
||||
util.exportExcel(response, list, "提升机执行队列数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提升机执行队列详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsjFinish:query')")
|
||||
@GetMapping(value = "/{guid}")
|
||||
public AjaxResult getInfo(@PathVariable("guid") String guid)
|
||||
{
|
||||
return success(tsjDeviceExecutionQueueFinishService.selectTsjDeviceExecutionQueueFinishByGuid(guid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增提升机执行队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsjFinish:add')")
|
||||
@Log(title = "提升机执行队列", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish)
|
||||
{
|
||||
return toAjax(tsjDeviceExecutionQueueFinishService.insertTsjDeviceExecutionQueueFinish(tsjDeviceExecutionQueueFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提升机执行队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsjFinish:edit')")
|
||||
@Log(title = "提升机执行队列", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish)
|
||||
{
|
||||
return toAjax(tsjDeviceExecutionQueueFinishService.updateTsjDeviceExecutionQueueFinish(tsjDeviceExecutionQueueFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除提升机执行队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('queue:tsjFinish:remove')")
|
||||
@Log(title = "提升机执行队列", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{guids}")
|
||||
public AjaxResult remove(@PathVariable String[] guids)
|
||||
{
|
||||
return toAjax(tsjDeviceExecutionQueueFinishService.deleteTsjDeviceExecutionQueueFinishByGuids(guids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,352 @@
|
||||
package com.ruoyi.queue.tsj.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 提升机执行队列对象 tsj_device_execution_queue
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
public class TsjDeviceExecutionQueue extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** GUID */
|
||||
private String guid;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private Long taskNo;
|
||||
|
||||
/** 原排 */
|
||||
@Excel(name = "原排")
|
||||
private String srcRow;
|
||||
|
||||
/** 原列 */
|
||||
@Excel(name = "原列")
|
||||
private String srcColumn;
|
||||
|
||||
/** 原层 */
|
||||
@Excel(name = "原层")
|
||||
private String srcLayer;
|
||||
|
||||
/** 目标排 */
|
||||
@Excel(name = "目标排")
|
||||
private String tarRow;
|
||||
|
||||
/** 目标列 */
|
||||
@Excel(name = "目标列")
|
||||
private String tarColumn;
|
||||
|
||||
/** 目标层 */
|
||||
@Excel(name = "目标层")
|
||||
private String tarLayer;
|
||||
|
||||
/** 原地址 */
|
||||
@Excel(name = "原地址")
|
||||
private String srcSite;
|
||||
|
||||
/** 目标地址 */
|
||||
@Excel(name = "目标地址")
|
||||
private String tarSite;
|
||||
|
||||
/** 下发 */
|
||||
@Excel(name = "下发")
|
||||
private String sendFlag;
|
||||
|
||||
/** 下发类型 */
|
||||
@Excel(name = "下发类型")
|
||||
private String sendType;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型")
|
||||
private String taskType;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间")
|
||||
private String createDate;
|
||||
|
||||
/** 开始时间 */
|
||||
@Excel(name = "开始时间")
|
||||
private String startDate;
|
||||
|
||||
/** 完成时间 */
|
||||
@Excel(name = "完成时间")
|
||||
private String finishDate;
|
||||
|
||||
/** 备用1 */
|
||||
@Excel(name = "备用1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用2 */
|
||||
@Excel(name = "备用2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用3 */
|
||||
@Excel(name = "备用3")
|
||||
private String spare3;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型")
|
||||
private String rwlx;
|
||||
|
||||
public void setGuid(String guid)
|
||||
{
|
||||
this.guid = guid;
|
||||
}
|
||||
|
||||
public String getGuid()
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setTaskNo(Long taskNo)
|
||||
{
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public Long getTaskNo()
|
||||
{
|
||||
return taskNo;
|
||||
}
|
||||
|
||||
public void setSrcRow(String srcRow)
|
||||
{
|
||||
this.srcRow = srcRow;
|
||||
}
|
||||
|
||||
public String getSrcRow()
|
||||
{
|
||||
return srcRow;
|
||||
}
|
||||
|
||||
public void setSrcColumn(String srcColumn)
|
||||
{
|
||||
this.srcColumn = srcColumn;
|
||||
}
|
||||
|
||||
public String getSrcColumn()
|
||||
{
|
||||
return srcColumn;
|
||||
}
|
||||
|
||||
public void setSrcLayer(String srcLayer)
|
||||
{
|
||||
this.srcLayer = srcLayer;
|
||||
}
|
||||
|
||||
public String getSrcLayer()
|
||||
{
|
||||
return srcLayer;
|
||||
}
|
||||
|
||||
public void setTarRow(String tarRow)
|
||||
{
|
||||
this.tarRow = tarRow;
|
||||
}
|
||||
|
||||
public String getTarRow()
|
||||
{
|
||||
return tarRow;
|
||||
}
|
||||
|
||||
public void setTarColumn(String tarColumn)
|
||||
{
|
||||
this.tarColumn = tarColumn;
|
||||
}
|
||||
|
||||
public String getTarColumn()
|
||||
{
|
||||
return tarColumn;
|
||||
}
|
||||
|
||||
public void setTarLayer(String tarLayer)
|
||||
{
|
||||
this.tarLayer = tarLayer;
|
||||
}
|
||||
|
||||
public String getTarLayer()
|
||||
{
|
||||
return tarLayer;
|
||||
}
|
||||
|
||||
public void setSrcSite(String srcSite)
|
||||
{
|
||||
this.srcSite = srcSite;
|
||||
}
|
||||
|
||||
public String getSrcSite()
|
||||
{
|
||||
return srcSite;
|
||||
}
|
||||
|
||||
public void setTarSite(String tarSite)
|
||||
{
|
||||
this.tarSite = tarSite;
|
||||
}
|
||||
|
||||
public String getTarSite()
|
||||
{
|
||||
return tarSite;
|
||||
}
|
||||
|
||||
public void setSendFlag(String sendFlag)
|
||||
{
|
||||
this.sendFlag = sendFlag;
|
||||
}
|
||||
|
||||
public String getSendFlag()
|
||||
{
|
||||
return sendFlag;
|
||||
}
|
||||
|
||||
public void setSendType(String sendType)
|
||||
{
|
||||
this.sendType = sendType;
|
||||
}
|
||||
|
||||
public String getSendType()
|
||||
{
|
||||
return sendType;
|
||||
}
|
||||
|
||||
public void setTaskType(String taskType)
|
||||
{
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTaskType()
|
||||
{
|
||||
return taskType;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate)
|
||||
{
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getStartDate()
|
||||
{
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setFinishDate(String finishDate)
|
||||
{
|
||||
this.finishDate = finishDate;
|
||||
}
|
||||
|
||||
public String getFinishDate()
|
||||
{
|
||||
return finishDate;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setRwlx(String rwlx)
|
||||
{
|
||||
this.rwlx = rwlx;
|
||||
}
|
||||
|
||||
public String getRwlx()
|
||||
{
|
||||
return rwlx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("guid", getGuid())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("taskNo", getTaskNo())
|
||||
.append("srcRow", getSrcRow())
|
||||
.append("srcColumn", getSrcColumn())
|
||||
.append("srcLayer", getSrcLayer())
|
||||
.append("tarRow", getTarRow())
|
||||
.append("tarColumn", getTarColumn())
|
||||
.append("tarLayer", getTarLayer())
|
||||
.append("srcSite", getSrcSite())
|
||||
.append("tarSite", getTarSite())
|
||||
.append("sendFlag", getSendFlag())
|
||||
.append("sendType", getSendType())
|
||||
.append("taskType", getTaskType())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("startDate", getStartDate())
|
||||
.append("finishDate", getFinishDate())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("rwlx", getRwlx())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,352 @@
|
||||
package com.ruoyi.queue.tsj.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 提升机执行队列对象 tsj_device_execution_queue_finish
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
public class TsjDeviceExecutionQueueFinish extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** GUID */
|
||||
private String guid;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private Long taskNo;
|
||||
|
||||
/** 原排 */
|
||||
@Excel(name = "原排")
|
||||
private String srcRow;
|
||||
|
||||
/** 原列 */
|
||||
@Excel(name = "原列")
|
||||
private String srcColumn;
|
||||
|
||||
/** 原层 */
|
||||
@Excel(name = "原层")
|
||||
private String srcLayer;
|
||||
|
||||
/** 目标排 */
|
||||
@Excel(name = "目标排")
|
||||
private String tarRow;
|
||||
|
||||
/** 目标列 */
|
||||
@Excel(name = "目标列")
|
||||
private String tarColumn;
|
||||
|
||||
/** 目标层 */
|
||||
@Excel(name = "目标层")
|
||||
private String tarLayer;
|
||||
|
||||
/** 原地址 */
|
||||
@Excel(name = "原地址")
|
||||
private String srcSite;
|
||||
|
||||
/** 目标地址 */
|
||||
@Excel(name = "目标地址")
|
||||
private String tarSite;
|
||||
|
||||
/** 下发 */
|
||||
@Excel(name = "下发")
|
||||
private String sendFlag;
|
||||
|
||||
/** 下发类型 */
|
||||
@Excel(name = "下发类型")
|
||||
private String sendType;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型")
|
||||
private String taskType;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间")
|
||||
private String createDate;
|
||||
|
||||
/** 开始时间 */
|
||||
@Excel(name = "开始时间")
|
||||
private String startDate;
|
||||
|
||||
/** 完成时间 */
|
||||
@Excel(name = "完成时间")
|
||||
private String finishDate;
|
||||
|
||||
/** 备用1 */
|
||||
@Excel(name = "备用1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用2 */
|
||||
@Excel(name = "备用2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用3 */
|
||||
@Excel(name = "备用3")
|
||||
private String spare3;
|
||||
|
||||
/** 1-空车任务 2-载车任务 */
|
||||
@Excel(name = "1-空车任务 2-载车任务")
|
||||
private String rwlx;
|
||||
|
||||
public void setGuid(String guid)
|
||||
{
|
||||
this.guid = guid;
|
||||
}
|
||||
|
||||
public String getGuid()
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setTaskNo(Long taskNo)
|
||||
{
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public Long getTaskNo()
|
||||
{
|
||||
return taskNo;
|
||||
}
|
||||
|
||||
public void setSrcRow(String srcRow)
|
||||
{
|
||||
this.srcRow = srcRow;
|
||||
}
|
||||
|
||||
public String getSrcRow()
|
||||
{
|
||||
return srcRow;
|
||||
}
|
||||
|
||||
public void setSrcColumn(String srcColumn)
|
||||
{
|
||||
this.srcColumn = srcColumn;
|
||||
}
|
||||
|
||||
public String getSrcColumn()
|
||||
{
|
||||
return srcColumn;
|
||||
}
|
||||
|
||||
public void setSrcLayer(String srcLayer)
|
||||
{
|
||||
this.srcLayer = srcLayer;
|
||||
}
|
||||
|
||||
public String getSrcLayer()
|
||||
{
|
||||
return srcLayer;
|
||||
}
|
||||
|
||||
public void setTarRow(String tarRow)
|
||||
{
|
||||
this.tarRow = tarRow;
|
||||
}
|
||||
|
||||
public String getTarRow()
|
||||
{
|
||||
return tarRow;
|
||||
}
|
||||
|
||||
public void setTarColumn(String tarColumn)
|
||||
{
|
||||
this.tarColumn = tarColumn;
|
||||
}
|
||||
|
||||
public String getTarColumn()
|
||||
{
|
||||
return tarColumn;
|
||||
}
|
||||
|
||||
public void setTarLayer(String tarLayer)
|
||||
{
|
||||
this.tarLayer = tarLayer;
|
||||
}
|
||||
|
||||
public String getTarLayer()
|
||||
{
|
||||
return tarLayer;
|
||||
}
|
||||
|
||||
public void setSrcSite(String srcSite)
|
||||
{
|
||||
this.srcSite = srcSite;
|
||||
}
|
||||
|
||||
public String getSrcSite()
|
||||
{
|
||||
return srcSite;
|
||||
}
|
||||
|
||||
public void setTarSite(String tarSite)
|
||||
{
|
||||
this.tarSite = tarSite;
|
||||
}
|
||||
|
||||
public String getTarSite()
|
||||
{
|
||||
return tarSite;
|
||||
}
|
||||
|
||||
public void setSendFlag(String sendFlag)
|
||||
{
|
||||
this.sendFlag = sendFlag;
|
||||
}
|
||||
|
||||
public String getSendFlag()
|
||||
{
|
||||
return sendFlag;
|
||||
}
|
||||
|
||||
public void setSendType(String sendType)
|
||||
{
|
||||
this.sendType = sendType;
|
||||
}
|
||||
|
||||
public String getSendType()
|
||||
{
|
||||
return sendType;
|
||||
}
|
||||
|
||||
public void setTaskType(String taskType)
|
||||
{
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTaskType()
|
||||
{
|
||||
return taskType;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate)
|
||||
{
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getStartDate()
|
||||
{
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setFinishDate(String finishDate)
|
||||
{
|
||||
this.finishDate = finishDate;
|
||||
}
|
||||
|
||||
public String getFinishDate()
|
||||
{
|
||||
return finishDate;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setRwlx(String rwlx)
|
||||
{
|
||||
this.rwlx = rwlx;
|
||||
}
|
||||
|
||||
public String getRwlx()
|
||||
{
|
||||
return rwlx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("guid", getGuid())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("taskNo", getTaskNo())
|
||||
.append("srcRow", getSrcRow())
|
||||
.append("srcColumn", getSrcColumn())
|
||||
.append("srcLayer", getSrcLayer())
|
||||
.append("tarRow", getTarRow())
|
||||
.append("tarColumn", getTarColumn())
|
||||
.append("tarLayer", getTarLayer())
|
||||
.append("srcSite", getSrcSite())
|
||||
.append("tarSite", getTarSite())
|
||||
.append("sendFlag", getSendFlag())
|
||||
.append("sendType", getSendType())
|
||||
.append("taskType", getTaskType())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("startDate", getStartDate())
|
||||
.append("finishDate", getFinishDate())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("rwlx", getRwlx())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.queue.tsj.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.queue.tsj.domain.TsjDeviceExecutionQueueFinish;
|
||||
|
||||
/**
|
||||
* 提升机执行队列Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
public interface TsjDeviceExecutionQueueFinishMapper
|
||||
{
|
||||
/**
|
||||
* 查询提升机执行队列
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
public TsjDeviceExecutionQueueFinish selectTsjDeviceExecutionQueueFinishByGuid(String guid);
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列列表
|
||||
*
|
||||
* @param tsjDeviceExecutionQueueFinish 提升机执行队列
|
||||
* @return 提升机执行队列集合
|
||||
*/
|
||||
public List<TsjDeviceExecutionQueueFinish> selectTsjDeviceExecutionQueueFinishList(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish);
|
||||
|
||||
/**
|
||||
* 新增提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueueFinish 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTsjDeviceExecutionQueueFinish(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish);
|
||||
|
||||
/**
|
||||
* 修改提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueueFinish 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTsjDeviceExecutionQueueFinish(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish);
|
||||
|
||||
/**
|
||||
* 删除提升机执行队列
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTsjDeviceExecutionQueueFinishByGuid(String guid);
|
||||
|
||||
/**
|
||||
* 批量删除提升机执行队列
|
||||
*
|
||||
* @param guids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTsjDeviceExecutionQueueFinishByGuids(String[] guids);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.queue.tsj.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.queue.tsj.domain.TsjDeviceExecutionQueue;
|
||||
|
||||
/**
|
||||
* 提升机执行队列Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
public interface TsjDeviceExecutionQueueMapper
|
||||
{
|
||||
/**
|
||||
* 查询提升机执行队列
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
public TsjDeviceExecutionQueue selectTsjDeviceExecutionQueueByGuid(String guid);
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列列表
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue 提升机执行队列
|
||||
* @return 提升机执行队列集合
|
||||
*/
|
||||
public List<TsjDeviceExecutionQueue> selectTsjDeviceExecutionQueueList(TsjDeviceExecutionQueue tsjDeviceExecutionQueue);
|
||||
|
||||
/**
|
||||
* 新增提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTsjDeviceExecutionQueue(TsjDeviceExecutionQueue tsjDeviceExecutionQueue);
|
||||
|
||||
/**
|
||||
* 修改提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTsjDeviceExecutionQueue(TsjDeviceExecutionQueue tsjDeviceExecutionQueue);
|
||||
|
||||
/**
|
||||
* 删除提升机执行队列
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTsjDeviceExecutionQueueByGuid(String guid);
|
||||
|
||||
/**
|
||||
* 批量删除提升机执行队列
|
||||
*
|
||||
* @param guids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTsjDeviceExecutionQueueByGuids(String[] guids);
|
||||
/**
|
||||
* 根据任务号查询提升机执行队列
|
||||
*
|
||||
* @param taskNo 任务号
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
TsjDeviceExecutionQueue selectTsjDeviceExecutionQueueByRwh(Long taskNo);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.queue.tsj.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.queue.tsj.domain.TsjDeviceExecutionQueueFinish;
|
||||
|
||||
/**
|
||||
* 提升机执行队列Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
public interface ITsjDeviceExecutionQueueFinishService
|
||||
{
|
||||
/**
|
||||
* 查询提升机执行队列
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
public TsjDeviceExecutionQueueFinish selectTsjDeviceExecutionQueueFinishByGuid(String guid);
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列列表
|
||||
*
|
||||
* @param tsjDeviceExecutionQueueFinish 提升机执行队列
|
||||
* @return 提升机执行队列集合
|
||||
*/
|
||||
public List<TsjDeviceExecutionQueueFinish> selectTsjDeviceExecutionQueueFinishList(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish);
|
||||
|
||||
/**
|
||||
* 新增提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueueFinish 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTsjDeviceExecutionQueueFinish(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish);
|
||||
|
||||
/**
|
||||
* 修改提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueueFinish 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTsjDeviceExecutionQueueFinish(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish);
|
||||
|
||||
/**
|
||||
* 批量删除提升机执行队列
|
||||
*
|
||||
* @param guids 需要删除的提升机执行队列主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTsjDeviceExecutionQueueFinishByGuids(String[] guids);
|
||||
|
||||
/**
|
||||
* 删除提升机执行队列信息
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTsjDeviceExecutionQueueFinishByGuid(String guid);
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.ruoyi.queue.tsj.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.queue.tsj.domain.TsjDeviceExecutionQueue;
|
||||
|
||||
/**
|
||||
* 提升机执行队列Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
public interface ITsjDeviceExecutionQueueService
|
||||
{
|
||||
/**
|
||||
* 查询提升机执行队列
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
public TsjDeviceExecutionQueue selectTsjDeviceExecutionQueueByGuid(String guid);
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列列表
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue 提升机执行队列
|
||||
* @return 提升机执行队列集合
|
||||
*/
|
||||
public List<TsjDeviceExecutionQueue> selectTsjDeviceExecutionQueueList(TsjDeviceExecutionQueue tsjDeviceExecutionQueue);
|
||||
|
||||
/**
|
||||
* 新增提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTsjDeviceExecutionQueue(TsjDeviceExecutionQueue tsjDeviceExecutionQueue);
|
||||
|
||||
/**
|
||||
* 修改提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTsjDeviceExecutionQueue(TsjDeviceExecutionQueue tsjDeviceExecutionQueue);
|
||||
|
||||
/**
|
||||
* 批量删除提升机执行队列
|
||||
*
|
||||
* @param guids 需要删除的提升机执行队列主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTsjDeviceExecutionQueueByGuids(String[] guids);
|
||||
|
||||
/**
|
||||
* 删除提升机执行队列信息
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTsjDeviceExecutionQueueByGuid(String guid);
|
||||
/**
|
||||
* 根据任务号查询提升机执行队列
|
||||
* @param taskNo
|
||||
* @return
|
||||
*/
|
||||
TsjDeviceExecutionQueue selectTsjDeviceExecutionQueueByRwh(Long taskNo);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.queue.tsj.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.queue.tsj.mapper.TsjDeviceExecutionQueueFinishMapper;
|
||||
import com.ruoyi.queue.tsj.domain.TsjDeviceExecutionQueueFinish;
|
||||
import com.ruoyi.queue.tsj.service.ITsjDeviceExecutionQueueFinishService;
|
||||
|
||||
/**
|
||||
* 提升机执行队列Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
@Service
|
||||
public class TsjDeviceExecutionQueueFinishServiceImpl implements ITsjDeviceExecutionQueueFinishService
|
||||
{
|
||||
@Autowired
|
||||
private TsjDeviceExecutionQueueFinishMapper tsjDeviceExecutionQueueFinishMapper;
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
@Override
|
||||
public TsjDeviceExecutionQueueFinish selectTsjDeviceExecutionQueueFinishByGuid(String guid)
|
||||
{
|
||||
return tsjDeviceExecutionQueueFinishMapper.selectTsjDeviceExecutionQueueFinishByGuid(guid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列列表
|
||||
*
|
||||
* @param tsjDeviceExecutionQueueFinish 提升机执行队列
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
@Override
|
||||
public List<TsjDeviceExecutionQueueFinish> selectTsjDeviceExecutionQueueFinishList(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish)
|
||||
{
|
||||
return tsjDeviceExecutionQueueFinishMapper.selectTsjDeviceExecutionQueueFinishList(tsjDeviceExecutionQueueFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueueFinish 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTsjDeviceExecutionQueueFinish(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish)
|
||||
{
|
||||
return tsjDeviceExecutionQueueFinishMapper.insertTsjDeviceExecutionQueueFinish(tsjDeviceExecutionQueueFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueueFinish 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTsjDeviceExecutionQueueFinish(TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish)
|
||||
{
|
||||
return tsjDeviceExecutionQueueFinishMapper.updateTsjDeviceExecutionQueueFinish(tsjDeviceExecutionQueueFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除提升机执行队列
|
||||
*
|
||||
* @param guids 需要删除的提升机执行队列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTsjDeviceExecutionQueueFinishByGuids(String[] guids)
|
||||
{
|
||||
return tsjDeviceExecutionQueueFinishMapper.deleteTsjDeviceExecutionQueueFinishByGuids(guids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除提升机执行队列信息
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTsjDeviceExecutionQueueFinishByGuid(String guid)
|
||||
{
|
||||
return tsjDeviceExecutionQueueFinishMapper.deleteTsjDeviceExecutionQueueFinishByGuid(guid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.queue.tsj.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.queue.tsj.mapper.TsjDeviceExecutionQueueMapper;
|
||||
import com.ruoyi.queue.tsj.domain.TsjDeviceExecutionQueue;
|
||||
import com.ruoyi.queue.tsj.service.ITsjDeviceExecutionQueueService;
|
||||
|
||||
/**
|
||||
* 提升机执行队列Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-19
|
||||
*/
|
||||
@Service
|
||||
public class TsjDeviceExecutionQueueServiceImpl implements ITsjDeviceExecutionQueueService
|
||||
{
|
||||
@Autowired
|
||||
private TsjDeviceExecutionQueueMapper tsjDeviceExecutionQueueMapper;
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
@Override
|
||||
public TsjDeviceExecutionQueue selectTsjDeviceExecutionQueueByGuid(String guid)
|
||||
{
|
||||
return tsjDeviceExecutionQueueMapper.selectTsjDeviceExecutionQueueByGuid(guid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询提升机执行队列列表
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue 提升机执行队列
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
@Override
|
||||
public List<TsjDeviceExecutionQueue> selectTsjDeviceExecutionQueueList(TsjDeviceExecutionQueue tsjDeviceExecutionQueue)
|
||||
{
|
||||
return tsjDeviceExecutionQueueMapper.selectTsjDeviceExecutionQueueList(tsjDeviceExecutionQueue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTsjDeviceExecutionQueue(TsjDeviceExecutionQueue tsjDeviceExecutionQueue)
|
||||
{
|
||||
return tsjDeviceExecutionQueueMapper.insertTsjDeviceExecutionQueue(tsjDeviceExecutionQueue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提升机执行队列
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue 提升机执行队列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTsjDeviceExecutionQueue(TsjDeviceExecutionQueue tsjDeviceExecutionQueue)
|
||||
{
|
||||
return tsjDeviceExecutionQueueMapper.updateTsjDeviceExecutionQueue(tsjDeviceExecutionQueue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除提升机执行队列
|
||||
*
|
||||
* @param guids 需要删除的提升机执行队列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTsjDeviceExecutionQueueByGuids(String[] guids)
|
||||
{
|
||||
return tsjDeviceExecutionQueueMapper.deleteTsjDeviceExecutionQueueByGuids(guids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除提升机执行队列信息
|
||||
*
|
||||
* @param guid 提升机执行队列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTsjDeviceExecutionQueueByGuid(String guid)
|
||||
{
|
||||
return tsjDeviceExecutionQueueMapper.deleteTsjDeviceExecutionQueueByGuid(guid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据任务号查询提升机执行队列
|
||||
*
|
||||
* @param taskNo 任务号
|
||||
* @return 提升机执行队列
|
||||
*/
|
||||
@Override
|
||||
public TsjDeviceExecutionQueue selectTsjDeviceExecutionQueueByRwh(Long taskNo) {
|
||||
return tsjDeviceExecutionQueueMapper.selectTsjDeviceExecutionQueueByRwh(taskNo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,13 +1,17 @@
|
||||
package com.ruoyi.schedule.plcRead.tsj;
|
||||
|
||||
import HslCommunication.BasicFramework.SoftBasic;
|
||||
import HslCommunication.Core.Net.IReadWriteNet;
|
||||
import HslCommunication.Core.Types.OperateResult;
|
||||
import HslCommunication.Core.Types.OperateResultExOne;
|
||||
import HslCommunication.Profinet.Siemens.SiemensPLCS;
|
||||
import HslCommunication.Profinet.Siemens.SiemensS7Net;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.ruoyi.common.domain.HslRead;
|
||||
import com.ruoyi.common.domain.PlcConnectInfo;
|
||||
import com.ruoyi.common.domain.SendData;
|
||||
import com.ruoyi.device.tsj.domain.DeviceTsj;
|
||||
import com.ruoyi.schedule.plcRead.util.ParseUtil;
|
||||
import com.ruoyi.schedule.plcRead.util.Tools;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -31,7 +35,7 @@ public class PlcTsjRead implements Runnable {
|
||||
this.port = plcConnectInfo.getPort();
|
||||
}
|
||||
|
||||
public static int WriteToSSJ(String address, byte[] data) {
|
||||
public static int WriteToTSJ(String address, byte[] data) {
|
||||
int a = 0;
|
||||
if (readWriteNet != null) {
|
||||
a = HslRead.WriteResultRender(readWriteNet.Write(address, data), address);
|
||||
@@ -44,11 +48,9 @@ public class PlcTsjRead implements Runnable {
|
||||
while (isRun) {
|
||||
try {
|
||||
if (IsConnect()) {
|
||||
int step = 20;
|
||||
int baseOffset = 0;
|
||||
for (String tsjCode : deviceTsjMap.keySet()) {
|
||||
DeviceTsj tsjDevice = deviceTsjMap.get(tsjCode);
|
||||
|
||||
plcRead(tsjDevice);
|
||||
}
|
||||
Thread.sleep(1000);
|
||||
} else {
|
||||
@@ -65,6 +67,25 @@ public class PlcTsjRead implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private void plcRead(DeviceTsj tsjDevice) {
|
||||
OperateResultExOne<byte[]> read2 = readWriteNet.Read(tsjDevice.getPlcDbReadAddress(), Short.parseShort("220"));
|
||||
String ddsx1 = "0";
|
||||
if (read2.IsSuccess) {
|
||||
ddsx1 = SoftBasic.ByteToHexString(read2.Content);
|
||||
tsjDevice.setCzfs(ParseUtil.optInt(2, ddsx1));
|
||||
tsjDevice.setSbzt(ParseUtil.optInt(4, ddsx1));
|
||||
tsjDevice.setRwh(Convert.toLong(ParseUtil.optDInt(6, ddsx1)));
|
||||
tsjDevice.setDqcs(ParseUtil.optInt(10, ddsx1));
|
||||
tsjDevice.setJdbz(ParseUtil.optInt(12, ddsx1));
|
||||
tsjDevice.setYph(ParseUtil.optInt(14, ddsx1));
|
||||
tsjDevice.setYch(ParseUtil.optInt(16, ddsx1));
|
||||
tsjDevice.setMbph(ParseUtil.optInt(18, ddsx1));
|
||||
tsjDevice.setMbch(ParseUtil.optInt(20, ddsx1));
|
||||
tsjDevice.setYxxf(ParseUtil.optInt(22, ddsx1));
|
||||
tsjDevice.setXtxh(ParseUtil.optInt(24, ddsx1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ConnectServer() {
|
||||
siemensS7Net = new SiemensS7Net(SiemensPLCS.S1500);
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
package com.ruoyi.schedule.scheduleTask.tsj;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
|
||||
import com.ruoyi.bas.port.domain.WcsPort;
|
||||
import com.ruoyi.bas.port.service.IWcsPortService;
|
||||
import com.ruoyi.common.domain.SendData;
|
||||
import com.ruoyi.device.tsj.domain.DeviceTsj;
|
||||
import com.ruoyi.device.tsj.service.IDeviceTsjService;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
import com.ruoyi.job.service.IMydoJobService;
|
||||
import com.ruoyi.queue.tsj.domain.TsjDeviceExecutionQueue;
|
||||
import com.ruoyi.queue.tsj.domain.TsjDeviceExecutionQueueFinish;
|
||||
import com.ruoyi.queue.tsj.service.ITsjDeviceExecutionQueueFinishService;
|
||||
import com.ruoyi.queue.tsj.service.ITsjDeviceExecutionQueueService;
|
||||
import com.ruoyi.schedule.plcRead.tsj.PlcTsjRead;
|
||||
import com.ruoyi.schedule.plcRead.util.Tools;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Slf4j
|
||||
public class TsjThread implements Runnable {
|
||||
public boolean isRun = true;
|
||||
|
||||
private ITsjDeviceExecutionQueueService tsjDeviceExecutionQueueService;
|
||||
private ITsjDeviceExecutionQueueFinishService tsjDeviceExecutionQueueFinishService;
|
||||
private IDeviceTsjService deviceTsjService;
|
||||
|
||||
private IMydoJobService mydoJobService;
|
||||
|
||||
private IWcsPortService wcsPortService;
|
||||
private IBasCargoSpaceService basCargoSpaceService;
|
||||
|
||||
|
||||
public void init() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
init();
|
||||
while (isRun) {
|
||||
for (String tsjCode : PlcTsjRead.deviceTsjMap.keySet()) {
|
||||
DeviceTsj tsj = PlcTsjRead.deviceTsjMap.get(tsjCode);
|
||||
|
||||
tsjTask(tsj);
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(1500);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void tsjTask(DeviceTsj tsj) {
|
||||
int sbzt = tsj.getSbzt();//设备状态
|
||||
int czfs = tsj.getCzfs();//操作方式 //0:未知,1:手动 2:自动
|
||||
int jdbz = tsj.getJdbz();//执行阶段
|
||||
Long rwh = tsj.getRwh();//任务号
|
||||
int yxxf = tsj.getYxxf();//允许下发
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 1、下发完成 如果设备状态为 2-工作 ,触发方式 2-自动,任务号大于999,则代表任务下发完成
|
||||
*
|
||||
* */
|
||||
if (czfs == 2 && sbzt == 2 && rwh > 999) {
|
||||
finishSend(rwh);
|
||||
}
|
||||
|
||||
/*
|
||||
* 2、任务完成
|
||||
*
|
||||
* */
|
||||
if (czfs == 2 && sbzt == 2 && jdbz == 5 && rwh > 999) {
|
||||
//任务完成
|
||||
finishTask(rwh);
|
||||
}
|
||||
|
||||
/*
|
||||
* 3、下发
|
||||
*
|
||||
* */
|
||||
if (czfs == 2 && yxxf == 1) {
|
||||
sendTsj();
|
||||
}
|
||||
|
||||
createLoadQueue(tsj);
|
||||
|
||||
createUnLoadQueue(tsj);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建装车队列
|
||||
*/
|
||||
private void createUnLoadQueue(DeviceTsj tsj) {
|
||||
//根据提升机入口点位循环如果提升机在某个占用的入口点位楼层,则锁定提升机否则生成提升机队列
|
||||
List<TsjDeviceExecutionQueue> tsjDeviceExecutionQueues = tsjDeviceExecutionQueueService.selectTsjDeviceExecutionQueueList(new TsjDeviceExecutionQueue());
|
||||
if (CollUtil.isNotEmpty(tsjDeviceExecutionQueues)) {
|
||||
// 提升机存在任务
|
||||
return;
|
||||
}
|
||||
WcsPort param = new WcsPort();
|
||||
param.setPortType("1");
|
||||
param.setStatus("1");
|
||||
param.setSpare2("0");
|
||||
List<WcsPort> wcsPorts = wcsPortService.selectWcsPortList(param);
|
||||
DeviceTsj deviceTsj = deviceTsjService.selectDeviceTsjById(tsj.getId());
|
||||
if (CollUtil.isNotEmpty(wcsPorts) && deviceTsj.getSpare1() == 0) {
|
||||
//todo 按时间顺序 或者是按提升机最近顺序
|
||||
Optional<WcsPort> existCurrentPort = wcsPorts.stream().filter(x -> x.getPortRegion().equals(Convert.toStr(deviceTsj.getDqcs()))).findFirst();
|
||||
if (existCurrentPort.isPresent()) {
|
||||
//修改承载锁定
|
||||
deviceTsj.setSpare1(1);
|
||||
deviceTsjService.updateDeviceTsj(deviceTsj);
|
||||
log.info("提升机任务锁定提升机承载 任务类型:{}", "提升机任务");
|
||||
} else {
|
||||
WcsPort wcsPort = wcsPorts.get(0);
|
||||
TsjDeviceExecutionQueue tsjDeviceExecutionQueue = new TsjDeviceExecutionQueue();
|
||||
tsjDeviceExecutionQueue.setGuid(IdUtil.simpleUUID());
|
||||
tsjDeviceExecutionQueue.setDeviceId(tsj.getId());
|
||||
tsjDeviceExecutionQueue.setDeviceName(tsj.getName());
|
||||
tsjDeviceExecutionQueue.setTaskNo(Convert.toLong(wcsPort.getSpare1()));
|
||||
tsjDeviceExecutionQueue.setSrcRow("0");
|
||||
tsjDeviceExecutionQueue.setSrcLayer("0");
|
||||
tsjDeviceExecutionQueue.setTarRow(wcsPort.getPortType());
|
||||
tsjDeviceExecutionQueue.setTarLayer(wcsPort.getPortRegion());
|
||||
tsjDeviceExecutionQueue.setSendFlag("0");
|
||||
tsjDeviceExecutionQueue.setSendType("1");
|
||||
tsjDeviceExecutionQueue.setRwlx("1");
|
||||
tsjDeviceExecutionQueue.setCreateDate(DateUtil.formatDateTime(new Date()));
|
||||
tsjDeviceExecutionQueueService.insertTsjDeviceExecutionQueue(tsjDeviceExecutionQueue);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建卸车队列
|
||||
*/
|
||||
private void createLoadQueue(DeviceTsj tsj) {
|
||||
//todo 根据当前楼层和执行阶段查询任务 获取目标队列 生成提升机队列 当小车出去后 解锁提升机
|
||||
List<TsjDeviceExecutionQueue> tsjDeviceExecutionQueues = tsjDeviceExecutionQueueService.selectTsjDeviceExecutionQueueList(new TsjDeviceExecutionQueue());
|
||||
if (CollUtil.isNotEmpty(tsjDeviceExecutionQueues)) {
|
||||
// 提升机存在任务
|
||||
return;
|
||||
}
|
||||
|
||||
DeviceTsj deviceTsj = deviceTsjService.selectDeviceTsjById(1L);
|
||||
//判断提升机锁定 并且 小车已进入提升机
|
||||
if (deviceTsj.getSpare1() == 1 && tsj.getSbzt() == 3 && tsj.getYxxf() == 1) {
|
||||
|
||||
//查询进入提升机的任务
|
||||
MydoJob param = new MydoJob();
|
||||
param.setRoadwayId("1");
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobList(param);
|
||||
|
||||
if (CollUtil.isNotEmpty(mydoJobs)){
|
||||
MydoJob mydoJob = mydoJobs.get(0);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByWmsCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
//生成提升机队列
|
||||
TsjDeviceExecutionQueue tsjDeviceExecutionQueue = new TsjDeviceExecutionQueue();
|
||||
tsjDeviceExecutionQueue.setGuid(IdUtil.simpleUUID());
|
||||
tsjDeviceExecutionQueue.setDeviceId(tsj.getId());
|
||||
tsjDeviceExecutionQueue.setDeviceName(tsj.getName());
|
||||
tsjDeviceExecutionQueue.setTaskNo(Convert.toLong(mydoJob.getTaskNo()));
|
||||
tsjDeviceExecutionQueue.setSrcRow("0");
|
||||
tsjDeviceExecutionQueue.setSrcLayer("0");
|
||||
tsjDeviceExecutionQueue.setTarRow(Convert.toStr(basCargoSpace.getThePlatoon()));
|
||||
tsjDeviceExecutionQueue.setTarLayer(Convert.toStr(basCargoSpace.getTheFloor()));
|
||||
tsjDeviceExecutionQueue.setSendFlag("0");
|
||||
tsjDeviceExecutionQueue.setSendType("1");
|
||||
tsjDeviceExecutionQueue.setRwlx("1");
|
||||
tsjDeviceExecutionQueue.setCreateDate(DateUtil.formatDateTime(new Date()));
|
||||
tsjDeviceExecutionQueueService.insertTsjDeviceExecutionQueue(tsjDeviceExecutionQueue);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendTsj() {
|
||||
List<TsjDeviceExecutionQueue> tsjDeviceExecutionQueues = tsjDeviceExecutionQueueService.selectTsjDeviceExecutionQueueList(new TsjDeviceExecutionQueue());
|
||||
if (CollUtil.isNotEmpty(tsjDeviceExecutionQueues)) {
|
||||
TsjDeviceExecutionQueue tsjDeviceExecutionQueue = tsjDeviceExecutionQueues.get(0);
|
||||
|
||||
if ("1".equals(tsjDeviceExecutionQueue.getRwlx())) {
|
||||
//提升机移动到小车楼层 需要判断目标楼层入库点位小车是否到位
|
||||
WcsPort param = new WcsPort();
|
||||
param.setPortType("1");
|
||||
param.setPortRegion(tsjDeviceExecutionQueue.getTarLayer());
|
||||
param.setStatus("1");
|
||||
param.setSpare2("1");
|
||||
List<WcsPort> wcsPorts = wcsPortService.selectWcsPortList(param);
|
||||
if (CollUtil.isEmpty(wcsPorts)) {
|
||||
log.info("提升机任务[{}]下发 目标楼层[{}]入库点位空闲 无法下发提升机任务", tsjDeviceExecutionQueue.getTaskNo(), tsjDeviceExecutionQueue.getTarLayer());
|
||||
return;
|
||||
}
|
||||
} else if ("2".equals(tsjDeviceExecutionQueue.getRwlx())) {
|
||||
//提升机承载小车到目标楼层 需要判断目标楼层出库点位是否空闲
|
||||
WcsPort param = new WcsPort();
|
||||
param.setPortType("1");
|
||||
param.setPortRegion(tsjDeviceExecutionQueue.getTarLayer());
|
||||
param.setStatus("0");
|
||||
param.setSpare2("1");
|
||||
List<WcsPort> wcsPorts = wcsPortService.selectWcsPortList(param);
|
||||
if (CollUtil.isEmpty(wcsPorts)) {
|
||||
log.info("提升机任务[{}]下发 目标楼层[{}]出库点位占用 无法下发提升机任务", tsjDeviceExecutionQueue.getTaskNo(), tsjDeviceExecutionQueue.getTarLayer());
|
||||
return;
|
||||
}
|
||||
}
|
||||
writeToTsj(tsjDeviceExecutionQueues.get(0));
|
||||
log.info("提升机任务下发 taskNo{} 任务类型:{}", tsjDeviceExecutionQueue.getTaskNo(), tsjDeviceExecutionQueue.getRwlx());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 写入提升机任务
|
||||
*
|
||||
* @param tsjDeviceExecutionQueue
|
||||
*/
|
||||
private void writeToTsj(TsjDeviceExecutionQueue tsjDeviceExecutionQueue) {
|
||||
SendData taskNoSendData = new SendData(Tools.INT, Convert.toInt(tsjDeviceExecutionQueue.getTaskNo()));
|
||||
SendData srcRow = new SendData(Tools.INT, Convert.toInt(tsjDeviceExecutionQueue.getSrcRow()));
|
||||
SendData srcLayer = new SendData(Tools.INT, Convert.toInt(tsjDeviceExecutionQueue.getSrcLayer()));
|
||||
SendData tarRow = new SendData(Tools.INT, Convert.toInt(tsjDeviceExecutionQueue.getTarRow()));
|
||||
SendData tarLayer = new SendData(Tools.INT, Convert.toInt(tsjDeviceExecutionQueue.getTarLayer()));
|
||||
SendData sendType = new SendData(Tools.INT, Convert.toInt(tsjDeviceExecutionQueue.getSendType()));
|
||||
SendData completedSendData = new SendData(Tools.INT, 1);
|
||||
int jym = Tools.getJYM(taskNoSendData.getNum2(), srcRow.getNum2(), srcLayer.getNum2(), tarRow.getNum2(), tarLayer.getNum2(), sendType.getNum2(), completedSendData.getNum2());
|
||||
SendData jymSendData = new SendData(Tools.INT, jym);
|
||||
byte[] bytes = Tools.sendData(taskNoSendData, srcRow, srcLayer, tarRow, tarLayer, sendType, completedSendData, jymSendData);
|
||||
DeviceTsj deviceTsj = PlcTsjRead.deviceTsjMap.get(Convert.toStr(tsjDeviceExecutionQueue.getDeviceId()));
|
||||
if (ObjUtil.isNotNull(deviceTsj)) {
|
||||
PlcTsjRead.WriteToTSJ(deviceTsj.getPlcDbWriteAddress(), bytes);
|
||||
}
|
||||
}
|
||||
|
||||
private void finishTask(Long taskNo) {
|
||||
|
||||
//根据任务号查询队列 修改执行状态
|
||||
TsjDeviceExecutionQueue tsjDeviceExecutionQueue = tsjDeviceExecutionQueueService.selectTsjDeviceExecutionQueueByRwh(taskNo);
|
||||
if (ObjUtil.isNotNull(tsjDeviceExecutionQueue)) {
|
||||
//完成提升机任务 插入历史表
|
||||
TsjDeviceExecutionQueueFinish tsjDeviceExecutionQueueFinish = new TsjDeviceExecutionQueueFinish();
|
||||
BeanUtil.copyProperties(tsjDeviceExecutionQueue, tsjDeviceExecutionQueueFinish);
|
||||
tsjDeviceExecutionQueueFinish.setFinishDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||
tsjDeviceExecutionQueueFinishService.insertTsjDeviceExecutionQueueFinish(tsjDeviceExecutionQueueFinish);
|
||||
tsjDeviceExecutionQueueService.deleteTsjDeviceExecutionQueueByGuid(tsjDeviceExecutionQueue.getGuid());
|
||||
log.info("提升机任务下发完成 taskNo{} 任务类型:{}", taskNo, "提升机任务");
|
||||
if ("1".equals(tsjDeviceExecutionQueue.getRwlx())) {
|
||||
//锁定提升机承载
|
||||
DeviceTsj deviceTsj = deviceTsjService.selectDeviceTsjById(tsjDeviceExecutionQueue.getDeviceId());
|
||||
deviceTsj.setSpare1(1);
|
||||
deviceTsjService.updateDeviceTsj(deviceTsj);
|
||||
log.info("提升机任务锁定提升机承载 taskNo{} 任务类型:{}", taskNo, "提升机任务");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 提升机下发任务完成
|
||||
*
|
||||
* @param taskNo
|
||||
*/
|
||||
private void finishSend(Long taskNo) {
|
||||
//根据任务号查询是否存在入库或者出库的正执行任务
|
||||
TsjDeviceExecutionQueue tsjDeviceExecutionQueue = tsjDeviceExecutionQueueService.selectTsjDeviceExecutionQueueByRwh(taskNo);
|
||||
if (ObjUtil.isNotNull(tsjDeviceExecutionQueue)) {
|
||||
tsjDeviceExecutionQueue.setSendFlag("1");
|
||||
tsjDeviceExecutionQueue.setStartDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||
tsjDeviceExecutionQueueService.updateTsjDeviceExecutionQueue(tsjDeviceExecutionQueue);
|
||||
log.info("提升机任务完成 taskNo:{} 任务类型:{}", taskNo, "提升机任务");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user