rev:优化报警代码、修改密码报错
This commit is contained in:
@@ -315,6 +315,10 @@ public class AppearanceInspectionScannerConveyorDeviceDriver extends AbstractOpc
|
||||
if (scanApplyFlag) {
|
||||
this.message = "正在执行申请AGV任务";
|
||||
this.applyAgvTask();
|
||||
} else {
|
||||
//TODO 等AGV上线后删除
|
||||
this.writing(ItemProtocol.TO_COMMAND.getKey(), CommandEnum.COMMAND_7.getValue());
|
||||
this.requireSuccess = true;
|
||||
}
|
||||
} else if (this.mode == AppModeEnum.MODE_8.getCode() && this.move > 0 && StrUtil.isNotEmpty(this.barcode) && !requireSuccess) {
|
||||
this.message = "正在获取外形检测高度";
|
||||
|
||||
@@ -66,164 +66,169 @@ public class LedScreenDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
@Override
|
||||
public void execute() throws Exception {
|
||||
if (isInitialized.compareAndSet(false, true)) {
|
||||
Bx6GEnv.initial(30000);
|
||||
}
|
||||
//建立连接
|
||||
if (this.screen == null) {
|
||||
String ip = Optional.ofNullable(this.getDevice().getExtraValue().get("ip_address")).map(Object::toString).orElse(null);
|
||||
int port = Optional.ofNullable(this.getDevice().getExtraValue().get("ip_port")).map(Object::toString).map(Integer::parseInt).orElse(0);
|
||||
if (ip == null || port == 0) {
|
||||
return;
|
||||
try {
|
||||
if (isInitialized.compareAndSet(false, true)) {
|
||||
Bx6GEnv.initial(30000);
|
||||
}
|
||||
this.screen = new Bx6GScreenClient(this.getDevice().getDevice_code(), new Bx6E());
|
||||
this.screen.connect(ip, port);
|
||||
}
|
||||
|
||||
//设置节目
|
||||
DisplayStyle[] styles = DisplayStyleFactory.getStyles().toArray(new DisplayStyle[0]);
|
||||
ProgramBxFile pf = new ProgramBxFile(0, this.screen.getProfile());
|
||||
TextCaptionBxArea area = new TextCaptionBxArea(0, 0, 192, 16, this.screen.getProfile());
|
||||
StringBuilder sb = new StringBuilder();
|
||||
//判断是否关联出入库模式
|
||||
boolean inOutFlag = Optional.ofNullable(this.getDevice().getExtraValue().get("inOut")).map(Object::toString).map(Boolean::parseBoolean).orElse(false);
|
||||
if (!inOutFlag) {
|
||||
String inOutMode = Optional.ofNullable(this.getDevice().getExtraValue().get("inOutMode")).map(Object::toString).orElse("");
|
||||
sb.append(inOutMode);
|
||||
} else {
|
||||
String linkSSX = Optional.ofNullable(this.getDevice().getExtraValue().get("linkSSX")).map(Object::toString).orElse(null);
|
||||
Device device = deviceAppService.findDeviceByCode(linkSSX);
|
||||
if (device != null && device.getDeviceDriver() instanceof StripConveyorDeviceDriver) {
|
||||
StripConveyorDeviceDriver stripConveyorDeviceDriver = (StripConveyorDeviceDriver) device.getDeviceDriver();
|
||||
if (stripConveyorDeviceDriver.getInOutMode() == 0) {
|
||||
sb.append("入库模式");
|
||||
//建立连接
|
||||
if (this.screen == null || !this.screen.isConnected()) {
|
||||
String ip = Optional.ofNullable(this.getDevice().getExtraValue().get("ip_address")).map(Object::toString).orElse(null);
|
||||
int port = Optional.ofNullable(this.getDevice().getExtraValue().get("ip_port")).map(Object::toString).map(Integer::parseInt).orElse(0);
|
||||
if (ip == null || port == 0) {
|
||||
return;
|
||||
}
|
||||
this.screen = new Bx6GScreenClient(this.getDevice().getDevice_code(), new Bx6E());
|
||||
this.screen.connect(ip, port);
|
||||
}
|
||||
//设置节目
|
||||
DisplayStyle[] styles = DisplayStyleFactory.getStyles().toArray(new DisplayStyle[0]);
|
||||
ProgramBxFile pf = new ProgramBxFile(0, this.screen.getProfile());
|
||||
TextCaptionBxArea area = new TextCaptionBxArea(0, 0, 192, 16, this.screen.getProfile());
|
||||
StringBuilder sb = new StringBuilder();
|
||||
//判断是否关联出入库模式
|
||||
boolean inOutFlag = Optional.ofNullable(this.getDevice().getExtraValue().get("inOut")).map(Object::toString).map(Boolean::parseBoolean).orElse(false);
|
||||
if (!inOutFlag) {
|
||||
String inOutMode = Optional.ofNullable(this.getDevice().getExtraValue().get("inOutMode")).map(Object::toString).orElse("");
|
||||
sb.append(inOutMode);
|
||||
} else {
|
||||
String linkSSX = Optional.ofNullable(this.getDevice().getExtraValue().get("linkSSX")).map(Object::toString).orElse(null);
|
||||
Device device = deviceAppService.findDeviceByCode(linkSSX);
|
||||
if (device != null && device.getDeviceDriver() instanceof StripConveyorDeviceDriver) {
|
||||
StripConveyorDeviceDriver stripConveyorDeviceDriver = (StripConveyorDeviceDriver) device.getDeviceDriver();
|
||||
if (stripConveyorDeviceDriver.getInOutMode() == 0) {
|
||||
sb.append("入库模式");
|
||||
} else {
|
||||
sb.append("出库模式");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!StrUtil.equals(this.modeMsgInfo, sb.toString())) {
|
||||
TextBxPage page = new TextBxPage(sb.toString());
|
||||
page.setForeground(Color.green);
|
||||
area.addPage(page);
|
||||
pf.addArea(area);
|
||||
this.screen.writeProgram(pf);
|
||||
this.modeMsgInfo = sb.toString();
|
||||
}
|
||||
//设置动态区1报警信息
|
||||
List<String> errorDevices = this.getExtraDeviceCodes("errorDevices");
|
||||
StringBuilder sbMsg = new StringBuilder();
|
||||
if (CollectionUtil.isNotEmpty(errorDevices)) {
|
||||
sbMsg.append("报警信息: ");
|
||||
String errorMsg = "";
|
||||
for (int i = 0; i < errorDevices.size(); i++) {
|
||||
String deviceCode = errorDevices.get(i);
|
||||
Device device = deviceAppService.findDeviceByCode(deviceCode);
|
||||
if (device != null && device.getDeviceDriver() instanceof AppearanceInspectionScannerConveyorDeviceDriver) {
|
||||
AppearanceInspectionScannerConveyorDeviceDriver appearanceInspectionScannerConveyorDeviceDriver = (AppearanceInspectionScannerConveyorDeviceDriver) device.getDeviceDriver();
|
||||
if (appearanceInspectionScannerConveyorDeviceDriver.getError() > 0) {
|
||||
String label = ErrorEnum.getLabel(appearanceInspectionScannerConveyorDeviceDriver.getError());
|
||||
errorMsg = "设备" + deviceCode + " " + label + ",";
|
||||
}
|
||||
} else if (device != null && device.getDeviceDriver() instanceof StandardStackerDeviceDriver) {
|
||||
StandardStackerDeviceDriver standardStackerDeviceDriver = (StandardStackerDeviceDriver) device.getDeviceDriver();
|
||||
if (standardStackerDeviceDriver.getFront_Zerror() > 0 || standardStackerDeviceDriver.getBack_Zerror() > 0) {
|
||||
errorMsg = deviceCode + " ";
|
||||
if (standardStackerDeviceDriver.getFront_Zerror() > 0) {
|
||||
errorMsg = "设备" + deviceCode + " 前叉报警 " + org.nl.acs.device.driver.stacker.double_stacker.enums.ErrorEnum.getDesc(standardStackerDeviceDriver.getFront_Zerror()) + ",";
|
||||
}
|
||||
if (standardStackerDeviceDriver.getBack_Zerror() > 0) {
|
||||
errorMsg = "设备" + deviceCode + " 后叉报警 " + org.nl.acs.device.driver.stacker.double_stacker.enums.ErrorEnum.getDesc(standardStackerDeviceDriver.getFront_Zerror()) + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StrUtil.isEmpty(errorMsg)) {
|
||||
sbMsg.append("无报警!");
|
||||
} else {
|
||||
sb.append("出库模式");
|
||||
sbMsg.append(errorMsg);
|
||||
if (sbMsg.length() > 0 && sbMsg.charAt(sbMsg.length() - 1) == ',') {
|
||||
sbMsg.deleteCharAt(sbMsg.length() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!StrUtil.equals(this.modeMsgInfo, sb.toString())) {
|
||||
TextBxPage page = new TextBxPage(sb.toString());
|
||||
page.setForeground(Color.green);
|
||||
area.addPage(page);
|
||||
pf.addArea(area);
|
||||
this.screen.writeProgram(pf);
|
||||
this.modeMsgInfo = sb.toString();
|
||||
}
|
||||
|
||||
//设置动态区1报警信息
|
||||
List<String> errorDevices = this.getExtraDeviceCodes("errorDevices");
|
||||
StringBuilder sbMsg = new StringBuilder();
|
||||
if (CollectionUtil.isNotEmpty(errorDevices)) {
|
||||
sbMsg.append("报警信息: ");
|
||||
String errorMsg = "";
|
||||
for (int i = 0; i < errorDevices.size(); i++) {
|
||||
String deviceCode = errorDevices.get(i);
|
||||
Device device = deviceAppService.findDeviceByCode(deviceCode);
|
||||
if (device != null && device.getDeviceDriver() instanceof AppearanceInspectionScannerConveyorDeviceDriver) {
|
||||
AppearanceInspectionScannerConveyorDeviceDriver appearanceInspectionScannerConveyorDeviceDriver = (AppearanceInspectionScannerConveyorDeviceDriver) device.getDeviceDriver();
|
||||
if (appearanceInspectionScannerConveyorDeviceDriver.getError() > 0) {
|
||||
String label = ErrorEnum.getLabel(appearanceInspectionScannerConveyorDeviceDriver.getError());
|
||||
errorMsg = "设备" + deviceCode + " " + label + ",";
|
||||
}
|
||||
} else if (device != null && device.getDeviceDriver() instanceof StandardStackerDeviceDriver) {
|
||||
StandardStackerDeviceDriver standardStackerDeviceDriver = (StandardStackerDeviceDriver) device.getDeviceDriver();
|
||||
if (standardStackerDeviceDriver.getFront_Zerror() > 0 || standardStackerDeviceDriver.getBack_Zerror() > 0) {
|
||||
errorMsg = deviceCode + " ";
|
||||
if (standardStackerDeviceDriver.getFront_Zerror() > 0) {
|
||||
errorMsg = "设备" + deviceCode + " 前叉报警 " + org.nl.acs.device.driver.stacker.double_stacker.enums.ErrorEnum.getDesc(standardStackerDeviceDriver.getFront_Zerror()) + ",";
|
||||
}
|
||||
if (standardStackerDeviceDriver.getBack_Zerror() > 0) {
|
||||
errorMsg = "设备" + deviceCode + " 后叉报警 " + org.nl.acs.device.driver.stacker.double_stacker.enums.ErrorEnum.getDesc(standardStackerDeviceDriver.getFront_Zerror()) + ",";
|
||||
if (!StrUtil.equals(this.errorMsgInfo, sbMsg.toString())) {
|
||||
DynamicBxAreaRule rule_2 = new DynamicBxAreaRule();
|
||||
rule_2.setId(0);
|
||||
rule_2.setRunMode((byte) 0);
|
||||
rule_2.setRelativeAllPrograms(false);
|
||||
rule_2.addRelativeProgram(0);
|
||||
DynamicBxArea area_2 = new DynamicBxArea(0, 22, 192, 22, screen.getProfile());
|
||||
TextBxPage page_2 = new TextBxPage(sbMsg.toString());
|
||||
boolean flag = getStringWidth(sbMsg.toString());
|
||||
if (flag) {
|
||||
page_2.setDisplayStyle(styles[1]);
|
||||
} else {
|
||||
page_2.setDisplayStyle(styles[4]);
|
||||
}
|
||||
page_2.setFont(new Font("Microsoft YaHei", Font.PLAIN, 12));
|
||||
page_2.setForeground(Color.green);
|
||||
page_2.setLineHeight(12);
|
||||
area_2.addPage(page_2);
|
||||
this.screen.writeDynamic(rule_2, area_2);
|
||||
this.errorMsgInfo = sbMsg.toString();
|
||||
}
|
||||
//设置动态区2任务信息
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
sb2.append("任务信息: ");
|
||||
List<String> startDevices = this.getExtraDeviceCodes("startDevices");
|
||||
if (CollectionUtil.isNotEmpty(startDevices)) {
|
||||
for (int i = 0; i < startDevices.size(); i++) {
|
||||
String start_device_code = startDevices.get(i);
|
||||
List<TaskDto> taskDtos = taskService.findTasksByStartCode(start_device_code);
|
||||
if (ObjectUtil.isNotEmpty(taskDtos)) {
|
||||
for (TaskDto taskDto : taskDtos) {
|
||||
sb2.append("载具" + taskDto.getVehicle_code() + "由" + taskDto.getStart_point_code() + "->" + taskDto.getNext_point_code() + ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StrUtil.isEmpty(errorMsg)) {
|
||||
sbMsg.append("无报警!");
|
||||
} else {
|
||||
sbMsg.append(errorMsg);
|
||||
if (sbMsg.length() > 0 && sbMsg.charAt(sbMsg.length() - 1) == ',') {
|
||||
sbMsg.deleteCharAt(sbMsg.length() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!StrUtil.equals(this.errorMsgInfo, sbMsg.toString())) {
|
||||
DynamicBxAreaRule rule_2 = new DynamicBxAreaRule();
|
||||
rule_2.setId(0);
|
||||
rule_2.setRunMode((byte) 0);
|
||||
rule_2.setRelativeAllPrograms(false);
|
||||
rule_2.addRelativeProgram(0);
|
||||
DynamicBxArea area_2 = new DynamicBxArea(0, 22, 192, 22, screen.getProfile());
|
||||
TextBxPage page_2 = new TextBxPage(sbMsg.toString());
|
||||
boolean flag = getStringWidth(sbMsg.toString());
|
||||
if (flag) {
|
||||
page_2.setDisplayStyle(styles[1]);
|
||||
} else {
|
||||
page_2.setDisplayStyle(styles[4]);
|
||||
}
|
||||
page_2.setFont(new Font("Microsoft YaHei", Font.PLAIN, 12));
|
||||
page_2.setForeground(Color.green);
|
||||
page_2.setLineHeight(12);
|
||||
area_2.addPage(page_2);
|
||||
this.screen.writeDynamic(rule_2, area_2);
|
||||
this.errorMsgInfo = sbMsg.toString();
|
||||
}
|
||||
|
||||
//设置动态区2任务信息
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
sb2.append("任务信息: ");
|
||||
List<String> startDevices = this.getExtraDeviceCodes("startDevices");
|
||||
if (CollectionUtil.isNotEmpty(startDevices)) {
|
||||
for (int i = 0; i < startDevices.size(); i++) {
|
||||
String start_device_code = startDevices.get(i);
|
||||
List<TaskDto> taskDtos = taskService.findTasksByStartCode(start_device_code);
|
||||
if (ObjectUtil.isNotEmpty(taskDtos)) {
|
||||
for (TaskDto taskDto : taskDtos) {
|
||||
sb2.append("载具" + taskDto.getVehicle_code() + "由" + taskDto.getStart_point_code() + "->" + taskDto.getNext_point_code() + ",");
|
||||
List<String> nextDevices = this.getExtraDeviceCodes("nextDevices");
|
||||
if (CollectionUtil.isNotEmpty(nextDevices)) {
|
||||
for (int i = 0; i < nextDevices.size(); i++) {
|
||||
String next_device_code = nextDevices.get(i);
|
||||
List<TaskDto> taskDtos = taskService.findTasksByNextCode(next_device_code);
|
||||
if (ObjectUtil.isNotEmpty(taskDtos)) {
|
||||
for (TaskDto taskDto : taskDtos) {
|
||||
sb2.append("载具" + taskDto.getVehicle_code() + "由" + taskDto.getStart_point_code() + "->" + taskDto.getNext_point_code() + ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
List<String> nextDevices = this.getExtraDeviceCodes("nextDevices");
|
||||
if (CollectionUtil.isNotEmpty(nextDevices)) {
|
||||
for (int i = 0; i < nextDevices.size(); i++) {
|
||||
String next_device_code = nextDevices.get(i);
|
||||
List<TaskDto> taskDtos = taskService.findTasksByNextCode(next_device_code);
|
||||
if (ObjectUtil.isNotEmpty(taskDtos)) {
|
||||
for (TaskDto taskDto : taskDtos) {
|
||||
sb2.append("载具" + taskDto.getVehicle_code() + "由" + taskDto.getStart_point_code() + "->" + taskDto.getNext_point_code() + ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sb2.length() > 0 && sb2.charAt(sb2.length() - 1) == ',') {
|
||||
sb2.deleteCharAt(sb2.length() - 1);
|
||||
} else {
|
||||
sb2.append("无任务!");
|
||||
}
|
||||
if (!StrUtil.equals(this.taskMsgInfo, sb2.toString())) {
|
||||
DynamicBxAreaRule rule = new DynamicBxAreaRule();
|
||||
rule.setId(1);
|
||||
rule.setRunMode((byte) 0);
|
||||
rule.setRelativeAllPrograms(false);
|
||||
rule.addRelativeProgram(0);
|
||||
DynamicBxArea dArea = new DynamicBxArea(0, 37, 192, 37, screen.getProfile());
|
||||
TextBxPage dPage = new TextBxPage(sb2.toString());
|
||||
boolean flag = getStringWidth(sb2.toString());
|
||||
if (flag) {
|
||||
dPage.setDisplayStyle(styles[1]);
|
||||
if (sb2.length() > 0 && sb2.charAt(sb2.length() - 1) == ',') {
|
||||
sb2.deleteCharAt(sb2.length() - 1);
|
||||
} else {
|
||||
dPage.setDisplayStyle(styles[4]);
|
||||
sb2.append("无任务!");
|
||||
}
|
||||
if (!StrUtil.equals(this.taskMsgInfo, sb2.toString())) {
|
||||
DynamicBxAreaRule rule = new DynamicBxAreaRule();
|
||||
rule.setId(1);
|
||||
rule.setRunMode((byte) 0);
|
||||
rule.setRelativeAllPrograms(false);
|
||||
rule.addRelativeProgram(0);
|
||||
DynamicBxArea dArea = new DynamicBxArea(0, 37, 192, 37, screen.getProfile());
|
||||
TextBxPage dPage = new TextBxPage(sb2.toString());
|
||||
boolean flag = getStringWidth(sb2.toString());
|
||||
if (flag) {
|
||||
dPage.setDisplayStyle(styles[1]);
|
||||
} else {
|
||||
dPage.setDisplayStyle(styles[4]);
|
||||
}
|
||||
dPage.setFont(new Font("Microsoft YaHei", Font.PLAIN, 12));
|
||||
dPage.setForeground(Color.green);
|
||||
dPage.setLineHeight(12);
|
||||
dArea.addPage(dPage);
|
||||
screen.writeDynamic(rule, dArea);
|
||||
this.taskMsgInfo = sb2.toString();
|
||||
}
|
||||
dPage.setFont(new Font("Microsoft YaHei", Font.PLAIN, 12));
|
||||
dPage.setForeground(Color.green);
|
||||
dPage.setLineHeight(12);
|
||||
dArea.addPage(dPage);
|
||||
screen.writeDynamic(rule, dArea);
|
||||
this.taskMsgInfo = sb2.toString();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
if (this.screen != null) {
|
||||
this.screen.disconnect();
|
||||
System.out.println(this.getDevice().getDevice_code() + "关闭Screen连接!");
|
||||
Thread.sleep(60000);
|
||||
}
|
||||
}
|
||||
Integer upTime = Optional.ofNullable(this.getDevice().getExtraValue().get("upTime")).map(Object::toString).map(Integer::parseInt).orElse(60);
|
||||
Thread.sleep(upTime * 1000);
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
||||
|
||||
@@ -1469,6 +1469,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
if (CollectionUtil.isNotEmpty(frontInsts)) {
|
||||
frontInst = frontInsts.get(0);
|
||||
if (ObjectUtil.isNotEmpty(frontInst)) {
|
||||
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第一次查询到前叉指令号:" + frontInst.getInstruction_code()));
|
||||
String front_start_device_code = frontInst.getStart_device_code();
|
||||
front_start_device = deviceAppService.findDeviceByCode(front_start_device_code);
|
||||
if (front_start_device != null) {
|
||||
@@ -1503,6 +1504,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
if (ObjectUtil.isNotEmpty(inst)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第二次查询到前叉指令号:" + frontInst.getInstruction_code()));
|
||||
if (frontInst.getTo_y() != null && (1 == Integer.parseInt(frontInst.getTo_y()) || 2 == Integer.parseInt(frontInst.getTo_y()))) {
|
||||
frontInst = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1511,6 +1517,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
if (CollectionUtil.isNotEmpty(frontInsts)) {
|
||||
frontInst = frontInsts.get(0);
|
||||
if (ObjectUtil.isNotEmpty(frontInst)) {
|
||||
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第三次查询到前叉指令号:" + frontInst.getInstruction_code()));
|
||||
String front_start_device_code = frontInst.getStart_device_code();
|
||||
front_start_device = deviceAppService.findDeviceByCode(front_start_device_code);
|
||||
if (front_start_device != null) {
|
||||
@@ -1544,6 +1551,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
if (ObjectUtil.isNotEmpty(inst)) {
|
||||
return;
|
||||
}
|
||||
}else {
|
||||
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第四次查询到前叉指令号:" + frontInst.getInstruction_code()));
|
||||
if (frontInst.getTo_y() != null && (1 == Integer.parseInt(frontInst.getTo_y()) || 2 == Integer.parseInt(frontInst.getTo_y()))) {
|
||||
frontInst = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1972,7 +1984,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
} else if (StrUtil.equals(back_start_device_code, back_device_code)) {
|
||||
Boolean frontIsFront = Optional.ofNullable(front_device.getExtraValue().get("isFront")).map(Object::toString).map(Boolean::parseBoolean).orElse(false);
|
||||
Boolean backIsFront = Optional.ofNullable(back_device.getExtraValue().get("isFront")).map(Object::toString).map(Boolean::parseBoolean).orElse(false);
|
||||
if (frontIsFront && !backIsFront){
|
||||
if (frontIsFront && !backIsFront) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -2049,7 +2061,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
} else if (StrUtil.equals(back_next_device_code, back_device_code)) {
|
||||
Boolean frontIsFront = Optional.ofNullable(front_device.getExtraValue().get("isFront")).map(Object::toString).map(Boolean::parseBoolean).orElse(false);
|
||||
Boolean backIsFront = Optional.ofNullable(back_device.getExtraValue().get("isFront")).map(Object::toString).map(Boolean::parseBoolean).orElse(false);
|
||||
if (frontIsFront && !backIsFront){
|
||||
if (frontIsFront && !backIsFront) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -13,7 +13,7 @@ import lombok.Getter;
|
||||
public enum ErrorEnum {
|
||||
NO(0, "无故障"),
|
||||
ERROR_1(1, "货位超限"),
|
||||
ERROR_2(2, "作业条件不满足"),
|
||||
ERROR_2(2, "堆垛机未停准"),
|
||||
ERROR_3(3, "与输送线通讯故障"),
|
||||
ERROR_4(4, "传送地址错误"),
|
||||
MR(5, "满入"),
|
||||
@@ -30,26 +30,26 @@ public enum ErrorEnum {
|
||||
ZD(16, "阻挡/浅货位有货"),
|
||||
ERROR_17(17, "烟感报警"),
|
||||
ERROR_18(18, "货叉数据出错"),
|
||||
ERROR_19(19, "货叉左右超限"),
|
||||
ERROR_20(20, "货叉货叉右报警"),
|
||||
ERROR_21(21, "货叉伸缩过头报警"),
|
||||
ERROR_19(19, "货叉左超限"),
|
||||
ERROR_20(20, "货叉右超限"),
|
||||
ERROR_21(21, "货叉伸叉受阻"),
|
||||
ERROR_22(22, "低位上升过头报警"),
|
||||
ERROR_23(23, "高位下降过头报警"),
|
||||
ERROR_24(24, "松绳报警"),
|
||||
ERROR_24(24, "松绳保护"),
|
||||
ERROR_25(25, "急停触发"),
|
||||
ERROR_26(26, "安全门打开"),
|
||||
ERROR_27(27, "红外温感报警"),
|
||||
ERROR_28(28, "红外温感探测"),
|
||||
ERROR_29(29, "行走超时保护触发"),
|
||||
ERROR_27(27, "左红外温感报警"),
|
||||
ERROR_28(28, "右红外温感探测"),
|
||||
ERROR_29(29, "执行烟感探测"),
|
||||
ERROR_30(30, "放货完成确认超时"),
|
||||
ERROR_31(31, "对接设备不允许取/放货"),
|
||||
ERROR_32(32, "未探测到检测件"),
|
||||
ERROR_32(32, "未探测到检测柜"),
|
||||
ERROR_33(33, "行走超速度保护触发"),
|
||||
ERROR_34(34, "升降超速度保护触发"),
|
||||
ERROR_35(35, "减速开关信号异常"),
|
||||
ERROR_36(36, "防撞开关被触发"),
|
||||
ERROR_36(36, "防撞开关被触碰"),
|
||||
ERROR_37(37, "防撞激光被遮挡"),
|
||||
ERROR_38(38, "高货物禁止上楼承接位");
|
||||
ERROR_38(38, "高货物禁止放入矮库位");
|
||||
|
||||
private int code;
|
||||
private String desc;
|
||||
|
||||
@@ -368,7 +368,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
JSONObject data = new JSONObject();
|
||||
if (device != null && device.getDeviceDriver() instanceof AppearanceInspectionScannerConveyorDeviceDriver){
|
||||
AppearanceInspectionScannerConveyorDeviceDriver appearanceInspectionScannerConveyorDeviceDriver = (AppearanceInspectionScannerConveyorDeviceDriver) device.getDeviceDriver();
|
||||
data.put("weight",appearanceInspectionScannerConveyorDeviceDriver.getWeight());
|
||||
data.put("weight",appearanceInspectionScannerConveyorDeviceDriver.getWeight() * 1000);
|
||||
} else {
|
||||
throw new BadRequestException("设备不存在");
|
||||
}
|
||||
|
||||
@@ -106,11 +106,17 @@ public class UserController {
|
||||
// 解密,得到字符密码
|
||||
String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getString("oldPass"));
|
||||
String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getString("newPass"));
|
||||
SysUser user = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, SecurityUtils.getCurrentNickName()));
|
||||
if (!SaSecureUtil.md5BySalt(user.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(oldPass, "salt"))) {
|
||||
SysUser user = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, SecurityUtils.getCurrentUsername()));
|
||||
// if (!SaSecureUtil.md5BySalt(user.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(oldPass, "salt"))) {
|
||||
// throw new BadRequestException(LangProcess.msg("login_pwdWrong_1"));
|
||||
// }
|
||||
// if (!SaSecureUtil.md5BySalt(user.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(newPass, "salt"))) {
|
||||
// throw new BadRequestException(LangProcess.msg("login_pwdWrong_2"));
|
||||
// }
|
||||
if (!user.getPassword().equals(SaSecureUtil.md5BySalt(oldPass, "salt"))) {
|
||||
throw new BadRequestException(LangProcess.msg("login_pwdWrong_1"));
|
||||
}
|
||||
if (!SaSecureUtil.md5BySalt(user.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(newPass, "salt"))) {
|
||||
if (user.getPassword().equals(SaSecureUtil.md5BySalt(newPass, "salt"))) {
|
||||
throw new BadRequestException(LangProcess.msg("login_pwdWrong_2"));
|
||||
}
|
||||
user.setPassword(SaSecureUtil.md5BySalt(newPass, "salt"));
|
||||
|
||||
Reference in New Issue
Block a user