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