rev:修复lucence日志打印为零问题

This commit is contained in:
2024-04-23 15:34:53 +08:00
parent 582426e672
commit f1687753ad

View File

@@ -240,9 +240,6 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
if (mode != last_mode) { if (mode != last_mode) {
requireSucess = false; requireSucess = false;
if (mode == 2) {
clearWrite();
}
} }
@@ -717,12 +714,12 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
itemMap.put(to_param, json.getString("value")); itemMap.put(to_param, json.getString("value"));
} }
} }
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder() LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code) .device_code(device_code)
.content("下发多个电气信号" + itemMap) .content("下发多个电气信号" + itemMap)
.build(); .build();
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
try { try {
this.checkcontrol(itemMap); this.checkcontrol(itemMap);
} catch (Exception e) { } catch (Exception e) {
@@ -881,29 +878,5 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
return true; return true;
} }
public void clearWrite() {
List list = new ArrayList();
Map map = new HashMap();
map.put("code", "to_target");
map.put("value", "0");
list.add(map);
Map map2 = new HashMap();
map2.put("code", "to_task");
map2.put("value", "0");
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_command");
map3.put("value", "0");
list.add(map3);
Map map4 = new HashMap();
map4.put("code", "to_container_type");
map4.put("value", "0");
list.add(map4);
this.writing(list);
message = null;
vehicle_code = null;
}
} }