From 33d364a9945f60c9ce46e726780e2005f47b6c9c Mon Sep 17 00:00:00 2001 From: Comair <1464848666@qq.com> Date: Wed, 31 Jul 2024 10:45:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E6=8C=82=E6=97=B6=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=B8=8B=E6=8C=82=E7=9A=84=E8=BD=A6=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shkj/common/constant/RedisConstant.java | 5 ++ .../shkj/wms/scheduled/ScheduledTasks.java | 46 +++++++++++++------ .../mapper/wms/BusinDataTaskMapper.xml | 2 +- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/shkj-common/src/main/java/com/shkj/common/constant/RedisConstant.java b/shkj-common/src/main/java/com/shkj/common/constant/RedisConstant.java index 102605a..cc16dd4 100644 --- a/shkj-common/src/main/java/com/shkj/common/constant/RedisConstant.java +++ b/shkj-common/src/main/java/com/shkj/common/constant/RedisConstant.java @@ -95,6 +95,11 @@ public class RedisConstant { */ public static String redisAgvRealInfo="redisAgvRealInfo:"; + /** + * 记录目前下发的车型 + */ + + public static String redisInVehicheModel="InVehicheModel:"; } diff --git a/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java b/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java index c8965ef..a351c0d 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java +++ b/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java @@ -203,7 +203,7 @@ public class ScheduledTasks { List businDataTaskVo4 = iBusinDataTaskService.selectOutBusinDataTask(taskQueryBo); businDataTaskVos.addAll(businDataTaskVo4); taskQueryBo.setTaskType("5"); - List businDataTaskVo5 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo); + List businDataTaskVo5 = iBusinDataTaskService.selectOutBusinDataTask(taskQueryBo); businDataTaskVos.addAll(businDataTaskVo5); taskQueryBo.setTaskType("7"); List businDataTaskVo7 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo); @@ -251,6 +251,10 @@ public class ScheduledTasks { for (BusinDataTaskVo businDataTaskVo : businDataTaskVos) { doTask(businDataTaskVo); } + + //查询下挂任务目前的车型:入库:3LN(20秒) 出库:3UG(40秒) + //从redis中写入 + } @@ -264,7 +268,8 @@ public class ScheduledTasks { BasePointDeviceQueryBo pointQueryBo = new BasePointDeviceQueryBo(); //任务类型 0 正常入库 1维修异常 2扫码异常 3入库冲孔 4 正常出库 5紧急出库 6越库出库 7手工入库 8呼叫空治具 - if (taskType.equals("0") || taskType.equals("7")) { + if (taskType.equals("0") || taskType.equals("7")) + { //获取要出入库的条码信息 List businDataTaskGoodsVos = iBusinDataTaskGoodsService.selectBusinTaskGoodsByTaskCode(businDataTaskVo.getId()); // if (ObjectUtils.isEmpty(businDataTaskGoodsVos)) { @@ -554,7 +559,8 @@ public class ScheduledTasks { businDataTaskVo.setDpsNoTwo(stkPlcId); iBusinDataTaskService.updateById(BeanUtil.toBean(businDataTaskVo, BusinDataTask.class)); - } else if (taskType.equals("2")) { + } + else if (taskType.equals("2")) { Long plcId = 0L; Long stkPlcId = 0L; Boolean NUMBER = true; @@ -712,7 +718,8 @@ public class ScheduledTasks { businDataTaskVo.setDpsNoOne(plcId); businDataTaskVo.setDpsNoTwo(stkPlcId); - } else if (taskType.equals("1")) { + } + else if (taskType.equals("1")) { Long plcId = 0L; Long stkPlcId = 0L; Boolean NUMBER = true; @@ -895,7 +902,8 @@ public class ScheduledTasks { businDataTaskVo.setDpsNoOne(plcId); businDataTaskVo.setDpsNoTwo(stkPlcId); - } else if (taskType.equals("3")) { + } + else if (taskType.equals("3")) { Long plcId = 0L; Long stkPlcId = 0L; Boolean NUMBER = true; @@ -1183,7 +1191,8 @@ public class ScheduledTasks { // } } } - } else if (taskType.equals("10")) { + } + else if (taskType.equals("10")) { //先判断补货入库是否是一套,如果是入存货区,否则入异常区 List businDataTaskGoodsVos = iBusinDataTaskGoodsService.getTaskGoodsByTaskCodeForOut(businDataTaskVo.getId()); Result baseLocationVoResult = iBaseLocationService.queryById(businDataTaskVo.getLocationId()); @@ -1204,7 +1213,8 @@ public class ScheduledTasks { businDataTaskVo.setExceptionMsg("下发堆垛机指令失败"); businDataTaskVo.setTaskStatus(TaskStatusEnum.err.getValue()); } - } else if (taskType.equals(TaskTypeEnum.abnormal_delivery.getValue())) { + } + else if (taskType.equals(TaskTypeEnum.abnormal_delivery.getValue())) { //异常出库 //异常区货位 Long abnormalArea = Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.abnormal_area)); @@ -1326,8 +1336,10 @@ public class ScheduledTasks { boolean b = iBusinDataTaskGoodsService.saveOrUpdateBatch(goods); - } else if (taskType.equals(TaskTypeEnum.punching_delivery.getValue())) { - } else if (taskType.equals(TaskTypeEnum.replenished_in.getValue())) { + } + else if (taskType.equals(TaskTypeEnum.punching_delivery.getValue())) { + } + else if (taskType.equals(TaskTypeEnum.replenished_in.getValue())) { String agvno = null; if (businDataTaskVo.getTaskPath().contains("manMade")) { List agvtaskType = new ArrayList(); @@ -1353,7 +1365,8 @@ public class ScheduledTasks { iBusinDataTaskService.runReplenishIn(businDataTaskVo, agvno); Result booleanResult = iPutInOutStorageService.reduceInventory(taskId, goodsNoStr); - } else if (taskType.equals("21")) { + } + else if (taskType.equals("21")) { // 冲孔出库 //待冲孔区货位 Long abnormalArea = Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.punching_area)); @@ -1492,7 +1505,8 @@ public class ScheduledTasks { } else { businDataTaskVo.setTaskStatus("-3"); } - } else if (taskType.equals("22")) { + } + else if (taskType.equals("22")) { BusinDataTask businDataTask = iBusinDataTaskService.getById(businDataTaskVo.getId()); Result taskResult = outTask(businDataTask); if (Result.isOk(taskResult)) { @@ -1510,7 +1524,8 @@ public class ScheduledTasks { } } - } else if (taskType.equals(TaskTypeEnum.seat_adjustment.getValue())) { + } + else if (taskType.equals(TaskTypeEnum.seat_adjustment.getValue())) { BusinDataTask businDataTask = iBusinDataTaskService.getById(businDataTaskVo.getId()); Result booleanResult = moveTask(businDataTask); if (Result.isOk(booleanResult)) { @@ -1519,7 +1534,8 @@ public class ScheduledTasks { businDataTaskVo.setExceptionMsg("下发堆垛机失败"); businDataTask.setTaskStatus(TaskStatusEnum.err.getValue()); } - } else if (taskType.equals(TaskTypeEnum.relocation_out.getValue())) { + } + else if (taskType.equals(TaskTypeEnum.relocation_out.getValue())) { BusinDataTask businDataTask = iBusinDataTaskService.getById(businDataTaskVo.getId()); Result taskResult = outTask(businDataTask); if (Result.isOk(taskResult)) { @@ -1528,7 +1544,8 @@ public class ScheduledTasks { businDataTaskVo.setExceptionMsg("下发堆垛机失败"); businDataTask.setTaskStatus(TaskStatusEnum.err.getValue()); } - } else if ("25".equals(taskType)) { + } + else if ("25".equals(taskType)) { BusinDataTask businDataTask = iBusinDataTaskService.getById(businDataTaskVo.getId()); //获取货位对应的巷道及巷道对应的设备信息 pointQueryBo.setTunnel(businDataTask.getTunnel()); @@ -2006,6 +2023,7 @@ public class ScheduledTasks { String goodsNo = goodsVo.getGoodsNo(); String startPoint = businDataTaskVo.getTaskPath(); + redisTemplate.opsForValue().set(RedisConstant.redisInVehicheModel, vehicheModel); BasePointDeviceVo pointDevice = new BasePointDeviceVo(); BasePointDeviceVo basePointDeviceVo = new BasePointDeviceVo(); diff --git a/shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml b/shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml index 84452d6..2353915 100644 --- a/shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml +++ b/shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml @@ -100,7 +100,7 @@ and task_type = #{taskType} - order by create_time asc + order by is_top,is_urgent, create_time asc limit 10