fix: 日志文件乱码修复日志配置,修复读取信号转换异常
This commit is contained in:
@@ -126,9 +126,9 @@ public class ItemProtocol {
|
||||
|
||||
public int getOpcIntegerValue(String protocol) {
|
||||
Integer value = this.driver.getIntegeregerValue(protocol);
|
||||
if(ObjectUtil.isEmpty(value)){
|
||||
if (ObjectUtil.isEmpty(value)) {
|
||||
deviceStatus = true;
|
||||
}else if (item_heartbeat.equals(protocol)){
|
||||
} else if (item_heartbeat.equals(protocol)) {
|
||||
deviceStatus = false;
|
||||
}
|
||||
if (value == null) {
|
||||
@@ -138,6 +138,9 @@ public class ItemProtocol {
|
||||
setIsonline(true);
|
||||
return value;
|
||||
}
|
||||
if (item_mode.equals(protocol)) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
last_inst_message = inst_message;
|
||||
if ("true".equals(this.device.getExtraValue().get("ship_device_update"))) {
|
||||
this.requiresShipDeviceUpdate = false;
|
||||
if (mode > 0) {
|
||||
if (mode >= 0) {
|
||||
shipDeviceUpdate();
|
||||
}
|
||||
}
|
||||
@@ -358,7 +358,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
Instruction instruction = null;
|
||||
List toInstructions;
|
||||
if(mode > 0) {
|
||||
if (mode > 0) {
|
||||
switch (mode) {
|
||||
case 1:
|
||||
log.debug("设备运转模式:等待工作");
|
||||
@@ -615,10 +615,10 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
move = "有托盘有货";
|
||||
jo.put("hasGoods", true);
|
||||
}
|
||||
if(deviceStatus){
|
||||
if (deviceStatus) {
|
||||
iserror = true;
|
||||
}
|
||||
if(error == 0 && !deviceStatus){
|
||||
if (error == 0 && !deviceStatus) {
|
||||
iserror = false;
|
||||
}
|
||||
if (this.carrier_direction == 1) {
|
||||
@@ -630,7 +630,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
}
|
||||
if(error == 0 && iserror){
|
||||
if (error == 0 && iserror) {
|
||||
message = "信号连接异常!";
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
@@ -1086,7 +1086,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
apply.put("type", "2");
|
||||
String str = acsToWmsService.applyTaskToWms(apply);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply + ",响应参数:" + JSON.toJSONString(str));
|
||||
message = "申请空盘入库任务,请求参数:" + apply + "响应参数: "+ str;
|
||||
message = "申请空盘入库任务,请求参数:" + apply + "响应参数: " + str;
|
||||
|
||||
JSONObject jo = JSON.parseObject(str);
|
||||
if (ObjectUtil.isEmpty(jo)) {
|
||||
|
||||
Reference in New Issue
Block a user