diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java index 510ddad..16d0336 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java @@ -123,6 +123,15 @@ public class PdaServiceImpl implements PdaService { } // 获取点位 SchBasePoint basePoint = pointService.getById(entity.getPoint_code()); + if (ObjectUtil.isEmpty(basePoint)) { + throw new BadRequestException("点位信息不存在!"); + } + if (!RegionEnum.ZP.getRegion_code().equals(basePoint.getRegion_code())) { + throw new BadRequestException("该点位不属于组盘区域!"); + } + if (ObjectUtil.isNotEmpty(basePoint.getVehicle_code()) && !StrUtil.equals(entity.getVehicle_code(), basePoint.getVehicle_code())) { + throw new BadRequestException("组盘信息中的载具编码和该点位记录的载具编码不一致!"); + } // 获取物料 MdBaseMaterial material = materialService.getById(entity.getMaterial_id()); SchBaseVehiclematerialgroup group = new SchBaseVehiclematerialgroup(); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/enums/PointTypeEnum.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/enums/PointTypeEnum.java new file mode 100644 index 0000000..2322295 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/enums/PointTypeEnum.java @@ -0,0 +1,25 @@ +package org.nl.wms.sch.task_manage.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @Author: lyd + * @Description: + * @Date: 2023/5/25 + */ +@Getter +@AllArgsConstructor +public enum PointTypeEnum { + /** + * 空托位 + */ + EMPTY_POINT("1", "空托位"), + /** + * 满托位 + */ + FULL_POINT("2", "满托位"); + + private final String code; + private final String label; +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/lmzb/LMZBQKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/lmzb/LMZBQKTask.java index cd8238e..ffa5c79 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/lmzb/LMZBQKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/lmzb/LMZBQKTask.java @@ -6,6 +6,7 @@ import org.nl.common.exception.BadRequestException; import org.nl.system.service.notice.ISysNoticeService; import org.nl.wms.sch.point.service.ISchBasePointService; import org.nl.wms.sch.point.service.dao.SchBasePoint; +import org.nl.wms.sch.region.service.RegionEnum; import org.nl.wms.sch.task.service.ISchBaseTaskService; import org.nl.wms.sch.task.service.ISchBaseTaskconfigService; import org.nl.wms.sch.task.service.dao.SchBaseTask; @@ -14,6 +15,7 @@ import org.nl.wms.sch.task_manage.AbstractTask; import org.nl.wms.sch.task_manage.GeneralDefinition; import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum; import org.nl.wms.sch.task_manage.enums.PointStatusEnum; +import org.nl.wms.sch.task_manage.enums.PointTypeEnum; import org.nl.wms.sch.task_manage.enums.TaskFinishedTypeEnum; import org.nl.wms.sch.task_manage.task.TaskType; import org.nl.wms.sch.task_manage.task.core.TaskStatus; @@ -98,7 +100,16 @@ public class LMZBQKTask extends AbstractTask { .eq(SchBasePoint::getIng_task_code, "")) .eq(SchBasePoint::getIs_used, true); List schBasePoints = pointService.list(lam); - return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null; + SchBasePoint start_point = schBasePoints.stream() + .filter(point -> RegionEnum.BCXKZB.getRegion_code().equals(point.getRegion_code())) + .filter(point -> PointTypeEnum.EMPTY_POINT.getCode().equals(point.getPoint_type())) + .findFirst() + .orElse(null); + if (ObjectUtil.isEmpty(start_point)) { + start_point = schBasePoints.stream().filter(point -> RegionEnum.KTPHC2.getRegion_code().equals(point.getRegion_code())) + .findFirst().orElse(null); + } + return ObjectUtil.isNotEmpty(start_point) ? start_point : null; } @Override diff --git a/lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml b/lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml index 907a16c..13f9ebb 100644 --- a/lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml +++ b/lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml @@ -18,7 +18,7 @@ https://juejin.cn/post/6844903775631572999 - + diff --git a/lms/nladmin-ui/public/favicon.ico b/lms/nladmin-ui/public/favicon.ico index 7675aa6..594b34a 100644 Binary files a/lms/nladmin-ui/public/favicon.ico and b/lms/nladmin-ui/public/favicon.ico differ diff --git a/lms/nladmin-ui/src/assets/images/logo.png b/lms/nladmin-ui/src/assets/images/logo.png index 7675aa6..0503a9a 100644 Binary files a/lms/nladmin-ui/src/assets/images/logo.png and b/lms/nladmin-ui/src/assets/images/logo.png differ diff --git a/lms/nladmin-ui/src/views/wms/basedata/vehicle/index.vue b/lms/nladmin-ui/src/views/wms/basedata/vehicle/index.vue index 3ca4369..2fcf390 100644 --- a/lms/nladmin-ui/src/views/wms/basedata/vehicle/index.vue +++ b/lms/nladmin-ui/src/views/wms/basedata/vehicle/index.vue @@ -44,43 +44,68 @@ - + + + 打印 + + - - - + + + - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + +