diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java index e1a03e7..14ddcca 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java @@ -40,7 +40,6 @@ public class LogMessageConstant { public final static String COLOR_RESET = "\u001B[0m"; /** 背景颜色:黄色 */ public final static String BACKGROUND_YELLOW = "\u001B[43m"; - /** 索引路径 */ public final static String INDEX_DIR = "E:\\lucene\\index"; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQKTask.java index 536504e..7769918 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQKTask.java @@ -102,6 +102,7 @@ public class FJQKTask extends AbstractTask { // todo: 未确认是否放在1还是2,目前规定四点任务空盘的载具编码是2 task.setRemark(""); task.setGroup_id(point.getGroup_id()); + task.setResponse_param(param.toJSONString()); taskService.updateById(task); // 父点位锁住 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java index 02b22a8..4e112b7 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java @@ -132,7 +132,7 @@ public class GZYQLTask extends AbstractTask { */ private SchBasePoint findStartPoint(List startRegionStr, JSONObject jsonObject) { // 无需工单 - // 默认认为缓存线有东西 + // 如果一个有货一个没货,但是载具数量又是5的时候,就要不需要检测不能为5 LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); lam.in(SchBasePoint::getRegion_code, startRegionStr) .eq(SchBasePoint::getPoint_type, GeneralDefinition.EXIT) // 点位类型是缓存输送线出口 @@ -140,9 +140,14 @@ public class GZYQLTask extends AbstractTask { .or() .eq(SchBasePoint::getIng_task_code, "")) .eq(SchBasePoint::getPoint_status, PointStatusEnum.EMPTY_VEHICLE.getCode()) - .eq(SchBasePoint::getIs_used, true) - .ne(SchBasePoint::getVehicle_qty, 5) - .orderByDesc(SchBasePoint::getVehicle_qty); // 每次都将载具数量+1,每次拿最大的 + .eq(SchBasePoint::getIs_used, true); + List list = pointService.list(lam); + boolean doDetection = true; // 如果只有一条符合的数据就不需要检验不符合5个托 + if (list.size() == 1) { + doDetection = false; + } + // 默认认为缓存线有东西 + lam.ne(doDetection, SchBasePoint::getVehicle_qty, 5).orderByDesc(SchBasePoint::getVehicle_qty); // 每次都将载具数量+1,每次拿最大的 List schBasePoints = pointService.list(lam); return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java index c38be0c..d15e170 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java @@ -186,8 +186,14 @@ public class YZSLTask extends AbstractTask { .and(la -> la.isNull(SchBasePoint::getIng_task_code) // 当前执行的任务为空或者NULL,有数据表示锁住 .or() .eq(SchBasePoint::getIng_task_code, "")) - .eq(SchBasePoint::getIs_used, true) - .ne(SchBasePoint::getVehicle_qty, 5) // 载具数量不能等于5 + .eq(SchBasePoint::getIs_used, true); + // 如果一个有货一个没货,但是载具数量又是5的时候,就要不需要检测不能为5 + List list = pointService.list(lam); + boolean doDetection = true; // 如果只有一条符合的数据就不需要检验不符合5个托 + if (list.size() == 1) { + doDetection = false; + } + lam.ne(doDetection, SchBasePoint::getVehicle_qty, 5) // 载具数量不能等于5 .orderByDesc(SchBasePoint::getVehicle_qty); List schBasePoints = pointService.list(lam); return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java index b722dad..24dd769 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java @@ -21,14 +21,15 @@ public class PointUtils { /** * 获取状态名或者类型名 + * * @param explain * @param label * @return */ public static String getStatusOrTypeName(String explain, String label) { JSONObject statusArr = new JSONObject(); - String[] split = explain.split(","); - for ( int j = 0; j < split.length; j++) { + String[] split = explain.split(","); + for (int j = 0; j < split.length; j++) { String[] status = split[j].split("-"); statusArr.put(status[0], status[1]); } @@ -38,6 +39,7 @@ public class PointUtils { /** * 清空点位 + * * @param point */ public static void clearPoint(SchBasePoint point) { @@ -57,6 +59,7 @@ public class PointUtils { /** * 清空点位 * 双层输送线特殊功能:上五下五 + * * @param point */ public static void clearPointAndRetainNum(SchBasePoint point) { @@ -67,11 +70,10 @@ public class PointUtils { // 获取父点位 String parentPointCode = point.getParent_point_code(); SchBasePoint basePoint = pointService.getById(parentPointCode); - point.setPoint_status(PointStatusEnum.EMPTY_POINT.getCode()); point.setVehicle_type(""); point.setVehicle_code(""); point.setIng_task_code(""); - point.setVehicle_qty(point.getVehicle_qty() + 1); + point.setVehicle_qty(point.getVehicle_qty() == 5 ? point.getVehicle_qty() : point.getVehicle_qty() + 1); if (basePoint.getVehicle_qty() == 5) { // 等到新的点执行第一托的时候,才判断另一个点满足5个托盘的时候就清空 basePoint.setVehicle_qty(0); basePoint.setUpdate_time(DateUtil.now()); @@ -81,18 +83,24 @@ public class PointUtils { pointService.updateById(point); } - /** 点位修改更新信息 **/ + /** + * 点位修改更新信息 + **/ public static void setUpdateByAcs(SchBasePoint pointObj) { pointObj.setUpdate_id(GeneralDefinition.ACS_ID); pointObj.setUpdate_name(GeneralDefinition.ACS_NAME); pointObj.setUpdate_time(DateUtil.now()); } - /** 点位修改更新信息 **/ + + /** + * 点位修改更新信息 + **/ public static void setUpdateByPC(SchBasePoint pointObj) { pointObj.setUpdate_id(SecurityUtils.getCurrentUserId()); pointObj.setUpdate_name(SecurityUtils.getCurrentNickName()); pointObj.setUpdate_time(DateUtil.now()); } + public static void setUpdateByType(SchBasePoint pointObj, TaskFinishedTypeEnum taskFinishedType) { if (taskFinishedType.equals(TaskFinishedTypeEnum.AUTO_ACS)) { setUpdateByAcs(pointObj); diff --git a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml index bbaafa7..b559a01 100644 --- a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml +++ b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml @@ -42,7 +42,7 @@ spring: freemarker: check-template-location: false profiles: - active: dev + active: prod jackson: time-zone: GMT+8 data: