rev:中文日志改造,lucene索引排序问题优化
Signed-off-by: jiaoliming <dawnjiao@foxmail.com>
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
package org.nl.acs.acsEnum;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author: jiao lm
|
||||
* @createDate: 2023/9/1
|
||||
* 电气信号枚举类
|
||||
*/
|
||||
@Getter
|
||||
public enum SignalEnum {
|
||||
|
||||
//电气协议类型
|
||||
MODE("mode","联机模式","【0:未联机;1:已联机】",""),
|
||||
MOVE("move","光电信号","【0:无料框;1:有料框】",""),
|
||||
STATUS("status","线体状态","【0:手动;1:自动】",""),
|
||||
IS_OPEN("is_open","线体开机状态","【0:未启动;1:启动】",""),
|
||||
IS_RUNNING("is_running","运行状态","【0未运行;1运行】",""),
|
||||
EMPTY_REQ("empty_req","请求取空料斗(空框请求)","【0无请求;1有请求】",""),
|
||||
ALLOW_PUT("allow_put","允许放货","【0不允许;1允许】",""),
|
||||
LINE_READY("line_ready","线体就绪","【0未就绪;1已就绪】",""),
|
||||
FULL_REQ("full_req","满框请求","【0无请求;1有请求】",""),
|
||||
TASK("task","任务号","",""),
|
||||
ENGRAVING_WEIGHT("engraving_weight","刻字上料重量","【单位(g)】",""),
|
||||
ENGRAVING_ALL_WEIGHT("engraving_all_weight","上料总重量实际值","【单位(g)】",""),
|
||||
FL_NOW_WEIGHT("fl_now_weight","回流实时重量","【单位(g)】",""),
|
||||
FL_FULL_WEIGHT("fl_full_weight","回流满框重量","【单位(g)】",""),
|
||||
IS_ONLINE("isonline","设备是否在线","【false离线;true在线】",""),
|
||||
IN_READY("in_ready","入料就绪","【0未就绪;1已就绪】",""),
|
||||
ALL_READY("all_ready","所有设备就绪","【0未就绪;1已就绪】",""),
|
||||
TASK_FINISH("task_finish","任务完成状态","【0未完成;1已完成】",""),
|
||||
ALLOWED_IN("allowed_in","清洗机允许上料","【0不允许;1允许】",""),
|
||||
IN_PCSN("in_pcsn","上料批次号","",""),
|
||||
COMPEL_FULL_REQ("compel_full_req","强制搬出请求","【0无请求;1有请求】",""),
|
||||
IS_UP("is_up","收料位是否上升","【0未上升;1上升】",""),
|
||||
NOW_WEIGHT("now_weight","实时重量","【单位(g)】",""),
|
||||
FULL_WEIGHT("full_weight","满料重量","【单位(g)】",""),
|
||||
BARCODE("barcode","条码","",""),
|
||||
ALL_WEIGHT("all_weight","总重量","【单位(g)】",""),
|
||||
ALL_NUM("all_num","总数量","【单位(个)】",""),
|
||||
MATERIAL_SPEC("material_spec","物料规格","",""),
|
||||
MATCHING_BARCODE("matching_barcode","开始条码匹配","",""),
|
||||
PREPARE_READY("prepare_ready","准备位就绪","【0未就绪;1已就绪】",""),
|
||||
IN_FINISH("in_finish","对接位入箱完成","【0未完成;1已完成】",""),
|
||||
OUT_READY("out_ready","对接位出箱就绪","【0未就绪;1已就绪】",""),
|
||||
CHECKING("checking","盘点中","【0否;1是】",""),
|
||||
CHECK_FINISH("check_finish","盘点完成","【0未完成;1已完成】",""),
|
||||
CHECK_COMPEL_FINISH("check_compel_finish","盘点强制完成","【0未完成;1已完成】",""),
|
||||
MATCHING_BARCODE_FAIL("matching_barcode_fail","匹配条码失败","",""),
|
||||
PAUSE("pause","专机暂停","【0否;1是】",""),
|
||||
HOIST_TARGET_LAYER("hoist_target_layer","提升机条码目的层","",""),
|
||||
TASK_TYPE("task_type","任务类型","【2单入;3双入;4单出;5盘点】",""),
|
||||
PREPARE_BARCODE("prepare_barcode","准备位条码","",""),
|
||||
DOCKING_BARCODE("docking_barcode","对接位条码","",""),
|
||||
SILO_WEIGHT("silo_weight","储料仓重量","【单位(g)】",""),
|
||||
FULL_NUMBER("full_number","储料仓总数量","【单位(个)】",""),
|
||||
SILO_MATERIAL("silo_material_no","储料仓物物料号","",""),
|
||||
EALING_ERROR("ealing_error","装箱机故障","",""),
|
||||
ORDER_FINISH("order_finish","订单完成","【0未完成;1已完成】",""),
|
||||
EALING_SHAPE("ealing_shape","装箱机准备中","【0未准备;1已准备】",""),
|
||||
EALING_READY("ealing_ready","装箱机就绪","【0未就绪;1已就绪】",""),
|
||||
ORDER_COMPEL_FINISH("order_compel_finish","订单强制完成","【0未完成;1已完成】",""),
|
||||
NOW_ORDER_BOX_NUM("now_order_box_num","订单实时箱数","【单位(箱)】",""),
|
||||
NOW_ORDER_BAG_NUM("now_order_bag_num","订单实时袋数","【单位(袋)】",""),
|
||||
NOW_ONE_BAG_OF_BOX("now_one_bag_of_box","当前箱袋数","【单位(袋)】",""),
|
||||
NOW_BAG_WEIGHT("now_bag_weight","当前袋重量","【单位(g)】",""),
|
||||
NOW_BOX_WEIGHT("now_box_weight","当前箱重量","【单位(g)】",""),
|
||||
ORDER("order","工单号","",""),
|
||||
FULL_FINISH("full_finish","满框完成","【0未完成;1已完成】",""),
|
||||
ENGRAVING_SHAPE("engraving_prepare","刻字机准备中","【0未准备;1已准备】",""),
|
||||
ENGRAVING_READY("engraving_ready","刻字机就绪","【0未就绪;1已就绪】",""),
|
||||
ORDER_NOW("order_now","订单实时数","",""),
|
||||
ONE_NOW("one_now","每框实时数","",""),
|
||||
PORT_FULL_NUM("port_full_num","出料口满框数量","",""),
|
||||
NOW_BAG_NUM("now_bag_num","当前装箱机箱实时袋数量","",""),
|
||||
NOW_SEAL_BOX_NUM("now_seal_box_num","当前封箱数量","",""),
|
||||
CACHE_WEIGHT("cache_weight","缓存称重","【单位(g)】",""),
|
||||
NOW_UP_BOX_NUM("now_up_box_num","当前装箱数量","",""),
|
||||
NOW_BAG_NUM_OF_BOX("now_bag_num_of_box","当前装箱机箱实时袋数量","",""),
|
||||
OUT_NUM("out_num","出料计数信号","",""),
|
||||
PACKER_READY("packer_ready","包装机就绪","【0未就绪;1已就绪】",""),
|
||||
LACK_REQ("lack_req","请求料","【0无请求;1有请求】",""),
|
||||
HOPPER_ALREADY("hopper_already","料斗已经到位","【0未到位;1已到位】",""),
|
||||
REQ_TASK_EMPTY("req_task_empty","请求取空料斗","【0无请求;1有请求】",""),
|
||||
HOPPER_REMOVED("hopper_removed","料斗已取走","【0未取走;1已取走】",""),
|
||||
NOW_ORDER_PROD_NUM("now_order_prod_num","当前生产总量","",""),
|
||||
NOW_ONE_BOX_NUM("now_one_box_num","每框数量","",""),
|
||||
LINE_STOCK_NUM("line_stock_num","线体库存数量","",""),
|
||||
ORDER_PROD_ALLNUM("order_prod_allnum","订单生产总量","",""),
|
||||
EMPTY_START("empty_start","空箱位移载电机启动","【0未启动;1已启动】",""),
|
||||
EMPTY_PUT_FINISH("empty_put_finish","空箱位空箱补给完成","【0未补给;1补给完成】",""),
|
||||
AGV_TAKE_FINISH("agv_take_finish","满箱已运出满箱位","",""),
|
||||
FULL_STATION_NUMBER("full_station_number","出料口满框数量","",""),
|
||||
STORAGE_STOCK_NUM("storage_stock_num","储料仓库存数量","",""),
|
||||
TRAY_NOW("tray_now","当前托盘总数","",""),
|
||||
IS_FULL("is_full","托盘是否满托","【0未满托;1已满托】",""),
|
||||
UNBOXING_RUNNING("unboxing_running","开箱机运行状态","【0未运行;1已运行】",""),
|
||||
UNBOXING_READY("unboxing_ready","开箱机就绪","【0未就绪;1已就绪】",""),
|
||||
|
||||
|
||||
|
||||
OTHER("错误状态", "5", "","");
|
||||
|
||||
private String name;
|
||||
private String code;
|
||||
private String desc;
|
||||
private String ext;
|
||||
|
||||
SignalEnum(String code, String name, String desc, String ext) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.desc = desc;
|
||||
this.ext = ext;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public String getExt() {
|
||||
return ext;
|
||||
}
|
||||
|
||||
public static String getNameByCode(String code){
|
||||
return Arrays
|
||||
.stream(SignalEnum.values())
|
||||
.filter(signal -> signal.code.equals(code))
|
||||
.findFirst()
|
||||
.orElse(OTHER)
|
||||
.name;
|
||||
}
|
||||
public static String getDescByCode(String code){
|
||||
return Arrays
|
||||
.stream(SignalEnum.values())
|
||||
.filter(signal -> signal.code.equals(code))
|
||||
.findFirst()
|
||||
.orElse(OTHER)
|
||||
.desc;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.StatusEnum;
|
||||
import org.nl.acs.agv.server.NDCAgvService;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
@@ -251,7 +252,7 @@ public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
+ "," + three_barcode6 + "," + three_barcode7 + "," + three_barcode8 + "," + three_barcode9 + "," + three_barcode10;
|
||||
|
||||
if (!StrUtil.equals(material_spec, last_material_spec)) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号material_spec:" + last_material_spec + "->" + material_spec);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("material_spec") + SignalEnum.getDescByCode("material_spec") +":"+ last_material_spec + "->" + material_spec);
|
||||
}
|
||||
if (!StrUtil.equals(barcodes, last_barcodes)) {
|
||||
//缓存线条码变化通知mes更新条码信息
|
||||
@@ -259,14 +260,14 @@ public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
map.put("device_code", device_code);
|
||||
map.put("vehicle_code", barcodes);
|
||||
acsToWmsService.feedCacheLineBarcodes(map);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号barcodes:" + last_barcodes + "->" + barcodes);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("barcode") + ":"+ last_barcodes + "->" + barcodes);
|
||||
}
|
||||
if (mode != last_mode) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":"+ last_move + "->" + move);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
@@ -280,7 +281,7 @@ public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
if (task_finish != last_task_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task_finish:" + last_task_finish + "->" + task_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task_finish") + SignalEnum.getDescByCode("task_finish") +":"+ last_task_finish + "->" + task_finish);
|
||||
}
|
||||
|
||||
if (task != last_task) {
|
||||
@@ -290,53 +291,53 @@ public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
param.put("position_code", this.device_code);
|
||||
acsToWmsService.feedCacheLineTask(param);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task") + SignalEnum.getDescByCode("task") +":"+ last_task + "->" + task);
|
||||
}
|
||||
if (matching_barcode != last_matching_barcode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号matching_barcode:" + last_matching_barcode + "->" + matching_barcode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("matching_barcode") + SignalEnum.getDescByCode("matching_barcode") +":"+ last_matching_barcode + "->" + matching_barcode);
|
||||
}
|
||||
if (prepare_ready != last_prepare_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号prepare_ready:" + last_prepare_ready + "->" + prepare_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("prepare_ready") + SignalEnum.getDescByCode("prepare_ready") +":"+ last_prepare_ready + "->" + prepare_ready);
|
||||
}
|
||||
if (in_ready != last_in_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号in_ready:" + last_in_ready + "->" + in_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("in_ready") + SignalEnum.getDescByCode("in_ready") +":"+ last_in_ready + "->" + in_ready);
|
||||
}
|
||||
if (in_finish != last_in_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号in_finish:" + last_in_finish + "->" + in_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("in_finish") + SignalEnum.getDescByCode("in_finish") +":"+ last_in_finish + "->" + in_finish);
|
||||
}
|
||||
if (out_ready != last_out_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号out_ready:" + last_out_ready + "->" + out_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("out_ready") + SignalEnum.getDescByCode("out_ready") +":"+ last_out_ready + "->" + out_ready);
|
||||
}
|
||||
if (checking != last_checking) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号checking:" + last_checking + "->" + checking);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("checking") + SignalEnum.getDescByCode("checking") +":"+ last_checking + "->" + checking);
|
||||
}
|
||||
if (check_finish != last_check_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号check_finish:" + last_check_finish + "->" + check_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("check_finish") + SignalEnum.getDescByCode("check_finish") +":"+ last_check_finish + "->" + check_finish);
|
||||
}
|
||||
if (check_compel_finish != last_check_compel_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号check_compel_finish:" + last_check_compel_finish + "->" + check_compel_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("check_compel_finish") + SignalEnum.getDescByCode("check_compel_finish") +":"+ last_check_compel_finish + "->" + check_compel_finish);
|
||||
}
|
||||
if (matching_barcode_fail != last_matching_barcode_fail) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号matching_barcode_fail:" + last_matching_barcode_fail + "->" + matching_barcode_fail);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("matching_barcode_fail") + SignalEnum.getDescByCode("matching_barcode_fail") +":"+ last_matching_barcode_fail + "->" + matching_barcode_fail);
|
||||
}
|
||||
if (pause != last_pause) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号pause:" + last_pause + "->" + pause);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("pause") + SignalEnum.getDescByCode("pause") +":"+ last_pause + "->" + pause);
|
||||
}
|
||||
if (hoist_target_layer != last_hoist_target_layer) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号hoist_target_layer:" + last_hoist_target_layer + "->" + hoist_target_layer);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("hoist_target_layer") + SignalEnum.getDescByCode("hoist_target_layer") +":"+ last_hoist_target_layer + "->" + hoist_target_layer);
|
||||
}
|
||||
if (task_type != last_task_type) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task_type:" + last_task_type + "->" + task_type);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task_type") + SignalEnum.getDescByCode("task_type") +":"+ last_task_type + "->" + task_type);
|
||||
}
|
||||
if (prepare_barcode != last_prepare_barcode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号prepare_barcode:" + last_prepare_barcode + "->" + prepare_barcode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("prepare_barcode") + SignalEnum.getDescByCode("prepare_barcode") +":"+ last_prepare_barcode + "->" + prepare_barcode);
|
||||
}
|
||||
if (docking_barcode != last_docking_barcode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号docking_barcode:" + last_docking_barcode + "->" + docking_barcode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("docking_barcode") + SignalEnum.getDescByCode("docking_barcode") +":"+ last_docking_barcode + "->" + docking_barcode);
|
||||
}
|
||||
if (isonline != last_isonline) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号isonline:" + last_isonline + "->" + isonline);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("isonline") + SignalEnum.getDescByCode("isonline") +":"+ last_isonline + "->" + isonline);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
@@ -124,31 +125,31 @@ public class HailiangCleaningFeedingLineDriver extends AbstractOpcDeviceDriver i
|
||||
error = this.itemProtocol.getItem_error();
|
||||
in_pcsn = this.itemProtocol.getItem_in_pcsn();
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode);
|
||||
}
|
||||
if (is_open != last_is_open) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_open:" + last_is_open + "->" + is_open);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_open") + SignalEnum.getDescByCode("is_open") +":"+ last_is_open + "->" + is_open);
|
||||
}
|
||||
if (in_ready != last_in_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号in_ready:" + last_in_ready + "->" + in_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("in_ready") + SignalEnum.getDescByCode("in_ready") +":"+ last_in_ready + "->" + in_ready);
|
||||
}
|
||||
if (all_ready != last_all_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号all_ready:" + last_all_ready + "->" + all_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("all_ready") + SignalEnum.getDescByCode("all_ready") +":"+ last_all_ready + "->" + all_ready);
|
||||
}
|
||||
if (task_finish != last_task_finish) {
|
||||
if (task_finish == 1) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task_finish:" + last_task_finish + "->" + task_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task_finish") + SignalEnum.getDescByCode("task_finish") +":"+ + last_task_finish + "->" + task_finish);
|
||||
}
|
||||
if (allowed_in != last_allowed_in) {
|
||||
if (allowed_in == 1) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号allowed_in:" + last_allowed_in + "->" + allowed_in);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("allowed_in") + SignalEnum.getDescByCode("allowed_in") +":"+ last_allowed_in + "->" + allowed_in);
|
||||
}
|
||||
if (in_pcsn != last_in_pcsn) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号in_pcsn:" + last_in_pcsn + "->" + in_pcsn);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("in_pcsn") +":"+ last_in_pcsn + "->" + in_pcsn);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.agv.server.NDCAgvService;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
@@ -126,10 +127,10 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
full_number = this.itemProtocol.getItem_full_number();
|
||||
silo_material_no = this.itemProtocol.getItem_silo_material_no();
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode);
|
||||
}
|
||||
if (running != last_running) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号running:" + last_running + "->" + running);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_running") + SignalEnum.getDescByCode("is_running") +":"+ last_running + "->" + running);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
@@ -142,7 +143,7 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
if (is_open != last_is_open) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_open:" + last_is_open + "->" + is_open);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_open") + SignalEnum.getDescByCode("is_open") +":"+ last_is_open + "->" + is_open);
|
||||
}
|
||||
if (silo_weight != last_silo_weight) {
|
||||
if (is_open == 1) {
|
||||
@@ -153,13 +154,13 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
fm.put(this.device_code, feedNumMap);
|
||||
acsToWmsService.feedDeviceNum2(fm);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号silo_weight:" + last_silo_weight + "->" + silo_weight);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("silo_weight") + SignalEnum.getDescByCode("silo_weight") +":"+ last_silo_weight + "->" + silo_weight);
|
||||
}
|
||||
if (full_number != last_full_number) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号full_number:" + last_full_number + "->" + full_number);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("full_number") + SignalEnum.getDescByCode("full_number") +":"+ last_full_number + "->" + full_number);
|
||||
}
|
||||
if (silo_material_no != last_silo_material_no) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号silo_material_no:" + last_silo_material_no + "->" + silo_material_no);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("silo_material_no") + SignalEnum.getDescByCode("silo_material_no") +":"+ last_silo_material_no + "->" + silo_material_no);
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
var17.printStackTrace();
|
||||
|
||||
@@ -7,6 +7,7 @@ import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.StatusEnum;
|
||||
import org.nl.acs.agv.server.NDCAgvService;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
@@ -208,73 +209,55 @@ public class HailiangCleaningPutLineDeviceDriver extends AbstractOpcDeviceDriver
|
||||
await_time = this.itemProtocol.getItem_await_time();
|
||||
barcode = stringToascii(barcode_1) + stringToascii(barcode_2) + stringToascii(barcode_3) + stringToascii(barcode_4);
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
if (move == 1) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":"+ last_move + "->" + move);
|
||||
}
|
||||
if (is_open != last_is_open) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_open:" + last_is_open + "->" + is_open);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_open") + SignalEnum.getDescByCode("is_open") +":"+ last_is_open + "->" + is_open);
|
||||
}
|
||||
if (put_line_ready != last_put_line_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号put_line_ready:" + last_put_line_ready + "->" + put_line_ready);
|
||||
}
|
||||
if (open_ready_time != last_open_ready_time) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号open_ready_time:" + last_open_ready_time + "->" + open_ready_time);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("line_ready") + SignalEnum.getDescByCode("line_ready") +":"+ last_put_line_ready + "->" + put_line_ready);
|
||||
}
|
||||
if (all_ready != last_all_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号all_ready:" + last_all_ready + "->" + all_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("all_ready") + SignalEnum.getDescByCode("all_ready") +":"+ last_all_ready + "->" + all_ready);
|
||||
}
|
||||
if (in_line_ready != last_in_line_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_real_time:" + last_in_line_ready + "->" + in_line_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("line_ready") + SignalEnum.getDescByCode("line_ready") +":"+ last_in_line_ready + "->" + in_line_ready);
|
||||
}
|
||||
if (empty_req != last_empty_req) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号empty_req:" + last_empty_req + "->" + empty_req);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("empty_req") + SignalEnum.getDescByCode("empty_req") +":"+ last_empty_req + "->" + empty_req);
|
||||
}
|
||||
if (full_req != last_full_req) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号full_req:" + last_full_req + "->" + full_req);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("full_req") + SignalEnum.getDescByCode("full_req") +":"+ last_full_req + "->" + full_req);
|
||||
}
|
||||
if (compel_full_req != last_compel_full_req) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号compel_full_req:" + last_compel_full_req + "->" + compel_full_req);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("compel_full_req") + SignalEnum.getDescByCode("compel_full_req") +":"+ last_compel_full_req + "->" + compel_full_req);
|
||||
}
|
||||
if (is_up != last_is_up) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_up:" + last_is_up + "->" + is_up);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_up") + SignalEnum.getDescByCode("is_up") +":"+ last_is_up + "->" + is_up);
|
||||
}
|
||||
if (now_weight != last_now_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_weight:" + last_now_weight + "->" + now_weight);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_weight") + SignalEnum.getDescByCode("now_weight") +":"+ last_now_weight + "->" + now_weight);
|
||||
}
|
||||
if (full_weight != last_full_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号full_weight:" + last_full_weight + "->" + full_weight);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("full_weight") + SignalEnum.getDescByCode("full_weight") +":"+ last_full_weight + "->" + full_weight);
|
||||
}
|
||||
if (in_pcsn != last_in_pcsn) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号in_pcsn:" + last_in_pcsn + "->" + in_pcsn);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("in_pcsn") + SignalEnum.getDescByCode("in_pcsn") +":"+ last_in_pcsn + "->" + in_pcsn);
|
||||
}
|
||||
if (all_num != last_all_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号all_num:" + last_all_num + "->" + all_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("all_num") + SignalEnum.getDescByCode("all_num") +":"+ last_all_num + "->" + all_num);
|
||||
}
|
||||
if (all_weight != last_all_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号all_weight:" + last_all_weight + "->" + all_weight);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("all_weight") + SignalEnum.getDescByCode("all_weight") +":"+ last_all_weight + "->" + all_weight);
|
||||
}
|
||||
if (device_running_time != last_device_running_time) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号device_running_time:" + last_device_running_time + "->" + device_running_time);
|
||||
}
|
||||
if (await_time != last_await_time) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号await_time:" + last_await_time + "->" + await_time);
|
||||
}
|
||||
if (barcode_1 != last_barcode_1) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号barcode_1:" + last_barcode_1 + "->" + barcode_1);
|
||||
}
|
||||
if (barcode_2 != last_barcode_2) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号barcode_2:" + last_barcode_2 + "->" + barcode_2);
|
||||
}
|
||||
if (barcode_3 != last_barcode_3) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号barcode_3:" + last_barcode_3 + "->" + barcode_3);
|
||||
}
|
||||
if (barcode_4 != last_barcode_4) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号barcode_4:" + last_barcode_4 + "->" + barcode_4);
|
||||
if (barcode != last_barcode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("barcode") + ":"+ last_barcode + "->" + barcode);
|
||||
}
|
||||
|
||||
if (error != last_error) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
@@ -134,64 +135,64 @@ public class EalingMachineDeviceDriver extends AbstractOpcDeviceDriver implement
|
||||
order = this.itemProtocol.getItem_order();
|
||||
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode + "复位请求标记");
|
||||
}
|
||||
if (ealing_error != last_ealing_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号ealing_error:" + last_ealing_error + "->" + ealing_error + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("ealing_error") + SignalEnum.getDescByCode("ealing_error") +":"+ last_ealing_error + "->" + ealing_error + "复位请求标记");
|
||||
}
|
||||
if (ealing_running != last_ealing_running) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号ealing_running:" + last_ealing_running + "->" + ealing_running + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_running") + SignalEnum.getDescByCode("is_running") +":"+ last_ealing_running + "->" + ealing_running + "复位请求标记");
|
||||
}
|
||||
if (order_finish != last_order_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_finish:" + last_order_finish + "->" + order_finish + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_finish") + SignalEnum.getDescByCode("order_finish") +":"+ last_order_finish + "->" + order_finish + "复位请求标记");
|
||||
}
|
||||
if (ealing_shape != last_ealing_shape) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号ealing_shape:" + last_ealing_shape + "->" + ealing_shape + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("ealing_shape") + SignalEnum.getDescByCode("ealing_shape") +":"+ last_ealing_shape + "->" + ealing_shape + "复位请求标记");
|
||||
}
|
||||
if (ealing_ready != last_ealing_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号ealing_ready:" + last_ealing_ready + "->" + ealing_ready + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("ealing_ready") + SignalEnum.getDescByCode("ealing_ready") +":"+ last_ealing_ready + "->" + ealing_ready + "复位请求标记");
|
||||
}
|
||||
if (all_ready != last_all_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号all_ready:" + last_all_ready + "->" + all_ready + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("all_ready") + SignalEnum.getDescByCode("all_ready") +":"+ last_all_ready + "->" + all_ready + "复位请求标记");
|
||||
}
|
||||
if (order_compel_finish != last_order_compel_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_compel_finish:" + last_order_compel_finish + "->" + order_compel_finish + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_compel_finish") + SignalEnum.getDescByCode("order_compel_finish") +":"+ last_order_compel_finish + "->" + order_compel_finish + "复位请求标记");
|
||||
}
|
||||
if (error != last_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("ealing_error") + SignalEnum.getDescByCode("ealing_error") +":"+ last_error + "->" + error + "复位请求标记");
|
||||
}
|
||||
if (now_order_box_num != last_now_order_box_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_order_box_num:" + last_now_order_box_num + "->" + now_order_box_num + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_order_box_num") + SignalEnum.getDescByCode("now_order_box_num") +":"+ last_now_order_box_num + "->" + now_order_box_num + "复位请求标记");
|
||||
}
|
||||
if (now_order_bag_num != last_now_order_bag_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_order_bag_num:" + last_now_order_bag_num + "->" + now_order_bag_num + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_order_bag_num") + SignalEnum.getDescByCode("now_order_bag_num") +":"+ last_now_order_bag_num + "->" + now_order_bag_num + "复位请求标记");
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task") + SignalEnum.getDescByCode("task") +":"+ last_task + "->" + task + "复位请求标记");
|
||||
}
|
||||
if (now_one_bag_of_box != last_now_one_bag_of_box) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_one_bag_of_box:" + last_now_one_bag_of_box + "->" + now_one_bag_of_box + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_one_bag_of_box") + SignalEnum.getDescByCode("now_one_bag_of_box") +":"+ last_now_one_bag_of_box + "->" + now_one_bag_of_box + "复位请求标记");
|
||||
}
|
||||
if (now_bag_weight != last_now_bag_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_bag_weight:" + last_now_bag_weight + "->" + now_bag_weight + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_bag_weight") + SignalEnum.getDescByCode("now_bag_weight") +":"+ last_now_bag_weight + "->" + now_bag_weight + "复位请求标记");
|
||||
}
|
||||
if (now_box_weight != last_now_box_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_box_weight:" + last_now_box_weight + "->" + now_box_weight + "复位请求标记");
|
||||
}
|
||||
if (pass_box_num != last_pass_box_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号pass_box_num:" + last_pass_box_num + "->" + pass_box_num + "复位请求标记");
|
||||
}
|
||||
if (no_pass_box_num != last_no_pass_box_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号no_pass_box_num:" + last_no_pass_box_num + "->" + no_pass_box_num + "复位请求标记");
|
||||
}
|
||||
if (pass_bag_num != last_pass_bag_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号pass_bag_num:" + last_pass_bag_num + "->" + pass_bag_num + "复位请求标记");
|
||||
}
|
||||
if (no_pass_bag_num != last_no_pass_bag_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号no_pass_bag_num:" + last_no_pass_bag_num + "->" + no_pass_bag_num + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_box_weight") + SignalEnum.getDescByCode("now_box_weight") +":"+ last_now_box_weight + "->" + now_box_weight + "复位请求标记");
|
||||
}
|
||||
// if (pass_box_num != last_pass_box_num) {
|
||||
// logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("pass_box_num") + SignalEnum.getDescByCode("pass_box_num") +":"+ last_pass_box_num + "->" + pass_box_num + "复位请求标记");
|
||||
// }
|
||||
// if (no_pass_box_num != last_no_pass_box_num) {
|
||||
// logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("no_pass_box_num") + SignalEnum.getDescByCode("no_pass_box_num") +":"+ last_no_pass_box_num + "->" + no_pass_box_num + "复位请求标记");
|
||||
// }
|
||||
// if (pass_bag_num != last_pass_bag_num) {
|
||||
// logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("pass_bag_num") + SignalEnum.getDescByCode("pass_bag_num") +":"+ last_pass_bag_num + "->" + pass_bag_num + "复位请求标记");
|
||||
// }
|
||||
// if (no_pass_bag_num != last_no_pass_bag_num) {
|
||||
// logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("no_pass_bag_num") + SignalEnum.getDescByCode("no_pass_bag_num") +":"+ last_no_pass_bag_num + "->" + no_pass_bag_num + "复位请求标记");
|
||||
// }
|
||||
if (order != last_order) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":"+ last_order + "->" + order + "复位请求标记");
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
var17.printStackTrace();
|
||||
|
||||
@@ -7,6 +7,7 @@ import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.agv.server.NDCAgvService;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun;
|
||||
@@ -79,10 +80,10 @@ public class HailiangEngravingCacheDeviceDriver extends AbstractOpcDeviceDriver
|
||||
move = this.itemProtocol.getItem_move();
|
||||
mode = this.itemProtocol.getItem_mode();
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":"+ last_move + "->" + move);
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
var17.printStackTrace();
|
||||
|
||||
@@ -10,6 +10,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.AcsConfig;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.StatusEnum;
|
||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
@@ -259,42 +260,39 @@ public class HailiangEngravingInDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
|
||||
if (mode != last_mode) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode);
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, ItemProtocol.item_mode, mode, last_mode));
|
||||
}
|
||||
if (gd_move != last_gd_move) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_gd_move + "->" + gd_move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":"+ last_gd_move + "->" + gd_move);
|
||||
}
|
||||
if (status != last_status) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号status:" + last_status + "->" + status);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("status") + SignalEnum.getDescByCode("status") +":"+ last_status + "->" + status);
|
||||
}
|
||||
if (is_open != last_is_open) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_open:" + last_is_open + "->" + is_open);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_open") + SignalEnum.getDescByCode("is_open") +":"+ last_is_open + "->" + is_open);
|
||||
}
|
||||
if (is_running != last_is_running) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_running【是否允】:" + last_is_running + "->" + is_running);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_running") + SignalEnum.getDescByCode("is_running") +":"+ last_is_running + "->" + is_running);
|
||||
}
|
||||
if (empty_req != last_empty_req) {
|
||||
if (empty_req == 1) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号empty_req:" + last_empty_req + "->" + empty_req);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("empty_req") + SignalEnum.getDescByCode("empty_req") +":"+ last_empty_req + "->" + empty_req);
|
||||
}
|
||||
|
||||
if (fl_move != last_fl_move) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号fl_move:" + last_fl_move + "->" + fl_move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":"+ last_fl_move + "->" + fl_move);
|
||||
}
|
||||
if (allow_put != last_allow_put) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号allow_put:" + last_allow_put + "->" + allow_put);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("allow_put") + SignalEnum.getDescByCode("allow_put") +":"+ last_allow_put + "->" + allow_put);
|
||||
}
|
||||
if (line_ready != last_line_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号line_ready:" + last_line_ready + "->" + line_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("line_ready") + SignalEnum.getDescByCode("line_ready") +":"+ last_line_ready + "->" + line_ready);
|
||||
}
|
||||
if (fl_full_req != last_fl_full_req) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号fl_full_req:" + last_fl_full_req + "->" + fl_full_req);
|
||||
}
|
||||
if (line_ready != last_line_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号line_ready:" + last_line_ready + "->" + line_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("full_req") + SignalEnum.getDescByCode("full_req") +":"+ last_fl_full_req + "->" + fl_full_req);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
@@ -324,41 +322,26 @@ public class HailiangEngravingInDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
}
|
||||
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task") +":"+ last_task + "->" + task);
|
||||
}
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode);
|
||||
}
|
||||
if (engraving_weight != last_engraving_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号engraving_weight:" + last_engraving_weight + "->" + engraving_weight);
|
||||
}
|
||||
if (engraving_storage_now_weight != last_engraving_storage_now_weight) {
|
||||
// logServer.deviceExecuteLog(this.device_code, "", "", "信号engraving_storage_now_weight:" + last_engraving_storage_now_weight + "->" + engraving_storage_now_weight);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("engraving_weight") + SignalEnum.getDescByCode("engraving_weight") +":"+ last_engraving_weight + "->" + engraving_weight);
|
||||
}
|
||||
if (engraving_all_weight != last_engraving_all_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号engraving_all_weight:" + last_engraving_all_weight + "->" + engraving_all_weight);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("engraving_all_weight") + SignalEnum.getDescByCode("engraving_all_weight") +":"+ last_engraving_all_weight + "->" + engraving_all_weight);
|
||||
}
|
||||
if (fl_now_weight != last_fl_now_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号fl_now_weight:" + last_fl_now_weight + "->" + fl_now_weight);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("fl_now_weight") + SignalEnum.getDescByCode("fl_now_weight") +":"+ last_fl_now_weight + "->" + fl_now_weight);
|
||||
}
|
||||
if (fl_full_weight != last_fl_full_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号fl_full_weight:" + last_fl_full_weight + "->" + fl_full_weight);
|
||||
}
|
||||
// if (barcode != last_barcode) {
|
||||
// logServer.deviceExecuteLog(this.device_code, "", "", "信号barcode:" + last_barcode + "->" + barcode);
|
||||
// }
|
||||
if (open_ready_time != last_open_ready_time) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号open_ready_time:" + last_open_ready_time + "->" + open_ready_time);
|
||||
}
|
||||
if (device_running_time != last_device_running_time) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号device_running_time:" + last_device_running_time + "->" + device_running_time);
|
||||
}
|
||||
if (await_time != last_await_time) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号await_time:" + last_await_time + "->" + await_time);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("fl_full_weight") + SignalEnum.getDescByCode("fl_full_weight") +":"+ last_fl_full_weight + "->" + fl_full_weight);
|
||||
}
|
||||
if (isonline != last_isonline) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号isonline:" + last_isonline + "->" + isonline);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("isonline") + SignalEnum.getDescByCode("isonline") +":"+ last_isonline + "->" + isonline);
|
||||
}
|
||||
|
||||
if (!this.itemProtocol.getIsonline() && !feedDeviceStatusFlag) {
|
||||
|
||||
@@ -304,7 +304,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_is_open, "线体开机状态", "DB1.B0.1"));
|
||||
list.add(new ItemDto(item_is_running, "清洗机运行状态", "DB1.B0.3"));
|
||||
list.add(new ItemDto(item_line_ready, "线体就绪", "DB1.B0.7"));
|
||||
list.add(new ItemDto(item_mode, "模式", "DB1.B1.0"));
|
||||
list.add(new ItemDto(item_mode, "模式【0未联机;1联机】", "DB1.B1.0"));
|
||||
list.add(new ItemDto(item_task_finish, "任务完成", "DB1.B1.3"));
|
||||
list.add(new ItemDto(item_fl_move, "回流在席光电(有货)", "DB1.B1.5"));
|
||||
list.add(new ItemDto(item_fl_full_req, "回流满框请求", "DB1.B1.7"));
|
||||
|
||||
@@ -9,6 +9,7 @@ import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun;
|
||||
@@ -214,46 +215,46 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
|
||||
if (mode != last_mode) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":"+ last_move + "->" + move);
|
||||
}
|
||||
if (status != last_status) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号status:" + last_status + "->" + status);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("status") + SignalEnum.getDescByCode("status") +":"+ last_status + "->" + status);
|
||||
}
|
||||
if (is_open != last_is_open) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_open:" + last_is_open + "->" + is_open);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_open") + SignalEnum.getDescByCode("is_open") +":"+ last_is_open + "->" + is_open);
|
||||
}
|
||||
if (is_running != last_is_running) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_running:" + last_is_running + "->" + is_running);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_running") + SignalEnum.getDescByCode("is_running") +":"+ last_is_running + "->" + is_running);
|
||||
}
|
||||
if (empty_req != last_empty_req) {
|
||||
if (empty_req == 1) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号empty_req:" + last_empty_req + "->" + empty_req);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("empty_req") + SignalEnum.getDescByCode("empty_req") +":"+ last_empty_req + "->" + empty_req);
|
||||
}
|
||||
if (full_req != last_full_req) {
|
||||
if (full_req == 1) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号full_req:" + last_full_req + "->" + full_req);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("full_req") + SignalEnum.getDescByCode("full_req") +":"+ last_full_req + "->" + full_req);
|
||||
}
|
||||
if (full_finish != last_full_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号full_finish:" + last_full_finish + "->" + full_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("full_finish") + SignalEnum.getDescByCode("full_finish") +":"+ last_full_finish + "->" + full_finish);
|
||||
}
|
||||
if (order_finish != last_order_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_finish:" + last_order_finish + "->" + order_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_finish") + SignalEnum.getDescByCode("order_finish") +":"+ last_order_finish + "->" + order_finish);
|
||||
}
|
||||
if (engraving_prepare != last_engraving_prepare) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号engraving_prepare:" + last_engraving_prepare + "->" + engraving_prepare);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("engraving_prepare") + SignalEnum.getDescByCode("engraving_prepare") +":"+ last_engraving_prepare + "->" + engraving_prepare);
|
||||
}
|
||||
if (engraving_ready != last_engraving_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号engraving_ready:" + last_engraving_ready + "->" + engraving_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("engraving_ready") + SignalEnum.getDescByCode("engraving_ready") +":"+ last_engraving_ready + "->" + engraving_ready);
|
||||
}
|
||||
if (line_ready != last_line_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号line_ready:" + last_line_ready + "->" + line_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("line_ready") + SignalEnum.getDescByCode("line_ready") +":"+ last_line_ready + "->" + line_ready);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
@@ -272,26 +273,26 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
if (order > 0) {
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), order_now);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_now:" + last_order_now + "->" + order_now);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_now") + SignalEnum.getDescByCode("order_now") +":"+ last_order_now + "->" + order_now);
|
||||
}
|
||||
if (one_now != last_one_now) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号one_now:" + last_one_now + "->" + one_now);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("one_now") + SignalEnum.getDescByCode("one_now") +":"+ last_one_now + "->" + one_now);
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task") + SignalEnum.getDescByCode("task") +":"+ last_task + "->" + task);
|
||||
}
|
||||
if (port_full_num != last_port_full_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号port_full_num:" + last_port_full_num + "->" + port_full_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("port_full_num") + SignalEnum.getDescByCode("port_full_num") +":"+ last_port_full_num + "->" + port_full_num);
|
||||
}
|
||||
if (lettering_silo_number != last_lettering_silo_number) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号lettering_silo_number:" + last_lettering_silo_number + "->" + lettering_silo_number);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("line_ready") + SignalEnum.getDescByCode("line_ready") +":"+ last_lettering_silo_number + "->" + lettering_silo_number);
|
||||
}
|
||||
if (order != last_order) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":"+ last_order + "->" + order);
|
||||
}
|
||||
if (isonline != last_isonline) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号isonline:" + last_isonline + "->" + isonline);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("isonline") + SignalEnum.getDescByCode("isonline") +":"+ last_isonline + "->" + isonline);
|
||||
}
|
||||
|
||||
if (!this.itemProtocol.getIsonline() && !feedDeviceStatusFlag) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||
import org.nl.acs.agv.server.NDCAgvService;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
@@ -196,63 +197,63 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
order = this.itemProtocol.getItem_order();
|
||||
isonline = this.itemProtocol.getIsonline();
|
||||
if (now_bag_num != last_now_bag_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_bag_num:" + last_now_bag_num + "->" + now_bag_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_bag_num") + SignalEnum.getDescByCode("now_bag_num") +":"+ last_now_bag_num + "->" + now_bag_num);
|
||||
}
|
||||
if (now_seal_box_num != last_now_seal_box_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_seal_box_num:" + last_now_seal_box_num + "->" + now_seal_box_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_seal_box_num") + SignalEnum.getDescByCode("now_seal_box_num") +":"+ last_now_seal_box_num + "->" + now_seal_box_num);
|
||||
}
|
||||
if (cache_weight != last_cache_weight) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号cache_weight:" + last_cache_weight + "->" + cache_weight);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("cache_weight") + SignalEnum.getDescByCode("cache_weight") +":"+ last_cache_weight + "->" + cache_weight);
|
||||
}
|
||||
if (now_up_box_num != last_now_up_box_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_up_box_num:" + last_now_up_box_num + "->" + now_up_box_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_up_box_num") + SignalEnum.getDescByCode("now_up_box_num") +":"+ last_now_up_box_num + "->" + now_up_box_num);
|
||||
}
|
||||
if (now_bag_num_of_box != last_now_bag_num_of_box) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_bag_num_of_box:" + last_now_bag_num_of_box + "->" + now_bag_num_of_box);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_bag_num_of_box") + SignalEnum.getDescByCode("now_bag_num_of_box") +":"+ last_now_bag_num_of_box + "->" + now_bag_num_of_box);
|
||||
}
|
||||
if (mode != last_mode) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":"+ last_mode + "->" + mode);
|
||||
}
|
||||
if (agv_abutment_error != last_agv_abutment_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号agv_abutment_error:" + last_agv_abutment_error + "->" + agv_abutment_error);
|
||||
}
|
||||
if (out_num != last_out_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号out_num:" + last_out_num + "->" + out_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("out_num") + SignalEnum.getDescByCode("out_num") +":"+ last_out_num + "->" + out_num);
|
||||
}
|
||||
if (packer_error != last_packer_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号packer_error:" + last_packer_error + "->" + packer_error);
|
||||
}
|
||||
if (move != last_move) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":"+ last_move + "->" + move);
|
||||
}
|
||||
if (packer_ready != last_packer_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号packer_ready:" + last_packer_ready + "->" + packer_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("packer_ready") + SignalEnum.getDescByCode("packer_ready") +":"+ last_packer_ready + "->" + packer_ready);
|
||||
}
|
||||
if (lack_req != last_lack_req) {
|
||||
if (lack_req == 0) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号lack_req:" + last_lack_req + "->" + lack_req);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("lack_req") + SignalEnum.getDescByCode("lack_req") +":"+ last_lack_req + "->" + lack_req);
|
||||
}
|
||||
if (hopper_already != last_hopper_already) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号hopper_already:" + last_hopper_already + "->" + hopper_already);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("hopper_already") + SignalEnum.getDescByCode("hopper_already") +":"+ last_hopper_already + "->" + hopper_already);
|
||||
}
|
||||
if (req_task_empty != last_req_task_empty) {
|
||||
if (req_task_empty == 0) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号req_task_empty:" + last_req_task_empty + "->" + req_task_empty);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("req_task_empty") + SignalEnum.getDescByCode("req_task_empty") +":"+ last_req_task_empty + "->" + req_task_empty);
|
||||
}
|
||||
if (hopper_removed != last_hopper_removed) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号hopper_removed:" + last_hopper_removed + "->" + hopper_removed);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("hopper_removed") + SignalEnum.getDescByCode("hopper_removed") +":" + last_hopper_removed + "->" + hopper_removed);
|
||||
}
|
||||
|
||||
if (order_finish != last_order_finish) {
|
||||
if (order_finish == 1) {
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), -1);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_finish:" + last_order_finish + "->" + order_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_finish") + SignalEnum.getDescByCode("order_finish") +":" + last_order_finish + "->" + order_finish);
|
||||
}
|
||||
|
||||
if (error != last_error) {
|
||||
@@ -270,14 +271,14 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (mode == 1 && order > 0) {
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), order_now);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_now:" + last_order_now + "->" + order_now);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_now") + SignalEnum.getDescByCode("order_now") +":" + last_order_now + "->" + order_now);
|
||||
}
|
||||
|
||||
if (order != last_order) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":" + last_order + "->" + order);
|
||||
}
|
||||
if (isonline != last_isonline) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号isonline:" + last_isonline + "->" + isonline);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("isonline") + SignalEnum.getDescByCode("isonline") +":" + last_isonline + "->" + isonline);
|
||||
feedDeviceStatusFlag = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.StatusEnum;
|
||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
@@ -115,7 +116,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
if (mode != last_mode) {
|
||||
feedDeviceStatusFlag = false;
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_mode, String.valueOf(this.last_mode), String.valueOf(this.mode)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_mode + "->" + mode);
|
||||
}
|
||||
|
||||
if (error != last_error) {
|
||||
@@ -137,7 +138,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), -1);
|
||||
}
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_finish, String.valueOf(this.last_finish), String.valueOf(this.finish)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号finish:" + last_finish + "->" + finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_finish") + SignalEnum.getDescByCode("order_finish") +":" + last_finish + "->" + finish);
|
||||
}
|
||||
|
||||
if (order_compel_finish != last_order_compel_finish) {
|
||||
@@ -149,11 +150,11 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
this.writing(map);
|
||||
}
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_order_compel_finish, String.valueOf(this.last_order_compel_finish), String.valueOf(this.order_compel_finish)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_compel_finish:" + last_order_compel_finish + "->" + order_compel_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_compel_finish") + SignalEnum.getDescByCode("order_compel_finish") +":" + last_order_compel_finish + "->" + order_compel_finish);
|
||||
}
|
||||
if (order != last_order) {
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_order, String.valueOf(this.last_order), String.valueOf(this.order)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":" + last_order + "->" + order);
|
||||
}
|
||||
if (now_order_prod_num != last_now_order_prod_num) {
|
||||
if (mode == 1 && order > 0 && order_prod_allnum > 0) {
|
||||
@@ -162,27 +163,27 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
}
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_now_order_prod_num, String.valueOf(this.last_now_order_prod_num), String.valueOf(this.now_order_prod_num)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_order_prod_num:" + last_now_order_prod_num + "->" + now_order_prod_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_order_prod_num") + SignalEnum.getDescByCode("now_order_prod_num") +":" + last_now_order_prod_num + "->" + now_order_prod_num);
|
||||
}
|
||||
|
||||
if (now_one_box_num != last_now_one_box_num) {
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_now_one_box_num, String.valueOf(this.last_now_one_box_num), String.valueOf(this.now_one_box_num)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_one_box_num:" + last_now_one_box_num + "->" + now_one_box_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_one_box_num") + SignalEnum.getDescByCode("now_one_box_num") +":" + last_now_one_box_num + "->" + now_one_box_num);
|
||||
}
|
||||
|
||||
if (line_stock_num != last_line_stock_num) {
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_line_stock_num, String.valueOf(this.last_line_stock_num), String.valueOf(this.line_stock_num)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号line_stock_num:" + last_line_stock_num + "->" + line_stock_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("line_stock_num") + SignalEnum.getDescByCode("line_stock_num") +":" + last_line_stock_num + "->" + line_stock_num);
|
||||
}
|
||||
|
||||
if (order_prod_allnum != last_order_prod_allnum) {
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_order_prod_allnum, String.valueOf(this.last_order_prod_allnum), String.valueOf(this.order_prod_allnum)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_prod_allnum:" + last_order_prod_allnum + "->" + order_prod_allnum);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_prod_allnum") + SignalEnum.getDescByCode("order_prod_allnum") +":" + last_order_prod_allnum + "->" + order_prod_allnum);
|
||||
}
|
||||
|
||||
if (isonline != last_isonline) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号isonline:" + last_isonline + "->" + isonline);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("isonline") + SignalEnum.getDescByCode("isonline") +":" + last_isonline + "->" + isonline);
|
||||
}
|
||||
|
||||
if (!this.itemProtocol.getIsonline() && !feedDeviceStatusFlag) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.agv.server.NDCAgvService;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
@@ -108,22 +109,22 @@ public class HailiangSpecialEmptyStationDeviceDriver extends AbstractOpcDeviceDr
|
||||
empty_put_finish = this.itemProtocol.getEmpty_put_finish();
|
||||
empty_start = this.itemProtocol.getEmpty_start();
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":" + last_move + "->" + move);
|
||||
}
|
||||
if (empty_put_finish != last_empty_put_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号empty_put_finish:" + last_empty_put_finish + "->" + empty_put_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("empty_put_finish") + SignalEnum.getDescByCode("empty_put_finish") +":" + last_empty_put_finish + "->" + empty_put_finish);
|
||||
}
|
||||
if (empty_start != last_empty_start) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号empty_start:" + last_empty_start + "->" + empty_start);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("empty_start") + SignalEnum.getDescByCode("empty_start") +":" + last_empty_start + "->" + empty_start);
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task") + SignalEnum.getDescByCode("task") +":" + last_task + "->" + task);
|
||||
}
|
||||
if (order != last_order) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":" + last_order + "->" + order);
|
||||
}
|
||||
if (error != last_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
|
||||
@@ -8,6 +8,7 @@ import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.agv.server.NDCAgvService;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
@@ -128,13 +129,13 @@ public class HailiangSpecialFullStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
order = this.itemProtocol.getOrder();
|
||||
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
if (move == 1) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":" + last_move + "->" + move);
|
||||
}
|
||||
|
||||
if (error != last_error) {
|
||||
@@ -142,17 +143,17 @@ public class HailiangSpecialFullStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
}
|
||||
|
||||
if (full_number != last_full_number) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号full_number:" + last_full_number + "->" + full_number);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("full_station_number") + SignalEnum.getDescByCode("full_station_number") +":" + last_full_number + "->" + full_number);
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task") + SignalEnum.getDescByCode("task") +":" + last_task + "->" + task);
|
||||
}
|
||||
|
||||
if (agv_take_finish != last_agv_take_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号agv_take_finish:" + last_agv_take_finish + "->" + agv_take_finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("agv_take_finish") + SignalEnum.getDescByCode("agv_take_finish") +":" + last_agv_take_finish + "->" + agv_take_finish);
|
||||
}
|
||||
if (order != last_order) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":" + last_order + "->" + order);
|
||||
}
|
||||
|
||||
} catch (Exception var17) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
@@ -76,13 +77,13 @@ public class HailiangSpecialPickStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
isonline = this.itemProtocol.getIsonline();
|
||||
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_mode + "->" + mode);
|
||||
}
|
||||
if (order != last_order) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":" + last_order + "->" + order);
|
||||
}
|
||||
if (now_one_box_num != now_one_box_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_one_box_num:" + last_now_one_box_num + "->" + now_one_box_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("now_one_box_num") + SignalEnum.getDescByCode("now_one_box_num") +":" + last_now_one_box_num + "->" + now_one_box_num);
|
||||
}
|
||||
if (error != last_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
|
||||
@@ -8,6 +8,7 @@ import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.InstActionEnum;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.agv.server.NDCAgvService;
|
||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
@@ -121,13 +122,13 @@ public class HailiangSpecialPourStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
storage_stock_num = this.itemProtocol.getStorage_stock_num();
|
||||
order = this.itemProtocol.getOrder();
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_mode + "->" + mode);
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task") + SignalEnum.getDescByCode("task") +":" + last_task + "->" + task);
|
||||
}
|
||||
if (order != last_order) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":" + last_order + "->" + order);
|
||||
}
|
||||
if (error != last_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
@@ -141,7 +142,7 @@ public class HailiangSpecialPourStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
if (ObjectUtil.isNotEmpty(this.getDevice().getExtraValue().get("min_num")) && storage_stock_num == Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) && Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) != -1) {
|
||||
requireSucess = false;
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号storage_stock_num:" + last_storage_stock_num + "->" + storage_stock_num);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("storage_stock_num") + SignalEnum.getDescByCode("storage_stock_num") +":" + last_storage_stock_num + "->" + storage_stock_num);
|
||||
}
|
||||
|
||||
} catch (Exception var17) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.StatusEnum;
|
||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
@@ -166,16 +167,16 @@ public class HailiangStackingStationDriver extends AbstractOpcDeviceDriver imple
|
||||
|
||||
if (mode != last_mode) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_mode + "->" + mode);
|
||||
}
|
||||
if (line_power_status != last_line_power_status) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号line_power_status:" + last_line_power_status + "->" + line_power_status);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_line_power_status + "->" + line_power_status);
|
||||
}
|
||||
if (line_ready != last_line_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号line_ready:" + last_line_ready + "->" + line_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_line_ready + "->" + line_ready);
|
||||
}
|
||||
if (all_ready != last_all_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号all_ready:" + last_all_ready + "->" + all_ready);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_all_ready + "->" + all_ready);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
@@ -189,16 +190,16 @@ public class HailiangStackingStationDriver extends AbstractOpcDeviceDriver imple
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
if (move != last_move) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":" + last_move + "->" + move);
|
||||
}
|
||||
if (finish != last_finish) {
|
||||
if (finish == 1) {
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), -1);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号finish:" + last_finish + "->" + finish);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_finish") + SignalEnum.getDescByCode("order_finish") +":" + last_finish + "->" + finish);
|
||||
}
|
||||
if (is_full_1 != last_is_full_1) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_full_1:" + last_is_full_1 + "->" + is_full_1);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("is_full") + SignalEnum.getDescByCode("is_full") +":" + last_is_full_1 + "->" + is_full_1);
|
||||
}
|
||||
if (is_full_2 != last_is_full_2) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_full_2:" + last_is_full_2 + "->" + is_full_2);
|
||||
@@ -210,7 +211,7 @@ public class HailiangStackingStationDriver extends AbstractOpcDeviceDriver imple
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_full_4:" + last_is_full_4 + "->" + is_full_4);
|
||||
}
|
||||
if (move_1 != last_move_1) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move_1:" + last_move_1 + "->" + move_1);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("move") + SignalEnum.getDescByCode("move") +":" + + last_move_1 + "->" + move_1);
|
||||
}
|
||||
if (move_2 != last_move_2) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move_2:" + last_move_2 + "->" + move_2);
|
||||
@@ -252,18 +253,18 @@ public class HailiangStackingStationDriver extends AbstractOpcDeviceDriver imple
|
||||
if (order > 0) {
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), order_now);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_now:" + last_order_now + "->" + order_now);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_now") + SignalEnum.getDescByCode("order_now") +":" + last_order_now + "->" + order_now);
|
||||
}
|
||||
if (tray_now != last_tray_now) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号tray_now:" + last_tray_now + "->" + tray_now);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("tray_now") + SignalEnum.getDescByCode("tray_now") +":" + last_tray_now + "->" + tray_now);
|
||||
}
|
||||
if (order != last_order) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":" + last_order + "->" + order);
|
||||
}
|
||||
|
||||
if (isonline != last_isonline) {
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号isonline:" + last_isonline + "->" + isonline);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("isonline") + SignalEnum.getDescByCode("isonline") +":" + last_isonline + "->" + isonline);
|
||||
}
|
||||
|
||||
if (!this.itemProtocol.getIsonline() && !feedDeviceStatusFlag) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.acsEnum.SignalEnum;
|
||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
@@ -106,22 +107,22 @@ public class UnboxingMachineDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
order = this.itemProtocol.getItem_order();
|
||||
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("mode") + SignalEnum.getDescByCode("mode") +":" + last_mode + "->" + mode + "复位请求标记");
|
||||
}
|
||||
if (unboxing_error != last_unboxing_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号unboxing_error:" + last_unboxing_error + "->" + unboxing_error + "复位请求标记");
|
||||
}
|
||||
if (unboxing_running != last_unboxing_running) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号unboxing_running:" + last_unboxing_running + "->" + unboxing_running + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("unboxing_running") + SignalEnum.getDescByCode("unboxing_running") +":" + last_unboxing_running + "->" + unboxing_running + "复位请求标记");
|
||||
}
|
||||
if (unboxing_ready != last_unboxing_ready) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号unboxing_ready:" + last_unboxing_ready + "->" + unboxing_ready + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("unboxing_ready") + SignalEnum.getDescByCode("unboxing_ready") +":" + last_unboxing_ready + "->" + unboxing_ready + "复位请求标记");
|
||||
}
|
||||
if (order_finish != last_order_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_finish:" + last_order_finish + "->" + order_finish + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_finish") + SignalEnum.getDescByCode("order_finish") +":" + last_order_finish + "->" + order_finish + "复位请求标记");
|
||||
}
|
||||
if (order_compel_finish != last_order_compel_finish) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_compel_finish:" + last_order_compel_finish + "->" + order_compel_finish + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_compel_finish") + SignalEnum.getDescByCode("order_compel_finish") +":" + last_order_compel_finish + "->" + order_compel_finish + "复位请求标记");
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
@@ -134,13 +135,13 @@ public class UnboxingMachineDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error + "复位请求标记");
|
||||
}
|
||||
if (now_order_num != last_now_order_num) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_order_num:" + last_now_order_num + "->" + now_order_num + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order_now") + SignalEnum.getDescByCode("order_now") +":" + last_now_order_num + "->" + now_order_num + "复位请求标记");
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("task") + SignalEnum.getDescByCode("task") +":" + last_task + "->" + task + "复位请求标记");
|
||||
}
|
||||
if (order != last_order) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order + "复位请求标记");
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", SignalEnum.getNameByCode("order") + SignalEnum.getDescByCode("order") +":" + last_order + "->" + order + "复位请求标记");
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
var17.printStackTrace();
|
||||
|
||||
@@ -418,12 +418,12 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
|
||||
}
|
||||
// log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value, sb});
|
||||
if (!itemDto.getItem_code().endsWith("heartbeat")) {
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".")+1), String.valueOf(his), String.valueOf(value)));
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".")+1), String.valueOf(his), String.valueOf(value)));
|
||||
}
|
||||
} else {
|
||||
// log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
|
||||
if (!itemDto.getItem_code().endsWith("heartbeat")) {
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".")+1), String.valueOf(his), String.valueOf(value)));
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".")+1), String.valueOf(his), String.valueOf(value)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +45,6 @@ public class Searcher {
|
||||
int pageNum = Integer.parseInt(whereJson.get("page").toString());// 当前页码
|
||||
int start = pageNum * pageSize;// 当前页的起始条数
|
||||
int end = start + pageSize;// 当前页的结束条数(不能包含)
|
||||
// 创建排序对象,需要排序字段SortField,参数:字段的名称、字段的类型、是否反转如果是false,升序。true降序
|
||||
Sort sort = new Sort(new SortField("logTime", SortField.Type.DOC,true));
|
||||
|
||||
TopDocs docs = null;
|
||||
BooleanQuery.Builder booleanQueryBuilder = new BooleanQuery.Builder();
|
||||
//时间范围查询
|
||||
@@ -91,7 +88,10 @@ public class Searcher {
|
||||
WildcardQuery query = new WildcardQuery(new Term("fieldContent", "*"+(String) whereJson.get("blurry")+"*"));
|
||||
booleanQueryBuilder.add(query, BooleanClause.Occur.MUST);
|
||||
}
|
||||
docs = searcher.search(booleanQueryBuilder.build(), end,sort);
|
||||
// 创建排序对象,需要排序字段SortField,参数:字段的名称、字段的类型、是否反转如果是false,升序。true降序
|
||||
Sort sort = new Sort(new SortField("logTime",SortField.Type.LONG,true));
|
||||
docs = searcher.search(booleanQueryBuilder.build(), end, sort);
|
||||
// docs = searcher.search(booleanQueryBuilder.build(), end, Sort.INDEXORDER);
|
||||
//记录索引时间
|
||||
long endTime = System.currentTimeMillis();
|
||||
log.info("匹配{}共耗时{}毫秒",booleanQueryBuilder.build(),(endTime-startTime));
|
||||
|
||||
@@ -83,6 +83,16 @@ public class LuceneLogDto {
|
||||
+ home;
|
||||
}
|
||||
|
||||
public LuceneLogDto(final String device_code, final String item, final String last_signal,
|
||||
final String signal) {
|
||||
super();
|
||||
this.device_code = device_code;
|
||||
this.content = "信号 ["
|
||||
+ item + "] 发生变更 "
|
||||
+ last_signal + " -> "
|
||||
+ signal;
|
||||
}
|
||||
|
||||
public LuceneLogDto(final String device_code, final String remark) {
|
||||
super();
|
||||
this.device_code = device_code;
|
||||
|
||||
@@ -6,9 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.document.Field;
|
||||
import org.apache.lucene.document.StringField;
|
||||
import org.apache.lucene.document.*;
|
||||
import org.apache.lucene.index.IndexWriter;
|
||||
import org.nl.modules.lucene.common.LuceneServiceAutoRun;
|
||||
import org.nl.modules.lucene.enums.LogTypeEnum;
|
||||
@@ -18,6 +16,7 @@ import org.slf4j.MDC;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* @author jlm
|
||||
@@ -28,6 +27,7 @@ import java.io.IOException;
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class LuceneExecuteLogServiceImpl implements LuceneExecuteLogService {
|
||||
private static AtomicInteger count = new AtomicInteger(0);
|
||||
|
||||
@Override
|
||||
public void deviceItemValue(String device_code, String key, String value) {
|
||||
@@ -76,6 +76,7 @@ public class LuceneExecuteLogServiceImpl implements LuceneExecuteLogService {
|
||||
}
|
||||
document.add(new StringField("logType", luceneLogDto.getLogType(), Field.Store.YES));
|
||||
document.add(new StringField("logTime", DateUtil.format(new DateTime(), "yyyy-MM-dd HH:mm:ss.SSS"), Field.Store.YES));
|
||||
document.add(new NumericDocValuesField("logTime",System.currentTimeMillis()));//排序
|
||||
indexWriter.addDocument(document);
|
||||
//记录索引结束时间
|
||||
long endTime = System.currentTimeMillis();
|
||||
|
||||
Reference in New Issue
Block a user