修改流利架入库
This commit is contained in:
@@ -38,7 +38,7 @@ public interface IApiService
|
|||||||
* @param mydoJob
|
* @param mydoJob
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public MydoJob requestEnterByEnterId(MydoJob mydoJob);
|
public List<MydoJob> requestEnterByEnterId(MydoJob mydoJob);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WMS出库任务推送
|
* WMS出库任务推送
|
||||||
|
|||||||
@@ -79,12 +79,12 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
* @return 返回入库口位置
|
* @return 返回入库口位置
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public MydoJob requestEnterByEnterId(MydoJob mydoJob) {
|
public List<MydoJob> requestEnterByEnterId(MydoJob mydoJob) {
|
||||||
RequestLog requestLog = requestLogService.getRequestLog(REQUEST_ENTER_BY_ENTER_ID, "根据入口请求入库", JSONUtil.toJsonStr(mydoJob));
|
RequestLog requestLog = requestLogService.getRequestLog(REQUEST_ENTER_BY_ENTER_ID, "根据入口请求入库", JSONUtil.toJsonStr(mydoJob));
|
||||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||||
String responseBody = requestLog.getResponseBody();
|
String responseBody = requestLog.getResponseBody();
|
||||||
InterfaceReceive bean = JSONUtil.toBean(responseBody, InterfaceReceive.class);
|
InterfaceReceive bean = JSONUtil.toBean(responseBody, InterfaceReceive.class);
|
||||||
return JSONUtil.toBean(JSONUtil.toJsonStr(bean.getData()), MydoJob.class);
|
return JSONUtil.toList(JSONUtil.toJsonStr(bean.getData()), MydoJob.class);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class ScheduleThread {
|
|||||||
//剪上出库到位线程调度-wms电子屏交互
|
//剪上出库到位线程调度-wms电子屏交互
|
||||||
//jsPickSsjThread.getThread().start();
|
//jsPickSsjThread.getThread().start();
|
||||||
//监控输送机
|
//监控输送机
|
||||||
ssjMonitorThread.getThread().start();
|
//ssjMonitorThread.getThread().start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ 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
|
||||||
@@ -86,15 +88,26 @@ public class BsInSsjThread implements Runnable {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "fluentIn":
|
case "fluentIn":
|
||||||
//流利架 空料箱入库
|
//查询流利架未开始的作业
|
||||||
for (String lljCode : ssjCodeList.get(type)) {
|
MydoJob mydoJobParam = new MydoJob();
|
||||||
try {
|
mydoJobParam.setStatus("1");
|
||||||
inLljDispatch(lljCode);
|
mydoJobParam.setEntranceId("fluent");
|
||||||
} catch (RuntimeException e) {
|
List<MydoJob> mydoJobs = apiService.requestEnterByEnterId(mydoJobParam);
|
||||||
log.error(e.getMessage(), e);
|
if (CollUtil.isNotEmpty(mydoJobs)){
|
||||||
}
|
Map<String, List<MydoJob>> lljCodeGroup = mydoJobs.stream().collect(Collectors.groupingBy(MydoJob::getEntranceId));
|
||||||
|
//流利架 空料箱入库
|
||||||
|
for (String lljCode : ssjCodeList.get(type)) {
|
||||||
|
try {
|
||||||
|
if (lljCodeGroup.containsKey(lljCode)){
|
||||||
|
inLljDispatch(lljCode,lljCodeGroup.get(lljCode));
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,7 +126,7 @@ public class BsInSsjThread implements Runnable {
|
|||||||
*
|
*
|
||||||
* @param lljCode
|
* @param lljCode
|
||||||
*/
|
*/
|
||||||
private void inLljDispatch(String lljCode) {
|
private void inLljDispatch(String lljCode,List<MydoJob> mydoJobs) {
|
||||||
|
|
||||||
//判断是否生成队列
|
//判断是否生成队列
|
||||||
AgvQueue agvQueueParam = new AgvQueue();
|
AgvQueue agvQueueParam = new AgvQueue();
|
||||||
@@ -121,11 +134,7 @@ public class BsInSsjThread implements Runnable {
|
|||||||
//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 mydoJob = mydoJobs.get(0);
|
||||||
MydoJob mydoJobParam = new MydoJob();
|
|
||||||
mydoJobParam.setStatus("1");
|
|
||||||
mydoJobParam.setEntranceId(lljCode);
|
|
||||||
MydoJob mydoJob = apiService.requestEnterByEnterId(mydoJobParam);
|
|
||||||
if (ObjUtil.isNotNull(mydoJob)) {
|
if (ObjUtil.isNotNull(mydoJob)) {
|
||||||
//生成agv队列
|
//生成agv队列
|
||||||
AgvQueue agvQueue = apiService.createAgvQueue(lljCode, mydoJob.getCargoSpaceId(),mydoJob.getTrayCode(),mydoJob.getTaskNo(),"1");
|
AgvQueue agvQueue = apiService.createAgvQueue(lljCode, mydoJob.getCargoSpaceId(),mydoJob.getTrayCode(),mydoJob.getTaskNo(),"1");
|
||||||
|
|||||||
@@ -130,6 +130,8 @@ public class BsOutSsjThread implements Runnable {
|
|||||||
queue.setPositionCode2(basFluentFrame.getLocationName());
|
queue.setPositionCode2(basFluentFrame.getLocationName());
|
||||||
agvQueueService.updateAgvQueue(queue);
|
agvQueueService.updateAgvQueue(queue);
|
||||||
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(queue);
|
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = apiService.requestAgvQueue(queue);
|
||||||
|
//todo 需要调试小车请求
|
||||||
|
genAgvSchedulingTaskResponse.setCode(0);
|
||||||
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
if (genAgvSchedulingTaskResponse.getCode() == 0) {
|
||||||
//修改ctu执行状态
|
//修改ctu执行状态
|
||||||
queue.setStatus("1");
|
queue.setStatus("1");
|
||||||
|
|||||||
Reference in New Issue
Block a user