Browse Source

rev:优化报警代码、修改密码报错

master
gengby 4 weeks ago
parent
commit
010c8eea23
  1. 4
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/conveyor/appearance_inspection_scannner_conveyor/AppearanceInspectionScannerConveyorDeviceDriver.java
  2. 281
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/screen/led_screen/LedScreenDeviceDriver.java
  3. 16
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/stacker/double_stacker/StandardStackerDeviceDriver.java
  4. 22
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/stacker/double_stacker/enums/ErrorEnum.java
  5. 2
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java
  6. 12
      nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/UserController.java

4
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/conveyor/appearance_inspection_scannner_conveyor/AppearanceInspectionScannerConveyorDeviceDriver.java

@ -315,6 +315,10 @@ public class AppearanceInspectionScannerConveyorDeviceDriver extends AbstractOpc
if (scanApplyFlag) { if (scanApplyFlag) {
this.message = "正在执行申请AGV任务"; this.message = "正在执行申请AGV任务";
this.applyAgvTask(); 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) { } else if (this.mode == AppModeEnum.MODE_8.getCode() && this.move > 0 && StrUtil.isNotEmpty(this.barcode) && !requireSuccess) {
this.message = "正在获取外形检测高度"; this.message = "正在获取外形检测高度";

281
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/screen/led_screen/LedScreenDeviceDriver.java

@ -66,164 +66,169 @@ public class LedScreenDeviceDriver extends AbstractDeviceDriver implements Devic
@Override @Override
public void execute() throws Exception { public void execute() throws Exception {
if (isInitialized.compareAndSet(false, true)) { try {
Bx6GEnv.initial(30000); 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;
} }
this.screen = new Bx6GScreenClient(this.getDevice().getDevice_code(), new Bx6E()); //建立连接
this.screen.connect(ip, port); 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) {
DisplayStyle[] styles = DisplayStyleFactory.getStyles().toArray(new DisplayStyle[0]); return;
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("出库模式");
} }
this.screen = new Bx6GScreenClient(this.getDevice().getDevice_code(), new Bx6E());
this.screen.connect(ip, port);
} }
} //设置节目
if (!StrUtil.equals(this.modeMsgInfo, sb.toString())) { DisplayStyle[] styles = DisplayStyleFactory.getStyles().toArray(new DisplayStyle[0]);
TextBxPage page = new TextBxPage(sb.toString()); ProgramBxFile pf = new ProgramBxFile(0, this.screen.getProfile());
page.setForeground(Color.green); TextCaptionBxArea area = new TextCaptionBxArea(0, 0, 192, 16, this.screen.getProfile());
area.addPage(page); StringBuilder sb = new StringBuilder();
pf.addArea(area); //判断是否关联出入库模式
this.screen.writeProgram(pf); boolean inOutFlag = Optional.ofNullable(this.getDevice().getExtraValue().get("inOut")).map(Object::toString).map(Boolean::parseBoolean).orElse(false);
this.modeMsgInfo = sb.toString(); if (!inOutFlag) {
} String inOutMode = Optional.ofNullable(this.getDevice().getExtraValue().get("inOutMode")).map(Object::toString).orElse("");
sb.append(inOutMode);
//设置动态区1报警信息 } else {
List<String> errorDevices = this.getExtraDeviceCodes("errorDevices"); String linkSSX = Optional.ofNullable(this.getDevice().getExtraValue().get("linkSSX")).map(Object::toString).orElse(null);
StringBuilder sbMsg = new StringBuilder(); Device device = deviceAppService.findDeviceByCode(linkSSX);
if (CollectionUtil.isNotEmpty(errorDevices)) { if (device != null && device.getDeviceDriver() instanceof StripConveyorDeviceDriver) {
sbMsg.append("报警信息: "); StripConveyorDeviceDriver stripConveyorDeviceDriver = (StripConveyorDeviceDriver) device.getDeviceDriver();
String errorMsg = ""; if (stripConveyorDeviceDriver.getInOutMode() == 0) {
for (int i = 0; i < errorDevices.size(); i++) { sb.append("入库模式");
String deviceCode = errorDevices.get(i); } else {
Device device = deviceAppService.findDeviceByCode(deviceCode); sb.append("出库模式");
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) { if (!StrUtil.equals(this.modeMsgInfo, sb.toString())) {
errorMsg = deviceCode + " "; TextBxPage page = new TextBxPage(sb.toString());
if (standardStackerDeviceDriver.getFront_Zerror() > 0) { page.setForeground(Color.green);
errorMsg = "设备" + deviceCode + " 前叉报警 " + org.nl.acs.device.driver.stacker.double_stacker.enums.ErrorEnum.getDesc(standardStackerDeviceDriver.getFront_Zerror()) + ","; 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 + ",";
} }
if (standardStackerDeviceDriver.getBack_Zerror() > 0) { } else if (device != null && device.getDeviceDriver() instanceof StandardStackerDeviceDriver) {
errorMsg = "设备" + deviceCode + " 后叉报警 " + org.nl.acs.device.driver.stacker.double_stacker.enums.ErrorEnum.getDesc(standardStackerDeviceDriver.getFront_Zerror()) + ","; 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)) {
if (StrUtil.isEmpty(errorMsg)) { sbMsg.append("无报警!");
sbMsg.append("无报警!"); } else {
} else { sbMsg.append(errorMsg);
sbMsg.append(errorMsg); if (sbMsg.length() > 0 && sbMsg.charAt(sbMsg.length() - 1) == ',') {
if (sbMsg.length() > 0 && sbMsg.charAt(sbMsg.length() - 1) == ',') { sbMsg.deleteCharAt(sbMsg.length() - 1);
sbMsg.deleteCharAt(sbMsg.length() - 1); }
} }
} }
} if (!StrUtil.equals(this.errorMsgInfo, sbMsg.toString())) {
if (!StrUtil.equals(this.errorMsgInfo, sbMsg.toString())) { DynamicBxAreaRule rule_2 = new DynamicBxAreaRule();
DynamicBxAreaRule rule_2 = new DynamicBxAreaRule(); rule_2.setId(0);
rule_2.setId(0); rule_2.setRunMode((byte) 0);
rule_2.setRunMode((byte) 0); rule_2.setRelativeAllPrograms(false);
rule_2.setRelativeAllPrograms(false); rule_2.addRelativeProgram(0);
rule_2.addRelativeProgram(0); DynamicBxArea area_2 = new DynamicBxArea(0, 22, 192, 22, screen.getProfile());
DynamicBxArea area_2 = new DynamicBxArea(0, 22, 192, 22, screen.getProfile()); TextBxPage page_2 = new TextBxPage(sbMsg.toString());
TextBxPage page_2 = new TextBxPage(sbMsg.toString()); boolean flag = getStringWidth(sbMsg.toString());
boolean flag = getStringWidth(sbMsg.toString()); if (flag) {
if (flag) { page_2.setDisplayStyle(styles[1]);
page_2.setDisplayStyle(styles[1]); } else {
} else { page_2.setDisplayStyle(styles[4]);
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();
} }
page_2.setFont(new Font("Microsoft YaHei", Font.PLAIN, 12)); //设置动态区2任务信息
page_2.setForeground(Color.green); StringBuilder sb2 = new StringBuilder();
page_2.setLineHeight(12); sb2.append("任务信息: ");
area_2.addPage(page_2); List<String> startDevices = this.getExtraDeviceCodes("startDevices");
this.screen.writeDynamic(rule_2, area_2); if (CollectionUtil.isNotEmpty(startDevices)) {
this.errorMsgInfo = sbMsg.toString(); for (int i = 0; i < startDevices.size(); i++) {
} String start_device_code = startDevices.get(i);
List<TaskDto> taskDtos = taskService.findTasksByStartCode(start_device_code);
//设置动态区2任务信息 if (ObjectUtil.isNotEmpty(taskDtos)) {
StringBuilder sb2 = new StringBuilder(); for (TaskDto taskDto : taskDtos) {
sb2.append("任务信息: "); sb2.append("载具" + taskDto.getVehicle_code() + "由" + taskDto.getStart_point_code() + "->" + taskDto.getNext_point_code() + ",");
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");
List<String> nextDevices = this.getExtraDeviceCodes("nextDevices"); if (CollectionUtil.isNotEmpty(nextDevices)) {
if (CollectionUtil.isNotEmpty(nextDevices)) { for (int i = 0; i < nextDevices.size(); i++) {
for (int i = 0; i < nextDevices.size(); i++) { String next_device_code = nextDevices.get(i);
String next_device_code = nextDevices.get(i); List<TaskDto> taskDtos = taskService.findTasksByNextCode(next_device_code);
List<TaskDto> taskDtos = taskService.findTasksByNextCode(next_device_code); if (ObjectUtil.isNotEmpty(taskDtos)) {
if (ObjectUtil.isNotEmpty(taskDtos)) { for (TaskDto taskDto : taskDtos) {
for (TaskDto taskDto : taskDtos) { sb2.append("载具" + taskDto.getVehicle_code() + "由" + taskDto.getStart_point_code() + "->" + taskDto.getNext_point_code() + ",");
sb2.append("载具" + taskDto.getVehicle_code() + "由" + taskDto.getStart_point_code() + "->" + taskDto.getNext_point_code() + ","); }
} }
} }
} }
} if (sb2.length() > 0 && sb2.charAt(sb2.length() - 1) == ',') {
if (sb2.length() > 0 && sb2.charAt(sb2.length() - 1) == ',') { sb2.deleteCharAt(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]);
} else { } 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); Integer upTime = Optional.ofNullable(this.getDevice().getExtraValue().get("upTime")).map(Object::toString).map(Integer::parseInt).orElse(60);
Thread.sleep(upTime * 1000); Thread.sleep(upTime * 1000);
Runtime.getRuntime().addShutdownHook(new Thread(() -> { Runtime.getRuntime().addShutdownHook(new Thread(() -> {

16
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/stacker/double_stacker/StandardStackerDeviceDriver.java

@ -1469,6 +1469,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
if (CollectionUtil.isNotEmpty(frontInsts)) { if (CollectionUtil.isNotEmpty(frontInsts)) {
frontInst = frontInsts.get(0); frontInst = frontInsts.get(0);
if (ObjectUtil.isNotEmpty(frontInst)) { if (ObjectUtil.isNotEmpty(frontInst)) {
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第一次查询到前叉指令号:" + frontInst.getInstruction_code()));
String front_start_device_code = frontInst.getStart_device_code(); String front_start_device_code = frontInst.getStart_device_code();
front_start_device = deviceAppService.findDeviceByCode(front_start_device_code); front_start_device = deviceAppService.findDeviceByCode(front_start_device_code);
if (front_start_device != null) { if (front_start_device != null) {
@ -1503,6 +1504,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
if (ObjectUtil.isNotEmpty(inst)) { if (ObjectUtil.isNotEmpty(inst)) {
return; 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)) { if (CollectionUtil.isNotEmpty(frontInsts)) {
frontInst = frontInsts.get(0); frontInst = frontInsts.get(0);
if (ObjectUtil.isNotEmpty(frontInst)) { if (ObjectUtil.isNotEmpty(frontInst)) {
logService.deviceExecuteLog(new LuceneLogDto(this.currentDeviceCode, "第三次查询到前叉指令号:" + frontInst.getInstruction_code()));
String front_start_device_code = frontInst.getStart_device_code(); String front_start_device_code = frontInst.getStart_device_code();
front_start_device = deviceAppService.findDeviceByCode(front_start_device_code); front_start_device = deviceAppService.findDeviceByCode(front_start_device_code);
if (front_start_device != null) { if (front_start_device != null) {
@ -1544,6 +1551,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
if (ObjectUtil.isNotEmpty(inst)) { if (ObjectUtil.isNotEmpty(inst)) {
return; 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)) { } 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 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); 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 true;
} }
return false; return false;
@ -2049,7 +2061,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
} else if (StrUtil.equals(back_next_device_code, back_device_code)) { } 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 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); 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 true;
} }
return false; return false;

22
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/stacker/double_stacker/enums/ErrorEnum.java

@ -13,7 +13,7 @@ import lombok.Getter;
public enum ErrorEnum { public enum ErrorEnum {
NO(0, "无故障"), NO(0, "无故障"),
ERROR_1(1, "货位超限"), ERROR_1(1, "货位超限"),
ERROR_2(2, "作业条件不满足"), ERROR_2(2, "堆垛机未停准"),
ERROR_3(3, "与输送线通讯故障"), ERROR_3(3, "与输送线通讯故障"),
ERROR_4(4, "传送地址错误"), ERROR_4(4, "传送地址错误"),
MR(5, "满入"), MR(5, "满入"),
@ -30,26 +30,26 @@ public enum ErrorEnum {
ZD(16, "阻挡/浅货位有货"), ZD(16, "阻挡/浅货位有货"),
ERROR_17(17, "烟感报警"), ERROR_17(17, "烟感报警"),
ERROR_18(18, "货叉数据出错"), ERROR_18(18, "货叉数据出错"),
ERROR_19(19, "货叉左超限"), ERROR_19(19, "货叉左超限"),
ERROR_20(20, "货叉货叉右报警"), ERROR_20(20, "货叉右超限"),
ERROR_21(21, "货叉伸缩过头报警"), ERROR_21(21, "货叉伸叉受阻"),
ERROR_22(22, "低位上升过头报警"), ERROR_22(22, "低位上升过头报警"),
ERROR_23(23, "高位下降过头报警"), ERROR_23(23, "高位下降过头报警"),
ERROR_24(24, "松绳报警"), ERROR_24(24, "松绳保护"),
ERROR_25(25, "急停触发"), ERROR_25(25, "急停触发"),
ERROR_26(26, "安全门打开"), ERROR_26(26, "安全门打开"),
ERROR_27(27, "红外温感报警"), ERROR_27(27, "红外温感报警"),
ERROR_28(28, "红外温感探测"), ERROR_28(28, "红外温感探测"),
ERROR_29(29, "行走超时保护触发"), ERROR_29(29, "执行烟感探测"),
ERROR_30(30, "放货完成确认超时"), ERROR_30(30, "放货完成确认超时"),
ERROR_31(31, "对接设备不允许取/放货"), ERROR_31(31, "对接设备不允许取/放货"),
ERROR_32(32, "未探测到检测"), ERROR_32(32, "未探测到检测"),
ERROR_33(33, "行走超速度保护触发"), ERROR_33(33, "行走超速度保护触发"),
ERROR_34(34, "升降超速度保护触发"), ERROR_34(34, "升降超速度保护触发"),
ERROR_35(35, "减速开关信号异常"), ERROR_35(35, "减速开关信号异常"),
ERROR_36(36, "防撞开关被触"), ERROR_36(36, "防撞开关被触"),
ERROR_37(37, "防撞激光被遮挡"), ERROR_37(37, "防撞激光被遮挡"),
ERROR_38(38, "高货物禁止上楼承接位"); ERROR_38(38, "高货物禁止放入矮库位");
private int code; private int code;
private String desc; private String desc;

2
nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -368,7 +368,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
if (device != null && device.getDeviceDriver() instanceof AppearanceInspectionScannerConveyorDeviceDriver){ if (device != null && device.getDeviceDriver() instanceof AppearanceInspectionScannerConveyorDeviceDriver){
AppearanceInspectionScannerConveyorDeviceDriver appearanceInspectionScannerConveyorDeviceDriver = (AppearanceInspectionScannerConveyorDeviceDriver) device.getDeviceDriver(); AppearanceInspectionScannerConveyorDeviceDriver appearanceInspectionScannerConveyorDeviceDriver = (AppearanceInspectionScannerConveyorDeviceDriver) device.getDeviceDriver();
data.put("weight",appearanceInspectionScannerConveyorDeviceDriver.getWeight()); data.put("weight",appearanceInspectionScannerConveyorDeviceDriver.getWeight() * 1000);
} else { } else {
throw new BadRequestException("设备不存在"); throw new BadRequestException("设备不存在");
} }

12
nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/UserController.java

@ -106,11 +106,17 @@ public class UserController {
// 解密,得到字符密码 // 解密,得到字符密码
String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getString("oldPass")); String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getString("oldPass"));
String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getString("newPass")); String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getString("newPass"));
SysUser user = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, SecurityUtils.getCurrentNickName())); SysUser user = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, SecurityUtils.getCurrentUsername()));
if (!SaSecureUtil.md5BySalt(user.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(oldPass, "salt"))) { // 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")); 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")); throw new BadRequestException(LangProcess.msg("login_pwdWrong_2"));
} }
user.setPassword(SaSecureUtil.md5BySalt(newPass, "salt")); user.setPassword(SaSecureUtil.md5BySalt(newPass, "salt"));

Loading…
Cancel
Save