优化
This commit is contained in:
@@ -23,6 +23,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.ruoyi.common.TaskStatusCode.*;
|
import static com.ruoyi.common.TaskStatusCode.*;
|
||||||
|
import static com.ruoyi.common.utils.Threads.sleep;
|
||||||
import static com.ruoyi.schedule.plcRead.ssj.PlcSsjRead.writeToSsj;
|
import static com.ruoyi.schedule.plcRead.ssj.PlcSsjRead.writeToSsj;
|
||||||
import static com.ruoyi.schedule.plcRead.ssj.PlcSsjRead.writeToSsjQH;
|
import static com.ruoyi.schedule.plcRead.ssj.PlcSsjRead.writeToSsjQH;
|
||||||
|
|
||||||
@@ -103,16 +104,16 @@ public class Floor2InOutSsjThread implements Runnable {
|
|||||||
//不允许放货 等着
|
//不允许放货 等着
|
||||||
if (!agvQueues.isEmpty() && inSsjDevice.getAllowPut() == 0 && "L1001".equals(inSsjDevice.getDeviceCode())) {
|
if (!agvQueues.isEmpty() && inSsjDevice.getAllowPut() == 0 && "L1001".equals(inSsjDevice.getDeviceCode())) {
|
||||||
//下发输送线切换导向 DB未知
|
//下发输送线切换导向 DB未知
|
||||||
int i = writeToSsjQH("DB802.106", Integer.parseInt(agvQueues.get(0).getCtnrType()));
|
int i = writeToSsjQH("DB802.106", Integer.parseInt(agvQueues.get(0).getCtnrCode()));
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
log.info("输送机{}下发切换导向{}成功", inSsjDevice.getDeviceCode(), agvQueues.get(0).getCtnrType());
|
log.info("输送机{}下发切换导向{}成功", inSsjDevice.getDeviceCode(), agvQueues.get(0).getCtnrCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!agvQueues.isEmpty() && inSsjDevice.getAllowPut() == 0 && "L1003".equals(inSsjDevice.getDeviceCode())) {
|
if (!agvQueues.isEmpty() && inSsjDevice.getAllowPut() == 0 && "L1003".equals(inSsjDevice.getDeviceCode())) {
|
||||||
//下发输送线切换导向 DB未知
|
//下发输送线切换导向 DB未知
|
||||||
int i = writeToSsjQH("DB802.118", Integer.parseInt(agvQueues.get(0).getCtnrType()));
|
int i = writeToSsjQH("DB802.118", Integer.parseInt(agvQueues.get(0).getCtnrCode()));
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
log.info("输送机{}下发切换导向{}成功", inSsjDevice.getDeviceCode(), agvQueues.get(0).getCtnrType());
|
log.info("输送机{}下发切换导向{}成功", inSsjDevice.getDeviceCode(), agvQueues.get(0).getCtnrCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,15 +138,16 @@ public class Floor2InOutSsjThread implements Runnable {
|
|||||||
if (!agvQueues.isEmpty()) {
|
if (!agvQueues.isEmpty()) {
|
||||||
//解绑AGV容器
|
//解绑AGV容器
|
||||||
apiService.deleteAgvTray(agvQueues.get(0));
|
apiService.deleteAgvTray(agvQueues.get(0));
|
||||||
|
sleep(10000);
|
||||||
if("L1001".equals(inSsjDevice.getDeviceCode())) {
|
if("L1001".equals(inSsjDevice.getDeviceCode())) {
|
||||||
int i = writeToSsj("DB802.100", agvQueues.get(0).getWmsTaskNo(), 2,Integer.parseInt(agvQueues.get(0).getCtnrType()));
|
int i = writeToSsj("DB802.100", agvQueues.get(0).getWmsTaskNo(), 2,Integer.parseInt(agvQueues.get(0).getCtnrCode()));
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
log.info("输送机{}AGV放货完成下发任务号{}成功", inSsjDevice.getDeviceCode(), agvQueues.get(0).getWmsTaskNo());
|
log.info("输送机{}AGV放货完成下发任务号{}成功", inSsjDevice.getDeviceCode(), agvQueues.get(0).getWmsTaskNo());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if("L1003".equals(inSsjDevice.getDeviceCode())) {
|
if("L1003".equals(inSsjDevice.getDeviceCode())) {
|
||||||
int i = writeToSsj("DB802.112", agvQueues.get(0).getWmsTaskNo(), 2,Integer.parseInt(agvQueues.get(0).getCtnrType()));
|
int i = writeToSsj("DB802.112", agvQueues.get(0).getWmsTaskNo(), 2,Integer.parseInt(agvQueues.get(0).getCtnrCode()));
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
log.info("输送机{}AGV放货完成下发任务号{}成功", inSsjDevice.getDeviceCode(), agvQueues.get(0).getWmsTaskNo());
|
log.info("输送机{}AGV放货完成下发任务号{}成功", inSsjDevice.getDeviceCode(), agvQueues.get(0).getWmsTaskNo());
|
||||||
|
|
||||||
@@ -172,7 +174,7 @@ public class Floor2InOutSsjThread implements Runnable {
|
|||||||
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0) {
|
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0) {
|
||||||
|
|
||||||
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Convert.toLong(inSsjDevice.getTaskNo()));
|
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Convert.toLong(inSsjDevice.getTaskNo()));
|
||||||
if (mydoJob != null) {
|
if (mydoJob != null && Integer.parseInt(mydoJob.getInOrOut()) > 20) {
|
||||||
log.info("设备:{} 位置:{} 任务号:{} 出库到位", "输送线", inSsjDevice.getDeviceCode(), mydoJob.getTaskNo());
|
log.info("设备:{} 位置:{} 任务号:{} 出库到位", "输送线", inSsjDevice.getDeviceCode(), mydoJob.getTaskNo());
|
||||||
mydoJobService.insertHistory(mydoJob.getJobId());
|
mydoJobService.insertHistory(mydoJob.getJobId());
|
||||||
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||||
|
|||||||
Reference in New Issue
Block a user