调度流程修改
This commit is contained in:
@@ -70,20 +70,25 @@ public class ApiServiceImpl implements IApiService {
|
||||
public List<MydoJob> getMydoJobList(MydoJob mydoJob) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(GET_MYDOJOB_URL, "获取任务", JSONUtil.toJsonStr(mydoJob));
|
||||
String responseBody = requestLog.getResponseBody();
|
||||
InterfaceReceive bean = JSONUtil.toBean(responseBody, InterfaceReceive.class);
|
||||
return JSONUtil.toList(JSONUtil.toJsonStr(bean.getData()), MydoJob.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
InterfaceReceive bean = JSONUtil.toBean(responseBody, InterfaceReceive.class);
|
||||
return JSONUtil.toList(JSONUtil.toJsonStr(bean.getData()), MydoJob.class);
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenAgvSchedulingTaskResponse genAgvSchedulingTask(GenAgvSchedulingTaskRequest genAgvSchedulingTaskRequest) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(GEN_AGV_SCHEDULING_TASK, "生成AGV任务", JSONUtil.toJsonStr(genAgvSchedulingTaskRequest));
|
||||
if(requestLog.getIsSuccessful().equals("1")){
|
||||
if("1".equals(requestLog.getIsSuccessful())){
|
||||
return BeanUtil.toBean(requestLog.getResponseBody(), GenAgvSchedulingTaskResponse.class);
|
||||
}else {
|
||||
GenAgvSchedulingTaskResponse response = new GenAgvSchedulingTaskResponse();
|
||||
response.setCode(500);
|
||||
response.setMessage("请求失败");
|
||||
return BeanUtil.toBean(requestLog.getResponseBody(), GenAgvSchedulingTaskResponse.class);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +254,7 @@ public class ApiServiceImpl implements IApiService {
|
||||
agvQueue.setWmsTaskType("2");
|
||||
agvQueue.setWmsTraycode(mydoJob.getTrayCode());
|
||||
agvQueue.setWmsTaskNo(mydoJob.getTaskNo());
|
||||
agvQueue.setStatus("0");
|
||||
int i = agvQueueService.insertAgvQueue(agvQueue);
|
||||
if (i > 0) {
|
||||
log.info("向AGV下任务成功");
|
||||
|
||||
@@ -19,7 +19,7 @@ public class Constant {
|
||||
public static final String BASEURL_AGV = BASEURL + "/rcms-dps/rest/queryAgvStatus/";
|
||||
|
||||
|
||||
public static final String GET_MYDOJOB_URL = "http://localhost:8080/api2wms/inJob";
|
||||
public static final String GET_MYDOJOB_URL = "http://localhost:8080/api2wms/getJob";
|
||||
public static final String REQUEST_ENTER = "http://localhost:8080/api2wms/requestEnter";
|
||||
public static final String UPDATE_MYDOJOB_URL = "http://127.0.0.1:8081/rcms-dps/rest/queryAgvStatus/";
|
||||
public static final String AGV_FINISH_URL = "http://localhost:8080/api2wms/jobFinish";
|
||||
|
||||
@@ -94,7 +94,7 @@ public class BsInSsjThread implements Runnable {
|
||||
}
|
||||
}
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
Thread.sleep(1500);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -113,7 +113,7 @@ public class BsInSsjThread implements Runnable {
|
||||
//判断是否生成队列
|
||||
AgvQueue agvQueueParam = new AgvQueue();
|
||||
agvQueueParam.setPositionCode1(lljCode);
|
||||
agvQueueParam.setStatus("0");
|
||||
//agvQueueParam.setStatus("0");
|
||||
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueueParam);
|
||||
if (CollUtil.isEmpty(agvQueues)){
|
||||
//查询流利架未开始的作业
|
||||
@@ -160,7 +160,7 @@ public class BsInSsjThread implements Runnable {
|
||||
//判断是否生成队列
|
||||
AgvQueue agvQueueParam = new AgvQueue();
|
||||
agvQueueParam.setWmsTraycode(inSsjDevice.getTrayCode());
|
||||
agvQueueParam.setStatus("0");
|
||||
//agvQueueParam.setStatus("0");
|
||||
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueueParam);
|
||||
if (CollUtil.isEmpty(agvQueues)) {
|
||||
//根据入口,查询对应的入库作业
|
||||
|
||||
@@ -85,7 +85,7 @@ public class BsOutSsjThread implements Runnable {
|
||||
|
||||
}
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
Thread.sleep(1500);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -118,9 +118,9 @@ public class BsOutSsjThread implements Runnable {
|
||||
log.info("队列 agvCode {},无对应出库作业", agvQueue.getReqCode());
|
||||
}
|
||||
}
|
||||
}else {
|
||||
}/*else {
|
||||
log.info("ssjCode:{},没有待下发的出库任务", outSsjDevice.getDeviceCode());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,9 +177,6 @@ public class BsOutSsjThread implements Runnable {
|
||||
agvQueue.setStatus("1");
|
||||
agvQueueService.updateAgvQueue(agvQueue);
|
||||
log.info("向CTU下入库库作业");
|
||||
//修改mydoJob执行阶段
|
||||
mydoJob.setExecutionPhase("6");
|
||||
apiService.updateMydoJob(mydoJob);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,11 @@ public class BsPickSsjTread implements Runnable{
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
Thread.sleep(1500);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class JsInSsjThread implements Runnable {
|
||||
}
|
||||
}
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
Thread.sleep(1500);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public class JsInSsjThread implements Runnable {
|
||||
//判断是否生成队列
|
||||
AgvQueue agvQueueParam = new AgvQueue();
|
||||
agvQueueParam.setWmsTraycode(inSsjDevice.getTrayCode());
|
||||
agvQueueParam.setStatus("0");
|
||||
//agvQueueParam.setStatus("0");
|
||||
List<AgvQueue> agvQueues = agvQueueService.selectAgvQueueList(agvQueueParam);
|
||||
if (CollUtil.isEmpty(agvQueues)) {
|
||||
//根据入口,查询对应的入库作业
|
||||
@@ -165,6 +165,7 @@ public class JsInSsjThread implements Runnable {
|
||||
agvQueue.setStatus("0");
|
||||
agvQueue.setTaskCode(taskCode);
|
||||
agvQueue.setWmsTaskType("1");
|
||||
agvQueueService.insertAgvQueue(agvQueue);
|
||||
return agvQueue;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class JsOutSsjThread implements Runnable{
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
Thread.sleep(1500);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -141,9 +141,6 @@ public class JsOutSsjThread implements Runnable{
|
||||
agvQueue.setStatus("1");
|
||||
agvQueueService.updateAgvQueue(agvQueue);
|
||||
log.info("向CTU下入库库作业");
|
||||
//修改mydoJob执行阶段
|
||||
mydoJob.setExecutionPhase("6");
|
||||
apiService.updateMydoJob(mydoJob);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class JsPickSsjTread implements Runnable {
|
||||
apiService = SpringUtils.getBean(IApiService.class);
|
||||
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
|
||||
wcsPortService = SpringUtils.getBean(IWcsPortService.class);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +82,11 @@ public class JsPickSsjTread implements Runnable {
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
Thread.sleep(1500);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user