回流输送机发送去向
This commit is contained in:
@@ -11,4 +11,6 @@ public class JobParam {
|
|||||||
private String jobId;
|
private String jobId;
|
||||||
private String trayCode;
|
private String trayCode;
|
||||||
private String taskNo;
|
private String taskNo;
|
||||||
|
private String type;
|
||||||
|
private String pickSsj;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(cron = "0/5 * * * * ?")
|
/*@Scheduled(cron = "0/5 * * * * ?")
|
||||||
public void sendInSsjTaskNo(){
|
public void sendInSsjTaskNo(){
|
||||||
AgvQueue agvQueueParam = new AgvQueue();
|
AgvQueue agvQueueParam = new AgvQueue();
|
||||||
agvQueueParam.setSsjTaskNo("0");
|
agvQueueParam.setSsjTaskNo("0");
|
||||||
@@ -439,7 +439,7 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
agvQueueService.updateAgvQueue(agvQueue);
|
agvQueueService.updateAgvQueue(agvQueue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流利架出库确认,清空流利架状态信息
|
* 流利架出库确认,清空流利架状态信息
|
||||||
@@ -448,16 +448,26 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult outMydojobMakesure(JobParam jobParam) {
|
public AjaxResult outMydojobMakesure(JobParam jobParam) {
|
||||||
BasFluentFrame param = new BasFluentFrame();
|
if ("1".equals(jobParam.getType())){
|
||||||
param.setTrayCode(jobParam.getTrayCode());
|
//流利架
|
||||||
List<BasFluentFrame> basFluentFrames = fluentFrameService.selectBasFluentFrameList(param);
|
BasFluentFrame param = new BasFluentFrame();
|
||||||
if (CollUtil.isEmpty(basFluentFrames)){
|
param.setTrayCode(jobParam.getTrayCode());
|
||||||
return AjaxResult.error("无流利架信息");
|
List<BasFluentFrame> basFluentFrames = fluentFrameService.selectBasFluentFrameList(param);
|
||||||
|
if (CollUtil.isEmpty(basFluentFrames)){
|
||||||
|
return AjaxResult.error("无流利架信息");
|
||||||
|
}
|
||||||
|
BasFluentFrame basFluentFrame = basFluentFrames.get(0);
|
||||||
|
basFluentFrame.setTrayCode("");
|
||||||
|
basFluentFrame.setAllotNum(0L);
|
||||||
|
fluentFrameService.updateBasFluentFrame(basFluentFrame);
|
||||||
|
}else if ("2".equals(jobParam.getType())){
|
||||||
|
//修改点位
|
||||||
|
WcsPort wcsPort = wcsPortService.selectWcsPortByPortCode(jobParam.getPickSsj());
|
||||||
|
wcsPort.setStatus("3");
|
||||||
|
wcsPortService.updateWcsPort(wcsPort);
|
||||||
|
}else {
|
||||||
|
return AjaxResult.error("未知设备类型");
|
||||||
}
|
}
|
||||||
BasFluentFrame basFluentFrame = basFluentFrames.get(0);
|
|
||||||
basFluentFrame.setTrayCode("");
|
|
||||||
basFluentFrame.setAllotNum(0L);
|
|
||||||
fluentFrameService.updateBasFluentFrame(basFluentFrame);
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,11 +2,7 @@ package com.ruoyi.schedule.scheduleTask.ssj.bs;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
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 cn.hutool.core.util.ObjUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskRequest;
|
|
||||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
||||||
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
||||||
import com.ruoyi.api.service.IApiService;
|
import com.ruoyi.api.service.IApiService;
|
||||||
@@ -16,15 +12,10 @@ import com.ruoyi.device.agv.service.IAgvQueueService;
|
|||||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcRead;
|
import com.ruoyi.schedule.plcRead.ssj.PlcRead;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -141,52 +132,35 @@ public class BsInSsjThread implements Runnable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 输送线入库
|
|
||||||
*
|
|
||||||
* @param inSsjDevice
|
|
||||||
*/
|
|
||||||
public void inDispatch(DeviceSsj inSsjDevice) {
|
public void inDispatch(DeviceSsj inSsjDevice) {
|
||||||
//如果入库请求1 并且 托盘码不为空
|
//如果到位 每个入口有且只有一个未开始的入库作业
|
||||||
if (inSsjDevice.getDw()==1 && inSsjDevice.getRkqq() == 1 && inSsjDevice.getTaskNo()>0) {
|
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0) {
|
||||||
//判断是否生成队列
|
//判断是否生成队列
|
||||||
AgvQueue agvQueueParam = new AgvQueue();
|
AgvQueue agvQueueParam = new AgvQueue();
|
||||||
agvQueueParam.setWmsTaskNo(String.valueOf(inSsjDevice.getTaskNo()));
|
agvQueueParam.setPositionCode1(inSsjDevice.getDeviceCode());
|
||||||
|
agvQueueParam.setStatus("0");
|
||||||
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueueParam);
|
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueueParam);
|
||||||
if (CollUtil.isEmpty(agvQueues)) {
|
if (CollUtil.isEmpty(agvQueues)) {
|
||||||
//根据入口,查询对应的入库作业
|
//根据入口,查询对应的入库作业
|
||||||
MydoJob mydoJobParam = new MydoJob();
|
MydoJob mydoJobParam = new MydoJob();
|
||||||
mydoJobParam.setTaskNo(Convert.toStr(inSsjDevice.getTaskNo()));
|
mydoJobParam.setEntranceId(Convert.toStr(inSsjDevice.getTaskNo()));
|
||||||
MydoJob mydoJob = apiService.requestEnterByTaskNo(mydoJobParam);
|
List<MydoJob> mydoJobs = apiService.requestEnterByEnterId(mydoJobParam);
|
||||||
if (ObjUtil.isNotNull(mydoJob)) {
|
if (ObjUtil.isNotNull(mydoJobs)) {
|
||||||
|
//创建ctu入库队列
|
||||||
//生成agv队列
|
AgvQueue agvQueue = apiService.createAgvQueue(inSsjDevice.getName(), mydoJobs.get(0).getCargoSpaceId(), mydoJobs.get(0).getTrayCode(), mydoJobs.get(0).getTaskNo(), "1");
|
||||||
AgvQueue agvQueue = apiService.createAgvQueue(inSsjDevice.getName(), mydoJob.getCargoSpaceId(),mydoJob.getTrayCode(),mydoJob.getTaskNo(),"1");
|
if (ObjUtil.isNotNull(agvQueue)) {
|
||||||
//请求任务生成
|
log.info("创建CTU入库作业 taskNo{}", agvQueue.getWmsTaskNo());
|
||||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue( agvQueue);
|
|
||||||
//修改wms任务状态
|
|
||||||
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
|
||||||
//修改ctu执行状态
|
|
||||||
agvQueue.setStatus("1");
|
|
||||||
agvQueueService.updateAgvQueue(agvQueue);
|
|
||||||
log.info("向CTU下入库库作业");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
AgvQueue agvQueue = agvQueues.get(0);
|
AgvQueue agvQueue = agvQueues.get(0);
|
||||||
if ("0".equals(agvQueue.getStatus())){
|
//ctu下发任务
|
||||||
//请求任务生成
|
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(agvQueue);
|
||||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(agvQueue);
|
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
||||||
//修改wms任务状态
|
//修改ctu执行状态
|
||||||
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
agvQueue.setStatus("1");
|
||||||
//修改ctu执行状态
|
agvQueueService.updateAgvQueue(agvQueue);
|
||||||
agvQueue.setStatus("1");
|
log.info("向CTU下入库库作业 taskNo{}", agvQueue.getWmsTaskNo());
|
||||||
agvQueueService.updateAgvQueue(agvQueue);
|
|
||||||
log.info("向CTU下入库库作业");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import com.ruoyi.common.utils.spring.SpringUtils;
|
|||||||
import com.ruoyi.device.agv.service.IAgvQueueService;
|
import com.ruoyi.device.agv.service.IAgvQueueService;
|
||||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcRead;
|
import com.ruoyi.schedule.plcRead.ssj.PlcRead;
|
||||||
|
import com.ruoyi.schedule.plcRead.ssj.domain.SendData;
|
||||||
|
import com.ruoyi.schedule.plcRead.util.Tools;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -81,22 +83,34 @@ public class BsPickSsjTread implements Runnable{
|
|||||||
List<WcsPort> wcsPorts = wcsPortService.selectWcsPortList(wcsPortParam);
|
List<WcsPort> wcsPorts = wcsPortService.selectWcsPortList(wcsPortParam);
|
||||||
if (CollUtil.isNotEmpty(wcsPorts)){
|
if (CollUtil.isNotEmpty(wcsPorts)){
|
||||||
WcsPort wcsPort = wcsPorts.get(0);
|
WcsPort wcsPort = wcsPorts.get(0);
|
||||||
if ("1".equals(wcsPort.getStatus())){
|
|
||||||
|
if ("1".equals(wcsPort.getStatus())) {
|
||||||
|
//未同步电子标签
|
||||||
Map<String, Object> param = new HashMap<>();
|
Map<String, Object> param = new HashMap<>();
|
||||||
param.put("taskNo", pickSsjDevice.getTaskNo());
|
param.put("taskNo", pickSsjDevice.getTaskNo());
|
||||||
param.put("wmsType", "2");
|
param.put("wmsType", "2");
|
||||||
param.put("pickSsj", pickSsjDevice.getDeviceCode());
|
param.put("pickSsj", pickSsjDevice.getDeviceCode());
|
||||||
RequestLog requestLog = apiService.finishMydoJob(JOB_FINISH_URL, "出库任务到达拣选口", param);
|
RequestLog requestLog = apiService.finishMydoJob(JOB_FINISH_URL, "出库任务到达拣选口", param);
|
||||||
if ("1".equals(requestLog.getIsSuccessful())){
|
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||||
|
//已同步电子标签任务
|
||||||
wcsPort.setStatus("2");
|
wcsPort.setStatus("2");
|
||||||
wcsPortService.updateWcsPort(wcsPort);
|
wcsPortService.updateWcsPort(wcsPort);
|
||||||
}else {
|
} else {
|
||||||
log.error("任务失败{}", requestLog.getErrorDetails());
|
log.error("任务失败{}", requestLog.getErrorDetails());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ("3".equals(wcsPort.getStatus())){
|
||||||
|
//拣选完成
|
||||||
|
DeviceSsj deviceSsj = PlcRead.deviceMap.get(wcsPort.getPortCode());
|
||||||
|
SendData qx = new SendData(Tools.INT, 1);
|
||||||
|
byte[] bytes = Tools.sendData(qx);
|
||||||
|
int i = PlcRead.WriteToSSJ(deviceSsj.getPlcDbWriteAddress(), bytes);
|
||||||
|
if (i==1){
|
||||||
|
log.info("发送回流任务去向成功 ssj{}", pickSsjDevice.getDeviceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pickSsjDevice.getKx() == 1 && pickSsjDevice.getTaskNo() == 0){
|
if (pickSsjDevice.getKx() == 1 && pickSsjDevice.getTaskNo() == 0){
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.schedule.scheduleTask.ssj.js;
|
package com.ruoyi.schedule.scheduleTask.ssj.js;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.ObjUtil;
|
import cn.hutool.core.util.ObjUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
||||||
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
||||||
import com.ruoyi.api.service.IApiService;
|
import com.ruoyi.api.service.IApiService;
|
||||||
@@ -55,7 +55,6 @@ public class JsInSsjThread implements Runnable {
|
|||||||
|
|
||||||
switch ( type){
|
switch ( type){
|
||||||
case "in":
|
case "in":
|
||||||
//正常入库 尾箱回流 物料入库 空料箱入库
|
|
||||||
for (String ssjCode : ssjCodeList.get(type)) {
|
for (String ssjCode : ssjCodeList.get(type)) {
|
||||||
try {
|
try {
|
||||||
if (PlcRead.deviceMap.containsKey(ssjCode)) {
|
if (PlcRead.deviceMap.containsKey(ssjCode)) {
|
||||||
@@ -82,47 +81,34 @@ public class JsInSsjThread implements Runnable {
|
|||||||
|
|
||||||
|
|
||||||
public void inDispatch(DeviceSsj inSsjDevice) {
|
public void inDispatch(DeviceSsj inSsjDevice) {
|
||||||
//如果入库请求1 并且 托盘码不为空
|
//如果到位 每个入口有且只有一个未开始的入库作业
|
||||||
if (inSsjDevice.getDw()==1 && inSsjDevice.getRkqq() == 1 && StrUtil.isNotEmpty(inSsjDevice.getTrayCode())) {
|
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0) {
|
||||||
//判断是否生成队列
|
//判断是否生成队列
|
||||||
AgvQueue agvQueueParam = new AgvQueue();
|
AgvQueue agvQueueParam = new AgvQueue();
|
||||||
agvQueueParam.setWmsTraycode(inSsjDevice.getTrayCode());
|
agvQueueParam.setPositionCode1(inSsjDevice.getDeviceCode());
|
||||||
//agvQueueParam.setStatus("0");
|
agvQueueParam.setStatus("0");
|
||||||
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueueParam);
|
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueueParam);
|
||||||
if (CollUtil.isEmpty(agvQueues)) {
|
if (CollUtil.isEmpty(agvQueues)) {
|
||||||
//根据入口,查询对应的入库作业
|
//根据入口,查询对应的入库作业
|
||||||
MydoJob mydoJobParam = new MydoJob();
|
MydoJob mydoJobParam = new MydoJob();
|
||||||
mydoJobParam.setStatus("1");
|
mydoJobParam.setEntranceId(Convert.toStr(inSsjDevice.getTaskNo()));
|
||||||
mydoJobParam.setTrayCode(inSsjDevice.getTrayCode());
|
List<MydoJob> mydoJobs = apiService.requestEnterByEnterId(mydoJobParam);
|
||||||
mydoJobParam.setEntranceId(inSsjDevice.getDeviceCode());
|
if (ObjUtil.isNotNull(mydoJobs)) {
|
||||||
MydoJob mydoJob = apiService.requestEnterByTaskNo(mydoJobParam);
|
//创建ctu入库队列
|
||||||
if (ObjUtil.isNotNull(mydoJob)) {
|
AgvQueue agvQueue = apiService.createAgvQueue(inSsjDevice.getName(), mydoJobs.get(0).getCargoSpaceId(), mydoJobs.get(0).getTrayCode(), mydoJobs.get(0).getTaskNo(), "1");
|
||||||
//生成agv队列
|
if (ObjUtil.isNotNull(agvQueue)) {
|
||||||
AgvQueue agvQueue = apiService.createAgvQueue(inSsjDevice.getName(), mydoJob.getCargoSpaceId(),mydoJob.getTrayCode(),mydoJob.getTaskNo(),"1");
|
log.info("创建CTU入库作业 taskNo{}", agvQueue.getWmsTaskNo());
|
||||||
//请求任务生成
|
|
||||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(agvQueue);
|
|
||||||
//修改wms任务状态
|
|
||||||
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
|
||||||
//修改ctu执行状态
|
|
||||||
agvQueue.setStatus("1");
|
|
||||||
agvQueueService.updateAgvQueue(agvQueue);
|
|
||||||
log.info("向CTU下入库库作业");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
AgvQueue agvQueue = agvQueues.get(0);
|
AgvQueue agvQueue = agvQueues.get(0);
|
||||||
if ("0".equals(agvQueue.getStatus())){
|
//ctu下发任务
|
||||||
//请求任务生成
|
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(agvQueue);
|
||||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(agvQueue);
|
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
||||||
//修改wms任务状态
|
//修改ctu执行状态
|
||||||
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
agvQueue.setStatus("1");
|
||||||
//修改ctu执行状态
|
agvQueueService.updateAgvQueue(agvQueue);
|
||||||
agvQueue.setStatus("1");
|
log.info("向CTU下入库库作业 taskNo{}", agvQueue.getWmsTaskNo());
|
||||||
agvQueueService.updateAgvQueue(agvQueue);
|
|
||||||
log.info("向CTU下入库库作业");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import com.ruoyi.common.utils.spring.SpringUtils;
|
|||||||
import com.ruoyi.device.agv.service.IAgvQueueService;
|
import com.ruoyi.device.agv.service.IAgvQueueService;
|
||||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcRead;
|
import com.ruoyi.schedule.plcRead.ssj.PlcRead;
|
||||||
|
import com.ruoyi.schedule.plcRead.ssj.domain.SendData;
|
||||||
|
import com.ruoyi.schedule.plcRead.util.Tools;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -93,25 +95,37 @@ public class JsPickSsjTread implements Runnable {
|
|||||||
List<WcsPort> wcsPorts = wcsPortService.selectWcsPortList(wcsPortParam);
|
List<WcsPort> wcsPorts = wcsPortService.selectWcsPortList(wcsPortParam);
|
||||||
if (CollUtil.isNotEmpty(wcsPorts)){
|
if (CollUtil.isNotEmpty(wcsPorts)){
|
||||||
WcsPort wcsPort = wcsPorts.get(0);
|
WcsPort wcsPort = wcsPorts.get(0);
|
||||||
if ("1".equals(wcsPort.getStatus())){
|
|
||||||
|
if ("1".equals(wcsPort.getStatus())) {
|
||||||
|
//未同步电子标签
|
||||||
Map<String, Object> param = new HashMap<>();
|
Map<String, Object> param = new HashMap<>();
|
||||||
param.put("taskNo", pickSsjDevice.getTaskNo());
|
param.put("taskNo", pickSsjDevice.getTaskNo());
|
||||||
param.put("wmsType", "2");
|
param.put("wmsType", "2");
|
||||||
param.put("pickSsj", pickSsjDevice.getDeviceCode());
|
param.put("pickSsj", pickSsjDevice.getDeviceCode());
|
||||||
RequestLog requestLog = apiService.finishMydoJob(JOB_FINISH_URL, "出库任务到达拣选口", param);
|
RequestLog requestLog = apiService.finishMydoJob(JOB_FINISH_URL, "出库任务到达拣选口", param);
|
||||||
if ("1".equals(requestLog.getIsSuccessful())){
|
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||||
|
//已同步电子标签任务
|
||||||
wcsPort.setStatus("2");
|
wcsPort.setStatus("2");
|
||||||
wcsPortService.updateWcsPort(wcsPort);
|
wcsPortService.updateWcsPort(wcsPort);
|
||||||
}else {
|
} else {
|
||||||
log.error("任务失败{}", requestLog.getErrorDetails());
|
log.error("任务失败{}", requestLog.getErrorDetails());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ("3".equals(wcsPort.getStatus())){
|
||||||
|
//拣选完成
|
||||||
|
DeviceSsj deviceSsj = PlcRead.deviceMap.get(wcsPort.getPortCode());
|
||||||
|
SendData qx = new SendData(Tools.INT, 1);
|
||||||
|
byte[] bytes = Tools.sendData(qx);
|
||||||
|
int i = PlcRead.WriteToSSJ(deviceSsj.getPlcDbWriteAddress(), bytes);
|
||||||
|
if (i==1){
|
||||||
|
log.info("发送回流任务去向成功 ssj{}", pickSsjDevice.getDeviceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pickSsjDevice.getKx() == 1 && pickSsjDevice.getTaskNo() == 0){
|
if (pickSsjDevice.getKx() == 1){
|
||||||
WcsPort wcsPortParam = new WcsPort();
|
WcsPort wcsPortParam = new WcsPort();
|
||||||
wcsPortParam.setPortCode(pickSsjDevice.getDeviceCode());
|
wcsPortParam.setPortCode(pickSsjDevice.getDeviceCode());
|
||||||
wcsPortParam.setPortType("1");
|
wcsPortParam.setPortType("1");
|
||||||
|
|||||||
Reference in New Issue
Block a user