|
|
|
@ -107,6 +107,7 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl<Wareh
|
|
|
|
|
stockupAreaVo.setMarketName(parcelListEntity.getMallName()); |
|
|
|
|
} |
|
|
|
|
stockupAreaVo.setGoodsType("1"); |
|
|
|
|
stockupAreaVo.setOrderId(parcelListEntity.getStockArticleId()); |
|
|
|
|
stockupAreaVo.setAssociationId(parcelListEntity.getId()); |
|
|
|
|
stockupAreaVo.setAssociationValue(parcelListEntity.getOrderPackageCode()); |
|
|
|
|
if (1==parcelListEntity.getConditions()){ |
|
|
|
@ -224,4 +225,61 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl<Wareh
|
|
|
|
|
warehouseUpdownStockupAreaLogService.saveBatch(waitSaveWarehouseUpdownStockupAreaLogEntity); |
|
|
|
|
return R.status(this.saveBatch(waitSaveWarehouseUpdownStockupAreaEntity)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param allocationId |
|
|
|
|
* @param warehouseId |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public UpShelfAllocationVO upShelfScanAllocation(Long allocationId, Long warehouseId) { |
|
|
|
|
BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.getEntityByAllocationId(allocationId); |
|
|
|
|
if(Objects.isNull(goodsAllocationEntity)){ |
|
|
|
|
log.warn("#############upShelfScanAllocation: 库位信息不存在 allocationId={}",allocationId); |
|
|
|
|
throw new CustomerException(403,"库位信息不存在"); |
|
|
|
|
} |
|
|
|
|
String goodsAllocationName = goodsAllocationEntity.getGoodsAllocationName(); |
|
|
|
|
Long goodsShelfId = goodsAllocationEntity.getGoodsShelfId(); |
|
|
|
|
BasicdataGoodsShelfEntity basicdataGoodsShelfEntity = basicdataGoodsShelfClient.getEntityByGoodsShelfId(goodsShelfId); |
|
|
|
|
if(Objects.isNull(basicdataGoodsShelfEntity)){ |
|
|
|
|
log.warn("#################upShelfScanAllocation: 货架信息不存在 goodsShelfId={}",goodsShelfId); |
|
|
|
|
throw new CustomerException(403,"货架信息不存在"); |
|
|
|
|
} |
|
|
|
|
String goodsShelfName = basicdataGoodsShelfEntity.getGoodsShelfName(); |
|
|
|
|
Long goodsAreaId = basicdataGoodsShelfEntity.getGoodsAreaId();//货区id
|
|
|
|
|
BasicdataGoodsAreaEntity basicdataGoodsAreaEntity = basicdataGoodsAreaClient.getEntityByGoodsAreaId(goodsAreaId); |
|
|
|
|
if(Objects.isNull(basicdataGoodsAreaEntity)){ |
|
|
|
|
log.warn("#################upShelfScanAllocation: 货区信息不存在 goodsAreaId={}",goodsAreaId); |
|
|
|
|
throw new CustomerException(403,"货区信息不存在"); |
|
|
|
|
} |
|
|
|
|
String areaType = basicdataGoodsAreaEntity.getAreaType(); |
|
|
|
|
if(!"1".equals(areaType)){ |
|
|
|
|
log.warn("#################upShelfScanAllocation: 备货区不能上下架 goodsAreaId={}",goodsAreaId); |
|
|
|
|
throw new CustomerException(403,"请扫描备货库位"); |
|
|
|
|
} |
|
|
|
|
Long wid = basicdataGoodsAreaEntity.getWarehouseId(); |
|
|
|
|
String goodsAreaName = basicdataGoodsAreaEntity.getHeadline();//货区名称
|
|
|
|
|
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(wid); |
|
|
|
|
if(Objects.isNull(basicdataWarehouseEntity)){ |
|
|
|
|
log.warn("#################upShelfScanAllocation: 仓库信息不存在 wid={}",wid); |
|
|
|
|
throw new CustomerException(403,"仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(!wid.equals(warehouseId)){ |
|
|
|
|
log.warn("#################upShelfScanAllocation: 库位不在当前仓"); |
|
|
|
|
throw new CustomerException(403,"库位不在当前仓"); |
|
|
|
|
} |
|
|
|
|
String warehouseName = basicdataWarehouseEntity.getName();//仓库名称
|
|
|
|
|
|
|
|
|
|
UpShelfAllocationVO upShelfAllocationVO = new UpShelfAllocationVO(); |
|
|
|
|
upShelfAllocationVO.setWarehouseId(warehouseId); |
|
|
|
|
upShelfAllocationVO.setWarehouseName(warehouseName); |
|
|
|
|
upShelfAllocationVO.setAreaId(goodsAreaId); |
|
|
|
|
upShelfAllocationVO.setAreaTitle(goodsAreaName); |
|
|
|
|
upShelfAllocationVO.setShelfId(goodsShelfId); |
|
|
|
|
upShelfAllocationVO.setShelfTitle(goodsShelfName); |
|
|
|
|
upShelfAllocationVO.setAllocationId(allocationId); |
|
|
|
|
upShelfAllocationVO.setAllocationTitle(goodsAllocationName); |
|
|
|
|
return upShelfAllocationVO; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|