diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java index fd45d1f..b527e33 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java @@ -196,7 +196,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { } //进入区域 else if (phase == 0x50) { //开门 - if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { + if (device!=null&&device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); standardAutodoorDeviceDriver.OpenOrClose("1"); if (standardAutodoorDeviceDriver.getAction() == 1) { @@ -208,7 +208,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { //离开区域 else if (phase == 0x51) { //关门 - if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { + if (device!=null&&device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); standardAutodoorDeviceDriver.OpenOrClose("2"); if (standardAutodoorDeviceDriver.getAction() == 2) { diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java index ac76667..8e4d53e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java @@ -210,10 +210,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { map.put("next_height",schBaseTask.getPoint_code2_height()); result.setParameters(map); } catch (Exception e) { - String message = ObjectUtil.isEmpty(e.getMessage()) - ? ((InvocationTargetException) e).getTargetException().getMessage() - : e.getMessage(); - log.error("ACS请求LMS出现错误: {}", message); + String message = e.getMessage(); + log.error("ACS请求LMS出现错误: {}{}", e.getMessage(),e); result.setCode(HttpStatus.HTTP_BAD_REQUEST); result.setMessage(message); result.setRequestNo(requestNo); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java index 897b479..8acddc6 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java @@ -110,7 +110,7 @@ public class TBXBKJTask extends AbstractTask { String regionCode = null; if ("TBX1".equals(startPoint.getRegion_code())) { //TBX1找A区 - regionCode = "HCQ1"; + regionCode = "HCQ3"; } else if ("TBX2".equals(startPoint.getRegion_code())) { //TBX2找B区 @@ -158,6 +158,11 @@ public class TBXBKJTask extends AbstractTask { taskObj.setRemark("任务完成"); } if (status.equals(TaskStatus.CANCELED)) { // 取消 + // 起点解锁 + if (ObjectUtil.isNotEmpty(startPointObj)) { + startPointObj.setIng_task_code(""); + pointService.update(endPointObj); + } // 终点解锁 if (ObjectUtil.isNotEmpty(endPointObj)) { endPointObj.setIng_task_code(""); @@ -186,10 +191,10 @@ public class TBXBKJTask extends AbstractTask { .eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code2())); SchBasePoint point = this.findNextPoint(startPoint); schBaseTask.setPoint_code1(point.getPoint_code()); - //重算点位时把点位占用,防止发起重复任务 - point.setIng_task_code(schBaseTask.getTask_code()); - //空固化架区别于组盘,任务完成后再扣除库存 -// point.setVehicle_qty(point.getVehicle_qty() - 1); - pointService.update(point); +// //重算点位时把点位占用,防止发起重复任务 +// point.setIng_task_code(schBaseTask.getTask_code()); +// //空固化架区别于组盘,任务完成后再扣除库存 +//// point.setVehicle_qty(point.getVehicle_qty() - 1); +// pointService.update(point); } } \ No newline at end of file diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/XSCKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/XSCKTask.java index 7c3b686..02dcf7f 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/XSCKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/XSCKTask.java @@ -120,8 +120,12 @@ public class XSCKTask extends AbstractTask { String regionCode = null; String materialType = extGroupData.getString("material_type"); if ("XSQ1".equals(nextPoint.getRegion_code())) { - //XSQ1找A区 - regionCode = "HCQ1"; + //XSQ1找A区 边负极板HCQ01 负极板HCQ02 + if("3".equals(materialType)) { + regionCode = "HCQ1"; + }else if("2".equals(materialType)){ + regionCode = "HCQ2"; + } } else if ("XSQ2".equals(nextPoint.getRegion_code())) { //XSQ2找B区 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java index 7e02edd..e0c4d51 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java @@ -162,7 +162,7 @@ public class GHSQHTask extends AbstractTask { /** * 1.根据当前固化室所处区域,判断到哪个区的缓存位 - * 正极板到HCQ4,负极板到HCQ2,边负极板到HCQ3 + * 正极板到HCQ4,负极板到HCQ2,边负极板到HCQ1 * 2.从1010列到0101列倒叙判断当前列物料类型是否与起点一致且存在空位 * 3.将当前点位设置为目标点 * 4.如果没有符合条件的点位,跳过执行暂时等待 @@ -178,8 +178,8 @@ public class GHSQHTask extends AbstractTask { //负极板到缓存区2 regionCode = "HCQ2"; } else if ("3".equals(startPoint.getVehicle_type())) { - //边负极板到缓存区3 - regionCode = "HCQ3"; + //边负极板到缓存区1 + regionCode = "HCQ1"; } List schBasePointList = pointMapper.findPointByRegion(regionCode, "1"); for (int i = schBasePointList.size() - 1; i >= 0; i--) { diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java index 2fd4b78..b02cb4c 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java @@ -10,6 +10,7 @@ import org.nl.wms.sch.task.service.impl.SchBaseTaskServiceImpl; import org.nl.wms.sch.task_manage.enums.TaskFinishedTypeEnum; import org.nl.wms.sch.task_manage.task.core.TaskStatus; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.util.List; @@ -21,6 +22,7 @@ import java.util.function.Consumer; * @Date: 2023/6/13 */ @Component +@Lazy public class TaskUtils { @Autowired private ISchBaseTaskService taskService;