下挂时记录下挂的车型

main
Comair 1 year ago
parent 0430de41b4
commit 33d364a994
  1. 5
      shkj-common/src/main/java/com/shkj/common/constant/RedisConstant.java
  2. 46
      shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java
  3. 2
      shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml

@ -95,6 +95,11 @@ public class RedisConstant {
*/
public static String redisAgvRealInfo="redisAgvRealInfo:";
/**
* 记录目前下发的车型
*/
public static String redisInVehicheModel="InVehicheModel:";
}

@ -203,7 +203,7 @@ public class ScheduledTasks {
List<BusinDataTaskVo> businDataTaskVo4 = iBusinDataTaskService.selectOutBusinDataTask(taskQueryBo);
businDataTaskVos.addAll(businDataTaskVo4);
taskQueryBo.setTaskType("5");
List<BusinDataTaskVo> businDataTaskVo5 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo);
List<BusinDataTaskVo> businDataTaskVo5 = iBusinDataTaskService.selectOutBusinDataTask(taskQueryBo);
businDataTaskVos.addAll(businDataTaskVo5);
taskQueryBo.setTaskType("7");
List<BusinDataTaskVo> 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<BusinDataTaskGoodsVo> 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<BusinDataTaskGoodsVo> businDataTaskGoodsVos = iBusinDataTaskGoodsService.getTaskGoodsByTaskCodeForOut(businDataTaskVo.getId());
Result<BaseLocationVo> 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<Boolean> 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<Boolean> 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<Boolean> 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<Boolean> 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();

@ -100,7 +100,7 @@
<if test="taskType !=null and taskType !=''">
and task_type = #{taskType}
</if>
order by create_time asc
order by is_top,is_urgent, create_time asc
limit 10
</select>

Loading…
Cancel
Save