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