Merge remote-tracking branch 'origin/master'

This commit is contained in:
2024-04-15 09:17:20 +08:00
44 changed files with 1008 additions and 1148 deletions

View File

@@ -21,6 +21,7 @@ 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.ExecutableDeviceDriver;
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.InteractionJsonDTO;
import org.nl.acs.enums.AcsToLmsApplyTaskTypeEnum;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
@@ -226,18 +227,17 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
container_type = this.itemProtocol.getContainer_type();
error = this.itemProtocol.getError();
task = this.itemProtocol.getTask();
container_no = this.itemProtocol.getContainer_no();
material_barcode= this.itemProtocol.getMaterialBarcode();
to_command = this.itemProtocol.getTo_command();
to_target = this.itemProtocol.getTotarget();
to_task = this.itemProtocol.getTo_task();
to_container_no = this.itemProtocol.getContainer_direction();
to_container_type = this.itemProtocol.getContainer_no();
if (mode != last_mode) {
requireSucess = false;
if(mode == 2){
clearWrite();
}
}
@@ -271,7 +271,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
break;
case 2:
//申请任务
if (move == 1 && !requireSucess && task==0) {
if (move == 1 && !requireSucess) {
instruction_require();
}
break;
@@ -320,9 +320,14 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
public void writing(int command) {
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + org.nl.acs.device_driver.conveyor.standard_conveyor_control_with_scanner.ItemProtocol.item_to_command;
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
@@ -479,6 +484,9 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
String start_device_code = taskdto.getStart_device_code();
String route_plan_code = taskdto.getRoute_plan_code();
String next_device_code = "";
String interactionJson = taskdto.getInteraction_json();
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
String containerType = interactionJsonDTO.getContainerType();
/**
* 开始平均分配
*/
@@ -517,7 +525,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
next_point_code = next_device_code;
}
Instruction instdto = new Instruction();
packageData(instdto, route_plan_code, taskdto, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code, priority);
packageData(instdto, route_plan_code, taskdto, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code, priority,containerType);
log.error("=================================,{}", instdto.getCreate_by());
try {
instructionService.create(instdto);
@@ -542,31 +550,33 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
private void writeData(String next_addr, List list, Instruction inst) {
List list1 = new ArrayList();
Map map = new HashMap();
map.put("code", "to_target");
map.put("value", next_addr);
list.add(map);
list1.add(map);
this.writing(list1);
List list2 = new ArrayList();
Map map1 = new HashMap();
map1.put("code", "to_task");
map1.put("value", inst.getInstruction_code());
list.add(map1);
Map map2 = new HashMap();
map2.put("code", "to_command");
map2.put("value", "1");
list.add(map2);
list2.add(map1);
this.writing(list2);
List list4 = new ArrayList();
Map map3 = new HashMap();
map3.put("code", "to_container_type");
map3.put("value", inst.getVehicle_type());
list.add(map3);
Map map4 = new HashMap();
map4.put("code", "to_container_no");
map4.put("value", "1");
list.add(map4);
this.writing(list);
list4.add(map3);
this.writing(list4);
List list3 = new ArrayList();
Map map2 = new HashMap();
map2.put("code", "to_command");
map2.put("value", "1");
list3.add(map2);
this.writing(list3);
}
private static void packageData(Instruction instdto, String route_plan_code, TaskDto taskdto, String taskid, String taskcode, String start_device_code, String next_device_code, String start_point_code, String next_point_code, String priority) {
private static void packageData(Instruction instdto, String route_plan_code, TaskDto taskdto, String taskid, String taskcode, String start_device_code, String next_device_code, String start_point_code, String next_point_code, String priority,String containerType) {
instdto.setInstruction_id(IdUtil.simpleUUID());
instdto.setRoute_plan_code(route_plan_code);
instdto.setRemark(taskdto.getRemark());
@@ -584,6 +594,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
instdto.setPriority(priority);
instdto.setInstruction_status("0");
instdto.setExecute_device_code(start_point_code);
instdto.setVehicle_type(containerType);
}
public void writeData(String next_addr, Instruction instdto, Map map) {
@@ -607,6 +618,11 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
try {
this.checkcontrol(itemMap);
} catch (Exception e) {
@@ -632,6 +648,11 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
//itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + param);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public synchronized boolean finish_instruction() throws Exception {
@@ -663,32 +684,19 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
jo.put("mode", mode);
jo.put("message", LangProcess.msg(message));
jo.put("error", this.getError());
String move = "无货";
if(this.move == 1){
move = "有货";
}
jo.put("move", move);
jo.put("task", task);
jo.put("type", container_type);
jo.put("is_click", true);
jo.put("isOnline", this.getIsonline());
jo.put("requireSucess", requireSucess);
return jo;
}
// /**
// * 获取任务信息
// */
// public JSONObject getLedMessage(Instruction instdto) {
// JSONObject json = new JSONObject();
// json.put("task_code", instdto.getTask_code());
// json.put("inst_code", instdto.getInstruction_code());
// json.put("start_device_code", instdto.getStart_device_code());
// json.put("next_device_code", instdto.getNext_device_code());
// json.put("material_type", instdto.getMaterial());
// json.put("quantity", instdto.getQuantity());
// json.put("vehicle_code", instdto.getVehicle_code());
// json.put("instruction_status", instdto.getInstruction_status());
// json.put("entry_time", instdto.getCreate_time());
// String acsIp = paramService.findByCode(AcsConfig.ACSIP).getValue();
// json.put("ip", acsIp);
// return json;
// }
/**
* 更新指令状态
@@ -762,4 +770,30 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
return true;
}
public void clearWrite() {
List list = new ArrayList();
Map map = new HashMap();
map.put("code", "to_target");
map.put("value", "0");
list.add(map);
Map map2 = new HashMap();
map2.put("code", "to_task");
map2.put("value", "0");
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_command");
map3.put("value", "0");
list.add(map3);
Map map4 = new HashMap();
map4.put("code", "to_container_type");
map4.put("value", "0");
list.add(map4);
this.writing(list);
message = null;
vehicle_code = null;
}
}

View File

@@ -45,15 +45,6 @@ public class ItemProtocol {
* 任务号
*/
public static String item_task = "task";
/**
* 出数字托盘号
*/
public static String item_container_no = "container_no";
/**
* 子卷条码
*/
public static String item_material_barcode = "material_barcode";
/**
* 下发命令
@@ -63,10 +54,6 @@ public class ItemProtocol {
* 下发托盘类型
*/
public static String item_to_container_type = "to_container_type";
/**
* 下发接纯数字托盘号
*/
public static String item_to_container_no = "to_container_no";
/**
* 下发任务号
*/
@@ -76,11 +63,6 @@ public class ItemProtocol {
*/
public static String item_to_target = "to_target";
/**
* 托盘条码
*/
public static String item_barcode = "barcode";
@@ -90,9 +72,6 @@ public class ItemProtocol {
this.driver = driver;
}
public String getMaterialBarcode() {
return this.getOpcStringValue(item_material_barcode);
}
public int getHeartbeat() {
return this.getOpcIntegerValue(item_heartbeat);
}
@@ -117,9 +96,6 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_action);
}
public int getContainer_no() {
return this.getOpcIntegerValue(item_container_no);
}
public int getError() {
return this.getOpcIntegerValue(item_error);
@@ -133,9 +109,6 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_to_task);
}
public String getBarcode() {
return this.getOpcStringValue(item_barcode);
}
@@ -151,9 +124,6 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_to_container_type);
}
public int getTo_container_no() {
return this.getOpcIntegerValue(item_to_container_no);
}
Boolean isonline;
@@ -198,12 +168,9 @@ public class ItemProtocol {
list.add(new ItemDto(item_move, "光电信号", "DB101.B3"));
list.add(new ItemDto(item_container_direction, "托盘方向", "DB101.B4"));
list.add(new ItemDto(item_container_type, "托盘类型", "DB101.B5"));
list.add(new ItemDto(item_container_no, "纯数字托盘号", "DB101.D7"));
list.add(new ItemDto(item_action, "动作类型", "DB101.B6"));
list.add(new ItemDto(item_error, "报警", "DB101.B58"));
list.add(new ItemDto(item_task, "任务号", "DB101.D68"));
list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50"));
list.add(new ItemDto(item_barcode, "托盘条码", "DB602.STRING1.50"));
return list;
}
@@ -212,7 +179,6 @@ public class ItemProtocol {
list.add(new ItemDto(item_to_target, "下发仓位号", "DB102.W2"));
list.add(new ItemDto(item_to_command, "下发命令", "DB102.W4"));
list.add(new ItemDto(item_to_task, "下发任务号", "DB102.D1"));
list.add(new ItemDto(item_to_container_no, "下发接纯数字托盘号", "DB102.D3"));
list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB102.B5"));
return list;
}

View File

@@ -121,7 +121,7 @@ public class ItemProtocol {
/**
*木箱宽度
*/
public static String item_to_weight = "to_weight";
public static String item_to_weight = "to_width";
/**
*木箱高度
*/

View File

@@ -23,6 +23,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.led.led_screen.LedScreenDeviceDriver;
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.InteractionJsonDTO;
import org.nl.acs.enums.StorageTypeEnum;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.history.ErrorUtil;
@@ -144,9 +145,9 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
String hand_material_barcode = null;
//数量
int qty = 0;
int last_qty = 0;
//高度
int height = 0;
int last_height = 0;
//托盘方向
int carrier_direction = 0;
@@ -219,7 +220,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
to_container_type = this.itemProtocol.getTo_container_type();
container_type = this.itemProtocol.getContainer_type();
carrier_direction = this.itemProtocol.getCarrier_direction();
qty = this.itemProtocol.getQty();
height = this.itemProtocol.getHeight();
weight = this.itemProtocol.getWeight();
barcode = this.itemProtocol.getBarcode();
material_barcode = this.itemProtocol.getMaterialBarcode();
@@ -306,7 +307,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
if (mode != 2) {
remark = "universal_remark2";
}
if (move != 0) {
if (move != 1) {
remark = "universal_remark3";
}
if (task != 0) {
@@ -338,7 +339,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
last_hj_task = hj_task;
last_container_type = container_type;
last_carrier_direction = carrier_direction;
last_qty = qty;
last_height = height;
last_weight = weight;
last_barcode = barcode;
}
@@ -475,6 +476,9 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
String vehiclecode = taskdto.getVehicle_code();
String priority = taskdto.getPriority();
Instruction instdto = new Instruction();
String interactionJson = taskdto.getInteraction_json();
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
String containerType = interactionJsonDTO.getContainerType();
if (TaskTypeEnum.AGV_Task.getIndex().equals(taskdto.getTask_type())){
String route_plan_code = taskdto.getRoute_plan_code();
@@ -489,17 +493,18 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
Integer start = 0;
String start_device_code = pathlist.get(start);
String next_device_code = pathlist.get(start+1);
//判断有无出入库任务是相同路线
TaskDto dto = taskserver.findByCodeAndExcute(taskdto.getNext_device_code(), taskdto.getStart_device_code());
if (ObjectUtil.isNotEmpty(dto)){
requireSucess = false;
return false;
}
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,start_device_code,next_device_code);
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,start_device_code,next_device_code,containerType);
}else {
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,taskdto.getStart_device_code(),taskdto.getNext_device_code());
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,taskdto.getStart_device_code(),taskdto.getNext_device_code(),containerType);
}
try {
instructionService.create(instdto);
@@ -525,9 +530,14 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
map2.put("value", instdto.getInstruction_code());
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_container_type");
map3.put("value", instdto.getVehicle_type());
list.add(map3);
Map map4 = new HashMap();
map3.put("code", "to_command");
map3.put("value", "1");
list.add(map3);
list.add(map4);
this.writing(list);
led_message = getLedMessage(instdto);
List<String> deviceCodes = this.getExtraDeviceCodes("link_device_code");
@@ -601,7 +611,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
return json;
}
private void packageInstrcutData(Instruction instdto, TaskDto taskdto, String taskid, String taskcode, String vehiclecode, String priority,String startCode, String endCode) {
private void packageInstrcutData(Instruction instdto, TaskDto taskdto, String taskid, String taskcode, String vehiclecode, String priority,String startCode, String endCode,String containerType) {
instdto.setInstruction_id(IdUtil.simpleUUID());
instdto.setRoute_plan_code(taskdto.getRoute_plan_code());
instdto.setRemark(taskdto.getRemark());
@@ -621,6 +631,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
instdto.setInstruction_status("0");
instdto.setExecute_device_code(device_code);
instdto.setInstruction_type(taskdto.getTask_type());
instdto.setVehicle_type(containerType);
}

View File

@@ -32,9 +32,9 @@ public class ItemProtocol {
*/
public static String item_error = "error";
/**
* 数量
* 高度
*/
public static String item_qty = "qty";
public static String item_height = "height";
/**
* 任务号
*/
@@ -112,8 +112,8 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_task);
}
public int getQty(){
return this.getOpcIntegerValue(item_qty);
public int getHeight(){
return this.getOpcIntegerValue(item_height);
}
public int getCarrier_direction(){
@@ -189,7 +189,7 @@ public class ItemProtocol {
list.add(new ItemDto(item_task, "任务号", "DB1.D6"));
list.add(new ItemDto(item_container_type, "托盘类型", "DB1.B7"));
list.add(new ItemDto(item_carrier_direction, "托盘方向", "DB1.B8"));
list.add(new ItemDto(item_qty, "数量", "DB1.B9"));
list.add(new ItemDto(item_height, "高度", "DB1.B9"));
list.add(new ItemDto(item_weight, "重量", "DB1.B10"));
list.add(new ItemDto(item_barcode, "托盘条码", "DB602.STRING1.50"));
list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50"));

View File

@@ -213,7 +213,7 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
List toInstructions;
//行架机械手申请任务
if (mode == 2 && move == 0 && task == 0 && !requireSucess) {
if (mode == 2 && move == 0 && !requireSucess) {
boolean res = applyTask();
if (res) {
notCreateInstMessage = "";
@@ -407,10 +407,10 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
ManipulatorCacheDeviceDriver manipulatorCacheDeviceDriver;
if (startDevice.getDeviceDriver() instanceof ManipulatorCacheDeviceDriver) {
manipulatorCacheDeviceDriver = (ManipulatorCacheDeviceDriver) startDevice.getDeviceDriver();
if (manipulatorCacheDeviceDriver.getMode() != 2 && manipulatorCacheDeviceDriver.getAction() !=1) {
notCreateInstMessage = "universal_notCreateInstMessage3";
return false;
}
// if (manipulatorCacheDeviceDriver.getMode() != 2) {
// notCreateInstMessage = "universal_notCreateInstMessage3";
// return false;
// }
}
String taskid = taskDto.getTask_id();

View File

@@ -11,7 +11,7 @@ public class InteractionJsonDTO {
private String maxNo;
/**
*木箱最大数量
*木箱放入数量
*/
private String boxNo;
@@ -31,4 +31,9 @@ public class InteractionJsonDTO {
*子卷长度
*/
private String len;
/**
* 托盘类型
*/
private String containerType;
}

View File

@@ -233,8 +233,8 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
}
}
//放货完成
if (action == 4 && move == 0) {
//任务完成
if (action == 5 && move == 0) {
if (inst != null) {
try {
logServer.deviceExecuteLog(this.device_code, "", "", "放货完成");
@@ -351,7 +351,7 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
notCreateInstMessage = "universal_notCreateInstMessage1";
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
}
//存在托盘才可以申请任务
/*//存在托盘才可以申请任务
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver();
@@ -359,7 +359,7 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
notCreateInstMessage = "universal_notCreateInstMessage2";
return false;
}
}
}*/
String taskid = taskDto.getTask_id();
@@ -451,6 +451,12 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
map9.put("value", interactionJsonDTO.getLayer());
list.add(map9);
}
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getContainerType())) {
Map<String, Object> map10 = new HashMap<>();
map10.put("code", "to_type");
map10.put("value", interactionJsonDTO.getContainerType());
list.add(map10);
}
}
this.writing(list);
}

View File

@@ -28,4 +28,9 @@ public class InteractionJsonDTO {
*/
private String layer;
/**
* 托盘类型
*/
private String containerType;
}

View File

@@ -37,6 +37,8 @@ import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
@@ -69,6 +71,8 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
@@ -288,6 +292,11 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -532,7 +532,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
requireSucess = true;
break;
}
if (ObjectUtil.isNotNull(list)) {
if (list.size() != 0) {
this.writing(list);
}

View File

@@ -567,7 +567,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
}
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content(LangProcess.msg("universal_message10") + itemMap)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -298,6 +298,11 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -236,6 +236,11 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -20,6 +20,8 @@ import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.nl.system.service.param.ISysParamService;
import org.nl.config.SpringContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
@@ -52,6 +54,8 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
private Date instruction_require_time = new Date();
private Date instruction_finished_time = new Date();
@@ -129,6 +133,11 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
/**
@@ -158,6 +167,11 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
itemMap.put(to_param, value);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -27,6 +27,8 @@ import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -58,6 +60,8 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
@Autowired
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
private String error_type = "hx_error_type";
@@ -243,6 +247,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public String getToParam() {
@@ -265,6 +274,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -299,6 +313,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
e.printStackTrace();
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -24,6 +24,8 @@ import org.nl.acs.route.service.impl.RouteLineServiceImpl;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
@@ -51,6 +53,8 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//心跳
public int heartbeat = 0;
@@ -128,6 +132,11 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -9,6 +9,8 @@ import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.config.SpringContextHolder;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
@@ -26,7 +28,8 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
@Autowired
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
String container;
String container_type_desc;
String last_container_type_desc;
@@ -103,6 +106,11 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -776,6 +776,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -1157,6 +1162,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
}
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public void writing(List list) {

View File

@@ -520,6 +520,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
}
}
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
this.control(itemMap);
}
@@ -534,6 +539,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -623,6 +633,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
itemMap.put(to_param, value);
// itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -37,6 +37,8 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -65,7 +67,8 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
int lastMode = 0;
@@ -551,6 +554,11 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -36,6 +36,8 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -63,6 +65,8 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
@@ -499,6 +503,11 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -31,6 +31,8 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.openscada.opc.lib.da.Server;
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,6 +60,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//分切行架机械手是否禁用 0否 1是
private int is_disable = 0;
@@ -551,6 +555,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public boolean exe_business() {
@@ -590,6 +599,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
@@ -615,6 +629,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
}
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
this.control(itemMap);
}
@@ -804,6 +823,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
}

View File

@@ -24,6 +24,8 @@ import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.nl.system.service.param.ISysParamService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -55,6 +57,8 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
@@ -191,6 +195,11 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -272,5 +281,10 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
itemMap.put(to_param, value);
// itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -21,6 +21,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -40,6 +42,8 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
private String error_type = "hx_error_type";
@@ -268,6 +272,11 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public String getToParam() {
@@ -290,6 +299,11 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}