更新驱动
This commit is contained in:
@@ -57,9 +57,14 @@ public class HaiLiangFeedingDefination implements OpcDeviceDriverDefination {
|
|||||||
public static List<ItemDto> getReadableItemDtos2() {
|
public static List<ItemDto> getReadableItemDtos2() {
|
||||||
List<ItemDto> list = new ArrayList();
|
List<ItemDto> list = new ArrayList();
|
||||||
list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
|
list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
|
||||||
list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB600.B1", true));
|
list.add(new ItemDto(ItemProtocol.item_mode, "工作模式", "DB600.B2", Boolean.valueOf(true)));
|
||||||
list.add(new ItemDto(ItemProtocol.item_action, "动作信号", "DB600.B2"));
|
list.add(new ItemDto(ItemProtocol.item_error, "故障信号", "DB600.B3"));
|
||||||
list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB600.B4"));
|
list.add(new ItemDto(ItemProtocol.item_order, "当前执行工单号", "DB600.D8"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_order_detail, "当前工单明细号", "DB600.D12"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_order_qty, "当前工单上料数量 ", "DB600.D16"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_order_qualified_qty, "当前工单上料合格数量", "DB600.D20"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_qty, "当前工单实时上料数量", "DB600.D24"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_qualified_qty, "当前工单明细号合格数量", "DB600.D28"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,16 @@
|
|||||||
package org.nl.acs.device_driver.hailiang.hailiang_feeding;
|
package org.nl.acs.device_driver.hailiang.hailiang_feeding;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device.service.DeviceService;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||||
import org.nl.acs.instruction.service.InstructionService;
|
import org.nl.acs.instruction.service.dto.Instruction;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.acs.route.service.RouteLineService;
|
import java.util.List;
|
||||||
import org.nl.acs.task.service.TaskService;
|
|
||||||
import org.nl.utils.SpringContextHolder;
|
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮-上料线体
|
* 海亮-上料线体
|
||||||
@@ -27,7 +18,8 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Data
|
@Data
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class HaiLiangFeedingDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver {
|
public class HaiLiangFeedingDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
|
||||||
|
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Device getDevice() {
|
public Device getDevice() {
|
||||||
@@ -35,9 +27,110 @@ public class HaiLiangFeedingDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String device_code;
|
||||||
|
int mode = 0;
|
||||||
|
int error = 0;
|
||||||
|
int move = 0;
|
||||||
|
int order = 0;
|
||||||
|
int order_detail = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
|
// String message = null;
|
||||||
|
// try {
|
||||||
|
// device_code = this.getDeviceCode();
|
||||||
|
// mode = this.itemProtocol.getMode();
|
||||||
|
// error = this.itemProtocol.getError();
|
||||||
|
// move = this.itemProtocol.getMove();
|
||||||
|
// task = this.itemProtocol.getTask();
|
||||||
|
// action = this.itemProtocol.getAction();
|
||||||
|
// ioaction = this.itemProtocol.getIoAction();
|
||||||
|
// height = this.itemProtocol.getHeight();
|
||||||
|
// operation_type = this.itemProtocol.getOperation_type();
|
||||||
|
// direction = this.itemProtocol.getDirection();
|
||||||
|
// hasGoods = this.itemProtocol.getMove();
|
||||||
|
//
|
||||||
|
// if (mode != last_mode) {
|
||||||
|
// this.setRequireSucess(false);
|
||||||
|
// }
|
||||||
|
// if (move != last_move) {
|
||||||
|
// if (move == 0) {
|
||||||
|
// thingToNothing();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (error != last_error) {
|
||||||
|
// }
|
||||||
|
// if (mode == 2 && move != 0 && task > 0) {
|
||||||
|
// //inst_message
|
||||||
|
// inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||||
|
// if (inst != null) {
|
||||||
|
// inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() + " 载具号:" + inst.getVehicle_code();
|
||||||
|
// if (StrUtil.equals(inst.getInstruction_status(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) {
|
||||||
|
// inst.setInstruction_status("1");
|
||||||
|
// instructionService.update(inst);
|
||||||
|
// }
|
||||||
|
// if (StrUtil.equals(inst.getInstruction_status(), "1") && StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
|
||||||
|
// finish_instruction();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (getBarcode() != null) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// } catch (Exception var17) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// if (!this.itemProtocol.getIsonline()) {
|
||||||
|
// this.setIsonline(false);
|
||||||
|
// this.setIserror(true);
|
||||||
|
// message = "信号量同步异常";
|
||||||
|
// //未联机
|
||||||
|
// } else if (mode == 0) {
|
||||||
|
// this.setIsonline(false);
|
||||||
|
// this.setIserror(true);
|
||||||
|
// message = "未联机";
|
||||||
|
// //有报警
|
||||||
|
// } else if (error != 0) {
|
||||||
|
// this.setIsonline(false);
|
||||||
|
// this.setIserror(true);
|
||||||
|
// message = "有报警";
|
||||||
|
// //无报警
|
||||||
|
// } else {
|
||||||
|
// this.setIsonline(true);
|
||||||
|
// this.setIserror(false);
|
||||||
|
// message = "";
|
||||||
|
// Instruction instruction = null;
|
||||||
|
// List toInstructions;
|
||||||
|
// switch (mode) {
|
||||||
|
// case 1:
|
||||||
|
// log.debug("设备运转模式:等待工作");
|
||||||
|
// break;
|
||||||
|
// case 2:
|
||||||
|
// //申请任务
|
||||||
|
// if (hasGoods > 0 && !StrUtil.isEmpty(barcode()) && height > 0 && !requireSucess) {
|
||||||
|
// instruction_require(barcode());
|
||||||
|
// }
|
||||||
|
// if (hasGoods > 0 && !StrUtil.isEmpty(barcode()) && height > 0 && !applySucess) {
|
||||||
|
// instruction_apply(barcode());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// switch (flag) {
|
||||||
|
// //取货完成
|
||||||
|
// case 1:
|
||||||
|
// writing(2);
|
||||||
|
// break;
|
||||||
|
// //放货完成
|
||||||
|
// case 2:
|
||||||
|
// writing(3);
|
||||||
|
// break;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// last_mode = mode;
|
||||||
|
// last_error = error;
|
||||||
|
// last_move = move;
|
||||||
|
// last_task = task;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,20 @@ import java.util.List;
|
|||||||
public class ItemProtocol {
|
public class ItemProtocol {
|
||||||
public static String item_heartbeat = "heartbeat";
|
public static String item_heartbeat = "heartbeat";
|
||||||
public static String item_mode = "mode";
|
public static String item_mode = "mode";
|
||||||
public static String item_action = "action";
|
public static String item_move = "move";
|
||||||
public static String item_error = "error";
|
public static String item_error = "error";
|
||||||
|
public static String item_order = "order";
|
||||||
|
public static String item_order_detail = "order_detail";
|
||||||
|
//当前工单上料数量
|
||||||
|
public static String item_order_qty = "order_qty";
|
||||||
|
//当前工单明细号上料数量
|
||||||
|
public static String item_order_qualified_qty = "order_qualified_qty";
|
||||||
|
//当前工单实时上料数量
|
||||||
|
public static String item_detail_qty = "detail_qty";
|
||||||
|
//当前工单明细号合格数量
|
||||||
|
public static String item_detail_qualified_qty = "detail_qualified_qty";
|
||||||
|
|
||||||
|
|
||||||
public static String item_to_command = "to_command";
|
public static String item_to_command = "to_command";
|
||||||
|
|
||||||
|
|
||||||
@@ -29,10 +41,6 @@ public class ItemProtocol {
|
|||||||
return this.getOpcIntegerValue(item_mode);
|
return this.getOpcIntegerValue(item_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAction() {
|
|
||||||
return this.getOpcIntegerValue(item_action);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getError() {
|
public int getError() {
|
||||||
return this.getOpcIntegerValue(item_error);
|
return this.getOpcIntegerValue(item_error);
|
||||||
}
|
}
|
||||||
@@ -55,16 +63,21 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB51.B0"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0"));
|
||||||
list.add(new ItemDto(item_mode, "工作状态", "DB51.B1", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_mode, "工作模式", "DB600.B2", Boolean.valueOf(true)));
|
||||||
list.add(new ItemDto(item_action, "动作信号", "DB51.B2"));
|
list.add(new ItemDto(item_error, "故障信号", "DB600.B3"));
|
||||||
list.add(new ItemDto(item_error, "报警信号", "DB51.B4"));
|
list.add(new ItemDto(item_order, "当前执行工单号", "DB600.D8"));
|
||||||
|
list.add(new ItemDto(item_order_detail, "当前工单明细号", "DB600.D12"));
|
||||||
|
list.add(new ItemDto(item_order_qty, "当前工单上料数量 ", "DB600.D16"));
|
||||||
|
list.add(new ItemDto(item_order_qualified_qty, "当前工单上料合格数量", "DB600.D20"));
|
||||||
|
list.add(new ItemDto(item_detail_qty, "当前工单实时上料数量", "DB600.D24"));
|
||||||
|
list.add(new ItemDto(item_detail_qualified_qty, "当前工单明细号合格数量", "DB600.D28"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ItemDto> getWriteableItemDtos() {
|
public static List<ItemDto> getWriteableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_to_command, "作业命令", "DB52.W2", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_to_command, "作业命令", "DB601.D2", Boolean.valueOf(true)));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,9 +57,24 @@ public class HaiLiangFeedingTrunkDefination implements OpcDeviceDriverDefination
|
|||||||
public static List<ItemDto> getReadableItemDtos2() {
|
public static List<ItemDto> getReadableItemDtos2() {
|
||||||
List<ItemDto> list = new ArrayList();
|
List<ItemDto> list = new ArrayList();
|
||||||
list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
|
list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
|
||||||
list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB600.B1", true));
|
list.add(new ItemDto(ItemProtocol.item_mode, "工作模式", "DB600.B2", Boolean.valueOf(true)));
|
||||||
list.add(new ItemDto(ItemProtocol.item_action, "动作信号", "DB600.B2"));
|
list.add(new ItemDto(ItemProtocol.item_error, "故障信号", "DB600.B3"));
|
||||||
list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB600.B4"));
|
list.add(new ItemDto(ItemProtocol.item_order, "当前执行工单号", "DB600.D4"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_order_detail, "当前工单明细号", "DB600.D8"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_last_order_detail, "上次完成工单明细号", "DB600.D12"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_order_feeding_qty, "当前工单上料数量", "DB600.D16"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_feeding_qty, "当前工单明细号上料数量", "DB600.D20"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_lettering_qty, "当前工单明细号刻字数量", "DB600.D24"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_lettering_qualified_qty, "当前工单明细号刻字合格数量", "DB600.D28"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_risking_qualified_qty, "当前工单明细号套冒合格数", "DB600.D32"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_risking_qty, "当前工单明细号套冒数", "DB600.D36"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_strapping_qty, "当前工单明细号捆扎包数", "DB600.D40"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_strapping_oneqty, "当前工单明细号捆扎根数", "DB600.D44"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_coating_qty, "当前工单明细号裹膜数", "DB600.D48"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_labeling_order, "当前贴标工单明细号", "DB600.D52"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_rlabeling_qualified_qty, "当前工单明细号刻字数量", "DB600.D56"));
|
||||||
|
list.add(new ItemDto(ItemProtocol.item_detail_rlabeling_qty, "当前贴标工单明细号贴标数", "DB600.D60"));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,11 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||||
|
import org.nl.acs.instruction.service.dto.Instruction;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮-上料总线体
|
* 海亮-上料总线体
|
||||||
*/
|
*/
|
||||||
@@ -22,10 +25,73 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im
|
|||||||
return this.device;
|
return this.device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean requireSucess = false;
|
||||||
|
String device_code;
|
||||||
|
int mode = 0;
|
||||||
|
int error = 0;
|
||||||
|
int move = 0;
|
||||||
|
int order = 0;
|
||||||
|
int order_detail = 0;
|
||||||
|
int last_mode = 0;
|
||||||
|
int last_order = order;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() throws Exception {
|
||||||
|
String message = null;
|
||||||
|
try {
|
||||||
|
device_code = this.getDeviceCode();
|
||||||
|
mode = this.itemProtocol.getMode();
|
||||||
|
error = this.itemProtocol.getError();
|
||||||
|
order = this.itemProtocol.getOrder();
|
||||||
|
order_detail = this.itemProtocol.getOrder_detail();
|
||||||
|
|
||||||
|
if (mode != last_mode) {
|
||||||
|
this.setRequireSucess(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception var17) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mode == 0) {
|
||||||
|
|
||||||
|
message = "未联机";
|
||||||
|
//有报警
|
||||||
|
} else if (error != 0) {
|
||||||
|
|
||||||
|
message = "有报警";
|
||||||
|
//无报警
|
||||||
|
} else {
|
||||||
|
message = "";
|
||||||
|
|
||||||
|
switch (mode) {
|
||||||
|
case 1:
|
||||||
|
log.debug("设备运转模式:等待工作");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
//申请工单
|
||||||
|
apply_order();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
//申请工单明细
|
||||||
|
apply_orderDetail();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
last_mode = mode;
|
||||||
|
last_order = order;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean apply_order() throws Exception {
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean apply_orderDetail() throws Exception {
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import java.util.List;
|
|||||||
public class ItemProtocol {
|
public class ItemProtocol {
|
||||||
public static String item_heartbeat = "heartbeat";
|
public static String item_heartbeat = "heartbeat";
|
||||||
public static String item_mode = "mode";
|
public static String item_mode = "mode";
|
||||||
public static String item_action = "action";
|
|
||||||
public static String item_error = "error";
|
public static String item_error = "error";
|
||||||
public static String item_order = "order";
|
public static String item_order = "order";
|
||||||
public static String item_order_detail = "order_detail";
|
public static String item_order_detail = "order_detail";
|
||||||
@@ -64,6 +63,7 @@ public class ItemProtocol {
|
|||||||
this.driver = driver;
|
this.driver = driver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int getHeartbeat() {
|
public int getHeartbeat() {
|
||||||
return this.getOpcIntegerValue(item_heartbeat);
|
return this.getOpcIntegerValue(item_heartbeat);
|
||||||
}
|
}
|
||||||
@@ -72,19 +72,78 @@ public class ItemProtocol {
|
|||||||
return this.getOpcIntegerValue(item_mode);
|
return this.getOpcIntegerValue(item_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAction() {
|
|
||||||
return this.getOpcIntegerValue(item_action);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getError() {
|
public int getError() {
|
||||||
return this.getOpcIntegerValue(item_error);
|
return this.getOpcIntegerValue(item_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getOrder() {
|
||||||
|
return this.getOpcIntegerValue(item_order);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getOrder_detail() {
|
||||||
|
return this.getOpcIntegerValue(item_order_detail);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLast_order_detail() {
|
||||||
|
return this.getOpcIntegerValue(item_last_order_detail);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getOrder_feeding_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_order_feeding_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_feeding_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_feeding_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_lettering_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_lettering_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_lettering_qualified_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_lettering_qualified_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_risking_qualified_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_risking_qualified_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_risking_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_risking_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_strapping_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_strapping_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_strapping_oneqty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_strapping_oneqty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_coating_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_coating_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLabeling_order() {
|
||||||
|
return this.getOpcIntegerValue(item_labeling_order);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_rlabeling_qualified_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_rlabeling_qualified_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDetail_rlabeling_qty() {
|
||||||
|
return this.getOpcIntegerValue(item_detail_rlabeling_qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public int getToCommand() {
|
public int getToCommand() {
|
||||||
return this.getOpcIntegerValue(item_to_command);
|
return this.getOpcIntegerValue(item_to_command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Boolean isonline;
|
||||||
|
|
||||||
public int getOpcIntegerValue(String protocol) {
|
public int getOpcIntegerValue(String protocol) {
|
||||||
Integer value = this.driver.getIntegeregerValue(protocol);
|
Integer value = this.driver.getIntegeregerValue(protocol);
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
@@ -122,22 +181,22 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getWriteableItemDtos() {
|
public static List<ItemDto> getWriteableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_to_order, "工单号", "DB600.D2"));
|
list.add(new ItemDto(item_to_order, "工单号", "DB601.D2"));
|
||||||
list.add(new ItemDto(item_to_order_detail, "工单明细号", "DB600.D6"));
|
list.add(new ItemDto(item_to_order_detail, "工单明细号", "DB601.D6"));
|
||||||
list.add(new ItemDto(item_to_order_feeding_qty, "工单上料总数量", "DB600.D10"));
|
list.add(new ItemDto(item_to_order_feeding_qty, "工单上料总数量", "DB601.D10"));
|
||||||
list.add(new ItemDto(item_to_detail_feeding_qty, "工单明细号上料数量", "DB600.D14"));
|
list.add(new ItemDto(item_to_detail_feeding_qty, "工单明细号上料数量", "DB601.D14"));
|
||||||
list.add(new ItemDto(item_to_outer_diameter, "外径", "DB600.REAL18"));
|
list.add(new ItemDto(item_to_outer_diameter, "外径", "DB601.REAL18"));
|
||||||
list.add(new ItemDto(item_to_wall_thickness, "壁厚", "DB600.REAL22"));
|
list.add(new ItemDto(item_to_wall_thickness, "壁厚", "DB601.REAL22"));
|
||||||
list.add(new ItemDto(item_to_length, "长度", "DB600.REAL26"));
|
list.add(new ItemDto(item_to_length, "长度", "DB601.REAL26"));
|
||||||
list.add(new ItemDto(item_to_is_last, "是否最后工单明细号", "DB600.D30"));
|
list.add(new ItemDto(item_to_is_last, "是否最后工单明细号", "DB601.D30"));
|
||||||
list.add(new ItemDto(item_to_strapping_qty, "总捆扎包数", "DB600.D34"));
|
list.add(new ItemDto(item_to_strapping_qty, "总捆扎包数", "DB601.D34"));
|
||||||
list.add(new ItemDto(item_to_one_strapping_qty, "标准每捆数量", "DB600.D38"));
|
list.add(new ItemDto(item_to_one_strapping_qty, "标准每捆数量", "DB601.D38"));
|
||||||
list.add(new ItemDto(item_to_lastone_strapping_qty, "捆扎尾料数量", "DB600.D42"));
|
list.add(new ItemDto(item_to_lastone_strapping_qty, "捆扎尾料数量", "DB601.D42"));
|
||||||
list.add(new ItemDto(item_to_coating_qty, "需要裹膜捆数", "DB600.D42"));
|
list.add(new ItemDto(item_to_coating_qty, "需要裹膜捆数", "DB601.D42"));
|
||||||
list.add(new ItemDto(item_to_labeling_qty, "需要贴标数量", "DB600.D46"));
|
list.add(new ItemDto(item_to_labeling_qty, "需要贴标数量", "DB601.D46"));
|
||||||
list.add(new ItemDto(item_to_stop, "急停", "DB600.D50"));
|
list.add(new ItemDto(item_to_stop, "急停", "DB601.D50"));
|
||||||
list.add(new ItemDto(item_to_force_complete, "工单强制完成", "DB600.D54"));
|
list.add(new ItemDto(item_to_force_complete, "工单强制完成", "DB601.D54"));
|
||||||
list.add(new ItemDto(item_to_command, "作业命令", "DB52.D62", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_to_command, "作业命令", "DB601.D62", Boolean.valueOf(true)));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void reload() {
|
public synchronized void reload() {
|
||||||
this.order = this.queryAllOrder("order_status <2 and is_delete =0");
|
this.order = this.queryAllOrder("order_status <2 and is_deleted =0");
|
||||||
this.detail = this.queryAllOrderDteail("order_detail_status <2 and is_delete =0");
|
this.detail = this.queryAllOrderDteail("order_detail_status <2 and is_deleted =0");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user