diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java index abaee69..e74f598 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java @@ -29,7 +29,7 @@ import java.util.Set; @RestController @Api(tags = "任务管理管理") @RequestMapping("/api/schBaseTask") - +@Lazy public class SchBaseTaskController { @Autowired diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java index 15914cc..a7c3216 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java @@ -29,6 +29,7 @@ import org.nl.wms.sch.task_manage.task.core.TaskStatus; import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper; import org.nl.wms.util.PointUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -44,6 +45,7 @@ import java.util.stream.Collectors; @Slf4j @Component @TaskType("BPSLTask") +@Lazy public class BPSLTask extends AbstractTask { private static String TASK_CONFIG_CODE = "BPSLTask"; /** @@ -95,8 +97,8 @@ public class BPSLTask extends AbstractTask { //发起任务时先把点位占用,防止发起重复任务 // point.setIng_task_code(task.getTask_code()); // point.setVehicle_qty(point.getVehicle_qty() - 1); - point.setVehicle_type(materialType); - pointService.update(point); +// point.setVehicle_type(materialType); +// pointService.update(point); //下发 this.renotifyAcs(task); @@ -231,5 +233,10 @@ public class BPSLTask extends AbstractTask { JSONObject jsonObject = JSONObject.parseObject(schBaseTask.getExt_group_data()); SchBasePoint point = this.findNextPoint(jsonObject); schBaseTask.setPoint_code1(point.getPoint_code()); + //重算点位时把点位占用 + point.setIng_task_code(schBaseTask.getTask_code()); +// point.setVehicle_qty(point.getVehicle_qty() - 1); +// point.setVehicle_type(materialType); + pointService.update(point); } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java index 8b534bb..3524407 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java @@ -28,6 +28,7 @@ import org.nl.wms.sch.task_manage.task.core.TaskStatus; import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper; import org.nl.wms.util.PointUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -43,6 +44,7 @@ import java.util.stream.Collectors; @Slf4j @Component @TaskType("KGHJRKTask") +@Lazy public class KGHJRKTask extends AbstractTask { private static String TASK_CONFIG_CODE = "KGHJRKTask"; /** 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 97845d5..897b479 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 @@ -28,6 +28,7 @@ import org.nl.wms.sch.task_manage.task.core.TaskStatus; import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper; import org.nl.wms.util.PointUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -43,6 +44,7 @@ import java.util.stream.Collectors; @Slf4j @Component @TaskType("TBXBKJTask") +@Lazy public class TBXBKJTask extends AbstractTask { private static String TASK_CONFIG_CODE = "TBXBKJTask"; /** @@ -95,12 +97,6 @@ public class TBXBKJTask extends AbstractTask { task.setRemark(""); taskService.update(task); - //发起任务时先把点位占用,防止发起重复任务 - point.setIng_task_code(task.getTask_code()); - //空固化架区别于组盘,任务完成后再扣除库存 -// point.setVehicle_qty(point.getVehicle_qty() - 1); - pointService.update(point); - //下发 this.renotifyAcs(task); } @@ -122,7 +118,7 @@ public class TBXBKJTask extends AbstractTask { } List schBasePointList = pointMapper.findPointByRegion(regionCode,"1"); for (SchBasePoint schBasePoint : schBasePointList) { - if (schBasePoint.getVehicle_qty() > 0) { + if (schBasePoint.getVehicle_qty() > 0&&ObjectUtil.isEmpty(schBasePoint.getIng_task_code())) { log.info("涂板线补空架找到当前符合条件的点位{}",schBasePoint.getPoint_code()); return schBasePoint; } @@ -190,5 +186,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); } } \ 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 d92d171..7c3b686 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 @@ -29,6 +29,7 @@ import org.nl.wms.sch.task_manage.task.core.TaskStatus; import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper; import org.nl.wms.util.PointUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -44,6 +45,7 @@ import java.util.stream.Collectors; @Slf4j @Component @TaskType("XSCKTask") +@Lazy public class XSCKTask extends AbstractTask { private static String TASK_CONFIG_CODE = "XSCKTask"; /** diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ZJBZKDDTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ZJBZKDDTask.java index c1306b5..0956a3e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ZJBZKDDTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ZJBZKDDTask.java @@ -28,6 +28,7 @@ import org.nl.wms.sch.task_manage.task.core.TaskStatus; import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper; import org.nl.wms.util.PointUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -43,6 +44,7 @@ import java.util.stream.Collectors; @Slf4j @Component @TaskType("ZJBZKDDTask") +@Lazy public class ZJBZKDDTask extends AbstractTask { private static String TASK_CONFIG_CODE = "ZJBZKDDTask"; /** diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSFMTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSFMTask.java index 34ae57f..1be7a9a 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSFMTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSFMTask.java @@ -34,6 +34,7 @@ import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper; import org.nl.wms.util.PointUtils; import org.nl.wms.util.TaskUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -49,6 +50,7 @@ import java.util.stream.Collectors; @Slf4j @Component @TaskType("GHSFMTask") +@Lazy public class GHSFMTask extends AbstractTask { private static String TASK_CONFIG_CODE = "GHSFMTask"; /** 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 0e84047..7e02edd 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 @@ -31,6 +31,7 @@ import org.nl.wms.sch.task_manage.task.core.TaskStatus; import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper; import org.nl.wms.util.PointUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -46,6 +47,7 @@ import java.util.stream.Collectors; @Slf4j @Component @TaskType("GHSQHTask") +@Lazy public class GHSQHTask extends AbstractTask { private static String TASK_CONFIG_CODE = "GHSQHTask"; /**