rev:更新
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.nl.acs.device.deviceDriver.service.defination.opcDefination.one_floor.conveyor.conveyor_with_scanner_weight;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.common.util.concurrent.Uninterruptibles;
|
||||
import lombok.Getter;
|
||||
@@ -200,7 +201,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
Boolean applyTask = Optional.ofNullable(extraValue.get("apply_task")).map(Object::toString).map(Boolean::parseBoolean).orElse(false);
|
||||
if (applyTask) {
|
||||
//编写业务逻辑方法
|
||||
if (mode >= 6 && !this.requireSuccess) {
|
||||
if (mode >= 6 && !this.requireSuccess && !StrUtil.equals(this.barcode,"NoRead")) {
|
||||
applyInbound("申请入库");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -578,15 +578,16 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
log.error("库卡任务取消失败:{}", response.getMessage());
|
||||
}
|
||||
} else if (StrUtil.equals(shortPathLines.get(0).getType(), RouteTypeEnum.SURAY.getCode())) {
|
||||
JSONObject paramObj = JSONObject.parseObject(task.getParam());
|
||||
TaskCancelRequest request = new TaskCancelRequest();
|
||||
request.setTaskId(entity.getInstruction_code());
|
||||
request.setMsgTime(DateUtil.now());
|
||||
request.setWarehouse(paramObj.getString("LK"));
|
||||
ResponseData response = ResponseData.getResponseData(surayApi.taskCancel(request));
|
||||
if (response.getCode() == 400) {
|
||||
log.error("速锐任务取消失败:{}", response.getMessage());
|
||||
}
|
||||
// JSONObject paramObj = JSONObject.parseObject(task.getParam());
|
||||
// TaskCancelRequest request = new TaskCancelRequest();
|
||||
// request.setTaskId(entity.getInstruction_code());
|
||||
// request.setMsgTime(DateUtil.now());
|
||||
// request.setWarehouse("LK");
|
||||
// ResponseData response = ResponseData.getResponseData(surayApi.taskCancel(request));
|
||||
// if (response.getCode() == 400) {
|
||||
// log.error("速锐任务取消失败:{}", response.getMessage());
|
||||
// }
|
||||
throw new BadRequestException("请从WCS系统取消!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ public class WmsMethodConstant {
|
||||
public static final String APPLY_INBOUND_TASK = "/admin-api/acs/wms/inbound/apply";
|
||||
public static final String APPLY_OUTBOUND_AGV_TASK = "/acs/call/outbound/agv/apply";
|
||||
public static final String CALL_EMPTY_PALLET_STACK = "/admin-api/acs/wms/applyEmptyPalletOutbound";
|
||||
public static final String REQUEST_BUNDLE_INFO = "/acs/call/request-bundle-info";
|
||||
public static final String REQUEST_BUNDLE_INFO = "/admin-api/acs/wms/binding/apply";
|
||||
public static final String REQUEST_OPEN_COVER_INFO = "/acs/call/request-open-cover-info";
|
||||
public static final String REQUEST_TUBE_INBOUND = "/acs/call/request-tube-inbound";
|
||||
public static final String REQUEST_TUBE_NEW_POINT = "/acs/call/request-new-point";
|
||||
|
||||
@@ -77,6 +77,20 @@ public class AutoCreateInst {
|
||||
String vehicleType = acsTask.getVehicle_type();
|
||||
Integer actionType = acsTask.getActionType();
|
||||
|
||||
// 判断当前是不是成品出库?任务类型:成品出库:9
|
||||
// 查找有没有空托盘出库的指令,叠托架= 当前任务终点的关联点位:逻辑写在驱动里
|
||||
if (TaskTypeEnum.OUTBOUNDTASK.getCode().equals(task_type)) {
|
||||
// 获取终点
|
||||
Device device = deviceAppService.findDeviceByCode(next_device_code);
|
||||
BeltConveyorAgvDeviceDriver deviceDriver = (BeltConveyorAgvDeviceDriver)device.getDeviceDriver();
|
||||
if (!deviceDriver.checkIssueTask()) {
|
||||
acsTask.setRemark("有空托盘出库任务,暂时不下发!");
|
||||
taskserver.update(acsTask);
|
||||
taskserver.updateByCodeFromCache(acsTask);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//校验路由关系
|
||||
List<RouteLineDto> shortPathsList = routeLineService.getShortPathLines(start_device_code, next_device_code, route_plan_code);
|
||||
if (ObjectUtils.isEmpty(shortPathsList)) {
|
||||
@@ -117,19 +131,7 @@ public class AutoCreateInst {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 判断当前是不是成品出库?任务类型:成品出库:9
|
||||
// 查找有没有空托盘出库的指令,叠托架= 当前任务终点的关联点位:逻辑写在驱动里
|
||||
if (TaskTypeEnum.OUTBOUNDTASK.getCode().equals(task_type)) {
|
||||
// 获取终点
|
||||
Device device = deviceAppService.findDeviceByCode(next_device_code);
|
||||
BeltConveyorAgvDeviceDriver deviceDriver = (BeltConveyorAgvDeviceDriver)device.getDeviceDriver();
|
||||
if (!deviceDriver.checkIssueTask()) {
|
||||
acsTask.setRemark("有空托盘出库任务,暂时不下发!");
|
||||
taskserver.update(acsTask);
|
||||
taskserver.updateByCodeFromCache(acsTask);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Instruction instdto = new Instruction();
|
||||
instdto.setInstruction_type(task_type);
|
||||
|
||||
@@ -31,7 +31,7 @@ class WmsApiTest {
|
||||
@Test
|
||||
void shouldApplyEmptyPalletInboundTask() {
|
||||
ApplyInboundReqVO request = ApplyInboundReqVO.builder()
|
||||
.type("6")
|
||||
.type(6)
|
||||
.deviceCode("DEV001")
|
||||
.build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user