rev:前端样式
This commit is contained in:
@@ -258,9 +258,10 @@ public class AppearanceInspectionScannerConveyorDeviceDriver extends AbstractOpc
|
||||
} else {
|
||||
this.requireTime = currentTimeMillis;
|
||||
JSONObject requestParam = new JSONObject();
|
||||
requestParam.put("device_code1", this.currentDeviceCode);
|
||||
requestParam.put("type", RequestTypeEnum.APPLY_IN_TASK.getType());
|
||||
requestParam.put("barcode1", this.barcode);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put(this.barcode, this.currentDeviceCode);
|
||||
requestParam.put("param", param);
|
||||
UnifiedResponse<JSONObject> response = acsToWmsService.applyTaskToWms(requestParam);
|
||||
if (response.isSuccess()) {
|
||||
this.requireSuccess = true;
|
||||
@@ -278,9 +279,10 @@ public class AppearanceInspectionScannerConveyorDeviceDriver extends AbstractOpc
|
||||
} else {
|
||||
this.requireTime = currentTimeMillis;
|
||||
JSONObject requestParam = new JSONObject();
|
||||
requestParam.put("device_code1", this.currentDeviceCode);
|
||||
requestParam.put("type", RequestTypeEnum.APPLY_IN_TASK.getType());
|
||||
requestParam.put("barcode1", this.barcode);
|
||||
requestParam.put("type", RequestTypeEnum.APPLY_AGV_TASK.getType());
|
||||
JSONObject param = new JSONObject();
|
||||
param.put(this.barcode, this.currentDeviceCode);
|
||||
requestParam.put("param", param);
|
||||
UnifiedResponse<JSONObject> response = acsToWmsService.applyTaskToWms(requestParam);
|
||||
if (response.isSuccess()) {
|
||||
this.requireSuccess = true;
|
||||
@@ -297,9 +299,9 @@ public class AppearanceInspectionScannerConveyorDeviceDriver extends AbstractOpc
|
||||
*/
|
||||
private UnifiedResponse<JSONObject> applyAgvTask(String barcode) {
|
||||
JSONObject requestParam = new JSONObject();
|
||||
requestParam.put("device_code1", this.currentDeviceCode);
|
||||
requestParam.put("type", RequestTypeEnum.APPLY_IN_TASK.getType());
|
||||
requestParam.put("barcode1", barcode);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put(barcode, this.currentDeviceCode);
|
||||
requestParam.put("param", param);
|
||||
return acsToWmsService.applyTaskToWms(requestParam);
|
||||
}
|
||||
|
||||
@@ -308,6 +310,7 @@ public class AppearanceInspectionScannerConveyorDeviceDriver extends AbstractOpc
|
||||
if (!isTimeValid(currentTimeMillis)) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.requireTimeOut);
|
||||
} else {
|
||||
this.requireTime = currentTimeMillis;
|
||||
TaskDto taskDto = taskService.findReadyByVehicleCode(this.barcode);
|
||||
Instruction instDto = instructionService.findReadyInstByVehicleCode(this.barcode);
|
||||
if (ObjectUtil.isNotEmpty(taskDto) && ObjectUtil.isEmpty(instDto)) {
|
||||
@@ -399,6 +402,7 @@ public class AppearanceInspectionScannerConveyorDeviceDriver extends AbstractOpc
|
||||
if (!isTimeValid(currentTimeMillis)) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.requireTimeOut);
|
||||
} else {
|
||||
this.requireTime = currentTimeMillis;
|
||||
LOCK.lock();
|
||||
try {
|
||||
Device cacheDevice = deviceAppService.findDeviceByCode(deviceCode);
|
||||
|
||||
@@ -94,14 +94,15 @@ public class WithStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
requestParam.put("type", RequestTypeEnum.APPLY_IN_TASK.getType());
|
||||
String getLinkDeviceCode = Optional.ofNullable(device.getExtraValue().get("getLinkDeviceCode")).map(Object::toString).orElse(null);
|
||||
if (StrUtil.isEmpty(getLinkDeviceCode)) {
|
||||
requestParam.put("device_code1", deviceCode);
|
||||
requestParam.put("barcode1", appearanceInspectionScannerConveyorDeviceDriver.getBarcode());
|
||||
JSONObject param = new JSONObject();
|
||||
param.put(appearanceInspectionScannerConveyorDeviceDriver.getBarcode(), deviceCode);
|
||||
requestParam.put("param", param);
|
||||
logServer.deviceExecuteLog(new LuceneLogDto(this.device_code, "申请任务...." + requestParam.toString()));
|
||||
// UnifiedResponse<JSONObject> response = acsToWmsService.applyTaskToWms(requestParam);
|
||||
// if (response.isSuccess()) {
|
||||
appearanceInspectionScannerConveyorDeviceDriver.setRequireSuccess(true);
|
||||
this.requireSuccess = true;
|
||||
// }
|
||||
UnifiedResponse<JSONObject> response = acsToWmsService.applyTaskToWms(requestParam);
|
||||
if (response.isSuccess()) {
|
||||
appearanceInspectionScannerConveyorDeviceDriver.setRequireSuccess(true);
|
||||
this.requireSuccess = true;
|
||||
}
|
||||
} else {
|
||||
Device linkDevice = deviceAppservice.findDeviceByCode(getLinkDeviceCode);
|
||||
if (ObjectUtil.isNotEmpty(linkDevice) && linkDevice.getDeviceDriver() instanceof AppearanceInspectionScannerConveyorDeviceDriver) {
|
||||
@@ -109,29 +110,29 @@ public class WithStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
if (appearanceInspectionScannerConveyorDeviceDriver2.getMove() == 1 && !appearanceInspectionScannerConveyorDeviceDriver2.isRequireSuccess()) {
|
||||
TaskDto taskDto2 = taskServer.findByContainer(appearanceInspectionScannerConveyorDeviceDriver2.getBarcode());
|
||||
if (ObjectUtil.isEmpty(taskDto2)) {
|
||||
requestParam.put("device_code1", deviceCode);
|
||||
requestParam.put("barcode1", appearanceInspectionScannerConveyorDeviceDriver.getBarcode());
|
||||
requestParam.put("device_code2", getLinkDeviceCode);
|
||||
requestParam.put("barcode2", appearanceInspectionScannerConveyorDeviceDriver2.getBarcode());
|
||||
JSONObject param = new JSONObject();
|
||||
param.put(appearanceInspectionScannerConveyorDeviceDriver.getBarcode(), deviceCode);
|
||||
param.put(appearanceInspectionScannerConveyorDeviceDriver2.getBarcode(), getLinkDeviceCode);
|
||||
requestParam.put("param", param);
|
||||
logServer.deviceExecuteLog(new LuceneLogDto(this.device_code, "申请任务...." + requestParam.toString()));
|
||||
//UnifiedResponse<JSONObject> response = acsToWmsService.applyTaskToWms(requestParam);
|
||||
// if (response.isSuccess()) {
|
||||
this.requireSuccess = true;
|
||||
appearanceInspectionScannerConveyorDeviceDriver.setRequireSuccess(true);
|
||||
appearanceInspectionScannerConveyorDeviceDriver2.setRequireSuccess(true);
|
||||
|
||||
// }
|
||||
UnifiedResponse<JSONObject> response = acsToWmsService.applyTaskToWms(requestParam);
|
||||
if (response.isSuccess()) {
|
||||
this.requireSuccess = true;
|
||||
appearanceInspectionScannerConveyorDeviceDriver.setRequireSuccess(true);
|
||||
appearanceInspectionScannerConveyorDeviceDriver2.setRequireSuccess(true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (System.currentTimeMillis() - appearanceInspectionScannerConveyorDeviceDriver.getRequireInTaskTime() > waitTime * 1000) {
|
||||
requestParam.put("device_code1", deviceCode);
|
||||
requestParam.put("barcode1", appearanceInspectionScannerConveyorDeviceDriver.getBarcode());
|
||||
JSONObject param = new JSONObject();
|
||||
param.put(appearanceInspectionScannerConveyorDeviceDriver.getBarcode(), deviceCode);
|
||||
requestParam.put("param", param);
|
||||
logServer.deviceExecuteLog(new LuceneLogDto(this.device_code, "申请任务...." + requestParam.toString()));
|
||||
// UnifiedResponse<JSONObject> response = acsToWmsService.applyTaskToWms(requestParam);
|
||||
//if (response.isSuccess()) {
|
||||
appearanceInspectionScannerConveyorDeviceDriver.setRequireSuccess(true);
|
||||
this.requireSuccess = true;
|
||||
// }
|
||||
UnifiedResponse<JSONObject> response = acsToWmsService.applyTaskToWms(requestParam);
|
||||
if (response.isSuccess()) {
|
||||
appearanceInspectionScannerConveyorDeviceDriver.setRequireSuccess(true);
|
||||
this.requireSuccess = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@ import lombok.Getter;
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum RequestTypeEnum {
|
||||
APPLY_IN_TASK("1", "申请任务");
|
||||
APPLY_IN_TASK("1", "申请任务"),
|
||||
APPLY_AGV_TASK("2", "申请AGV任务");
|
||||
|
||||
private final String type;
|
||||
private final String desc;
|
||||
|
||||
@@ -4,7 +4,6 @@ import org.nl.acs.AcsConfig;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package org.nl.acs.ext;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author Gengby
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.device.device.domain.Device;
|
||||
import org.nl.acs.ext.wms.data.*;
|
||||
|
||||
import org.nl.acs.ext.wms.service.AcsToLiKuService;
|
||||
|
||||
Reference in New Issue
Block a user