|
|
|
@ -1191,6 +1191,44 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
return R.success("移库成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R downScanTrayCode(String trayCode) { |
|
|
|
|
BasicdataTrayEntity trayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode);//托盘信息
|
|
|
|
|
if(Objects.isNull(trayEntity)){ |
|
|
|
|
log.warn("#################findUpShelfScanGoods: 托盘信息不存在 trayCode={}",trayCode); |
|
|
|
|
throw new CustomerException(403,"托盘信息不存在"); |
|
|
|
|
} |
|
|
|
|
Long allocationId = warehouseTaryAllocationService.getAllocationIdByTrayId(trayEntity.getId()); |
|
|
|
|
if (Objects.isNull(allocationId)){ |
|
|
|
|
log.warn("#################findUpShelfScanGoods: 托盘未上架 trayCode={}",trayCode); |
|
|
|
|
throw new CustomerException(403,"托盘未上架"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Long trayId = trayEntity.getId(); |
|
|
|
|
QueryWrapper<WarehouseTrayTypeEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("tray_id",trayId) |
|
|
|
|
.eq("is_deleted",0); |
|
|
|
|
WarehouseTrayTypeEntity trayTypeEntity = warehouseTrayTypeService.getOne(queryWrapper); |
|
|
|
|
if(Objects.isNull(trayTypeEntity)){ |
|
|
|
|
log.warn("#################findUpShelfScanGoods: 托盘没有货物信息 trayCode={}",trayCode); |
|
|
|
|
throw new CustomerException(403,"托盘没有货物信息"); |
|
|
|
|
} |
|
|
|
|
Long trayTypeId = trayTypeEntity.getId();//打托方式id
|
|
|
|
|
String type = trayTypeEntity.getType();//打托分类
|
|
|
|
|
List<UpShelfDataVO> listByTrayTypeId = null; |
|
|
|
|
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){ |
|
|
|
|
listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId); |
|
|
|
|
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){ |
|
|
|
|
listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId); |
|
|
|
|
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){ |
|
|
|
|
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId); |
|
|
|
|
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){ |
|
|
|
|
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId); |
|
|
|
|
} |
|
|
|
|
return R.data(listByTrayTypeId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveUpdownGoodsLogPart(List<WarehouseUpdownGoodsEntity> updownGoodsList, int residue, String bindingType, Integer isAlltrays, String remark) { |
|
|
|
|
List<WarehouseUpdownGoodsLogEntity> updownGoodsLogList = new ArrayList<>(); |
|
|
|
|
for (WarehouseUpdownGoodsEntity updownGoodsEntity:updownGoodsList){ |
|
|
|
|