堆垛机状态反馈映射
This commit is contained in:
@@ -2,6 +2,8 @@ package com.ruoyi.device.ddj.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.device.ddj.domain.StackerStatus;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -104,9 +106,25 @@ public class MsgDdjController extends BaseController
|
||||
|
||||
|
||||
@GetMapping("/getStackerStatus/{id}")
|
||||
public MsgDdj getStackerStatus(@PathVariable Long id){
|
||||
public StackerStatus getStackerStatus(@PathVariable Long id){
|
||||
//返回堆垛机状态映射
|
||||
if (id == 1) {
|
||||
return msgDdjService.selectMsgDdjById(id);
|
||||
MsgDdj msg = msgDdjService.selectMsgDdjById(id);
|
||||
StackerStatus status = new StackerStatus();
|
||||
status.setId(msg.getId());
|
||||
status.setName(msg.getName());
|
||||
status.setMode(msg.getCzfs());
|
||||
status.setTaskNo(msg.getRwh());
|
||||
status.setDeviceStatus(msg.getSbzt());
|
||||
status.setForkStatus(msg.getHczt());
|
||||
status.setExecutionPhase(msg.getJdbz());
|
||||
status.setPermission(msg.getYxxf());
|
||||
status.setCurrentRow(msg.getCurrentRow());
|
||||
status.setCurrentColumn(msg.getCurrentColumn());
|
||||
status.setCurrentFloor(msg.getCurrentFloor());
|
||||
status.setCurrentPosition(msg.getCurrentRow() + "排" + msg.getCurrentColumn() + "列" + msg.getCurrentFloor() + "层");
|
||||
|
||||
return status;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.ruoyi.device.ddj.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -71,9 +73,21 @@ public class MsgDdj extends BaseEntity
|
||||
private Integer mblh;
|
||||
|
||||
/** 目标层 */
|
||||
@Excel(name = "目标层")
|
||||
@Excel(name = "当前层")
|
||||
private Integer mbch;
|
||||
|
||||
/** 当前排 */
|
||||
@Excel(name = "当前排")
|
||||
private Integer currentRow;
|
||||
|
||||
/** 当前列 */
|
||||
@Excel(name = "当前列")
|
||||
private Integer currentColumn;
|
||||
|
||||
/** 当前层 */
|
||||
@Excel(name = "当前层")
|
||||
private Integer currentFloor;
|
||||
|
||||
/** 心跳信号 */
|
||||
@Excel(name = "心跳信号")
|
||||
private Integer xtxh;
|
||||
@@ -86,22 +100,24 @@ public class MsgDdj extends BaseEntity
|
||||
@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;
|
||||
// /** 备用字段1 */
|
||||
// @Excel(name = "备用字段1")
|
||||
// private Integer spare1;
|
||||
//
|
||||
// /** 备用字段2 */
|
||||
// @Excel(name = "备用字段2")
|
||||
// private Integer spare2;
|
||||
//
|
||||
// /** 备用字段3 */
|
||||
// @Excel(name = "备用字段3")
|
||||
// private Integer spare3;
|
||||
|
||||
private String plcDbReadAddress;
|
||||
|
||||
private String plcDbWriteAddress;
|
||||
|
||||
private String ip;
|
||||
|
||||
private String port;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.ruoyi.device.ddj.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* wms请求的堆垛机状态映射
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class StackerStatus {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
@JsonProperty("堆垛机编号")
|
||||
private Integer id;
|
||||
|
||||
/** 堆垛机名称 */
|
||||
@Excel(name = "堆垛机名称")
|
||||
@JsonIgnore
|
||||
private String name;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
@JsonProperty("任务号")
|
||||
private Long TaskNo;
|
||||
|
||||
/** 阶段标志 */
|
||||
@Excel(name = "阶段标志")
|
||||
@JsonProperty("执行阶段")
|
||||
private Integer executionPhase;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
@JsonProperty("设备状态")
|
||||
private Integer deviceStatus;
|
||||
|
||||
/** 操作方式 */
|
||||
@Excel(name = "操作方式")
|
||||
@JsonProperty("操作模式")
|
||||
private Integer mode;
|
||||
|
||||
/** 允许下发 */
|
||||
@Excel(name = "允许下发")
|
||||
@JsonProperty("是否允许下发任务")
|
||||
private Integer permission;
|
||||
|
||||
/** 当前排 */
|
||||
@Excel(name = "当前排")
|
||||
@JsonProperty("当前排")
|
||||
private Integer currentRow;
|
||||
|
||||
/** 当前列 */
|
||||
@Excel(name = "当前列")
|
||||
@JsonProperty("当前列")
|
||||
private Integer currentColumn;
|
||||
|
||||
/** 当前层 */
|
||||
@Excel(name = "当前层")
|
||||
@JsonProperty("当前层")
|
||||
private Integer currentFloor;
|
||||
|
||||
/** 当前位置 */
|
||||
@Excel(name = "当前位置")
|
||||
@JsonProperty("当前位置")
|
||||
private String currentPosition;
|
||||
|
||||
/** 心跳信号 */
|
||||
@Excel(name = "心跳信号")
|
||||
private Integer xtxh;
|
||||
|
||||
/** 当前巷道 */
|
||||
@Excel(name = "当前巷道")
|
||||
@JsonProperty("当前巷道")
|
||||
@JsonIgnore
|
||||
private Integer currentRoad;
|
||||
|
||||
/** 货叉状态 */
|
||||
@Excel(name = "货叉状态")
|
||||
@JsonProperty("货叉状态")
|
||||
private Integer forkStatus;
|
||||
|
||||
|
||||
}
|
||||
@@ -71,6 +71,10 @@ public class PlcDdj1Read extends Thread {
|
||||
msgDdj.setMbch(ParseUtil.optInt(22, ddsx));
|
||||
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
|
||||
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
|
||||
|
||||
msgDdj.setCurrentRow(ParseUtil.optInt(26, ddsx));
|
||||
msgDdj.setCurrentColumn(ParseUtil.optInt(26, ddsx));
|
||||
msgDdj.setCurrentFloor(ParseUtil.optInt(26, ddsx));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,10 @@ public class PlcDdj2Read extends Thread {
|
||||
msgDdj.setMbch(ParseUtil.optInt(22, ddsx));
|
||||
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
|
||||
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
|
||||
|
||||
msgDdj.setCurrentRow(ParseUtil.optInt(26, ddsx));
|
||||
msgDdj.setCurrentColumn(ParseUtil.optInt(26, ddsx));
|
||||
msgDdj.setCurrentFloor(ParseUtil.optInt(26, ddsx));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user