|
|
|
@ -1072,7 +1072,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
//修改库位状态为空闲
|
|
|
|
|
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1"); |
|
|
|
|
} |
|
|
|
|
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:零担下架"); |
|
|
|
|
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:零担下架",updownTypeEntity.getWarehouseId()); |
|
|
|
|
updateUpdownTypeNum(updownTypeEntity); |
|
|
|
|
}else{ |
|
|
|
|
if(!Objects.isNull(trayEntity)){ |
|
|
|
@ -1085,7 +1085,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
warehouseUpdownGoodsService.updeteNumByUpdownGoodsId(residue,updownGoodsId); |
|
|
|
|
|
|
|
|
|
//存入日志
|
|
|
|
|
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:零担部分下架"); |
|
|
|
|
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:零担部分下架",updownTypeEntity.getWarehouseId()); |
|
|
|
|
} |
|
|
|
|
updateZeroOrderGroundingStatus(orderCode); |
|
|
|
|
updateUpdownTypeNum(updownTypeEntity); |
|
|
|
@ -1182,7 +1182,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
//修改库位状态为空闲
|
|
|
|
|
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1"); |
|
|
|
|
} |
|
|
|
|
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:库存品下架"); |
|
|
|
|
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:库存品下架",updownTypeEntity.getWarehouseId()); |
|
|
|
|
// updateUpdownTypeNum(updownTypeEntity);
|
|
|
|
|
}else{ |
|
|
|
|
if(!Objects.isNull(trayEntity)){ |
|
|
|
@ -1206,7 +1206,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
warehouseUpdownGoodsService.updeteNumByUpdownGoodsId(residue,updownGoodsId); |
|
|
|
|
|
|
|
|
|
//存入日志
|
|
|
|
|
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:库存品部分下架"); |
|
|
|
|
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:库存品部分下架",updownTypeEntity.getWarehouseId()); |
|
|
|
|
} |
|
|
|
|
updateUpdownTypeNum(updownTypeEntity); |
|
|
|
|
allNum = allNum + enterNum; |
|
|
|
@ -1242,7 +1242,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
return R.fail(basicdataGoodsAllocationClient.getEntityByAllocationId(allocationId).getGoodsAllocationName()+"暂无下架物品"); |
|
|
|
|
} |
|
|
|
|
//存入下架日志
|
|
|
|
|
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:按库位下架"); |
|
|
|
|
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:按库位下架",updownTypeEntity.getWarehouseId()); |
|
|
|
|
//删除绑定关系
|
|
|
|
|
warehouseUpdownGoodsService.deleteEntityList(updownGoodsList); |
|
|
|
|
//上架方式删除
|
|
|
|
@ -1575,7 +1575,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveUpdownGoodsLogPart(List<WarehouseUpdownGoodsEntity> updownGoodsList, int residue, String bindingType, Integer isAlltrays, String remark) { |
|
|
|
|
private void saveUpdownGoodsLogPart(List<WarehouseUpdownGoodsEntity> updownGoodsList, int residue, String bindingType, Integer isAlltrays, String remark,Long warehouseId) { |
|
|
|
|
List<WarehouseUpdownGoodsLogEntity> updownGoodsLogList = new ArrayList<>(); |
|
|
|
|
for (WarehouseUpdownGoodsEntity updownGoodsEntity:updownGoodsList){ |
|
|
|
|
WarehouseUpdownGoodsLogEntity updownGoodsLogEntity = new WarehouseUpdownGoodsLogEntity(); |
|
|
|
@ -1584,6 +1584,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
updownGoodsLogEntity.setBindingType(bindingType); |
|
|
|
|
updownGoodsLogEntity.setIsAlltrays(isAlltrays); |
|
|
|
|
updownGoodsLogEntity.setRemark(remark); |
|
|
|
|
updownGoodsLogEntity.setWarehouseId(warehouseId); |
|
|
|
|
updownGoodsLogList.add(updownGoodsLogEntity); |
|
|
|
|
} |
|
|
|
|
warehouseUpdownGoodsLogService.saveBatch(updownGoodsLogList); |
|
|
|
@ -1609,13 +1610,16 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
.eq("association_value",materialCode) |
|
|
|
|
.eq("incoming_batch",incomingBatch); |
|
|
|
|
WarehouseUpdownGoodsEntity updownGoodsEntity = warehouseUpdownGoodsService.getOne(queryWrapper); |
|
|
|
|
DistributionStockListEntity stockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(marketId, materialCode,incomingBatch); |
|
|
|
|
if(!Objects.isNull(updownGoodsEntity)){ |
|
|
|
|
Integer num = updownGoodsEntity.getNum(); |
|
|
|
|
if (enterNum>num){ |
|
|
|
|
int i = num + enterNum; |
|
|
|
|
//对比原库存数量
|
|
|
|
|
if (i>stockListEntity.getQuantityStock()){ |
|
|
|
|
stringBuffer.append("{").append(materialCode).append("},"); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
updownGoodsEntity.setNum(num+enterNum); |
|
|
|
|
updownGoodsEntity.setNum(i); |
|
|
|
|
updownGoodsList.add(updownGoodsEntity); |
|
|
|
|
//存入日志对象
|
|
|
|
|
WarehouseUpdownGoodsEntity oldUpdownGoodsEntity = new WarehouseUpdownGoodsEntity(); |
|
|
|
@ -1624,7 +1628,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
oldUpdownGoodsEntity.setId(null); |
|
|
|
|
updownGoodsLogList.add(oldUpdownGoodsEntity); |
|
|
|
|
}else{ |
|
|
|
|
DistributionStockListEntity stockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(marketId, materialCode,incomingBatch); |
|
|
|
|
//对比原库存数量
|
|
|
|
|
if (enterNum>stockListEntity.getQuantityStock()){ |
|
|
|
|
stringBuffer.append("{").append(materialCode).append("},"); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
updownGoodsEntity = new WarehouseUpdownGoodsEntity(); |
|
|
|
|
updownGoodsEntity.setUpdownTypeId(updownTypeEntity.getId()); |
|
|
|
|
updownGoodsEntity.setAreaId(updownTypeEntity.getAreaId()); |
|
|
|
@ -1649,7 +1657,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
} |
|
|
|
|
warehouseUpdownGoodsService.saveOrUpdateBatch(updownGoodsList); |
|
|
|
|
|
|
|
|
|
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:库存品上架"); |
|
|
|
|
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:库存品上架",updownTypeEntity.getWarehouseId()); |
|
|
|
|
return stringBuffer.toString(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1742,7 +1750,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
warehouseUpdownGoodsService.saveOrUpdateBatch(updownGoodsList); |
|
|
|
|
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:零担上架"); |
|
|
|
|
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:零担上架",updownTypeEntity.getWarehouseId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private R saveTrayGoodsToAllocation(WarehouseTrayTypeEntity trayTypeEntity, BasicdataGoodsAllocationEntity goodsAllocationEntity, BasicdataGoodsShelfEntity goodsShelfEntity, BasicdataGoodsAreaEntity goodsAreaEntity,Long warehouseId) { |
|
|
|
@ -1821,12 +1829,12 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
} |
|
|
|
|
warehouseUpdownGoodsService.saveBatch(updownGoodsList); |
|
|
|
|
|
|
|
|
|
saveUpdownGoodsLog(updownGoodsList,"1",1,"扫描上架:托盘上架"); |
|
|
|
|
saveUpdownGoodsLog(updownGoodsList,"1",1,"扫描上架:托盘上架",updownTypeEntity.getWarehouseId()); |
|
|
|
|
|
|
|
|
|
return updownGoodsList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void saveUpdownGoodsLog(List<WarehouseUpdownGoodsEntity> updownGoodsList, String bindingType, Integer isAlltrays, String remark) { |
|
|
|
|
private void saveUpdownGoodsLog(List<WarehouseUpdownGoodsEntity> updownGoodsList, String bindingType, Integer isAlltrays, String remark,Long warehouseId) { |
|
|
|
|
List<WarehouseUpdownGoodsLogEntity> updownGoodsLogList = new ArrayList<>(); |
|
|
|
|
for (WarehouseUpdownGoodsEntity updownGoodsEntity:updownGoodsList){ |
|
|
|
|
WarehouseUpdownGoodsLogEntity updownGoodsLogEntity = new WarehouseUpdownGoodsLogEntity(); |
|
|
|
@ -1835,6 +1843,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
updownGoodsLogEntity.setBindingType(bindingType); |
|
|
|
|
updownGoodsLogEntity.setIsAlltrays(isAlltrays); |
|
|
|
|
updownGoodsLogEntity.setRemark(remark); |
|
|
|
|
updownGoodsLogEntity.setWarehouseId(warehouseId); |
|
|
|
|
updownGoodsLogList.add(updownGoodsLogEntity); |
|
|
|
|
} |
|
|
|
|
warehouseUpdownGoodsLogService.saveBatch(updownGoodsLogList); |
|
|
|
|