|
|
|
@ -71,7 +71,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
for (TrunklineCarsLoadVO trunklineCarsLoadVO:records){ |
|
|
|
|
Long loadId = trunklineCarsLoadVO.getId(); |
|
|
|
|
QueryWrapper<TrunklineCarsLoadLineEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("id_deleted",0) |
|
|
|
|
queryWrapper.eq("is_deleted",0) |
|
|
|
|
.eq("load_id",loadId); |
|
|
|
|
List<TrunklineCarsLoadLineEntity> list = trunklineCarsLoadLineService.list(queryWrapper); |
|
|
|
|
trunklineCarsLoadVO.setCarsLoadLineList(list); |
|
|
|
@ -759,7 +759,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long loadLineId = nodeNumDataVO.getLoadLineId(); |
|
|
|
|
Integer planNum = nodeNumDataVO.getPlanNum(); |
|
|
|
|
loadPlanNum = loadPlanNum + planNum; |
|
|
|
|
|
|
|
|
|
trunklineCarsLoadLineService.updatePlanLoadingNumberByLoadLineId(planNum,loadLineId); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -794,10 +793,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String orderCode = carsOrderEntity.getOrderCode(); |
|
|
|
|
String waybillNo = carsOrderEntity.getWaybillNo(); |
|
|
|
|
Integer orderLoadingNum = trunklineCarsLoadScanService.findNumByLoadIdAndNodeIdAndOrderCodeAndWaybillNo(loadId,nodeId,orderCode,waybillNo);//节点实际装车数量
|
|
|
|
|
// Integer orderUnloadingNum = trunklineCarsUnloadScanService.findNumByLoadIdAndNodeId(loadId,nodeId,orderCode,waybillNo);//节点实际卸车数量
|
|
|
|
|
Integer orderUnloadingNum = trunklineCarsUnloadScanService.findNumByLoadIdAndNodeIdAndOrderCodeAndWaybillNo(loadId,nodeId,orderCode,waybillNo);//节点实际卸车数量
|
|
|
|
|
// Integer orderLoadingAbnormalNum = trunklineCarsLoadScanService.findAbnormalNumByLoadIdAndNodeId(loadId,nodeId,orderCode,waybillNo);//节点实际装车异常数量
|
|
|
|
|
// Integer orderUnloadingAbnormalNum = trunklineCarsUnloadScanService.findAbnormalNumByLoadIdAndNodeId(loadId,nodeId,orderCode,waybillNo);//节点实际卸车异常数量
|
|
|
|
|
carsOrderEntity.setRealNum(orderLoadingNum); |
|
|
|
|
carsOrderEntity.setUnloadNum(orderUnloadingNum); |
|
|
|
|
trunklineCarsOrderService.updateById(carsOrderEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1362,6 +1362,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405,"仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//判断包条是不是已经装车
|
|
|
|
|
TrunklineCarsLoadScanEntity isExit = trunklineCarsLoadScanService.findEntityByLoadIdAndOrderPackageCode(loadId,orderPackageCode); |
|
|
|
|
if(!Objects.isNull(isExit)){ |
|
|
|
|
log.warn("##################loadingScan: 包件已经装车 orderPackageCode={}",orderPackageCode); |
|
|
|
|
return R.fail(405,"包件已经装车"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//判断包条码是不是在库
|
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId); |
|
|
|
|
TrunklineCarsLoadScanEntity carsLoadScanEntity = new TrunklineCarsLoadScanEntity(); |
|
|
|
@ -1382,8 +1389,36 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadScanEntity.setNum(1); |
|
|
|
|
carsLoadScanEntity.setType(1); |
|
|
|
|
if(Objects.isNull(parcelListEntity)){ |
|
|
|
|
carsLoadScanEntity.setIsData(0); |
|
|
|
|
carsLoadScanEntity.setIsAbnormal(1); |
|
|
|
|
DistributionParcelListEntity otherParcelListEntity = distributionParcelListClient.findByOrderPackageCodeAndStatus(orderPackageCode); |
|
|
|
|
if(Objects.isNull(otherParcelListEntity)){ |
|
|
|
|
carsLoadScanEntity.setIsData(0); |
|
|
|
|
carsLoadScanEntity.setIsAbnormal(1); |
|
|
|
|
}else{ |
|
|
|
|
carsLoadScanEntity.setIsData(1); |
|
|
|
|
carsLoadScanEntity.setIsAbnormal(1); |
|
|
|
|
String waybillNumber = otherParcelListEntity.getWaybillNumber(); |
|
|
|
|
Long wid = otherParcelListEntity.getWarehouseId(); |
|
|
|
|
String orderCode = otherParcelListEntity.getOrderCode(); |
|
|
|
|
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber); |
|
|
|
|
if(Objects.isNull(waybillEntity)){ |
|
|
|
|
log.warn("##################loadingScan: 运单信息不存在 waybillNumber={}",waybillNumber); |
|
|
|
|
return R.fail(405,"运单信息不存在"); |
|
|
|
|
} |
|
|
|
|
carsLoadScanEntity.setWaybillId(waybillEntity.getId()); |
|
|
|
|
carsLoadScanEntity.setWaybillNo(waybillEntity.getWaybillNo()); |
|
|
|
|
carsLoadScanEntity.setOrderCode(orderCode); |
|
|
|
|
otherParcelListEntity.setOrderPackageStatus("60"); |
|
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, wid); |
|
|
|
|
if(Objects.isNull(stockArticleEntity)){ |
|
|
|
|
log.warn("##################loadingScan: 订单信息不存在 orderCode={} warehouseId={}",orderCode,warehouseId); |
|
|
|
|
return R.fail(405,"订单信息不存在"); |
|
|
|
|
} |
|
|
|
|
stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity()-1); |
|
|
|
|
distributionParcelListClient.update(otherParcelListEntity); |
|
|
|
|
distributionStockArticleClient.saveOrUpdate(stockArticleEntity); |
|
|
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode,wid); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
//有包件所以是有数据的包件扫描
|
|
|
|
|
carsLoadScanEntity.setIsData(1); |
|
|
|
@ -1428,6 +1463,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
distributionParcelListClient.update(parcelListEntity); |
|
|
|
|
distributionStockArticleClient.saveOrUpdate(stockArticleEntity); |
|
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId); |
|
|
|
|
} |
|
|
|
|
trunklineCarsLoadScanService.save(carsLoadScanEntity); |
|
|
|
|
|
|
|
|
@ -1612,6 +1648,62 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.data(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R transferLoadPageList(LoadCarsDTO loadCarsDTO) { |
|
|
|
|
IPage<Object> page = new Page<>(); |
|
|
|
|
page.setCurrent(loadCarsDTO.getPageNum()); |
|
|
|
|
page.setSize(loadCarsDTO.getPageSize()); |
|
|
|
|
Integer type = loadCarsDTO.getType(); |
|
|
|
|
|
|
|
|
|
Date start = CommonUtil.getStartByDateStr(loadCarsDTO.getStartDate()); |
|
|
|
|
Date end = CommonUtil.getStartByDateStr(loadCarsDTO.getEndDate()); |
|
|
|
|
loadCarsDTO.setStartDate(CommonUtil.dateToStringGeneral(start)); |
|
|
|
|
loadCarsDTO.setEndDate(CommonUtil.dateToStringGeneral(end)); |
|
|
|
|
|
|
|
|
|
IPage<TrunklineCarsLoadVO> pageList = baseMapper.carsLoadPageList(page,loadCarsDTO); |
|
|
|
|
return R.data(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R findLoadFeeByNodeId(Long loadId,Long warehouseId) { |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if(Objects.isNull(carsLoadEntity)){ |
|
|
|
|
log.warn("##################findLoadFeeByNodeId: 配载or三方计划不存在 loadId={}",loadId); |
|
|
|
|
return R.fail(405,"计划不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId); |
|
|
|
|
if(Objects.isNull(carsLoadLineEntity)){ |
|
|
|
|
log.warn("##################findLoadFeeByNodeId: 节点信息不存在 loadId={} warehouseId={}",loadId,warehouseId); |
|
|
|
|
return R.fail(405,"节点信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return R.data(carsLoadLineEntity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R updateLoadFeeByNodeId(TrunklineCarsLoadLineVO carsLoadLineVO) { |
|
|
|
|
|
|
|
|
|
trunklineCarsLoadLineService.updateById(carsLoadLineVO); |
|
|
|
|
|
|
|
|
|
Long loadId = carsLoadLineVO.getLoadId(); |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if(Objects.isNull(carsLoadEntity)){ |
|
|
|
|
log.warn("##########updateLoadFeeByNodeId: 配载计划信息不存在 loadId={}",loadId); |
|
|
|
|
return R.fail(405,"配载计划信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//重新计算配载计划的费用
|
|
|
|
|
BigDecimal countTransportCost = trunklineCarsLoadLineService.getAllNodeFee(loadId); |
|
|
|
|
carsLoadEntity.setCountTransportCost(countTransportCost); |
|
|
|
|
|
|
|
|
|
updateById(carsLoadEntity); |
|
|
|
|
|
|
|
|
|
return R.success("修改成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) { |
|
|
|
|
log.info("##############loadingTrayInfo: 查询托盘的货物信息"); |
|
|
|
@ -1692,7 +1784,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
loadingZero(loadId,warehouseId,waybillNo,trayCode,productInfoList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//TODO 托盘下架
|
|
|
|
|
//下架托盘
|
|
|
|
|
updownTypeClient.downTray(trayCode,warehouseId); |
|
|
|
|
|
|
|
|
|
return R.success("整托装车成功"); |
|
|
|
|
} |
|
|
|
@ -1858,7 +1951,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R unloadPackage(Long loadId, String orderPackageCode, Long warehouseId) { |
|
|
|
|
public R unloadPackage(Long loadId, String orderPackageCode, Long warehouseId,Integer unbindTray) { |
|
|
|
|
log.info("#############unloadPackage: 卸车包件"); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
@ -2041,13 +2134,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
trunklineCarsUnloadScanEntity.setIsAbnormal(0); |
|
|
|
|
trunklineCarsUnloadScanService.save(trunklineCarsUnloadScanEntity); |
|
|
|
|
String trayCode = trunklineCarsUnloadScanEntity.getTrayCode(); |
|
|
|
|
Long wid = carsLoadScanEntity.getWarehouseId();//包件装车的节点仓库
|
|
|
|
|
if(!StringUtil.isBlank(trayCode)){ |
|
|
|
|
//有托盘码
|
|
|
|
|
//所有按件卸车需要解绑托盘
|
|
|
|
|
//TODO 需要解绑托盘
|
|
|
|
|
if(unbindTray == 1){ |
|
|
|
|
//需要解绑托盘
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode,wid); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Long wid = carsLoadScanEntity.getWarehouseId();//包件装车的节点仓库
|
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, wid); |
|
|
|
|
if(Objects.isNull(parcelListEntity)){ |
|
|
|
|
log.warn("##############unloadPackage: 包件信息不存在 orderPackageCode={} wid={}",orderPackageCode,wid); |
|
|
|
@ -2132,7 +2228,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R unloadZero(Long loadId, String waybillNo,List<ProductInfoDTO> productInfoList, Long warehouseId,String trayCode) { |
|
|
|
|
public R unloadZero(Long loadId, String waybillNo,List<ProductInfoDTO> productInfoList, Long warehouseId,Integer unbindTray) { |
|
|
|
|
log.info("#############unloadZero: 卸车零担"); |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
@ -2153,11 +2249,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405,"运单信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BasicdataTrayEntity basicdataTrayEntity = null; |
|
|
|
|
if(!StringUtil.isBlank(trayCode)){ |
|
|
|
|
basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String trayCode = null; |
|
|
|
|
Integer totalNum = 0; |
|
|
|
|
Long wid = null; |
|
|
|
|
for (ProductInfoDTO productInfoDTO : productInfoList) { |
|
|
|
|
//判断装车数据
|
|
|
|
|
String productName = productInfoDTO.getProductName(); |
|
|
|
@ -2171,6 +2265,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
TrunklineCarsLoadScanEntity one = trunklineCarsLoadScanService.getOne(queryWrapper); |
|
|
|
|
Integer loadNum = 0; |
|
|
|
|
if(!Objects.isNull(one)){ |
|
|
|
|
trayCode = one.getTrayCode(); |
|
|
|
|
wid = one.getWarehouseId(); |
|
|
|
|
loadNum = one.getNum(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2190,13 +2286,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsUnloadScanEntity.setScanCode(productName); |
|
|
|
|
carsUnloadScanEntity.setScanStatus("2"); |
|
|
|
|
carsUnloadScanEntity.setNum(enterNum); |
|
|
|
|
if(!Objects.isNull(basicdataTrayEntity)){ |
|
|
|
|
carsUnloadScanEntity.setTrayId(basicdataTrayEntity.getId()); |
|
|
|
|
carsUnloadScanEntity.setTrayCode(trayCode); |
|
|
|
|
carsUnloadScanEntity.setTrayName(basicdataTrayEntity.getPalletName()); |
|
|
|
|
} |
|
|
|
|
carsUnloadScanEntity.setTrayId(one.getTrayId()); |
|
|
|
|
carsUnloadScanEntity.setTrayCode(trayCode); |
|
|
|
|
carsUnloadScanEntity.setTrayName(one.getTrayName()); |
|
|
|
|
|
|
|
|
|
trunklineCarsUnloadScanService.save(carsUnloadScanEntity); |
|
|
|
|
|
|
|
|
|
totalNum = totalNum + enterNum; |
|
|
|
|
|
|
|
|
|
//创建对应的订单信息
|
|
|
|
|
String orderCode = waybillNo; |
|
|
|
|
DistributionStockArticleEntity newStockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId); |
|
|
|
@ -2242,6 +2339,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(!StringUtil.isBlank(trayCode)){ |
|
|
|
|
if(unbindTray == 1){ |
|
|
|
|
String orderCode=waybillNo; |
|
|
|
|
trayTypeClient.deleteZeroOrderByTrayCode(orderCode,trayCode,wid); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return R.success("卸车成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2296,7 +2399,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405,"配载计划信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//查询已扫描装车的包件
|
|
|
|
|
//查询已扫描卸车的包件
|
|
|
|
|
QueryWrapper<TrunklineCarsUnloadScanEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("load_id",loadId) |
|
|
|
|
.eq("warehouse_id",warehouseId) |
|
|
|
@ -2304,14 +2407,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
List<TrunklineCarsUnloadScanEntity> packageList = trunklineCarsUnloadScanService.list(queryWrapper); |
|
|
|
|
|
|
|
|
|
//查询已装车的零担
|
|
|
|
|
List<LoadZeroListVO> zeroList = trunklineCarsOrderService.findZeroList(loadId,warehouseId); |
|
|
|
|
List<UnloadZeroVO> zeroList = trunklineCarsOrderService.findUnloadZeroList(loadId,warehouseId); |
|
|
|
|
for (UnloadZeroVO unloadZeroVO : zeroList) { |
|
|
|
|
String waybillNo = unloadZeroVO.getWaybillNo(); |
|
|
|
|
List<ProductUnloadInfoVO> list = trunklineCarsLoadScanService.findListByLoadIdAndWaybillNo(loadId,waybillNo); |
|
|
|
|
unloadZeroVO.setProductUnloadInfoList(list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadVO trunklineCarsLoadVO = new TrunklineCarsLoadVO(); |
|
|
|
|
|
|
|
|
|
BeanUtil.copy(carsLoadEntity,trunklineCarsLoadVO); |
|
|
|
|
|
|
|
|
|
trunklineCarsLoadVO.setCarsUnloadScanPackageList(packageList); |
|
|
|
|
trunklineCarsLoadVO.setZeroList(zeroList); |
|
|
|
|
trunklineCarsLoadVO.setUnloadZeroList(zeroList); |
|
|
|
|
|
|
|
|
|
return R.data(trunklineCarsLoadVO); |
|
|
|
|
} |
|
|
|
@ -2357,5 +2465,58 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.data(map); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R findUnloadTrayGoodsList(Long loadId, String trayCode,Long warehouseId) { |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if(Objects.isNull(carsLoadEntity)){ |
|
|
|
|
log.warn("###############findUnloadTrayGoodsList: 配载计划不存在 loadId={}",loadId); |
|
|
|
|
return R.fail(405,"配载计划不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//查询该节点有没有该托盘的信息
|
|
|
|
|
List<TrunklineCarsLoadScanEntity> list = trunklineCarsLoadScanService.findUnloadTrayGoodsList(loadId,warehouseId,trayCode); |
|
|
|
|
if(list.isEmpty()){ |
|
|
|
|
log.warn("###############findUnloadTrayGoodsList: 托盘上没有该节点的卸货数据 loadId={} trayCode={} warehouseId={]",loadId,trayCode,warehouseId); |
|
|
|
|
return R.fail(405,"托盘上没有该节点的卸货数据"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return R.data(list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R unloadTray(Long loadId, String trayCode, Long warehouseId) { |
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if(Objects.isNull(carsLoadEntity)){ |
|
|
|
|
log.warn("###############unloadTray: 配载计划不存在 loadId={}",loadId); |
|
|
|
|
return R.fail(405,"配载计划不存在"); |
|
|
|
|
} |
|
|
|
|
//查询该节点有没有该托盘的信息
|
|
|
|
|
List<TrunklineCarsLoadScanEntity> list = trunklineCarsLoadScanService.findUnloadTrayGoodsList(loadId,warehouseId,trayCode); |
|
|
|
|
Set<String> set = new TreeSet<>(); |
|
|
|
|
for (TrunklineCarsLoadScanEntity carsLoadScanEntity : list) { |
|
|
|
|
Integer type = carsLoadScanEntity.getType(); |
|
|
|
|
String scanCode = carsLoadScanEntity.getScanCode(); |
|
|
|
|
if(type == 1){ |
|
|
|
|
//包件
|
|
|
|
|
unloadPackage(loadId,scanCode,warehouseId,0); |
|
|
|
|
}else if(type == 2){ |
|
|
|
|
String waybillNo = carsLoadScanEntity.getWaybillNo(); |
|
|
|
|
set.add(waybillNo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//零担处理
|
|
|
|
|
for (String waybillNo:set){ |
|
|
|
|
List<ProductInfoDTO> productInfoList = trunklineCarsLoadScanService.findProductInfoList(loadId,trayCode,waybillNo); |
|
|
|
|
unloadZero(loadId,waybillNo,productInfoList,warehouseId,0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//处理托盘的入库和货物的入库
|
|
|
|
|
trayTypeClient.changeTrayWarehouseInfo(trayCode,warehouseId); |
|
|
|
|
|
|
|
|
|
return R.success("卸车成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|