Browse Source

1.有数据转了库存品也能扫码

training
zhenghaoyu 12 months ago
parent
commit
ab5b669c88
  1. 1
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/UpShelfDataVO.java
  2. 16
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  3. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java
  4. 21
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

1
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/UpShelfDataVO.java

@ -21,5 +21,6 @@ public class UpShelfDataVO implements Serializable {
private String materialName;//物料名称
private String incomingBatch;//批次号
private Integer goodsType;//货物类型
private Integer conditions;//1 订制品 2库存品
}

16
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -418,10 +418,10 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
return Resp.scanFail(2001,"包件不在当前仓","包件不在当前仓");
}
if(conditions.equals(2)){
log.warn("##############orderScanOrderPackageCode: 包件已转库存品 orderPackageCode={} conditions={}",orderPackageCode,conditions);
return Resp.scanFail(2001,"包件已转库存品","包件已转库存品");
}
// if(conditions.equals(2)){
// log.warn("##############orderScanOrderPackageCode: 包件已转库存品 orderPackageCode={} conditions={}",orderPackageCode,conditions);
// return Resp.scanFail(2001,"包件已转库存品","包件已转库存品");
// }
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode,warehouseId);
if(Objects.isNull(stockArticleEntity)){
@ -609,10 +609,10 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
return Resp.scanFail(2001,"包件不在当前仓","包件不在当前仓");
}
if(conditions.equals(2)){
log.warn("##############orderScanOrderPackageCode: 包件已转库存品 orderPackageCode={} conditions={}",orderPackageCode,conditions);
return Resp.scanFail(2001,"包件已转库存品","包件已转库存品");
}
// if(conditions.equals(2)){
// log.warn("##############orderScanOrderPackageCode: 包件已转库存品 orderPackageCode={} conditions={}",orderPackageCode,conditions);
// return Resp.scanFail(2001,"包件已转库存品","包件已转库存品");
// }
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode,warehouseId);
if(Objects.isNull(stockArticleEntity)){

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -345,6 +345,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
dataVO.setOrderPackageCode(parcelListEntity.getOrderPackageCode());
dataVO.setTotalNum(1);
dataVO.setGoodsType(0);
dataVO.setConditions(parcelListEntity.getConditions());
ls.add(dataVO);
return ls;
}else if(upshelfScanType == 4){

21
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -252,7 +252,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
}
//第一次生成订单也要生成包件信息
List<DistributionParcelListEntity> ls = new ArrayList<>();
List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>();
for (WarehouseWayBillDetail warehouseWayBillDetail : details) {
DistributionParcelListEntity entity = new DistributionParcelListEntity();
entity.setFirsts(warehouseWayBillDetail.getProductName());
@ -278,20 +278,15 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
entity.setSendWarehouseName(warehouseWaybill.getDepartureWarehouseName());
entity.setAcceptWarehouseId(warehouseWaybill.getDestinationWarehouseId());
entity.setAcceptWarehouseName(warehouseWaybill.getDestinationWarehouseName());
ls.add(entity);
}
boolean b = distributionParcelListClient.addBatch(ls);
if (!b) {
log.warn("#################createStockArticle: 保存包件信息失败 orderSelfNum={}", waybillNo);
throw new CustomerException(405, "保存包件信息失败");
}
Long aLong = distributionParcelListClient.addReturnId(entity);
List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>();
for (DistributionParcelListEntity entity:ls){
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity();
parcelNumberEntity.setStockArticleId(id);
parcelNumberEntity.setParcelListId(entity.getId());
parcelNumberEntity.setParcelListId(aLong);
parcelNumberEntity.setTenantId("627683");
parcelNumberEntity.setCreateUser(distributionStockArticleEntity.getCreateUser());
parcelNumberEntity.setUpdateUser(distributionStockArticleEntity.getCreateUser());
parcelNumberEntity.setCreateDept(distributionStockArticleEntity.getCreateDept());
if(totalCount.equals(stockCount)){
parcelNumberEntity.setHandQuantity(entity.getQuantity());
}else{
@ -302,9 +297,11 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
parcelNumberEntity.setSigninQuantity(0);
parcelNumberEntity.setOutboundQuantity(0);
parcelNumberList.add(parcelNumberEntity);
}
//存入零担订单包件数量
distributionParcelNumberClient.addBatch(parcelNumberList);
} else {
id = distributionStockArticleEntity.getId();

Loading…
Cancel
Save