现场联调优化
This commit is contained in:
@@ -144,7 +144,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
}
|
||||
|
||||
if (this.getApply_handling()) {
|
||||
String link_device_code = this.getDevice().getExtraValue().get("link_device_code").toString();
|
||||
String link_device_code = String.valueOf(this.getDevice().getExtraValue().get("link_device_code"));
|
||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
Device link_device = appService.findDeviceByCode(link_device_code);
|
||||
StandardInspectSiteDeviceDriver standardInspectSiteDevicedriver;
|
||||
|
||||
@@ -56,22 +56,7 @@ public class HfStationTwoDefination implements OpcDeviceDriverDefination {
|
||||
}
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos2() {
|
||||
List<ItemDto> list = new ArrayList();
|
||||
list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB101.B0"));
|
||||
list.add(new ItemDto(ItemProtocol.item_mode, "工作模式", "DB101.B1"));
|
||||
list.add(new ItemDto(ItemProtocol.item_move, "光电信号", "DB101.B2"));
|
||||
list.add(new ItemDto(ItemProtocol.item_action, "取放信号", "DB101.B3"));
|
||||
list.add(new ItemDto(ItemProtocol.item_ioaction, "进出信号", "DB101.B4"));
|
||||
list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB101.B5"));
|
||||
list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB101.D6"));
|
||||
list.add(new ItemDto(ItemProtocol.item_status, "设备状态", "DB101.B10"));
|
||||
list.add(new ItemDto(ItemProtocol.item_current_order_num, "当前工单数量", "DB101.D12"));
|
||||
list.add(new ItemDto(ItemProtocol.item_order, "工单号", "DB200.STRING20.50"));
|
||||
list.add(new ItemDto(ItemProtocol.item_barcode, "条码", "DB200.STRING72.50"));
|
||||
list.add(new ItemDto(ItemProtocol.item_material_code, "物料号", "DB200.B72"));
|
||||
list.add(new ItemDto(ItemProtocol.item_product_code,"产品编号","DB200.B124"));
|
||||
list.add(new ItemDto(ItemProtocol.item_number,"托盘砖数量","DB200.B16"));
|
||||
return list;
|
||||
return ItemProtocol.getReadableItemDtos();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,8 +14,6 @@ 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.hongfeng.hf_kiln_manipulator.HfKilnManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.hongfeng.hf_station.HfStationDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
@@ -333,6 +331,9 @@ public class HfStationTwoDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
finish();
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
finish();
|
||||
break;
|
||||
case 6:
|
||||
//满跺完成,请求呼叫
|
||||
if (!callEmptyRequireSucess && move != 0) {
|
||||
@@ -692,8 +693,8 @@ public class HfStationTwoDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
dto.setUpdate_time(DateUtil.now());
|
||||
produceshiftorderService.update(dto);
|
||||
this.setRequireSucess(true);
|
||||
this.writing(8);
|
||||
this.writing(8);
|
||||
this.writing(3);
|
||||
this.writing(3);
|
||||
logServer.deviceInfo("人工排产确认", this.getDevice_code(), "人工排产确认成功!");
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -173,20 +173,21 @@ public class ItemProtocol {
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB101.B0"));
|
||||
list.add(new ItemDto(item_mode, "工作模式", "DB101.B1"));
|
||||
list.add(new ItemDto(item_move, "光电信号", "DB101.B2"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "DB101.B3"));
|
||||
list.add(new ItemDto(item_ioaction, "进出信号", "DB101.B4"));
|
||||
list.add(new ItemDto(item_error, "报警信号", "DB101.B5"));
|
||||
list.add(new ItemDto(item_task, "任务号", "DB101.D6"));
|
||||
list.add(new ItemDto(item_status, "设备状态", "DB101.B10"));
|
||||
list.add(new ItemDto(item_current_order_num, "当前工单数量", "DB101.D12"));
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB200.B0"));
|
||||
list.add(new ItemDto(item_mode, "工作模式", "DB200.B1"));
|
||||
list.add(new ItemDto(item_move, "光电信号", "DB200.B2"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "DB200.B3"));
|
||||
list.add(new ItemDto(item_ioaction, "进出信号", "DB200.B4"));
|
||||
list.add(new ItemDto(item_error, "报警信号", "DB200.B5"));
|
||||
list.add(new ItemDto(item_task, "任务号", "DB200.D6"));
|
||||
list.add(new ItemDto(item_status, "设备状态", "DB200.B10"));
|
||||
list.add(new ItemDto(item_current_order_num, "当前工单数量", "DB200.D12"));
|
||||
list.add(new ItemDto(item_number,"托盘砖数量","DB200.W16"));
|
||||
list.add(new ItemDto(item_barcode, "条码", "DB200.W18"));
|
||||
list.add(new ItemDto(item_order, "工单号", "DB200.STRING20.50"));
|
||||
list.add(new ItemDto(item_barcode, "条码", "DB200.STRING72.50"));
|
||||
list.add(new ItemDto(item_material_code, "物料号", "DB200.B72"));
|
||||
list.add(new ItemDto(item_product_code,"产品编号","DB200.B124"));
|
||||
list.add(new ItemDto(item_number,"托盘砖数量","DB200.B16"));
|
||||
list.add(new ItemDto(item_material_code, "物料号", "DB200.STRING72.50"));
|
||||
list.add(new ItemDto(item_product_code,"产品编号","DB200.W124"));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,9 +142,9 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
if (StrUtil.isNotBlank(hfStationDeviceDriver.getOrder())) {
|
||||
throw new BadRequestException("设备正在生产");
|
||||
}
|
||||
if (hfStationDeviceDriver.getStatus() != 2) {
|
||||
throw new BadRequestException("设备状态不为自动");
|
||||
}
|
||||
// if (hfStationDeviceDriver.getStatus() != 2) {
|
||||
// throw new BadRequestException("设备状态不为自动");
|
||||
// }
|
||||
hfStationDeviceDriver.writing("to_order", dto.getOrder_code());
|
||||
hfStationDeviceDriver.writing("to_order_num", String.valueOf(dto.getQty()));
|
||||
hfStationDeviceDriver.writing("to_product_number", dto.getMaterial_code());
|
||||
@@ -154,7 +154,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
hfStationDeviceDriver.writing("to_command", "3");
|
||||
hfStationDeviceDriver.writing("to_command", "3");
|
||||
//压力机下发工单同时下发到关联的码盘工位
|
||||
String device_code=hfStationDeviceDriver.getExtraValue().get("link_device_code").toString();
|
||||
String device_code=String.valueOf(hfStationDeviceDriver.getExtraValue().get("link_device_code"));
|
||||
Device linkDevice = deviceAppService.findDeviceByCode(device_code);
|
||||
if (ObjectUtil.isNotEmpty(linkDevice)&&linkDevice.getDeviceDriver() instanceof HfStationTwoDeviceDriver) {
|
||||
HfStationTwoDeviceDriver hfStationTwoDeviceDriver = (HfStationTwoDeviceDriver) linkDevice.getDeviceDriver();
|
||||
@@ -171,14 +171,16 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
hfStationTwoDeviceDriver.writing("to_product_code", dto.getProduct_code());
|
||||
hfStationTwoDeviceDriver.writing("to_order", dto.getOrder_code());
|
||||
hfStationTwoDeviceDriver.writing("to_order_num", String.valueOf(dto.getQty()));
|
||||
hfStationTwoDeviceDriver.writing("to_material_code", dto.getMaterial_code());
|
||||
hfStationTwoDeviceDriver.writing("to_a", dto.getA());
|
||||
hfStationTwoDeviceDriver.writing("to_b", dto.getB());
|
||||
hfStationTwoDeviceDriver.writing("to_h", dto.getH());
|
||||
hfStationTwoDeviceDriver.writing("to_w", dto.getW());
|
||||
hfStationTwoDeviceDriver.writing("to_number", dto.getNumber());
|
||||
hfStationTwoDeviceDriver.writing("to_product_code", dto.getProduct_code());
|
||||
hfStationTwoDeviceDriver.writing("to_command", "3");
|
||||
hfStationTwoDeviceDriver.writing("to_command", "3");
|
||||
hfStationTwoDeviceDriver.writing("to_material_code", dto.getMaterial_code());
|
||||
hfStationTwoDeviceDriver.writing("to_command", "1");
|
||||
hfStationTwoDeviceDriver.writing("to_command", "1");
|
||||
}
|
||||
}else if (device.getDeviceDriver() instanceof HfStationTwoDeviceDriver) {
|
||||
HfStationTwoDeviceDriver hfStationTwoDeviceDriver = (HfStationTwoDeviceDriver) device.getDeviceDriver();
|
||||
@@ -203,8 +205,8 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
hfStationTwoDeviceDriver.writing("to_w", dto.getW());
|
||||
hfStationTwoDeviceDriver.writing("to_number", dto.getNumber());
|
||||
hfStationTwoDeviceDriver.writing("to_product_code", dto.getProduct_code());
|
||||
hfStationTwoDeviceDriver.writing("to_command", "3");
|
||||
hfStationTwoDeviceDriver.writing("to_command", "3");
|
||||
hfStationTwoDeviceDriver.writing("to_command", "1");
|
||||
hfStationTwoDeviceDriver.writing("to_command", "1");
|
||||
}
|
||||
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||
wo.insert(json);
|
||||
@@ -367,7 +369,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
hfStationDeviceDriver.writing("to_command", "3");
|
||||
hfStationDeviceDriver.writing("to_command", "3");
|
||||
//压力机下发工单同时下发到关联的码盘工位
|
||||
String link_device_code=hfStationDeviceDriver.getExtraValue().get("link_device_code").toString();
|
||||
String link_device_code=String.valueOf(hfStationDeviceDriver.getExtraValue().get("link_device_code"));
|
||||
Device linkDevice = deviceAppService.findDeviceByCode(link_device_code);
|
||||
if (linkDevice.getDeviceDriver() instanceof HfStationTwoDeviceDriver) {
|
||||
HfStationTwoDeviceDriver hfStationTwoDeviceDriver = (HfStationTwoDeviceDriver) linkDevice.getDeviceDriver();
|
||||
|
||||
Reference in New Issue
Block a user