rev 更新
This commit is contained in:
@@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jinterop.dcom.common.JIException;
|
||||
import org.jinterop.dcom.core.JIUnsignedInteger;
|
||||
import org.nl.acs.agv.server.AgvService;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
@@ -40,6 +41,7 @@ import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.system.service.ParamService;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.openscada.opc.lib.da.AddFailedException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.*;
|
||||
@@ -463,7 +465,11 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
}
|
||||
});
|
||||
if (ObjectUtil.isNotEmpty(itemMap)) {
|
||||
this.checkcontrol(itemMap);
|
||||
try {
|
||||
this.checkcontrol(itemMap);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
|
||||
}
|
||||
}
|
||||
@@ -668,9 +674,9 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
map.put("to_material" + status, paper.getMaterial_code());
|
||||
map.put("to_out_qty" + status, paper.getQty());
|
||||
map.put("to_seq" + status, status);
|
||||
Device nextdevice = deviceAppservice.findDeviceByCode(paper.getDevice_code());
|
||||
String next_addr = nextdevice.getExtraValue().get("address").toString();
|
||||
map.put("to_position" + status, next_addr);
|
||||
// Device nextdevice = deviceAppservice.findDeviceByCode(paper.getDevice_code());
|
||||
// String next_addr = nextdevice.getExtraValue().get("address").toString();
|
||||
map.put("to_position" + status, paper.getDevice_code());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
|
||||
|
||||
while(var24.hasNext()) {
|
||||
String itemString = (String)var24.next();
|
||||
if (!ObjectUtl.isEquals(itemValues.get(itemString), JsonUtl.parse(read.get(itemString)))) {
|
||||
if (!ObjectUtl.isEquals(String.valueOf(itemValues.get(itemString)), String.valueOf(read.get(itemString)))) {
|
||||
check = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +144,6 @@ public class CreateTaskRequest extends BaseRequest {
|
||||
*/
|
||||
private String bushing_num;
|
||||
|
||||
private JSONArray paper_array;
|
||||
private String paper_array;
|
||||
|
||||
}
|
||||
|
||||
@@ -720,7 +720,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
for (int i = 0; i < datas.size(); i++) {
|
||||
String data = datas.get(i).toString();
|
||||
CreateTaskRequest request = JsonUtl.format(data, CreateTaskRequest.class);
|
||||
JSONArray paper_array = request.getPaper_array();
|
||||
String paper_array = request.getPaper_array();
|
||||
String ext_task_id = request.getExt_task_id();
|
||||
String task_code = request.getTask_code();
|
||||
String start_device_code = request.getStart_device_code();
|
||||
|
||||
@@ -419,7 +419,17 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
|
||||
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", 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 {
|
||||
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
|
||||
if(his instanceof int[]){
|
||||
if(!Arrays.equals((long[]) his, (long[]) value)){
|
||||
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", 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});
|
||||
}
|
||||
} else {
|
||||
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
|
||||
}
|
||||
// this.businessLogger.setResource(itemDto.getDevice_code(), itemDto.getDevice_name()).log("信号{}变更从{}->{}", new Object[]{itemId, his, value});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user