Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 11 months ago
parent
commit
f4ee0f057c
  1. 8
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java
  2. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

8
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java

@ -36,14 +36,6 @@ public class TrunklineAdvanceEntity extends TenantEntity {
/** 仓库名称 */
@ApiModelProperty(name = "仓库名称",notes = "")
private String warehouseName ;
/** 入库仓库id */
@ApiModelProperty(name = "入库仓库id",notes = "")
private Long incomingWarehouseId ;
/** 入库仓库名称 */
@ApiModelProperty(name = "入库仓库名称",notes = "")
private String incomingWarehouseName ;
/** 订单自编码 */
@ApiModelProperty(name = "订单自编码",notes = "")
private String orderCode ;

21
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -235,7 +235,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
DistributionStockListEntity one2 = this.getOne(Wrappers.<DistributionStockListEntity>query().lambda()
.eq(DistributionStockListEntity::getMaterialId, distributionStockListDTO.getMaterialId())
.eq(ObjectUtil.isNotEmpty(distributionStockListDTO.getMaterialId()),DistributionStockListEntity::getMaterialId, distributionStockListDTO.getMaterialId())
.eq(DistributionStockListEntity::getPid, distributionStockListDTO.getId())
.eq(DistributionStockListEntity::getMarketId, distributionStockListDTO.getMarketId())
.eq(DistributionStockListEntity::getWarehouseId, myCurrentWarehouse.getId())
@ -246,7 +246,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
DistributionStockListEntity one = this.getOne(Wrappers.<DistributionStockListEntity>query().lambda()
.eq(DistributionStockListEntity::getId, distributionStockListDTO.getId())
.eq(DistributionStockListEntity::getMarketId, distributionStockListDTO.getMarketId())
.eq(DistributionStockListEntity::getMaterialId, distributionStockListDTO.getMaterialId())
// .eq(DistributionStockListEntity::getMaterialId, distributionStockListDTO.getMaterialId())
.eq(DistributionStockListEntity::getWarehouseId, myCurrentWarehouse.getId())
.eq(ObjectUtil.isNotEmpty(distributionStockListDTO.getStoreId()), DistributionStockListEntity::getStoreId, distributionStockListDTO.getStoreId())
);
@ -254,7 +254,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
//查询是否存在有拆包产物
//存在则是进行数量的累加
//有修改
DistributionStockListEntity d = new DistributionStockListEntity();
DistributionStockListEntity d = one2;
d.setId(one2.getId());
int i = one2.getQuantityStock() + (distributionStockListDTO.getStoreNum() * Integer.parseInt(distributionStockListDTO.getPackageNum()));
d.setQuantityStock(i);
@ -267,7 +267,15 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
distributionStockListInfo.setStockListId(d.getId());
distributionStockListInfo.setOutboundQuantity(0);
distributionStockListInfo.setGroundingTime(new Date());
distributionStockListInfo.setQuantityStock(i);
distributionStockListInfo.setQuantityStock((distributionStockListDTO.getStoreNum() * Integer.parseInt(distributionStockListDTO.getPackageNum())));
// distributionStockListInfo.setOrderCode(one.getOrderCode());
// distributionStockListInfo.setIncomingBatch(one.getIncomingBatch());
// distributionStockListInfo.setServiceNumber(one.getServiceNumber());
// distributionStockListInfo.setMallName(one.getMallName());
// distributionStockListInfo.setMarketId(one.getMarketId());
// distributionStockListInfo.setMarketId(one.getMarketId());
distributionStockListInfo.setPid(distributionStockListDTO.getId());
distributionStockListInfo.setSourceType("2");
distributionStockListInfoService.save(distributionStockListInfo);
//添加拆包记录
distributionUnpackingDetails.setStockArticleId(Optional.ofNullable(one2.getStockArticleId()).orElse(null));
@ -293,7 +301,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
basicMaterialEntity.setPid(distributionStockListDTO.getMaterialId());
aLong = basicMaterialClient.addMaterial(basicMaterialEntity);
}else {
aLong = one.getMaterialId();
aLong = materialByProductCode.getId();
}
if (Func.isNotEmpty(one)) {
//生成新的库存品信息
@ -311,6 +319,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
distributionStockListEntity.setCargoNumber(distributionStockListDTO.getCargoNumber());
distributionStockListEntity.setCargoNorms(distributionStockListDTO.getCargoNorms());
distributionStockListEntity.setQuantityOccupied(0);
distributionStockListEntity.setIncomingBatch(one.getIncomingBatch());
distributionStockListEntity.setId(null);
this.save(distributionStockListEntity);
//新增入库记录
@ -319,6 +328,8 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
distributionStockListInfo.setStockListId(distributionStockListEntity.getId());
distributionStockListInfo.setOutboundQuantity(0);
distributionStockListInfo.setGroundingTime(new Date());
distributionStockListInfo.setPid(distributionStockListDTO.getId());
distributionStockListInfo.setSourceType("2");
distributionStockListInfo.setQuantityStock((distributionStockListDTO.getStoreNum() * Integer.parseInt(distributionStockListDTO.getPackageNum())));
distributionStockListInfoService.save(distributionStockListInfo);
//添加拆包记录

Loading…
Cancel
Save