From 0dea91b5b31b8fad104e63d605edec491cf3b529 Mon Sep 17 00:00:00 2001 From: ludj Date: Wed, 14 Aug 2024 09:59:52 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E5=BA=93=E5=AD=98=E5=8C=BA=E6=BB=A1?= =?UTF-8?q?=E4=BA=86=E5=8F=AF=E4=BB=A5=E5=8E=BB=E7=A9=BA=E6=9E=B6=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/mes/domain/QPMES098RequestBody.java | 5 ++++ .../sch/task_manage/task/tasks/YCLCKTask.java | 4 +-- .../sch/task_manage/task/tasks/YCLRKTask.java | 25 +++++++++++++++++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestBody.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestBody.java index 419c396..e35f6b9 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestBody.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestBody.java @@ -35,6 +35,11 @@ public class QPMES098RequestBody { private String ZGG; private String ZGYTCL; private String FXXDM; + /** + * 1代表下达 + * 2代表关闭 + * 3代表删除 + */ private String ZSTAT; private String UEBTK; private String ZRSV01; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java index ca23c22..b66c648 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java @@ -82,9 +82,7 @@ public class YCLCKTask extends AbstractTask { protected void create() throws BadRequestException { // 获取任务 List tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY); - // 配置信息 - SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper() - .eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE)); + for (SchBaseTask task : tasks) { JSONObject jsonObject = JSONObject.parseObject(task.getExt_group_data()); String region; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java index 782c26b..b31f321 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java @@ -123,15 +123,36 @@ public class YCLRKTask extends AbstractTask { * @return */ private SchBasePoint findNextPoint(String sub_tray) { - String regionCode = "YL"; + //人工录入的子托盘号以YBHC开头 if(sub_tray.startsWith("YBHC")) { - regionCode = "YLHC"; + String regionCode = "YLHC"; + return getSchBasePoint(regionCode); + }else {//非人工录入子托盘 + //1、优先从原料库存区查找 + String regionCode = "YL"; + SchBasePoint point = getSchBasePoint(regionCode); + if (ObjectUtil.isNotEmpty(point)){ + return point; + }else {//2、原料库存区未找到,则去空架缓存区查找 + regionCode="KJHC"; + ;return getSchBasePoint(regionCode); + } } + + } + + /** + * 根据区域编码查找合适的点位 + * @param regionCode + * @return + */ + private SchBasePoint getSchBasePoint(String regionCode) { List schBasePointList = pointMapper.findPointByRegion(regionCode, "0"); for (SchBasePoint schBasePoint : schBasePointList) { if (schBasePoint.getIs_used() && schBasePoint.getVehicle_qty() ==0 &&ObjectUtil.isEmpty(schBasePoint.getIng_task_code())) { log.info("原材料入库找到当前符合条件的点位{}", schBasePoint.getPoint_code()); + return schBasePoint; } }