调度代码修改
This commit is contained in:
@@ -114,7 +114,7 @@ public class ApiServiceImpl implements IApiService {
|
||||
String startPoint = param.get("startPoint");
|
||||
String endPoint = param.get("endPoint");
|
||||
String traySize = param.get("traySize");
|
||||
String wmsTaskNo = param.get("wmstaskNo");
|
||||
String wmsTaskNo = param.get("wmsTaskNo");
|
||||
|
||||
AgvQueue agvQueue = createAgvQueue(startPoint, endPoint, param.get("trayCode"), param.get("taskNo"), "1", traySize, wmsTaskNo);
|
||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = requestAgvQueue(agvQueue);
|
||||
|
||||
@@ -13,8 +13,8 @@ import com.ruoyi.schedule.scheduleTask.monit.MonitoringThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor1.Floor1BothWayInSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor1.Floor1BothWayOutSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor1.Floor1SingleSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor2.Floor2InSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor2.Floor2OutSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor2.Floor2InOutSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor2.Floor2RoadWaySsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor2.LineSsjThread;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -35,8 +35,8 @@ public class ScheduleThread {
|
||||
public CustomThread<Floor1BothWayInSsjThread> floor1BothWayInSsjCustomThread;
|
||||
public CustomThread<Floor1BothWayOutSsjThread> floor1BothWayOutSsjCustomThread;
|
||||
public CustomThread<Floor1SingleSsjThread> floor1SingleSsjCustomThread;
|
||||
public CustomThread<Floor2InSsjThread> floor2InSsjCustomThread;
|
||||
public CustomThread<Floor2OutSsjThread> floor2OutSsjCustomThread;
|
||||
public CustomThread<Floor2InOutSsjThread> floor2InSsjCustomThread;
|
||||
public CustomThread<Floor2RoadWaySsjThread> floor2OutSsjCustomThread;
|
||||
public CustomThread<LineSsjThread> lineSsjCustomThread;
|
||||
public CustomThread<MonitoringThread> monitoringCustomThread;
|
||||
public CustomThread<Ddj1Thread> ddj1CustomThread;
|
||||
@@ -77,14 +77,14 @@ public class ScheduleThread {
|
||||
Floor1SingleSsjThread floor1SingleSsjThread = new Floor1SingleSsjThread();
|
||||
floor1SingleSsjCustomThread = new CustomThread<Floor1SingleSsjThread>(new Thread(floor1SingleSsjThread), floor1SingleSsjThread);
|
||||
|
||||
Floor2InSsjThread floor2InSsjThread = new Floor2InSsjThread();
|
||||
floor2InSsjCustomThread = new CustomThread<Floor2InSsjThread>(new Thread(floor2InSsjThread), floor2InSsjThread);
|
||||
Floor2InOutSsjThread floor2InSsjThread = new Floor2InOutSsjThread();
|
||||
floor2InSsjCustomThread = new CustomThread<Floor2InOutSsjThread>(new Thread(floor2InSsjThread), floor2InSsjThread);
|
||||
|
||||
LineSsjThread lineSsjThread = new LineSsjThread();
|
||||
lineSsjCustomThread = new CustomThread<LineSsjThread>(new Thread(lineSsjThread), lineSsjThread);
|
||||
|
||||
Floor2OutSsjThread floor2OutSsjThread = new Floor2OutSsjThread();
|
||||
floor2OutSsjCustomThread = new CustomThread<Floor2OutSsjThread>(new Thread(floor2OutSsjThread), floor2OutSsjThread);
|
||||
Floor2RoadWaySsjThread floor2OutSsjThread = new Floor2RoadWaySsjThread();
|
||||
floor2OutSsjCustomThread = new CustomThread<Floor2RoadWaySsjThread>(new Thread(floor2OutSsjThread), floor2OutSsjThread);
|
||||
|
||||
Ddj1Thread ddj1Thread = new Ddj1Thread();
|
||||
ddj1CustomThread = new CustomThread<Ddj1Thread>(new Thread(ddj1Thread), ddj1Thread);
|
||||
|
||||
@@ -42,6 +42,9 @@ public class Floor1BothWayInSsjThread implements Runnable {
|
||||
private final Map<String, List<Integer>> roadwayMap = new HashMap<>();
|
||||
private final Map<String, String> exitRoadwayMap = new HashMap<>();
|
||||
|
||||
private final String l2005WriteAddress = "DB501.20";
|
||||
private final String l2012WriteAddress = "DB501.30";
|
||||
|
||||
|
||||
public boolean isRun = true;
|
||||
|
||||
@@ -137,19 +140,15 @@ public class Floor1BothWayInSsjThread implements Runnable {
|
||||
if (ssj.getDw() == 1 && ssj.getTaskNo() > 0 && ssj.getTaskNo() < 1000 && ssj.getRkqq() == 1) {
|
||||
//先检测有没有出库作业,有出库作业直接退回
|
||||
MydoJob outMydoJob = mydoJobService.selectMydoJobByExitList(Collections.singletonList(exitRoadwayMap.get(ssj.getDeviceCode())));
|
||||
if (ObjUtil.isNotNull(outMydoJob)) {
|
||||
//回退
|
||||
SendData qx = new SendData(Tools.INT, 2);
|
||||
byte[] bytes = Tools.sendData(qx);
|
||||
if (ObjUtil.isNotNull(outMydoJob) || StrUtil.isEmpty(ssj.getTrayCode())) {
|
||||
int i = 0;
|
||||
//下发去向 和任务号
|
||||
switch (ssj.getDeviceCode()) {
|
||||
case "L2005":
|
||||
i = PlcSsjRead.WriteToSSJ("DB501.20", bytes);
|
||||
|
||||
i = writeToSsj(l2005WriteAddress,"0",2,1);
|
||||
break;
|
||||
case "L2012":
|
||||
i = PlcSsjRead.WriteToSSJ("DB501.30", bytes);
|
||||
i = writeToSsj(l2012WriteAddress,"0",2,1);
|
||||
break;
|
||||
}
|
||||
if (i == 1) {
|
||||
@@ -162,7 +161,7 @@ public class Floor1BothWayInSsjThread implements Runnable {
|
||||
param.setExecutionPhase("0");
|
||||
if ("L2005".equals(ssj.getDeviceCode())) {
|
||||
param.setEntranceId("L2013");
|
||||
}else {
|
||||
} else {
|
||||
param.setEntranceId("L2012");
|
||||
}
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobList(param);
|
||||
@@ -179,47 +178,26 @@ public class Floor1BothWayInSsjThread implements Runnable {
|
||||
log.info("未检测到托盘码请求入库作业 rwh:{},trayCode:{}", ssj.getTaskNo(), ssj.getTrayCode());
|
||||
}
|
||||
}
|
||||
if (inJob != null){
|
||||
SendData qx = new SendData(Tools.INT, 1);
|
||||
SendData rwh = new SendData(Tools.DINT, inJob.getTaskNo());
|
||||
byte[] bytes = Tools.sendData(qx, rwh);
|
||||
if (inJob != null) {
|
||||
int i = 0;
|
||||
//下发去向 和任务号
|
||||
switch (ssj.getDeviceCode()) {
|
||||
case "L2005":
|
||||
i = PlcSsjRead.WriteToSSJ("DB501.20", bytes);
|
||||
i = writeToSsj(l2005WriteAddress,inJob.getTaskNo(),1,1);
|
||||
break;
|
||||
case "L2012":
|
||||
i = PlcSsjRead.WriteToSSJ("DB501.30", bytes);
|
||||
i = writeToSsj(l2012WriteAddress,inJob.getTaskNo(),1,1);
|
||||
break;
|
||||
}
|
||||
if (i == 1) {
|
||||
inJob.setStatus(TASK_STATUS_RUNNING);
|
||||
inJob.setExecutionPhase(TASK_EP_SSJ);
|
||||
inJob.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
inJob.setTargetRoadwayId(Convert.toStr(qx));
|
||||
inJob.setTargetRoadwayId(Convert.toStr(1));
|
||||
mydoJobService.updateMydoJob(inJob);
|
||||
log.info("入库请求下发任务号加去向 rwh:{},qx:{},trayCode:{}", ssj.getTaskNo(), 1, ssj.getTrayCode());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//回退
|
||||
SendData qx = new SendData(Tools.INT, 2);
|
||||
byte[] bytes = Tools.sendData(qx);
|
||||
int i = 0;
|
||||
//下发去向 和任务号
|
||||
switch (ssj.getDeviceCode()) {
|
||||
case "L2005":
|
||||
i = PlcSsjRead.WriteToSSJ("DB501.20", bytes);
|
||||
|
||||
break;
|
||||
case "L2012":
|
||||
i = PlcSsjRead.WriteToSSJ("DB501.30", bytes);
|
||||
break;
|
||||
}
|
||||
if (i == 1) {
|
||||
log.info("未检测到托盘码下发回退 rwh:{},qx:{},trayCode:{}", ssj.getTaskNo(), 1, ssj.getTrayCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,4 +205,17 @@ public class Floor1BothWayInSsjThread implements Runnable {
|
||||
}
|
||||
|
||||
|
||||
private static int writeToSsj(String address, String taskNo, int qx, int completed) {
|
||||
|
||||
int jym = Tools.getJYM(Integer.parseInt(taskNo), qx, 1);
|
||||
SendData taskNoSendData = new SendData(Tools.INT, taskNo);
|
||||
SendData qxSendData = new SendData(Tools.INT, qx);
|
||||
SendData completedSendData = new SendData(Tools.INT, completed);
|
||||
SendData jymSendData = new SendData(Tools.INT, jym);
|
||||
byte[] bytes = Tools.sendData(taskNoSendData, qxSendData, completedSendData, jymSendData);
|
||||
int i = PlcSsjRead.WriteToSSJ(address, bytes);
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ public class Floor1SingleSsjThread implements Runnable {
|
||||
private IJobCallBackService jobCallBackService;
|
||||
|
||||
|
||||
|
||||
public void init() {
|
||||
//设置要循环的输送机
|
||||
ssjCodeList = new HashMap<>();
|
||||
|
||||
@@ -27,7 +27,7 @@ import static com.ruoyi.common.TaskStatusCode.TASK_EP_SSJ;
|
||||
* 二楼出入口输送线线程
|
||||
*/
|
||||
@Slf4j
|
||||
public class Floor2InSsjThread implements Runnable {
|
||||
public class Floor2InOutSsjThread implements Runnable {
|
||||
|
||||
public HashMap<String, List<String>> ssjCodeList;
|
||||
|
||||
@@ -55,10 +55,10 @@ public class Floor2InSsjThread implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
init();
|
||||
while (isRun){
|
||||
while (isRun) {
|
||||
for (String type : ssjCodeList.keySet()) {
|
||||
|
||||
switch ( type){
|
||||
switch (type) {
|
||||
case "inout":
|
||||
//生产线入库
|
||||
for (String ssjCode : ssjCodeList.get(type)) {
|
||||
@@ -69,7 +69,7 @@ public class Floor2InSsjThread implements Runnable {
|
||||
log.error("设备不存在 ssjCode{}", ssjCode);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
log.error(e.getMessage(),e);
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -94,19 +94,19 @@ public class Floor2InSsjThread implements Runnable {
|
||||
agvQueue.setPositionCode2(inSsjDevice.getDeviceCode());
|
||||
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueue);
|
||||
//不允许放货
|
||||
if(!agvQueues.isEmpty() && inSsjDevice.getAllowPut()==0){
|
||||
if (!agvQueues.isEmpty() && inSsjDevice.getAllowPut() == 0) {
|
||||
//如果有这个输送机口的agv队列并请求放货(状态为6)
|
||||
int i = writeToSsj(inSsjDevice.getPlcDbWriteAddress(),"0",Integer.valueOf(agvQueues.get(0).getCtnrType()),1);
|
||||
if(i==1){
|
||||
log.info(inSsjDevice.getDeviceCode()+"输送机下发请求放货成功");
|
||||
int i = writeToSsj(inSsjDevice.getPlcDbWriteAddress(), "0", Integer.parseInt(agvQueues.get(0).getCtnrType()), 1);
|
||||
if (i == 1) {
|
||||
log.info(inSsjDevice.getDeviceCode() + "输送机下发请求放货成功");
|
||||
}
|
||||
}
|
||||
//允许放货
|
||||
if(!agvQueues.isEmpty() && inSsjDevice.getAllowPut()==1 ){
|
||||
if (!agvQueues.isEmpty() && inSsjDevice.getAllowPut() == 1) {
|
||||
log.info("设备:{} 位置:{} 任务号:{} 请求放货成功", inSsjDevice.getDeviceCode(), "输送线", agvQueues.get(0).getTaskCode());
|
||||
AjaxResult ajaxResult = apiService.continueTask(agvQueues.get(0));
|
||||
if(ajaxResult.isSuccess()) {
|
||||
log.info("下发agv允许放货成功"+agvQueues.get(0).getWmsTaskNo());
|
||||
if (ajaxResult.isSuccess()) {
|
||||
log.info("下发agv允许放货成功" + agvQueues.get(0).getWmsTaskNo());
|
||||
agvQueues.get(0).setStatus("6");
|
||||
agvQueueService.updateAgvQueue(agvQueues.get(0));
|
||||
}
|
||||
@@ -114,12 +114,12 @@ public class Floor2InSsjThread implements Runnable {
|
||||
|
||||
}
|
||||
//入库下发输送线
|
||||
if(inSsjDevice.getKx()==0 && inSsjDevice.getTaskNo()==0){
|
||||
if (inSsjDevice.getKx() == 0 && inSsjDevice.getTaskNo() == 0) {
|
||||
AgvQueue agvQueue = new AgvQueue();
|
||||
agvQueue.setStatus("7"); //end
|
||||
agvQueue.setPositionCode2(inSsjDevice.getDeviceCode());
|
||||
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueue);
|
||||
if(!agvQueues.isEmpty()) {
|
||||
if (!agvQueues.isEmpty()) {
|
||||
int i = writeToSsj(inSsjDevice.getPlcDbWriteAddress(), agvQueues.get(0).getWmsTaskNo(), 1, 1);
|
||||
if (i == 1) {
|
||||
log.info(inSsjDevice.getDeviceCode() + "输送机下发任务号成功");
|
||||
@@ -133,10 +133,10 @@ public class Floor2InSsjThread implements Runnable {
|
||||
|
||||
}
|
||||
//出库到位
|
||||
if(inSsjDevice.getDw()==1 && inSsjDevice.getTaskNo()>0){
|
||||
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0) {
|
||||
|
||||
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Convert.toLong(inSsjDevice.getTaskNo()));
|
||||
if(mydoJob!=null){
|
||||
if (mydoJob != null) {
|
||||
log.info("设备:{} 位置:{} 任务号:{} 出库到位", inSsjDevice.getDeviceCode(), "输送线", mydoJob.getTaskNo());
|
||||
mydoJobService.insertHistory(mydoJob.getJobId());
|
||||
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||
@@ -151,11 +151,11 @@ public class Floor2InSsjThread implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private static int writeToSsj(String address,String taskNo,int qx,int completed) {
|
||||
private static int writeToSsj(String address, String taskNo, int qx, int completed) {
|
||||
|
||||
int jym = Tools.getJYM(Integer.parseInt(taskNo), qx, 1);
|
||||
SendData taskNoSendData = new SendData(Tools.INT, taskNo);
|
||||
SendData qxSendData = new SendData(Tools.INT,qx);
|
||||
SendData qxSendData = new SendData(Tools.INT, qx);
|
||||
SendData completedSendData = new SendData(Tools.INT, completed);
|
||||
SendData jymSendData = new SendData(Tools.INT, jym);
|
||||
byte[] bytes = Tools.sendData(taskNoSendData, qxSendData, completedSendData, jymSendData);
|
||||
@@ -29,7 +29,7 @@ import static com.ruoyi.common.TaskType.DDJ_RWLX_3;
|
||||
* 二楼出库线程 检测当前巷道有没有入库作业,没有作业,生成堆垛机出库队列
|
||||
*/
|
||||
@Slf4j
|
||||
public class Floor2OutSsjThread implements Runnable {
|
||||
public class Floor2RoadWaySsjThread implements Runnable {
|
||||
|
||||
public HashMap<String, List<String>> ssjCodeList;
|
||||
private final Map<String, List<Integer>> roadwayMap = new HashMap<>();
|
||||
@@ -46,7 +46,7 @@ public class Floor2OutSsjThread implements Runnable {
|
||||
ArrayList<String> ssjCodes = new ArrayList<>();
|
||||
ssjCodes.add("L1002");
|
||||
ssjCodes.add("L1004");
|
||||
ssjCodeList.put("roadwayssj", ssjCodes);
|
||||
ssjCodeList.put("roadwaySsj", ssjCodes);
|
||||
apiService = SpringUtils.getBean(IApiService.class);
|
||||
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
||||
mydoJobService = SpringUtils.getBean(IMydoJobService.class);
|
||||
@@ -65,7 +65,7 @@ public class Floor2OutSsjThread implements Runnable {
|
||||
for (String type : ssjCodeList.keySet()) {
|
||||
|
||||
switch ( type){
|
||||
case "roadwayssj":
|
||||
case "roadwaySsj":
|
||||
//生产线入库
|
||||
for (String ssjCode : ssjCodeList.get(type)) {
|
||||
try {
|
||||
@@ -95,7 +95,7 @@ public class Floor2OutSsjThread implements Runnable {
|
||||
public void inDispatch(DeviceSsj roadSsjDevice) {
|
||||
//如果到位,且任务号大于0
|
||||
if (roadSsjDevice.getDw()==1 && roadSsjDevice.getTaskNo()>0) {
|
||||
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Long.valueOf(roadSsjDevice.getTaskNo()));
|
||||
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Convert.toLong(roadSsjDevice.getTaskNo()));
|
||||
if (ObjUtil.isNotNull(mydoJob) && mydoJob.getExecutionPhase().equals(TASK_EP_SSJ)) {
|
||||
mydoJob.setExecutionPhase(TASK_EP_ROADWAY_SSJ);
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.schedule.scheduleTask.ssj.floor2;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.api.service.IApiService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@@ -96,7 +97,7 @@ public class LineSsjThread implements Runnable {
|
||||
mydoJob.setExecutionPhase("0");
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectInOrOutMydoJobList(mydoJob);
|
||||
//有作业,下发输送机任务号,覆盖任务号
|
||||
if (mydoJobs.size() > 0) {
|
||||
if (!mydoJobs.isEmpty()) {
|
||||
|
||||
mydoJob = mydoJobs.get(0);
|
||||
int i = writeToSsj(SsjDevice.getPlcDbWriteAddress(),mydoJob.getTaskNo(),1,1);
|
||||
@@ -134,7 +135,7 @@ public class LineSsjThread implements Runnable {
|
||||
//超大,给plc下发错误信息,等待人工处理
|
||||
//托盘大小对不上,给plc下发错误信息,等待人工处理
|
||||
//码不对,给plc下发错误信息,等待人工处理
|
||||
int i = writeToSsj(SsjDevice.getPlcDbWriteAddress(),"0",Integer.valueOf(ajaxResult.get("code").toString()),2);
|
||||
int i = writeToSsj(SsjDevice.getPlcDbWriteAddress(), "0", Integer.parseInt(ajaxResult.get("code").toString()), 2);
|
||||
if (i == 1) {
|
||||
log.info("G1005产线输送机下发错误信息成功");
|
||||
}
|
||||
@@ -155,7 +156,7 @@ public class LineSsjThread implements Runnable {
|
||||
mydoJob.setEntranceId("G1005");
|
||||
mydoJob.setExecutionPhase("0");
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectInOrOutMydoJobList(mydoJob);
|
||||
if (mydoJobs.size() > 0) {
|
||||
if (!mydoJobs.isEmpty()) {
|
||||
mydoJob = mydoJobs.get(0);
|
||||
int i = writeToSsj(SsjDevice.getPlcDbWriteAddress(),mydoJob.getTaskNo(),1,1);
|
||||
if (i == 1) {
|
||||
@@ -180,7 +181,7 @@ public class LineSsjThread implements Runnable {
|
||||
//超大,给plc下发错误信息,等待人工处理
|
||||
//托盘大小对不上,给plc下发错误信息,等待人工处理
|
||||
//码不对,给plc下发错误信息,等待人工处理
|
||||
int i = writeToSsj(SsjDevice.getPlcDbWriteAddress(),"0",Integer.valueOf(ajaxResult.get("code").toString()),2);
|
||||
int i = writeToSsj(SsjDevice.getPlcDbWriteAddress(), "0", Integer.parseInt(ajaxResult.get("code").toString()), 2);
|
||||
if (i == 1) {
|
||||
log.info("G1005产线输送机下发错误信息成功");
|
||||
}
|
||||
@@ -189,12 +190,12 @@ public class LineSsjThread implements Runnable {
|
||||
|
||||
}
|
||||
|
||||
if (SsjDevice.getDw() == 1 && SsjDevice.getTraySize() != 0 && StrUtil.isNotBlank(SsjDevice.getTrayCode()) && SsjDevice.getTaskNo() > 1000) {
|
||||
if (SsjDevice.getDw() == 1 && SsjDevice.getTaskNo() > 1000) {
|
||||
|
||||
log.info("设备:{} 位置:{} 条码:{} 托盘大小:{}", SsjDevice.getDeviceCode(), "产线收到wcs任务号", SsjDevice.getTrayCode(), SsjDevice.getTraySize());
|
||||
//任务号查wcs作业,查巷道,看目标输送线是否空闲,查是否有出库作业,生成agv队列
|
||||
|
||||
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Long.valueOf(SsjDevice.getTaskNo()));
|
||||
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Convert.toLong(SsjDevice.getTaskNo()));
|
||||
String deviceCode = "";
|
||||
if (mydoJob != null) {
|
||||
if ("1".equals(mydoJob.getRoadwayId())) {
|
||||
@@ -203,14 +204,14 @@ public class LineSsjThread implements Runnable {
|
||||
deviceCode = "L1012";
|
||||
}
|
||||
int kx = deviceSsjMap.get(deviceCode).getKx();
|
||||
MydoJob mydoJob1 = new MydoJob();
|
||||
mydoJob1.setInOut("2");
|
||||
mydoJob1.setStatus("3");
|
||||
mydoJob1.setExitId(deviceCode);
|
||||
List<MydoJob> mydoJob2 = mydoJobService.selectInOrOutMydoJobList(mydoJob1);
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setInOut("2");
|
||||
mydoJobParam.setStatus("3");
|
||||
mydoJobParam.setExitId(deviceCode);
|
||||
List<MydoJob> outMydoJobList = mydoJobService.selectInOrOutMydoJobList(mydoJobParam);
|
||||
|
||||
|
||||
if (mydoJob2.isEmpty() && kx == 1) {
|
||||
if (outMydoJobList.isEmpty() && kx == 1) {
|
||||
//查是否有队列,如果有了请求放货修改为允许放货
|
||||
AgvQueue agvQueue = agvQueueService.selectAgvQueueByTaskCode(mydoJob.getJobId());
|
||||
if (agvQueue != null){
|
||||
@@ -230,7 +231,7 @@ public class LineSsjThread implements Runnable {
|
||||
paramMap.put("startPoint", "G1005");
|
||||
paramMap.put("endPoint", deviceCode);
|
||||
paramMap.put("traySize",String.valueOf(SsjDevice.getTraySize()));
|
||||
paramMap.put("wmstaskNo",mydoJob.getTaskNo());
|
||||
paramMap.put("wmsTaskNo", mydoJob.getTaskNo());
|
||||
AjaxResult ajaxResult = apiService.receiveAgvMoveJob(paramMap);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
mydoJob.setStatus("3");
|
||||
|
||||
@@ -97,6 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dw != null">dw = #{dw},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="taskNo != null">task_no = #{taskNo},</if>
|
||||
<if test="exception != null">exception = #{exception},</if>
|
||||
<if test="traySize != null">tray_size = #{traySize},</if>
|
||||
<if test="allowPut != null">allow_put = #{allowPut},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user