opt: 将物料PDF文件转换成图片展示
This commit is contained in:
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -111,7 +112,12 @@ public class PlcToAgvDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
AGVSetOutReqLower = this.itemProtocol.getAGVSetOutReqLower();
|
||||
heartbeat = this.itemProtocol.getHeartbeat();
|
||||
if (heartbeat == 1) {
|
||||
writing("heartbeat", writing_heartbeat);
|
||||
List list = new ArrayList<>();
|
||||
Map map = new HashMap();
|
||||
map.put("code", "heartbeat");
|
||||
map.put("value", writing_heartbeat);
|
||||
list.add(map);
|
||||
writing(list);
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
log.info("读取信号失败,失败原因:{}", var17.getMessage());
|
||||
@@ -121,11 +127,10 @@ public class PlcToAgvDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
}
|
||||
|
||||
public void writing(String param, String value) {
|
||||
if (!"heartbeat".equals(param)) {
|
||||
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + param;
|
||||
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
Map<String, Object> itemMap = new HashMap<>();
|
||||
|
||||
itemMap.put(to_param, Integer.parseInt(value));
|
||||
try {
|
||||
@@ -134,6 +139,7 @@ public class PlcToAgvDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!"heartbeat".equals(param)) {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("下发多个电气信号" + itemMap)
|
||||
@@ -154,6 +160,7 @@ public class PlcToAgvDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
itemMap.put(to_param, json.getString("value"));
|
||||
}
|
||||
}
|
||||
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("下发电气信号:" + itemMap)
|
||||
|
||||
Reference in New Issue
Block a user