|
|
|
@ -50,6 +50,7 @@ import lombok.AllArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springblade.common.constant.CodeDesEnum; |
|
|
|
|
import org.springblade.common.constant.DictBizConstant; |
|
|
|
|
import org.springblade.common.constant.DistributionTypeConstant; |
|
|
|
|
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant; |
|
|
|
|
import org.springblade.common.constant.pda.PdaAudioLingoStatus; |
|
|
|
|
import org.springblade.common.constant.stocklist.StockLockingStatusConstant; |
|
|
|
@ -873,6 +874,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
if( ObjectUtils.isNotNull(i.getPallet()) && !wu.getPallet().contains(i.getPallet())){ |
|
|
|
|
wu.setPallet(wu.getPallet()+","+i.getPallet()); |
|
|
|
|
} |
|
|
|
|
//托盘信息
|
|
|
|
|
if( ObjectUtils.isNotNull(i.getTrayId()) && !wu.getTrayId().contains(i.getTrayId())){ |
|
|
|
|
wu.setTrayId(wu.getTrayId()+","+i.getTrayId()); |
|
|
|
|
} |
|
|
|
|
//订单自编号信息
|
|
|
|
|
if(ObjectUtils.isNotNull(i.getOrderCode()) && !wu.getOrderCode().contains(i.getOrderCode())){ |
|
|
|
|
wu.setOrderCode(wu.getOrderCode()+","+i.getOrderCode()); |
|
|
|
@ -948,6 +953,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
} |
|
|
|
|
//t托盘信息
|
|
|
|
|
if(ObjectUtils.isNotNull(y.getTrayId()) && !y.getTrayId().contains(p.getTrayId())){ |
|
|
|
|
y.setTrayId(y.getTrayId()+","+p.getTrayId()); |
|
|
|
|
} |
|
|
|
|
//t托盘信息
|
|
|
|
|
if(ObjectUtils.isNotNull(y.getPallet()) && !y.getPallet().contains(p.getPallet())){ |
|
|
|
|
y.setPallet(y.getPallet()+","+p.getPallet()); |
|
|
|
|
} |
|
|
|
|
//订单自编号信息
|
|
|
|
@ -1025,6 +1034,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
} |
|
|
|
|
//t托盘信息
|
|
|
|
|
if(ObjectUtils.isNotNull(y.getTrayId()) && ObjectUtils.isNotNull(p.getTrayId()) && !y.getTrayId().contains(p.getTrayId())){ |
|
|
|
|
y.setTrayId(y.getTrayId()+","+p.getTrayId()); |
|
|
|
|
} |
|
|
|
|
//托盘信息
|
|
|
|
|
if(ObjectUtils.isNotNull(y.getPallet()) && ObjectUtils.isNotNull(p.getPallet()) && !y.getPallet().contains(p.getPallet())){ |
|
|
|
|
y.setPallet(y.getPallet()+","+p.getPallet()); |
|
|
|
|
} |
|
|
|
|
//订单自编号信息
|
|
|
|
@ -1087,6 +1100,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
} |
|
|
|
|
//托盘信息
|
|
|
|
|
if(ObjectUtils.isNotNull(wu.getTrayId()) && ObjectUtils.isNotNull(i.getTrayId()) && !wu.getTrayId().contains(i.getTrayId())){ |
|
|
|
|
wu.setTrayId(wu.getTrayId()+","+i.getTrayId()); |
|
|
|
|
} |
|
|
|
|
//托盘信息
|
|
|
|
|
if(ObjectUtils.isNotNull(wu.getPallet()) && ObjectUtils.isNotNull(i.getPallet()) && !wu.getPallet().contains(i.getPallet())){ |
|
|
|
|
wu.setPallet(wu.getPallet()+","+i.getPallet()); |
|
|
|
|
} |
|
|
|
|
//订单自编号信息
|
|
|
|
@ -1739,7 +1756,8 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
if(trayIdList.isEmpty()){ |
|
|
|
|
return Resp.scanFail("托盘信息错误!!!", "托盘信息错误!!!"); |
|
|
|
|
} |
|
|
|
|
trayIdList.forEach(t -> { |
|
|
|
|
List<WarehouseTrayGoodsEntity> trayIdListCode = trayIdList.stream().filter(i -> i.getTrayCode().equals(stockupDTO.getTrayBarCode())).collect(Collectors.toList()); |
|
|
|
|
trayIdListCode.forEach(t -> { |
|
|
|
|
boolean b = finalList.stream().anyMatch(l -> l.getParcelListId().equals(t.getAssociationId())); |
|
|
|
|
if (b) { |
|
|
|
|
finalList.stream().forEach(i -> { |
|
|
|
@ -1758,11 +1776,13 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return Resp.scanFail("备货失败!有其他包件无法整托", "备货失败!有其他包件无法整托"); |
|
|
|
|
} else { |
|
|
|
|
List<DistributionStockEntity> list1 = new ArrayList<>(); |
|
|
|
|
AtomicBoolean f = new AtomicBoolean(false); |
|
|
|
|
AtomicBoolean f = new AtomicBoolean(false); //是否下架
|
|
|
|
|
AtomicBoolean fa = new AtomicBoolean(false); //是否有包件
|
|
|
|
|
voList.forEach(i -> { |
|
|
|
|
//查询是否已备货
|
|
|
|
|
DistributionParcelListEntity byId = distributionParcelListService.getById(i.getParcelListId()); |
|
|
|
|
if(ObjectUtils.isNotNull(byId) && !byId.getOrderPackageStockupStatus().equals(OrderPackageStockupStatusConstant.yibeihu.getValue())){ |
|
|
|
|
fa.set(true); |
|
|
|
|
DistributionStockEntity distributionStock = new DistributionStockEntity(); |
|
|
|
|
//修改包件备货状态
|
|
|
|
|
|
|
|
|
@ -1813,6 +1833,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
list1.add(distributionStock); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if(!fa.get()){ |
|
|
|
|
return Resp.scanSuccess("当前托盘已完成备货!!","当前托盘已完成备货!!"); |
|
|
|
|
} |
|
|
|
|
if(!f.get() ){ |
|
|
|
|
Long warehouseId ; |
|
|
|
|
if(one.getStockUpType().equals("3")){ |
|
|
|
@ -2674,12 +2697,14 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public boolean getTrayBoot(DistributionStockupOrderListVO vo) { |
|
|
|
|
public boolean getTrayBoot(DistributionStockupOrderListVO vo,String type) { |
|
|
|
|
// BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
|
|
|
|
|
List<WarehouseTrayGoodsEntity> trayIdList = warehouseTrayGoodsClient.getTrayIdList(vo.getTrayId(), vo.getPallet()); |
|
|
|
|
AtomicBoolean f = new AtomicBoolean(true); |
|
|
|
|
trayIdList.stream().collect(Collectors.groupingBy(WarehouseTrayGoodsEntity::getTrayId)). |
|
|
|
|
forEach((k,v) ->{ |
|
|
|
|
List<Long> di = new ArrayList<>(); |
|
|
|
|
// List<Long> di = new ArrayList<>();
|
|
|
|
|
// AtomicReference<Integer> s = new AtomicReference<>(0); //已扫数量
|
|
|
|
|
v.stream().forEach( i ->{ |
|
|
|
|
DistributionParcelListEntity byId = distributionParcelListService.getById(i.getAssociationId()); |
|
|
|
|
if(!vo.getStockArticleId().contains(byId.getStockArticleId().toString())){ |
|
|
|
|