报表优化&acs日志优化

This commit is contained in:
psh
2024-07-29 17:16:22 +08:00
parent ece66065d9
commit 0da286653e
10 changed files with 83 additions and 37 deletions

View File

@@ -283,30 +283,32 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
message = "";
Instruction instruction = null;
List toInstructions;
switch (mode) {
case 1:
log.debug("设备运转模式:等待工作");
return;
case 2:
break;
case 5:
log.info("呼叫空盅");
this.apply(5);
break;
case 6:
log.info("空盅出库");
this.apply(6);
break;
case 7:
log.info("呼叫满料");
this.apply(7);
break;
case 8:
if(ObjectUtils.isNotEmpty(sub_tray)&&ObjectUtils.isNotEmpty(mother_tray)) {
log.info("满料出库");
this.apply(8);
}
break;
if(!requireSucess) {
switch (mode) {
case 1:
log.debug("设备运转模式:等待工作");
return;
case 2:
break;
case 5:
log.info("呼叫空盅");
this.apply(5);
break;
case 6:
log.info("空盅出库");
this.apply(6);
break;
case 7:
log.info("呼叫满料");
this.apply(7);
break;
case 8:
if (ObjectUtils.isNotEmpty(sub_tray) && ObjectUtils.isNotEmpty(mother_tray)) {
log.info("满料出库");
this.apply(8);
}
break;
}
}
}

View File

@@ -426,19 +426,19 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
Object obj = accessor_value.getValue(relate);
sb.append("key:" + relate + "value:" + obj + ";");
}
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value, sb});
log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value, sb});
// this.businessLogger.setResource(itemDto.getDevice_code(), itemDto.getDevice_name()).log("信号{}变更从{}->{};信号快照:{}", new Object[]{itemId, his, value, sb});
} else {
if(his instanceof int[]){
if(!Arrays.equals((long[]) his, (long[]) value)){
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
}
} else if(his instanceof String){
if(!StrUtil.equals((CharSequence) his, (CharSequence) value)){
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
}
} else {
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
}
// this.businessLogger.setResource(itemDto.getDevice_code(), itemDto.getDevice_name()).log("信号{}变更从{}->{}", new Object[]{itemId, his, value});
}