初始化调度线程
This commit is contained in:
@@ -7,12 +7,6 @@ import com.ruoyi.common.domain.PlcConnectInfo;
|
|||||||
import com.ruoyi.schedule.plcRead.ddj.PlcDdjRead;
|
import com.ruoyi.schedule.plcRead.ddj.PlcDdjRead;
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
import com.ruoyi.common.domain.CustomThread;
|
import com.ruoyi.common.domain.CustomThread;
|
||||||
import com.ruoyi.schedule.scheduleTask.ddj.Ddj1Thread;
|
|
||||||
import com.ruoyi.schedule.scheduleTask.ddj.Ddj2Thread;
|
|
||||||
import com.ruoyi.schedule.scheduleTask.ssj.floor1.Floor1SsjInOutThread;
|
|
||||||
import com.ruoyi.schedule.scheduleTask.ssj.floor1.Floor1SsjRoadWayThread;
|
|
||||||
import com.ruoyi.schedule.scheduleTask.ssj.floor2.Floor2SsjInOutThread;
|
|
||||||
import com.ruoyi.schedule.scheduleTask.ssj.floor2.Floor2SsjRoadWayThread;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -31,14 +25,6 @@ public class ScheduleThread {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IDeviceSsjService deviceSsjService;
|
private IDeviceSsjService deviceSsjService;
|
||||||
|
|
||||||
public CustomThread<Ddj1Thread> ddj1ThreadCustomThread;
|
|
||||||
public CustomThread<Ddj2Thread> ddj2ThreadCustomThread;
|
|
||||||
public CustomThread<Floor1SsjInOutThread> bsOutSsjThread;
|
|
||||||
public CustomThread<Floor1SsjRoadWayThread> jsOutSsjThread;
|
|
||||||
public CustomThread<Floor2SsjInOutThread> bsPickSsjThread;
|
|
||||||
public CustomThread<Floor2SsjRoadWayThread> jsPickSsjThread;
|
|
||||||
|
|
||||||
|
|
||||||
private boolean isRun = false;
|
private boolean isRun = false;
|
||||||
private boolean isRun2 = false;
|
private boolean isRun2 = false;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.ruoyi.schedule.scheduleTask.ssj.floor2;
|
package com.ruoyi.schedule.scheduleTask.ssj.common;
|
||||||
|
|
||||||
import com.ruoyi.api.service.IApiService;
|
import com.ruoyi.api.service.IApiService;
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
|
||||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
|
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@@ -11,10 +11,11 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监控线程
|
||||||
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class Floor2SsjRoadWayThread implements Runnable {
|
public class MonitoringThread implements Runnable {
|
||||||
|
|
||||||
public HashMap<String, List<String>> ssjCodeList;
|
public HashMap<String, List<String>> ssjCodeList;
|
||||||
|
|
||||||
private IApiService apiService;
|
private IApiService apiService;
|
||||||
@@ -79,5 +80,4 @@ public class Floor2SsjRoadWayThread implements Runnable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package com.ruoyi.schedule.scheduleTask.ssj.common;
|
||||||
|
|
||||||
|
import com.ruoyi.api.service.IApiService;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
|
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||||
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巷道口线程 到位+任务号+入库作业+货位未分配 请求wms生成货位 到位+任务号+入库作业+货位已分配 生成堆垛机入库队列
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class RoadwaySsjThread implements Runnable{
|
||||||
|
|
||||||
|
public HashMap<String, List<String>> ssjCodeList;
|
||||||
|
|
||||||
|
private IApiService apiService;
|
||||||
|
private IAgvQueueService agvQueueService;
|
||||||
|
|
||||||
|
public boolean isRun = true;
|
||||||
|
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
ssjCodeList = new HashMap<>();
|
||||||
|
ArrayList<String> ssjCodes = new ArrayList<>();
|
||||||
|
ssjCodes.add("L1002");
|
||||||
|
ssjCodes.add("L1004");
|
||||||
|
ssjCodeList.put("in", ssjCodes);
|
||||||
|
apiService = SpringUtils.getBean(IApiService.class);
|
||||||
|
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
||||||
|
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
init();
|
||||||
|
while (isRun){
|
||||||
|
for (String type : ssjCodeList.keySet()) {
|
||||||
|
|
||||||
|
switch ( type){
|
||||||
|
case "in":
|
||||||
|
//生产线入库
|
||||||
|
for (String ssjCode : ssjCodeList.get(type)) {
|
||||||
|
try {
|
||||||
|
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
||||||
|
inDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
|
||||||
|
} else {
|
||||||
|
log.error("设备不存在 ssjCode{}", ssjCode);
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Thread.sleep(1500);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void inDispatch(DeviceSsj inSsjDevice) {
|
||||||
|
//如果入库请求1 并且 托盘码不为空
|
||||||
|
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0 && inSsjDevice.getRkqq() == 1) {
|
||||||
|
//查询货位 排列层
|
||||||
|
|
||||||
|
//查询入口 排列层
|
||||||
|
|
||||||
|
//生成堆垛机队列
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,13 @@
|
|||||||
package com.ruoyi.schedule.scheduleTask.ssj.floor1;
|
package com.ruoyi.schedule.scheduleTask.ssj.floor1;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ObjUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
||||||
import com.ruoyi.api.service.IApiService;
|
import com.ruoyi.api.service.IApiService;
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.job.domain.MydoJob;
|
||||||
|
import com.ruoyi.queue.agv.domain.AgvQueue;
|
||||||
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
@@ -11,9 +17,12 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一楼双向线体入库线程 条码+到位+无出库作业 下发去向+任务号 有出库作业就下发退回
|
||||||
|
*/
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class Floor1SsjRoadWayThread implements Runnable {
|
public class Floor1BothWayInSsjThread implements Runnable {
|
||||||
|
|
||||||
public HashMap<String, List<String>> ssjCodeList;
|
public HashMap<String, List<String>> ssjCodeList;
|
||||||
|
|
||||||
@@ -24,17 +33,11 @@ public class Floor1SsjRoadWayThread implements Runnable {
|
|||||||
|
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
//todo 获取设备编码列表
|
|
||||||
ssjCodeList = new HashMap<>();
|
ssjCodeList = new HashMap<>();
|
||||||
ArrayList<String> in = new ArrayList<>();
|
ArrayList<String> ssjCodes = new ArrayList<>();
|
||||||
in.add("L2003");
|
ssjCodes.add("L1002");
|
||||||
in.add("L2005");
|
ssjCodes.add("L1004");
|
||||||
ssjCodeList.put("in", in);
|
ssjCodeList.put("in", ssjCodes);
|
||||||
ArrayList<String> out = new ArrayList<>();
|
|
||||||
in.add("L2003");
|
|
||||||
in.add("L2005");
|
|
||||||
ssjCodeList.put("out", out);
|
|
||||||
|
|
||||||
apiService = SpringUtils.getBean(IApiService.class);
|
apiService = SpringUtils.getBean(IApiService.class);
|
||||||
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
||||||
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
||||||
@@ -43,12 +46,12 @@ public class Floor1SsjRoadWayThread implements Runnable {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
init();
|
init();
|
||||||
while (isRun) {
|
while (isRun){
|
||||||
for (String type : ssjCodeList.keySet()) {
|
for (String type : ssjCodeList.keySet()) {
|
||||||
|
|
||||||
switch (type) {
|
switch ( type){
|
||||||
case "in":
|
case "in":
|
||||||
//退料入库 其它入库
|
//生产线入库
|
||||||
for (String ssjCode : ssjCodeList.get(type)) {
|
for (String ssjCode : ssjCodeList.get(type)) {
|
||||||
try {
|
try {
|
||||||
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
||||||
@@ -57,21 +60,7 @@ public class Floor1SsjRoadWayThread implements Runnable {
|
|||||||
log.error("设备不存在 ssjCode{}", ssjCode);
|
log.error("设备不存在 ssjCode{}", ssjCode);
|
||||||
}
|
}
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(),e);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "out":
|
|
||||||
for (String ssjCode : ssjCodeList.get(type)) {
|
|
||||||
try {
|
|
||||||
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
|
||||||
outDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
|
|
||||||
} else {
|
|
||||||
log.error("设备不存在 ssjCode{}", ssjCode);
|
|
||||||
}
|
|
||||||
} catch (RuntimeException e) {
|
|
||||||
log.error(e.getMessage(), e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -87,10 +76,6 @@ public class Floor1SsjRoadWayThread implements Runnable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void outDispatch(DeviceSsj outSsjDevice) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void inDispatch(DeviceSsj inSsjDevice) {
|
public void inDispatch(DeviceSsj inSsjDevice) {
|
||||||
//如果入库请求1 并且 托盘码不为空
|
//如果入库请求1 并且 托盘码不为空
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
package com.ruoyi.schedule.scheduleTask.ssj.floor1;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ObjUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
||||||
|
import com.ruoyi.api.service.IApiService;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
|
import com.ruoyi.job.domain.MydoJob;
|
||||||
|
import com.ruoyi.queue.agv.domain.AgvQueue;
|
||||||
|
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||||
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一楼双向线体出库线程 循环盘点出库作业+巷道口空闲+出库线体全部空闲+无入库作业 生成堆垛机出库队列
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class Floor1BothWaySsjOutThread implements Runnable {
|
||||||
|
|
||||||
|
public HashMap<String, List<String>> ssjCodeList;
|
||||||
|
|
||||||
|
private IApiService apiService;
|
||||||
|
private IAgvQueueService agvQueueService;
|
||||||
|
|
||||||
|
public boolean isRun = true;
|
||||||
|
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
ssjCodeList = new HashMap<>();
|
||||||
|
ArrayList<String> ssjCodes = new ArrayList<>();
|
||||||
|
ssjCodes.add("L1002");
|
||||||
|
ssjCodes.add("L1004");
|
||||||
|
ssjCodeList.put("in", ssjCodes);
|
||||||
|
apiService = SpringUtils.getBean(IApiService.class);
|
||||||
|
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
||||||
|
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
init();
|
||||||
|
while (isRun){
|
||||||
|
for (String type : ssjCodeList.keySet()) {
|
||||||
|
|
||||||
|
switch ( type){
|
||||||
|
case "in":
|
||||||
|
//生产线入库
|
||||||
|
for (String ssjCode : ssjCodeList.get(type)) {
|
||||||
|
try {
|
||||||
|
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
||||||
|
inDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
|
||||||
|
} else {
|
||||||
|
log.error("设备不存在 ssjCode{}", ssjCode);
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Thread.sleep(1500);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void inDispatch(DeviceSsj inSsjDevice) {
|
||||||
|
//如果入库请求1 并且 托盘码不为空
|
||||||
|
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0 && inSsjDevice.getRkqq() == 1) {
|
||||||
|
//查询货位 排列层
|
||||||
|
|
||||||
|
//查询入口 排列层
|
||||||
|
|
||||||
|
//生成堆垛机队列
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.ruoyi.schedule.scheduleTask.ssj.floor1;
|
||||||
|
|
||||||
|
import com.ruoyi.api.service.IApiService;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||||
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一楼单向出库线程 循环出库作业+巷道口空闲 生成堆垛机出库队列
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class Floor1SingleSsjThread implements Runnable {
|
||||||
|
|
||||||
|
public HashMap<String, List<String>> ssjCodeList;
|
||||||
|
|
||||||
|
private IApiService apiService;
|
||||||
|
private IAgvQueueService agvQueueService;
|
||||||
|
|
||||||
|
public boolean isRun = true;
|
||||||
|
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
ssjCodeList = new HashMap<>();
|
||||||
|
ArrayList<String> ssjCodes = new ArrayList<>();
|
||||||
|
ssjCodes.add("L1002");
|
||||||
|
ssjCodes.add("L1004");
|
||||||
|
ssjCodeList.put("in", ssjCodes);
|
||||||
|
apiService = SpringUtils.getBean(IApiService.class);
|
||||||
|
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
||||||
|
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
init();
|
||||||
|
while (isRun){
|
||||||
|
for (String type : ssjCodeList.keySet()) {
|
||||||
|
|
||||||
|
switch ( type){
|
||||||
|
case "in":
|
||||||
|
//生产线入库
|
||||||
|
for (String ssjCode : ssjCodeList.get(type)) {
|
||||||
|
try {
|
||||||
|
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
||||||
|
inDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
|
||||||
|
} else {
|
||||||
|
log.error("设备不存在 ssjCode{}", ssjCode);
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Thread.sleep(1500);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void inDispatch(DeviceSsj inSsjDevice) {
|
||||||
|
//如果入库请求1 并且 托盘码不为空
|
||||||
|
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0 && inSsjDevice.getRkqq() == 1) {
|
||||||
|
//查询货位 排列层
|
||||||
|
|
||||||
|
//查询入口 排列层
|
||||||
|
|
||||||
|
//生成堆垛机队列
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
package com.ruoyi.schedule.scheduleTask.ssj.floor1;
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import cn.hutool.core.util.ObjUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
|
||||||
import com.ruoyi.api.service.IApiService;
|
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
|
||||||
import com.ruoyi.job.domain.MydoJob;
|
|
||||||
import com.ruoyi.queue.agv.domain.AgvQueue;
|
|
||||||
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
|
||||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
public class Floor1SsjInOutThread implements Runnable {
|
|
||||||
|
|
||||||
public HashMap<String, List<String>> ssjCodeList;
|
|
||||||
|
|
||||||
private IApiService apiService;
|
|
||||||
private IAgvQueueService agvQueueService;
|
|
||||||
|
|
||||||
public boolean isRun = true;
|
|
||||||
|
|
||||||
|
|
||||||
public void init() {
|
|
||||||
//todo 获取设备编码列表
|
|
||||||
ssjCodeList = new HashMap<>();
|
|
||||||
ArrayList<String> ssjCodes = new ArrayList<>();
|
|
||||||
ssjCodes.add("G2012");
|
|
||||||
ssjCodes.add("G3009");
|
|
||||||
ssjCodes.add("G3018");
|
|
||||||
ssjCodes.add("G4009");
|
|
||||||
ssjCodes.add("G4018");
|
|
||||||
ssjCodes.add("G5009");
|
|
||||||
ssjCodes.add("G5018");
|
|
||||||
ssjCodeList.put("in", ssjCodes);
|
|
||||||
|
|
||||||
apiService = SpringUtils.getBean(IApiService.class);
|
|
||||||
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
|
||||||
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
init();
|
|
||||||
while (isRun){
|
|
||||||
for (String type : ssjCodeList.keySet()) {
|
|
||||||
|
|
||||||
switch ( type){
|
|
||||||
case "in":
|
|
||||||
//正常入库 尾箱回流 物料入库 空料箱入库
|
|
||||||
for (String ssjCode : ssjCodeList.get(type)) {
|
|
||||||
try {
|
|
||||||
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
|
||||||
inDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
|
|
||||||
} else {
|
|
||||||
log.error("设备不存在 ssjCode{}", ssjCode);
|
|
||||||
}
|
|
||||||
} catch (RuntimeException e) {
|
|
||||||
log.error(e.getMessage(),e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
Thread.sleep(1500);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void inDispatch(DeviceSsj inSsjDevice) {
|
|
||||||
//如果入库请求1 并且 托盘码不为空
|
|
||||||
if (inSsjDevice.getDw()==1 && inSsjDevice.getRkqq() == 1 && StrUtil.isNotEmpty(inSsjDevice.getTrayCode())) {
|
|
||||||
//判断是否生成队列
|
|
||||||
AgvQueue agvQueueParam = new AgvQueue();
|
|
||||||
agvQueueParam.setWmsTraycode(inSsjDevice.getTrayCode());
|
|
||||||
//agvQueueParam.setStatus("0");
|
|
||||||
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueueParam);
|
|
||||||
if (CollUtil.isEmpty(agvQueues)) {
|
|
||||||
//根据入口,查询对应的入库作业
|
|
||||||
MydoJob mydoJobParam = new MydoJob();
|
|
||||||
mydoJobParam.setStatus("1");
|
|
||||||
mydoJobParam.setTrayCode(inSsjDevice.getTrayCode());
|
|
||||||
mydoJobParam.setEntranceId(inSsjDevice.getDeviceCode());
|
|
||||||
MydoJob mydoJob = apiService.requestEnterByTrayCode(mydoJobParam);
|
|
||||||
if (ObjUtil.isNotNull(mydoJob)) {
|
|
||||||
|
|
||||||
//生成agv队列
|
|
||||||
AgvQueue agvQueue = apiService.createAgvQueue(inSsjDevice.getName(), mydoJob.getCargoSpaceId(),mydoJob.getTrayCode(),mydoJob.getTaskNo(),"1");
|
|
||||||
//请求任务生成
|
|
||||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(agvQueue);
|
|
||||||
//修改wms任务状态
|
|
||||||
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
|
||||||
//修改ctu执行状态
|
|
||||||
agvQueue.setStatus("1");
|
|
||||||
agvQueueService.updateAgvQueue(agvQueue);
|
|
||||||
log.info("向CTU下入库库作业");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
AgvQueue agvQueue = agvQueues.get(0);
|
|
||||||
if ("0".equals(agvQueue.getStatus())){
|
|
||||||
//请求任务生成
|
|
||||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(agvQueue);
|
|
||||||
//修改wms任务状态
|
|
||||||
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
|
||||||
//修改ctu执行状态
|
|
||||||
agvQueue.setStatus("1");
|
|
||||||
agvQueueService.updateAgvQueue(agvQueue);
|
|
||||||
log.info("向CTU下入库库作业");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package com.ruoyi.schedule.scheduleTask.ssj.floor2;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ObjUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
||||||
|
import com.ruoyi.api.service.IApiService;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.job.domain.MydoJob;
|
||||||
|
import com.ruoyi.queue.agv.domain.AgvQueue;
|
||||||
|
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||||
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二楼入口线程 循环agv搬运完成状态的队列,找到作业,下发去向+任务号
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class Floor2InSsjThread implements Runnable {
|
||||||
|
|
||||||
|
public HashMap<String, List<String>> ssjCodeList;
|
||||||
|
|
||||||
|
private IApiService apiService;
|
||||||
|
private IAgvQueueService agvQueueService;
|
||||||
|
|
||||||
|
public boolean isRun = true;
|
||||||
|
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
ssjCodeList = new HashMap<>();
|
||||||
|
ArrayList<String> ssjCodes = new ArrayList<>();
|
||||||
|
ssjCodes.add("L1002");
|
||||||
|
ssjCodes.add("L1004");
|
||||||
|
ssjCodeList.put("in", ssjCodes);
|
||||||
|
apiService = SpringUtils.getBean(IApiService.class);
|
||||||
|
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
||||||
|
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
init();
|
||||||
|
while (isRun){
|
||||||
|
for (String type : ssjCodeList.keySet()) {
|
||||||
|
|
||||||
|
switch ( type){
|
||||||
|
case "in":
|
||||||
|
//生产线入库
|
||||||
|
for (String ssjCode : ssjCodeList.get(type)) {
|
||||||
|
try {
|
||||||
|
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
||||||
|
inDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
|
||||||
|
} else {
|
||||||
|
log.error("设备不存在 ssjCode{}", ssjCode);
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Thread.sleep(1500);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void inDispatch(DeviceSsj inSsjDevice) {
|
||||||
|
//如果入库请求1 并且 托盘码不为空
|
||||||
|
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0 && inSsjDevice.getRkqq() == 1) {
|
||||||
|
//查询货位 排列层
|
||||||
|
|
||||||
|
//查询入口 排列层
|
||||||
|
|
||||||
|
//生成堆垛机队列
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.ruoyi.schedule.scheduleTask.ssj.floor2;
|
||||||
|
|
||||||
|
import com.ruoyi.api.service.IApiService;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||||
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二楼出库线程 检测当前巷道有没有入库作业,没有作业,生成堆垛机出库队列
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class Floor2OutSsjThread implements Runnable {
|
||||||
|
|
||||||
|
public HashMap<String, List<String>> ssjCodeList;
|
||||||
|
|
||||||
|
private IApiService apiService;
|
||||||
|
private IAgvQueueService agvQueueService;
|
||||||
|
|
||||||
|
public boolean isRun = true;
|
||||||
|
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
ssjCodeList = new HashMap<>();
|
||||||
|
ArrayList<String> ssjCodes = new ArrayList<>();
|
||||||
|
ssjCodes.add("L1002");
|
||||||
|
ssjCodes.add("L1004");
|
||||||
|
ssjCodeList.put("in", ssjCodes);
|
||||||
|
apiService = SpringUtils.getBean(IApiService.class);
|
||||||
|
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
||||||
|
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
init();
|
||||||
|
while (isRun){
|
||||||
|
for (String type : ssjCodeList.keySet()) {
|
||||||
|
|
||||||
|
switch ( type){
|
||||||
|
case "in":
|
||||||
|
//生产线入库
|
||||||
|
for (String ssjCode : ssjCodeList.get(type)) {
|
||||||
|
try {
|
||||||
|
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
||||||
|
inDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
|
||||||
|
} else {
|
||||||
|
log.error("设备不存在 ssjCode{}", ssjCode);
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Thread.sleep(1500);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void inDispatch(DeviceSsj inSsjDevice) {
|
||||||
|
//如果入库请求1 并且 托盘码不为空
|
||||||
|
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0 && inSsjDevice.getRkqq() == 1) {
|
||||||
|
//查询货位 排列层
|
||||||
|
|
||||||
|
//查询入口 排列层
|
||||||
|
|
||||||
|
//生成堆垛机队列
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
package com.ruoyi.schedule.scheduleTask.ssj.floor2;
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import cn.hutool.core.util.ObjUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
|
||||||
import com.ruoyi.api.service.IApiService;
|
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
|
||||||
import com.ruoyi.job.domain.MydoJob;
|
|
||||||
import com.ruoyi.queue.agv.domain.AgvQueue;
|
|
||||||
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
|
||||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
public class Floor2SsjInOutThread implements Runnable {
|
|
||||||
|
|
||||||
public HashMap<String, List<String>> ssjCodeList;
|
|
||||||
|
|
||||||
private IApiService apiService;
|
|
||||||
private IAgvQueueService agvQueueService;
|
|
||||||
|
|
||||||
public boolean isRun = true;
|
|
||||||
|
|
||||||
|
|
||||||
public void init() {
|
|
||||||
//todo 获取设备编码列表
|
|
||||||
ssjCodeList = new HashMap<>();
|
|
||||||
ArrayList<String> ssjCodes = new ArrayList<>();
|
|
||||||
ssjCodes.add("G2012");
|
|
||||||
ssjCodes.add("G3009");
|
|
||||||
ssjCodes.add("G3018");
|
|
||||||
ssjCodes.add("G4009");
|
|
||||||
ssjCodes.add("G4018");
|
|
||||||
ssjCodes.add("G5009");
|
|
||||||
ssjCodes.add("G5018");
|
|
||||||
ssjCodeList.put("in", ssjCodes);
|
|
||||||
|
|
||||||
apiService = SpringUtils.getBean(IApiService.class);
|
|
||||||
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
|
||||||
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
init();
|
|
||||||
while (isRun){
|
|
||||||
for (String type : ssjCodeList.keySet()) {
|
|
||||||
|
|
||||||
switch ( type){
|
|
||||||
case "in":
|
|
||||||
//正常入库 尾箱回流 物料入库 空料箱入库
|
|
||||||
for (String ssjCode : ssjCodeList.get(type)) {
|
|
||||||
try {
|
|
||||||
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
|
||||||
inDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
|
|
||||||
} else {
|
|
||||||
log.error("设备不存在 ssjCode{}", ssjCode);
|
|
||||||
}
|
|
||||||
} catch (RuntimeException e) {
|
|
||||||
log.error(e.getMessage(),e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
Thread.sleep(1500);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void inDispatch(DeviceSsj inSsjDevice) {
|
|
||||||
//如果入库请求1 并且 托盘码不为空
|
|
||||||
if (inSsjDevice.getDw()==1 && inSsjDevice.getRkqq() == 1 && StrUtil.isNotEmpty(inSsjDevice.getTrayCode())) {
|
|
||||||
//判断是否生成队列
|
|
||||||
AgvQueue agvQueueParam = new AgvQueue();
|
|
||||||
agvQueueParam.setWmsTraycode(inSsjDevice.getTrayCode());
|
|
||||||
//agvQueueParam.setStatus("0");
|
|
||||||
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueueParam);
|
|
||||||
if (CollUtil.isEmpty(agvQueues)) {
|
|
||||||
//根据入口,查询对应的入库作业
|
|
||||||
MydoJob mydoJobParam = new MydoJob();
|
|
||||||
mydoJobParam.setStatus("1");
|
|
||||||
mydoJobParam.setTrayCode(inSsjDevice.getTrayCode());
|
|
||||||
mydoJobParam.setEntranceId(inSsjDevice.getDeviceCode());
|
|
||||||
MydoJob mydoJob = apiService.requestEnterByTrayCode(mydoJobParam);
|
|
||||||
if (ObjUtil.isNotNull(mydoJob)) {
|
|
||||||
|
|
||||||
//生成agv队列
|
|
||||||
AgvQueue agvQueue = apiService.createAgvQueue(inSsjDevice.getName(), mydoJob.getCargoSpaceId(),mydoJob.getTrayCode(),mydoJob.getTaskNo(),"1");
|
|
||||||
//请求任务生成
|
|
||||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(agvQueue);
|
|
||||||
//修改wms任务状态
|
|
||||||
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
|
||||||
//修改ctu执行状态
|
|
||||||
agvQueue.setStatus("1");
|
|
||||||
agvQueueService.updateAgvQueue(agvQueue);
|
|
||||||
log.info("向CTU下入库库作业");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
AgvQueue agvQueue = agvQueues.get(0);
|
|
||||||
if ("0".equals(agvQueue.getStatus())){
|
|
||||||
//请求任务生成
|
|
||||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(agvQueue);
|
|
||||||
//修改wms任务状态
|
|
||||||
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
|
||||||
//修改ctu执行状态
|
|
||||||
agvQueue.setStatus("1");
|
|
||||||
agvQueueService.updateAgvQueue(agvQueue);
|
|
||||||
log.info("向CTU下入库库作业");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package com.ruoyi.schedule.scheduleTask.ssj.floor2;
|
||||||
|
|
||||||
|
import com.ruoyi.api.service.IApiService;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
|
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||||
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产线输送机
|
||||||
|
* 生产线线程 检测到位+托盘条码+托盘大小 请求wms生成入库作业 。 循环作业表,检测有没有出库作业 ,生成agv搬运作业。
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class LineSsjThread implements Runnable {
|
||||||
|
public HashMap<String, List<String>> ssjCodeList;
|
||||||
|
|
||||||
|
private IApiService apiService;
|
||||||
|
private IAgvQueueService agvQueueService;
|
||||||
|
|
||||||
|
public boolean isRun = true;
|
||||||
|
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
ssjCodeList = new HashMap<>();
|
||||||
|
ArrayList<String> ssjCodes = new ArrayList<>();
|
||||||
|
ssjCodes.add("L1002");
|
||||||
|
ssjCodes.add("L1004");
|
||||||
|
ssjCodeList.put("in", ssjCodes);
|
||||||
|
apiService = SpringUtils.getBean(IApiService.class);
|
||||||
|
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
||||||
|
log.info("初始化服务 {},{}", apiService, agvQueueService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
init();
|
||||||
|
while (isRun){
|
||||||
|
for (String type : ssjCodeList.keySet()) {
|
||||||
|
|
||||||
|
switch ( type){
|
||||||
|
case "in":
|
||||||
|
//生产线入库
|
||||||
|
for (String ssjCode : ssjCodeList.get(type)) {
|
||||||
|
try {
|
||||||
|
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
|
||||||
|
inDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
|
||||||
|
} else {
|
||||||
|
log.error("设备不存在 ssjCode{}", ssjCode);
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Thread.sleep(1500);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void inDispatch(DeviceSsj inSsjDevice) {
|
||||||
|
//如果入库请求1 并且 托盘码不为空
|
||||||
|
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0 && inSsjDevice.getRkqq() == 1) {
|
||||||
|
//查询货位 排列层
|
||||||
|
|
||||||
|
//查询入口 排列层
|
||||||
|
|
||||||
|
//生成堆垛机队列
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user