fix: 现场联调加堆垛机修改
This commit is contained in:
@@ -29,6 +29,10 @@ import org.nl.acs.device.domain.DeviceRunpoint;
|
||||
import org.nl.acs.device.service.mapper.DeviceRunpointMapper;
|
||||
import org.nl.acs.device_driver.conveyor.belt_conveyor.BeltConveyorDeviceDriver;
|
||||
import org.nl.acs.device_driver.one_conveyor.scanner_weight_conveyor.ConveyorWithScannerWeightDeviceDriver;
|
||||
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.BoxPackageManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.one_manipulator.box_storage_manipulator.BoxStorageManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.one_manipulator.return_good_manipulator.ReturnGoodManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.one_manipulator.trapped_manipulator.TrappedManipulatorManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.one_manipulator.volume_two_manipulator.VolumeTwoManipulatorManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.stacker.standard_stacker.StandardStackerDeviceDriver;
|
||||
import org.nl.acs.device_driver.two_conveyor.oven_manipulator.OvenGantryManipulatorDeviceDriver;
|
||||
@@ -1031,6 +1035,18 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
}else if (device.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
BeltConveyorDeviceDriver beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) device.getDeviceDriver();
|
||||
beltConveyorDeviceDriver.setDeviceStatus(form);
|
||||
}else if (device.getDeviceDriver() instanceof BoxPackageManipulatorDeviceDriver) {
|
||||
BoxPackageManipulatorDeviceDriver boxPackageManipulatorDeviceDriver = (BoxPackageManipulatorDeviceDriver) device.getDeviceDriver();
|
||||
boxPackageManipulatorDeviceDriver.setDeviceStatus(form);
|
||||
}else if (device.getDeviceDriver() instanceof BoxStorageManipulatorDeviceDriver) {
|
||||
BoxStorageManipulatorDeviceDriver boxStorageManipulatorDeviceDriver = (BoxStorageManipulatorDeviceDriver) device.getDeviceDriver();
|
||||
boxStorageManipulatorDeviceDriver.setDeviceStatus(form);
|
||||
}else if (device.getDeviceDriver() instanceof ReturnGoodManipulatorDeviceDriver) {
|
||||
ReturnGoodManipulatorDeviceDriver returnGoodManipulatorDeviceDriver = (ReturnGoodManipulatorDeviceDriver) device.getDeviceDriver();
|
||||
returnGoodManipulatorDeviceDriver.setDeviceStatus(form);
|
||||
}else if (device.getDeviceDriver() instanceof TrappedManipulatorManipulatorDeviceDriver) {
|
||||
TrappedManipulatorManipulatorDeviceDriver trappedManipulatorManipulatorDeviceDriver = (TrappedManipulatorManipulatorDeviceDriver) device.getDeviceDriver();
|
||||
trappedManipulatorManipulatorDeviceDriver.setDeviceStatus(form);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -274,19 +274,19 @@ public class BoxManipulatorSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
//if (!requireSucess) {
|
||||
String remark = "";;
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "universal_remark5";
|
||||
remark = "universal_remark5";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Data
|
||||
public class ItemProtocol {
|
||||
public class ItemProtocol {
|
||||
|
||||
/**
|
||||
* 心跳
|
||||
|
||||
@@ -268,13 +268,13 @@
|
||||
// remark = remark + "光电信号(move)为有货状态,";
|
||||
// }
|
||||
// if (task != 0) {
|
||||
// remark = remark + "universal_remark4";
|
||||
// remark = "universal_remark4";
|
||||
// if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
// this.inst = null;
|
||||
// }
|
||||
// }
|
||||
// if (requireSucess) {
|
||||
// remark = remark + "universal_remark5";
|
||||
// remark = "universal_remark5";
|
||||
// }
|
||||
// this.setNotCreateTaskMessage(remark);
|
||||
// //}
|
||||
|
||||
@@ -267,13 +267,13 @@
|
||||
// remark = remark + "光电信号(move)为有货状态,";
|
||||
// }
|
||||
// if (task != 0) {
|
||||
// remark = remark + "universal_remark4";
|
||||
// remark = "universal_remark4";
|
||||
// if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
// this.inst = null;
|
||||
// }
|
||||
// }
|
||||
// if (requireSucess) {
|
||||
// remark = remark + "universal_remark5";
|
||||
// remark = "universal_remark5";
|
||||
// }
|
||||
// this.setNotCreateTaskMessage(remark);
|
||||
// //}
|
||||
|
||||
@@ -273,13 +273,13 @@
|
||||
// remark = remark + "光电信号(move)为有货状态,";
|
||||
// }
|
||||
// if (task != 0) {
|
||||
// remark = remark + "universal_remark4";
|
||||
// remark = "universal_remark4";
|
||||
// if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
// this.inst = null;
|
||||
// }
|
||||
// }
|
||||
// if (requireSucess) {
|
||||
// remark = remark + "universal_remark5";
|
||||
// remark = "universal_remark5";
|
||||
// }
|
||||
// this.setNotCreateTaskMessage(remark);
|
||||
// //}
|
||||
|
||||
@@ -242,10 +242,10 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
//if (!requireSucess) {
|
||||
String remark = "";;
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + LangProcess.msg("universal_remark4");
|
||||
|
||||
@@ -264,10 +264,10 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
//if (!requireSucess) {
|
||||
String remark = "";;
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + LangProcess.msg("universal_remark4");
|
||||
|
||||
@@ -113,7 +113,7 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
|
||||
Boolean isonline = true;
|
||||
int hasGoods = 0;
|
||||
String message = null;
|
||||
String message = "";
|
||||
Boolean iserror = false;
|
||||
private Date instruction_update_time = new Date();
|
||||
private int instruction_update_time_out = 1000;
|
||||
@@ -219,19 +219,19 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
} else {
|
||||
String remark = "";;
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "universal_remark5";
|
||||
remark = "universal_remark5";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
}
|
||||
@@ -293,16 +293,16 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}else {
|
||||
feedMessage = "universal_feedMessage5";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "universal_feedMessage1";
|
||||
feedMessage = "universal_feedMessage1";
|
||||
}
|
||||
if (action != 8) {
|
||||
feedMessage = feedMessage + "universal_feedMessage2";
|
||||
feedMessage = "universal_feedMessage2";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage3";
|
||||
feedMessage = "universal_feedMessage3";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage4";
|
||||
feedMessage = "universal_feedMessage4";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -470,19 +470,14 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
map4.put("value", task);
|
||||
list.add(map4);
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO)) {
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getSeq())) {
|
||||
map5.put("code", "to_seq");
|
||||
map5.put("value", interactionJsonDTO.getSeq());
|
||||
list.add(map5);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getLastOne())) {
|
||||
map6.put("code", "to_last_one");
|
||||
map6.put("value", interactionJsonDTO.getLastOne());
|
||||
list.add(map6);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getDirection())) {
|
||||
map7.put("code", "to_direction");
|
||||
map7.put("value", interactionJsonDTO.getDirection());
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getBoxNo())) {
|
||||
map7.put("code", "to_box_no");
|
||||
map7.put("value", interactionJsonDTO.getBoxNo());
|
||||
list.add(map7);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getMaxNo())) {
|
||||
|
||||
@@ -9,14 +9,12 @@ public class InteractionJsonDTO {
|
||||
*木箱最大数量
|
||||
*/
|
||||
private String maxNo;
|
||||
|
||||
/**
|
||||
*子卷摆放方向
|
||||
*木箱最大数量
|
||||
*/
|
||||
private String direction;
|
||||
/**
|
||||
*下发木箱工位顺序
|
||||
*/
|
||||
private String seq;
|
||||
private String boxNo;
|
||||
|
||||
|
||||
/**
|
||||
*是否最后子卷
|
||||
|
||||
@@ -193,19 +193,19 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
} else {
|
||||
String remark = "";;
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "universal_remark5";
|
||||
remark = "universal_remark5";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
}
|
||||
@@ -254,16 +254,16 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
} else {
|
||||
feedMessage = "universal_feedMessage5";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "universal_feedMessage1";
|
||||
feedMessage = "universal_feedMessage1";
|
||||
}
|
||||
if (action != 8) {
|
||||
feedMessage = feedMessage + "universal_feedMessage2";
|
||||
feedMessage = "universal_feedMessage2";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage3";
|
||||
feedMessage = "universal_feedMessage3";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage4";
|
||||
feedMessage = "universal_feedMessage4";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -351,9 +351,10 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
notCreateInstMessage = "universal_notCreateInstMessage1";
|
||||
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||
}
|
||||
//存在托盘才可以申请任务
|
||||
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
|
||||
if (startDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||
if (beltConveyorDeviceDriver.getMove() != 1) {
|
||||
notCreateInstMessage = "universal_notCreateInstMessage2";
|
||||
return false;
|
||||
@@ -426,12 +427,12 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
list.add(map4);
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO)) {
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getWeight())) {
|
||||
map5.put("code", "to_weight");
|
||||
map5.put("code", "to_width");
|
||||
map5.put("value", interactionJsonDTO.getWeight());
|
||||
list.add(map5);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getLength())) {
|
||||
map6.put("code", "to_lenght");
|
||||
map6.put("code", "to_length");
|
||||
map6.put("value", interactionJsonDTO.getLength());
|
||||
list.add(map6);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class ItemProtocol {
|
||||
/**
|
||||
*木箱宽度
|
||||
*/
|
||||
public static String item_to_weight = "to_weight";
|
||||
public static String item_to_width = "to_width";
|
||||
/**
|
||||
*木箱高度
|
||||
*/
|
||||
@@ -226,7 +226,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_to_task, "下发任务号", "DB2.D6"));
|
||||
list.add(new ItemDto(item_to_onset, "下发起始站", "DB2.W2"));
|
||||
list.add(new ItemDto(item_to_length, "木箱长度", "DB601.W14"));
|
||||
list.add(new ItemDto(item_to_weight, "木箱宽度", "DB601.W16"));
|
||||
list.add(new ItemDto(item_to_width, "木箱宽度", "DB601.W16"));
|
||||
list.add(new ItemDto(item_to_height, "木箱高度", "DB601.W18"));
|
||||
list.add(new ItemDto(item_to_barcode, "下发木箱条码", "DB601.STRING1.50"));
|
||||
list.add(new ItemDto(item_to_layer, "下发木箱层数", "DB601.W22"));
|
||||
|
||||
@@ -203,19 +203,19 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
} else {
|
||||
String remark = "";;
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "universal_remark5";
|
||||
remark = "universal_remark5";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
}
|
||||
@@ -274,16 +274,16 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
} else {
|
||||
feedMessage = "universal_feedMessage5";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "universal_feedMessage1";
|
||||
feedMessage = "universal_feedMessage1";
|
||||
}
|
||||
if (action != 8) {
|
||||
feedMessage = feedMessage + "universal_feedMessage2";
|
||||
feedMessage = "universal_feedMessage2";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage3";
|
||||
feedMessage = "universal_feedMessage3";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage4";
|
||||
feedMessage = "universal_feedMessage4";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -374,9 +374,10 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||
}
|
||||
|
||||
//存在托盘才可以申请任务
|
||||
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
|
||||
if (startDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||
if (beltConveyorDeviceDriver.getMove() != 1) {
|
||||
notCreateInstMessage = "universal_notCreateInstMessage2";
|
||||
return false;
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ItemProtocol {
|
||||
/**
|
||||
*木箱宽度
|
||||
*/
|
||||
public static String item_to_weight = "to_weight";
|
||||
public static String item_to_width = "to_width";
|
||||
/**
|
||||
*木箱高度
|
||||
*/
|
||||
@@ -219,7 +219,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_to_onset, "下发起始站", "DB2.W2"));
|
||||
list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB102.B8"));
|
||||
list.add(new ItemDto(item_to_length, "木箱长度", "DB601.W10"));
|
||||
list.add(new ItemDto(item_to_weight, "木箱宽度", "DB601.W12"));
|
||||
list.add(new ItemDto(item_to_width, "木箱宽度", "DB601.W12"));
|
||||
list.add(new ItemDto(item_to_height, "木箱高度", "DB601.W14"));
|
||||
list.add(new ItemDto(item_to_template, "堆叠模板", "DB601.W16"));
|
||||
list.add(new ItemDto(item_to_is_binding, "下发是否捆轧", "DB601.D10"));
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.FeedLmsRealFailed;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.box_manipulator_site.BoxManipulatorSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.conveyor.belt_conveyor.BeltConveyorDeviceDriver;
|
||||
import org.nl.acs.device_driver.conveyor.siemens_conveyor.SiemensConveyorDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
@@ -206,13 +207,13 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
remark = remark + "光电信号(move)为有货状态,";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "universal_remark5";
|
||||
remark = "universal_remark5";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
}
|
||||
@@ -272,16 +273,16 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
}else {
|
||||
feedMessage = "universal_feedMessage5";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "universal_feedMessage1";
|
||||
feedMessage = "universal_feedMessage1";
|
||||
}
|
||||
if (action != 8) {
|
||||
feedMessage = feedMessage + "universal_feedMessage2";
|
||||
feedMessage = "universal_feedMessage2";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage3";
|
||||
feedMessage = "universal_feedMessage3";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage4";
|
||||
feedMessage = "universal_feedMessage4";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -369,10 +370,10 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
}
|
||||
|
||||
|
||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||
if (startDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
||||
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
if (siemensConveyorDeviceDriver.getMove() != 1) {
|
||||
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
|
||||
if (startDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
if (beltConveyorDeviceDriver.getMove() != 1) {
|
||||
notCreateInstMessage = "universal_notCreateInstMessage2";
|
||||
return false;
|
||||
}
|
||||
@@ -445,7 +446,7 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
list.add(map4);
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO)) {
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getWeight())) {
|
||||
map5.put("code", "to_weight");
|
||||
map5.put("code", "to_width");
|
||||
map5.put("value", interactionJsonDTO.getWeight());
|
||||
list.add(map5);
|
||||
}
|
||||
|
||||
@@ -218,19 +218,19 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
||||
} else {
|
||||
String remark = "";
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "universal_remark5";
|
||||
remark = "universal_remark5";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
}
|
||||
@@ -294,16 +294,16 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
||||
} else {
|
||||
feedMessage = "universal_feedMessage5";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "universal_feedMessage1";
|
||||
feedMessage = "universal_feedMessage1";
|
||||
}
|
||||
if (action != 8) {
|
||||
feedMessage = feedMessage + "universal_feedMessage2";
|
||||
feedMessage = "universal_feedMessage2";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage3";
|
||||
feedMessage = "universal_feedMessage3";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + "universal_feedMessage4";
|
||||
feedMessage = "universal_feedMessage4";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,10 +243,10 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
String remark = "";
|
||||
;
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + LangProcess.msg("universal_remark4");
|
||||
|
||||
@@ -69,7 +69,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
|
||||
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
|
||||
public static final String REDIS_MOVE_BOX = "MOVE:MOVE_TASK";
|
||||
|
||||
@@ -284,8 +284,6 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
Instruction inst = null;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Device getDevice() {
|
||||
return this.device;
|
||||
@@ -319,7 +317,6 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
storage_cache = this.itemProtocol.getItem_storage_cache();
|
||||
|
||||
|
||||
|
||||
// 更新指令状态
|
||||
if (mode == 3 && task > 0) {
|
||||
Date date = new Date();
|
||||
@@ -388,7 +385,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
case 2:
|
||||
message = "universal_completed";
|
||||
Instruction instruction = checkInst();
|
||||
if (ObjectUtil.isEmpty(instruction)){
|
||||
if (ObjectUtil.isEmpty(instruction)) {
|
||||
message = "universal_message4";
|
||||
break;
|
||||
}
|
||||
@@ -473,25 +470,12 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
case 5:
|
||||
message = "universal_releasing_completed";
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
List list5 = new ArrayList<>();
|
||||
map.put("code", "to_command");
|
||||
map.put("value", 5);
|
||||
list5.add(map);
|
||||
this.writing(list5);
|
||||
list.add(map);
|
||||
Instruction inst = checkInst();
|
||||
try {
|
||||
finish_instruction(inst);
|
||||
if (ObjectUtil.isNotEmpty(redisUtils.get(REDIS_MOVE_BOX))){
|
||||
String taskRedis = redisUtils.get(REDIS_MOVE_BOX).toString();
|
||||
task = Integer.valueOf(taskRedis);
|
||||
Instruction instOld = checkInst();
|
||||
List list1 = new ArrayList();
|
||||
pakageCommand(list1, taskRedis);
|
||||
pakagePlc(instOld, list1);
|
||||
if (ObjectUtil.isNotNull(list1)) {
|
||||
this.writing(list1);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -569,6 +553,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
/**
|
||||
* 申请更新点位
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
private void applyUpdatePointCode(String type) {
|
||||
@@ -578,7 +563,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
return;
|
||||
} else {
|
||||
Instruction instruction = instructionService.findByCode(String.valueOf(task));
|
||||
if (ObjectUtil.isEmpty(instruction)){
|
||||
if (ObjectUtil.isEmpty(instruction)) {
|
||||
message = "one_message9";
|
||||
return;
|
||||
}
|
||||
@@ -605,35 +590,24 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
if (type.equals(StandarStirageErroEnum.VOIDANCE.getType())) {
|
||||
updateData1(poinCode, instruction, point, split);
|
||||
List list = new ArrayList();
|
||||
pakageData(list,point, split);
|
||||
pakageData(list, point, split);
|
||||
}
|
||||
if (type.equals(StandarStirageErroEnum.BLOCK_IN.getType()) || type.equals(StandarStirageErroEnum.FILL.getType())) {
|
||||
updateData2(poinCode, instruction, point, split);
|
||||
List list = new ArrayList();
|
||||
pakageData(list,point, split);
|
||||
pakageData(list, point, split);
|
||||
}
|
||||
}
|
||||
if (StrUtil.isNotEmpty(jo.getString("task_id"))) {
|
||||
//取货潜货位阻挡做完移库任务
|
||||
if (type.equals(StandarStirageErroEnum.BLOCK_OUT.getType())) {
|
||||
//存缓存
|
||||
redisUtils.set(REDIS_MOVE_BOX, task);
|
||||
TaskDto taskId = taskserver.findById(jo.getString("task_id"));
|
||||
Instruction instructionDDJ = instructionService.creatDDJInstruction(taskId.getTask_id());
|
||||
List list = new ArrayList();
|
||||
if (ObjectUtil.isNotEmpty(taskId)) {
|
||||
if (StrUtil.isNotEmpty(instructionDDJ.getInstruction_code())) {
|
||||
task = Integer.valueOf(instructionDDJ.getInstruction_code());
|
||||
pakageCommand(list,instructionDDJ.getInstruction_code());
|
||||
}
|
||||
String poinCodeMove = taskId.getStart_point_code();
|
||||
String[] split = poinCodeMove.split("-");
|
||||
Device point = deviceAppService.findDeviceByCode(split[0]);
|
||||
pakageData(list, point, split);
|
||||
}
|
||||
}
|
||||
//取货潜货位阻挡做完移库任务
|
||||
if (type.equals(StandarStirageErroEnum.BLOCK_OUT.getType())) {
|
||||
//获取出库指令更新其优先级和状态
|
||||
Instruction instruction1 = checkInst();
|
||||
instruction1.setPriority("2");
|
||||
instruction1.setInstruction_status("0");
|
||||
instructionService.update(instruction1);
|
||||
|
||||
}
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
this.requireSucess = true;
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -722,7 +696,6 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 申请任务
|
||||
*
|
||||
@@ -844,7 +817,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
list.add(map7);
|
||||
}
|
||||
|
||||
private void pakageCommand( List list, String inst) {
|
||||
private void pakageCommand(List list, String inst) {
|
||||
HashMap map1 = new HashMap();
|
||||
map1.put("code", "to_device_code");
|
||||
map1.put("value", this.getDevice().getAddress());
|
||||
|
||||
@@ -306,7 +306,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
} else {
|
||||
feedMessage = "universal_feedMessage5";
|
||||
if (mode != 3) {
|
||||
feedMessage = feedMessage + "universal_feedMessage1";
|
||||
feedMessage = "universal_feedMessage1";
|
||||
}
|
||||
if (action != 5) {
|
||||
feedMessage = feedMessage + "two_message4";
|
||||
|
||||
@@ -226,13 +226,13 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
remark = remark + "光电信号(move)为有货状态,";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "universal_remark5";
|
||||
remark = "universal_remark5";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
|
||||
@@ -325,19 +325,19 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
//if (!requireSucess) {
|
||||
String remark = "";
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "universal_remark5";
|
||||
remark = "universal_remark5";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
|
||||
@@ -329,13 +329,13 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
remark = remark + "光电信号(move)为有货状态,";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "universal_remark5";
|
||||
remark = "universal_remark5";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
|
||||
@@ -218,7 +218,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (!requireSucess) {
|
||||
String remark = "";
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
if (move1 != 0) {
|
||||
remark = remark + "universal_remark6";
|
||||
@@ -227,7 +227,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
remark = remark + "universal_remark7";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "universal_remark4";
|
||||
remark = "universal_remark4";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ public interface InstructionService extends CommonService<InstructionMybatis> {
|
||||
void create(Instruction dto) throws Exception;
|
||||
|
||||
|
||||
Instruction creatDDJInstruction(String taskId);
|
||||
|
||||
|
||||
/**
|
||||
* 创建2
|
||||
|
||||
@@ -528,34 +528,6 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
instructions.add(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Instruction creatDDJInstruction(String taskId) {
|
||||
TaskDto task = taskService.findByCodeFromCache(taskId);
|
||||
Instruction instdto = new Instruction();
|
||||
instdto.setInstruction_type(task.getTask_type());
|
||||
instdto.setInstruction_id(IdUtil.simpleUUID());
|
||||
instdto.setRoute_plan_code(task.getRoute_plan_code());
|
||||
instdto.setTask_id(taskId);
|
||||
instdto.setTask_code(task.getTask_code());
|
||||
String now = DateUtil.now();
|
||||
instdto.setCreate_time(now);
|
||||
instdto.setCreate_by(SecurityUtils.getCurrentNickName());
|
||||
instdto.setStart_device_code(task.getStart_device_code());
|
||||
instdto.setStart_point_code(task.getStart_point_code());
|
||||
instdto.setNext_device_code(task.getNext_device_code());
|
||||
instdto.setNext_point_code(task.getNext_point_code());
|
||||
instdto.setPriority("2");
|
||||
instdto.setInstruction_status(InstructionStatusEnum.READY.getIndex());
|
||||
instdto.setExecute_device_code(task.getStart_point_code());
|
||||
instdto.setFrom_x(task.getFrom_x());
|
||||
instdto.setFrom_z(task.getFrom_z());
|
||||
instdto.setFrom_y(task.getFrom_y());
|
||||
instdto.setTo_x(task.getTo_x());
|
||||
instdto.setTo_z(task.getTo_z());
|
||||
instdto.setTo_y(task.getTo_y());
|
||||
create(instdto);
|
||||
return instdto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create2(Instruction dto) throws Exception {
|
||||
|
||||
@@ -11,7 +11,7 @@ public class LangProcess {
|
||||
public static String msg(String code,String...args){
|
||||
MessageSource bean = SpringContextHolder.getBean(MessageSource.class);
|
||||
if (StringUtils.isEmpty(code)){
|
||||
return "配置信息不存在";
|
||||
return " ";
|
||||
}
|
||||
String message = bean.getMessage(code, args, LocaleContextHolder.getLocale());
|
||||
return message;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
universal_null = \u7A7A
|
||||
universal_off-line=\u8131\u673A
|
||||
universal_stand-alone=\u5355\u673A
|
||||
universal_standby=\u5F85\u673A
|
||||
|
||||
Reference in New Issue
Block a user