Browse Source

1.库内作业修复展示数据bug

training
zhenghaoyu 1 year ago
parent
commit
93cb7bea00
  1. 1
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TrayTypeDataListVO.java
  2. 3
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseUpdownGoodsVO.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  4. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.java
  5. 17
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.xml
  6. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownGoodsService.java
  7. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  8. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsServiceImpl.java
  9. 12
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java
  10. 23
      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/TrayTypeDataListVO.java

@ -22,6 +22,7 @@ public class TrayTypeDataListVO implements Serializable {
private Integer isFleeing;//是否串货 1是0否
private Integer orderTotalNum;//订单总件数
private Integer residueNum;//剩余件数
private List<PositionVO> positionList = new ArrayList<>();

3
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseUpdownGoodsVO.java

@ -11,4 +11,7 @@ public class WarehouseUpdownGoodsVO extends WarehouseUpdownGoodsEntity {
private String orderCode;
private String waybillNumber;
private String warehouseName;
private String materialName;
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -1049,7 +1049,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
@Override
public DistributionStockArticleEntity findStockArticleByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) {
QueryWrapper<DistributionStockArticleEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.like("order_code",orderCode)
queryWrapper.eq("order_code",orderCode)
.eq("warehouse_id",warehouseId)
// .eq("is_zero",1)
.eq("is_deleted",0);

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.java

@ -82,7 +82,7 @@ public interface WarehouseUpdownGoodsMapper extends BaseMapper<WarehouseUpdownGo
List<PositionVO> getUpdownGoodsByStock(@Param("marketId") Long marketId, @Param("materialCode") String materialCode, @Param("incomingBatch") String incomingBatch,@Param("warehouseId") Long warehouseId);
List<WarehouseUpdownGoodsEntity> findUpdownStockByMaterialName(@Param("materialName") String materialName, @Param("marketId") Long marketId,@Param("warehouseId") Long warehouseId);
List<WarehouseUpdownGoodsVO> findUpdownStockByMaterialName(@Param("materialName") String materialName, @Param("marketId") Long marketId,@Param("warehouseId") Long warehouseId);
List<WarehouseUpdownGoodsVO> getZeroOrderList(@Param("orderCode") String orderCode,@Param("warehouseId") Long warehouseId);
@ -94,6 +94,8 @@ public interface WarehouseUpdownGoodsMapper extends BaseMapper<WarehouseUpdownGo
Integer selectCountNumByshelf(@Param("goodsAreaId") Long goodsAreaId,@Param("goodsShelfId") Long goodsShelfId);
List<WarehouseUpdownGoodsVO> findUpdownStockByMaterialCode(@Param("materialCode") String materialCode, @Param("marketId") Long marketId, @Param("warehouseId") Long warehouseId);
// /**
// * 根据货位查询货物

17
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.xml

@ -236,8 +236,10 @@
and lwug.warehouse_id = #{warehouseId}
</select>
<select id="findUpdownStockByMaterialName" resultType="com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity">
select lwug.*
<select id="findUpdownStockByMaterialName" resultType="com.logpm.warehouse.vo.WarehouseUpdownGoodsVO">
select lwug.*,
ldsl.description_goods materialName,
ldsl.warehouse_name warehouseName
from logpm_warehouse_updown_goods lwug
left join logpm_distribution_stock_list ldsl on ldsl.market_id = lwug.market_id and ldsl.incoming_batch = lwug.incoming_batch and ldsl.material_id = lwug.association_id and lwug.is_deleted = 0
where ldsl.description_goods like concat('%',#{materialName},'%')
@ -282,4 +284,15 @@
</select>
<select id="findUpdownStockByMaterialCode" resultType="com.logpm.warehouse.vo.WarehouseUpdownGoodsVO">
select lwug.*,
ldsl.description_goods materialName,
ldsl.warehouse_name warehouseName
from logpm_warehouse_updown_goods lwug
left join logpm_distribution_stock_list ldsl on ldsl.market_id = lwug.market_id and ldsl.incoming_batch = lwug.incoming_batch and ldsl.material_id = lwug.association_id and lwug.is_deleted = 0
where ldsl.cargo_number like concat('%',#{materialCode},'%')
and ldsl.market_id = #{marketId}
and ldsl.warehouse_id = #{warehouseId}
</select>
</mapper>

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownGoodsService.java

@ -117,7 +117,7 @@ public interface IWarehouseUpdownGoodsService extends BaseService<WarehouseUpdow
List<PositionVO> getUpdownGoodsByStock(Long marketId, String materialCode, String incomingBatch,Long warehouseId);
List<WarehouseUpdownGoodsEntity> findUpdownStockByMaterialName(String materialName, Long marketId,Long warehouseId);
List<WarehouseUpdownGoodsVO> findUpdownStockByMaterialName(String materialName, Long marketId,Long warehouseId);
List<WarehouseUpdownGoodsVO> getZeroOrderList(String orderCode,Long warehouseId);
@ -128,4 +128,6 @@ public interface IWarehouseUpdownGoodsService extends BaseService<WarehouseUpdow
ParcelListVO findAllUpShelfDataByOrderCode(String orderCode);
Integer selectCountNumByshelf(Long goodsAreaId, Long goodsShelfId);
List<WarehouseUpdownGoodsVO> findUpdownStockByMaterialCode(String materialCode, Long marketId, Long warehouseId);
}

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

@ -693,15 +693,17 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
for (TrayTypeDataListVO trayTypeDataListVO:zeroOrderByWaybillCode){
Long orderId = trayTypeDataListVO.getDataId();
Integer orderTotalNum = trayTypeDataListVO.getOrderTotalNum();
Integer residueNum = orderTotalNum;
//查询该零担的库位数据
List<PositionVO> updownGoodsEntities = warehouseUpdownGoodsService.getUpdownGoodsByZeroOrderId(orderId,warehouseId);
List<PositionVO> trayGoodsEntities = warehouseTrayGoodsService.getTrayGoodsByZeroOrderIdNoAllocationId(orderId,warehouseId);
updownGoodsEntities.addAll(trayGoodsEntities);
for (PositionVO positionVO:updownGoodsEntities){
Integer num = positionVO.getNum();
orderTotalNum = orderTotalNum - num;
residueNum = residueNum - num;
}
trayTypeDataListVO.setOrderTotalNum(orderTotalNum);
trayTypeDataListVO.setResidueNum(residueNum);
trayTypeDataListVO.setPositionList(updownGoodsEntities);
}

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsServiceImpl.java

@ -195,7 +195,7 @@ public class WarehouseUpdownGoodsServiceImpl extends BaseServiceImpl<WarehouseUp
}
@Override
public List<WarehouseUpdownGoodsEntity> findUpdownStockByMaterialName(String materialName, Long marketId,Long warehouseId) {
public List<WarehouseUpdownGoodsVO> findUpdownStockByMaterialName(String materialName, Long marketId,Long warehouseId) {
return baseMapper.findUpdownStockByMaterialName(materialName,marketId,warehouseId);
}
@ -224,4 +224,9 @@ public class WarehouseUpdownGoodsServiceImpl extends BaseServiceImpl<WarehouseUp
return baseMapper.selectCountNumByshelf(goodsAreaId,goodsShelfId);
}
@Override
public List<WarehouseUpdownGoodsVO> findUpdownStockByMaterialCode(String materialCode, Long marketId, Long warehouseId) {
return baseMapper.findUpdownStockByMaterialCode(materialCode,marketId,warehouseId);
}
}

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

@ -1129,16 +1129,16 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
if(1==stockType){
//1物料编码
String materialCode = code;
QueryWrapper<WarehouseUpdownGoodsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.like("association_value",materialCode)
.eq("warehouse_id",warehouseId)
.eq("market_id",marketId);
List<WarehouseUpdownGoodsEntity> list = warehouseUpdownGoodsService.list(queryWrapper);
// QueryWrapper<WarehouseUpdownGoodsEntity> queryWrapper = new QueryWrapper<>();
// queryWrapper.like("association_value",materialCode)
// .eq("warehouse_id",warehouseId)
// .eq("market_id",marketId);
List<WarehouseUpdownGoodsVO> list = warehouseUpdownGoodsService.findUpdownStockByMaterialCode(materialCode,marketId,warehouseId);
return R.data(list);
}else if (2==stockType){
//2物料名称
String materialName = code;
List<WarehouseUpdownGoodsEntity> list = warehouseUpdownGoodsService.findUpdownStockByMaterialName(materialName,marketId,warehouseId);
List<WarehouseUpdownGoodsVO> list = warehouseUpdownGoodsService.findUpdownStockByMaterialName(materialName,marketId,warehouseId);
return R.data(list);
}else{
log.warn("#################getZeroOrderByCode: 未知的订单查询类型");

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

@ -172,7 +172,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity.setWaybillNumber(waybillNo);
distributionStockArticleEntity.setWaybillId(warehouseWaybill.getId());
distributionStockArticleEntity.setWarehouseId(basicdataWarehouseEntity.getId());
distributionStockArticleEntity.setMallName(warehouseWaybill.getConsigneeName());
distributionStockArticleEntity.setMallName(warehouseWaybill.getConsignee());
distributionStockArticleEntity.setMallId(warehouseWaybill.getConsigneeId());
distributionStockArticleEntity.setDescriptionGoods(warehouseWaybill.getGoodsName());
distributionStockArticleEntity.setWarehouse(basicdataWarehouseEntity.getName());
@ -197,7 +197,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold());
}
}
distributionStockArticleEntity.setCustomerName(customerName);
distributionStockArticleEntity.setCustomerName(warehouseWaybill.getConsigneeName());
distributionStockArticleEntity.setCustomerTelephone(warehouseWaybill.getConsigneeMobile());
distributionStockArticleEntity.setCustomerAddress(warehouseWaybill.getConsigneeAddress());
distributionStockArticleEntity.setGenre(1);
@ -235,6 +235,23 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
log.warn("#################createStockArticle: 保存订单信息失败 orderSelfNum={}", waybillNo);
throw new CustomerException(405, "保存订单信息失败");
}
//第一次生成订单也要生成包件信息
List<DistributionParcelListEntity> ls = new ArrayList<>();
for (WarehouseWayBillDetail warehouseWayBillDetail : details) {
DistributionParcelListEntity entity = new DistributionParcelListEntity();
entity.setMaterialName(warehouseWayBillDetail.getProductName());
entity.setQuantity(warehouseWayBillDetail.getNum());
entity.setConditions(3);
entity.setStockArticleId(id);
ls.add(entity);
}
boolean b = distributionParcelListClient.addBatch(ls);
if (!b) {
log.warn("#################createStockArticle: 保存包件信息失败 orderSelfNum={}", waybillNo);
throw new CustomerException(405, "保存包件信息失败");
}
} else {
id = distributionStockArticleEntity.getId();
@ -247,7 +264,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
}
// 存入包件信息
//存入包件信息
// List<WarehouseWayBillDetail> details = warehouseWayBillDetailService.findByWaybillId(waybillId);
//
//

Loading…
Cancel
Save