rev:修改
This commit is contained in:
@@ -161,14 +161,17 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
|||||||
driver.setCar_no(reqParam.getString("robot_name"));
|
driver.setCar_no(reqParam.getString("robot_name"));
|
||||||
|
|
||||||
result.put("code", HttpStatus.HTTP_OK);
|
result.put("code", HttpStatus.HTTP_OK);
|
||||||
result.put("message", "申请进入设备:"+device.getDevice_code()+"成功");
|
result.put("message", "ok");
|
||||||
|
// result.put("message", "申请进入设备:"+device.getDevice_code()+"成功");
|
||||||
} else {
|
} else {
|
||||||
result.put("code", HttpStatus.HTTP_BAD_REQUEST);
|
result.put("code", HttpStatus.HTTP_BAD_REQUEST);
|
||||||
result.put("message", "当前action值为:"+driver.getAction()+"不允许进入");
|
result.put("message", "ok");
|
||||||
|
// result.put("message", "当前action值为:"+driver.getAction()+"不允许进入");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
result.put("code", HttpStatus.HTTP_BAD_REQUEST);
|
result.put("code", HttpStatus.HTTP_BAD_REQUEST);
|
||||||
result.put("message", "当前设备不属于三色灯!");
|
result.put("message", "ok");
|
||||||
|
// result.put("message", "当前设备不属于三色灯!");
|
||||||
}
|
}
|
||||||
log.info("getBlockGroup反馈AGV输出参数:{}", result.toString());
|
log.info("getBlockGroup反馈AGV输出参数:{}", result.toString());
|
||||||
return result;
|
return result;
|
||||||
@@ -207,14 +210,17 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
|||||||
driver2.setCar_no("");
|
driver2.setCar_no("");
|
||||||
}
|
}
|
||||||
result.put("code", HttpStatus.HTTP_OK);
|
result.put("code", HttpStatus.HTTP_OK);
|
||||||
result.put("message", "申请离开设备:"+device.getDevice_code()+"成功");
|
// result.put("message", "申请离开设备:"+device.getDevice_code()+"成功");
|
||||||
|
result.put("message", "ok");
|
||||||
} else {
|
} else {
|
||||||
result.put("code", HttpStatus.HTTP_BAD_REQUEST);
|
result.put("code", HttpStatus.HTTP_BAD_REQUEST);
|
||||||
result.put("message", "当前action值为:"+driver.getAction()+"不允许离开");
|
// result.put("message", "当前action值为:"+driver.getAction()+"不允许离开");
|
||||||
|
result.put("message", "ok");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
result.put("code", HttpStatus.HTTP_BAD_REQUEST);
|
result.put("code", HttpStatus.HTTP_BAD_REQUEST);
|
||||||
result.put("message", "当前设备不属于三色灯!");
|
// result.put("message", "当前设备不属于三色灯!");
|
||||||
|
result.put("message", "ok");
|
||||||
}
|
}
|
||||||
log.info("releaseBlockGroup反馈AGV输出参数:{}", result.toString());
|
log.info("releaseBlockGroup反馈AGV输出参数:{}", result.toString());
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -402,6 +402,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject SearchTasks() {
|
public JSONObject SearchTasks() {
|
||||||
|
// 返回结果
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
// 需返回mes集合
|
// 需返回mes集合
|
||||||
List<ResultTaskMesDto> mesDtoList = new ArrayList<>();
|
List<ResultTaskMesDto> mesDtoList = new ArrayList<>();
|
||||||
// 获取当前所有任务
|
// 获取当前所有任务
|
||||||
@@ -422,6 +424,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
if (ObjectUtil.isNotEmpty(instruction)) {
|
if (ObjectUtil.isNotEmpty(instruction)) {
|
||||||
if (instruction.getSend_status().equals("1")) {
|
if (instruction.getSend_status().equals("1")) {
|
||||||
UnifiedResponse<JSONObject> resp = agvService.queryXZAgvInstStatusByCode(instruction.getInstruction_code(), JSONObject.class);
|
UnifiedResponse<JSONObject> resp = agvService.queryXZAgvInstStatusByCode(instruction.getInstruction_code(), JSONObject.class);
|
||||||
|
if (ObjectUtil.isNotEmpty(resp) && ObjectUtil.isNotEmpty(resp.getData())) {
|
||||||
// 状态
|
// 状态
|
||||||
String state = resp.getData().getString("state");
|
String state = resp.getData().getString("state");
|
||||||
if ("RUNNING".equals(state) || "WAITING".equals(state)) {
|
if ("RUNNING".equals(state) || "WAITING".equals(state)) {
|
||||||
@@ -431,6 +434,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
ExecutingAGV = resp.getData().getString("vehicle");
|
ExecutingAGV = resp.getData().getString("vehicle");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// mes起点终点为空则不返回
|
// mes起点终点为空则不返回
|
||||||
if (ObjectUtil.isEmpty(taskDto.getStart_parent_code()) || ObjectUtil.isEmpty(taskDto.getNext_parent_code())) {
|
if (ObjectUtil.isEmpty(taskDto.getStart_parent_code()) || ObjectUtil.isEmpty(taskDto.getNext_parent_code())) {
|
||||||
@@ -488,8 +492,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
.build();
|
.build();
|
||||||
mesDtoList.add(mesDto);
|
mesDtoList.add(mesDto);
|
||||||
}*/
|
}*/
|
||||||
// 返回结果
|
|
||||||
JSONObject result = new JSONObject();
|
|
||||||
result.put("ReturnStatus", 0);
|
result.put("ReturnStatus", 0);
|
||||||
result.put("MsgTime", DateUtil.now());
|
result.put("MsgTime", DateUtil.now());
|
||||||
result.put("TaskList", mesDtoList);
|
result.put("TaskList", mesDtoList);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class AgvWaitUtil {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ConveyorService conveyorService;
|
private ConveyorService conveyorService;
|
||||||
|
|
||||||
private final String code = "AK001,ZB003,BK001";
|
private final String code = "AK001,ZB004,BK001";
|
||||||
|
|
||||||
//取货前等待
|
//取货前等待
|
||||||
public JSONObject waitInGet(String deviceCode) {
|
public JSONObject waitInGet(String deviceCode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user