移库逻辑修改
This commit is contained in:
parent
9b3f8e27db
commit
b4cb27e7af
|
|
@ -100,7 +100,7 @@ public class JobComponent extends BaseController {
|
||||||
}
|
}
|
||||||
if(task.getTaskType().equals(TaskType.MOVE.getCode())){
|
if(task.getTaskType().equals(TaskType.MOVE.getCode())){
|
||||||
sendTasksMoveToWcs(task);
|
sendTasksMoveToWcs(task);
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (Exception exception){
|
}catch (Exception exception){
|
||||||
|
|
@ -352,6 +352,7 @@ public class JobComponent extends BaseController {
|
||||||
*/
|
*/
|
||||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||||
public void sendTasksMoveToWcs(Task task){
|
public void sendTasksMoveToWcs(Task task){
|
||||||
|
// 目标库位
|
||||||
List<Location> desLocations = locationService.selLocations(new Location(task.getDestination()));
|
List<Location> desLocations = locationService.selLocations(new Location(task.getDestination()));
|
||||||
if(desLocations == null) {
|
if(desLocations == null) {
|
||||||
logger.info("下发移库任务查询库位详细信息失败,数据库网络连接异常");
|
logger.info("下发移库任务查询库位详细信息失败,数据库网络连接异常");
|
||||||
|
|
@ -385,16 +386,20 @@ public class JobComponent extends BaseController {
|
||||||
if (desDeepLocations.isEmpty()) {
|
if (desDeepLocations.isEmpty()) {
|
||||||
logger.info("后一个库位信息为空");
|
logger.info("后一个库位信息为空");
|
||||||
}else {
|
}else {
|
||||||
Location desDeepLocation = desDeepLocations.get(0); // 前一个库位
|
Location desDeepLocation = desDeepLocations.get(0); // 移动目标库位后一个库位
|
||||||
List<Task> desNotCompleteTasks = taskMapper.haveNotCompleteTask(desDeepLocation.getLocationId());
|
List<Task> desNotCompleteTasks = taskMapper.haveNotCompleteTask(desDeepLocation.getLocationId());
|
||||||
if (desNotCompleteTasks == null) {
|
if (desNotCompleteTasks == null) {
|
||||||
logger.info("查询任务异常");
|
logger.info("查询任务异常");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!desNotCompleteTasks.isEmpty()) {
|
|
||||||
logger.info("发送移库任务时目标库位,高深度存在未完成的任务,退出函数");
|
// for (Task desNotCompleteTask : desNotCompleteTasks) {&& desNotCompleteTask.getTaskType() != 9
|
||||||
return;
|
if (!desNotCompleteTasks.isEmpty() ) {
|
||||||
}
|
logger.info("发送移库任务时目标库位,高深度存在未完成的任务,退出函数");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,8 +158,8 @@ public class LocationUtils {
|
||||||
boolean canUse = true;
|
boolean canUse = true;
|
||||||
for (Location location : canUseLocations) {
|
for (Location location : canUseLocations) {
|
||||||
/* 校验此位置是否有遮挡 */ /* 如果这位置有库存(可能出现记错导致有库存),或者这位置其他深度(不论深度大小)有任务则不采用此位置 */
|
/* 校验此位置是否有遮挡 */ /* 如果这位置有库存(可能出现记错导致有库存),或者这位置其他深度(不论深度大小)有任务则不采用此位置 */
|
||||||
// 如果在同一排上则不采用
|
// 如果在同一排 同巷道上则不采用
|
||||||
if (location.getQueue().equals(thisLocation.getQueue())) {
|
if (location.getQueue().equals(thisLocation.getQueue()) && location.getTunnelId().equals(thisLocation.getTunnelId())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* 1 判断库存 */
|
/* 1 判断库存 */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user