1
This commit is contained in:
parent
726b7ff463
commit
e6edf40068
|
|
@ -1188,6 +1188,7 @@ public class AppTaskController extends BaseController
|
||||||
return error("该任务状态不是待捡货,请检查!");
|
return error("该任务状态不是待捡货,请检查!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logger.info("1111111111111111111111111");
|
||||||
for(PickCompleteReq request : requests) {
|
for(PickCompleteReq request : requests) {
|
||||||
// 更新捡货任务数量
|
// 更新捡货任务数量
|
||||||
//根据taskId,查询该条任务
|
//根据taskId,查询该条任务
|
||||||
|
|
@ -1208,12 +1209,23 @@ public class AppTaskController extends BaseController
|
||||||
if(CollectionUtils.isEmpty(appPmsOrderOuts)){
|
if(CollectionUtils.isEmpty(appPmsOrderOuts)){
|
||||||
return error("数据服务异常,请重试");
|
return error("数据服务异常,请重试");
|
||||||
}
|
}
|
||||||
|
logger.info("2222222222222222222222222222222222");
|
||||||
AppPmsOrderOut appPmsOrderOut1 = appPmsOrderOuts.get(0);
|
AppPmsOrderOut appPmsOrderOut1 = appPmsOrderOuts.get(0);
|
||||||
|
if(appPmsOrderOut1.getTrNum() == null) appPmsOrderOut1.setTrNum(BigDecimal.ZERO);
|
||||||
appPmsOrderOut1.setTrNum(appPmsOrderOut1.getTrNum().add(request.getPickNum()));
|
appPmsOrderOut1.setTrNum(appPmsOrderOut1.getTrNum().add(request.getPickNum()));
|
||||||
appPmsOrderOut1.setShelvesNum(BigDecimal.ZERO);
|
appPmsOrderOut1.setShelvesNum(BigDecimal.ZERO);
|
||||||
appPmsOrderOut1.setOrderStatus(0);
|
if(appPmsOrderOut1.getTrNum().compareTo(appPmsOrderOut1.getGoodsNum()) == 0){
|
||||||
appPmsOrderOutService.updateAppPmsOrderOut(appPmsOrderOut1);
|
appPmsOrderOut1.setOrderStatus(2);
|
||||||
|
}else{
|
||||||
|
appPmsOrderOut1.setOrderStatus(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appPmsOrderOut1.setIsLock("0");
|
||||||
|
logger.info("3333333333333333333");
|
||||||
|
appPmsOrderOutService.updateAppPmsOrderOut(appPmsOrderOut1);
|
||||||
|
logger.info("444444444444444444444444");
|
||||||
|
}
|
||||||
|
logger.info("拣货成功===》》》》》》》》》》》》》》》》》》");
|
||||||
return success("捡货成功");
|
return success("捡货成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,9 @@ public class AppLocationServiceImpl implements IAppLocationService {
|
||||||
// 查询到所有的库位
|
// 查询到所有的库位
|
||||||
AppLocation locationQuery = new AppLocation();
|
AppLocation locationQuery = new AppLocation();
|
||||||
locationQuery.setEquipmentId(equipmentId);
|
locationQuery.setEquipmentId(equipmentId);
|
||||||
|
locationQuery.setIsWorking(0);
|
||||||
|
locationQuery.setLocationStatus(0);
|
||||||
|
locationQuery.setIsLock(0);
|
||||||
List<AppLocation> appLocationList = appLocationMapper.selectAppLocationList(locationQuery);
|
List<AppLocation> appLocationList = appLocationMapper.selectAppLocationList(locationQuery);
|
||||||
if (appLocationList == null || appLocationList.isEmpty()) {
|
if (appLocationList == null || appLocationList.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -131,20 +134,20 @@ public class AppLocationServiceImpl implements IAppLocationService {
|
||||||
// 结果库位
|
// 结果库位
|
||||||
AppLocation resultLocation = null;
|
AppLocation resultLocation = null;
|
||||||
// 可用库位列表
|
// 可用库位列表
|
||||||
List<AppLocation> availableLocationList = appLocationList.stream().filter(item ->
|
// List<AppLocation> availableLocationList = appLocationList.stream().filter(item ->
|
||||||
item.getIsWorking() == 0 && item.getIsLock() == 0 && item.getLocationStatus() == 0).sorted(Comparator
|
// item.getIsWorking() == 0 && item.getIsLock() == 0 && item.getLocationStatus() == 0).sorted(Comparator
|
||||||
.comparingInt(AppLocation::getwCol).thenComparingInt(AppLocation::getwLayer).thenComparingInt(AppLocation::getwDepth)).collect(Collectors.toList());
|
// .comparingInt(AppLocation::getwCol).thenComparingInt(AppLocation::getwLayer).thenComparingInt(AppLocation::getwDepth)).collect(Collectors.toList());
|
||||||
// 排序
|
// // 排序
|
||||||
for (AppLocation appLocation : availableLocationList) {
|
// for (AppLocation appLocation : availableLocationList) {
|
||||||
if (appLocation.getIsWorking() == 1 || appLocation.getIsLock() == 1 || appLocation.getLocationStatus() == 1) {
|
// if (appLocation.getIsWorking() == 1 || appLocation.getIsLock() == 1 || appLocation.getLocationStatus() == 1) {
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
if (isMaxDepthAvailable(appLocationList, appLocation)) {
|
// if (isMaxDepthAvailable(appLocationList, appLocation)) {
|
||||||
resultLocation = appLocation;
|
// resultLocation = appLocation;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return resultLocation;
|
return appLocationList.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user