Browse Source

Merge branch 'dev' into pre-production

master
汤建军 10 months ago
parent
commit
cafd547276
  1. 3
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java
  2. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  3. 16
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java
  4. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java
  5. 71
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

3
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java

@ -61,6 +61,9 @@ public interface IWarehouseUpdownTypeClient {
@GetMapping(TOP + "/downPackageOrDelTray")
R downPackageOrDelTray(@RequestParam("orderPackageCodes") String orderPackageCodes, @RequestParam("warehouseId") Long warehouseId,@RequestParam("remark") String remark);
@GetMapping(TOP + "/downPackageAndDelTrayAndIsUpdate")
R downPackageAndDelTrayAndIsUpdate(@RequestParam("orderPackageCodes") String orderPackageCodes, @RequestParam("warehouseId") Long warehouseId,@RequestParam("remark") String remark,@RequestParam("isOrNo") boolean isOrNo);
@GetMapping(TOP + "/downTray")
R downTray(@RequestParam("trayCode") String trayCode, @RequestParam("warehouseId") Long warehouseId);

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -729,7 +729,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Map<String,Object> info = new HashMap<>();
info.put("orderPackageCode",parcelListEntity.getOrderPackageCode());
info.put("warehouseId",myCurrentWarehouse.getId());
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId(),"扫描装车进行下架、解托");
warehouseUpdownTypeClient.downPackageAndDelTrayAndIsUpdate(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId(),"扫描装车进行下架、解托",false);
Map<String, Object> map = new HashMap();
String distrilbutionloadingscanDTOJson = JSONObject.toJSONString(distrilbutionloadingscanDTO);

16
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java

@ -97,6 +97,22 @@ public class WarehouseUpdownTypeClient implements IWarehouseUpdownTypeClient {
}
}
@Override
public R downPackageAndDelTrayAndIsUpdate(String orderPackageCodes,Long warehouseId,String remark,boolean isOrNo) {
List<UpShelfPackageDTO> upShelfPackageList = new ArrayList<>();
String[] split = orderPackageCodes.split(",");
for(String orderPackageCode:split){
UpShelfPackageDTO dto = new UpShelfPackageDTO();
dto.setOrderPackageCode(orderPackageCode);
upShelfPackageList.add(dto);
}
if(!upShelfPackageList.isEmpty()){
return warehouseUpdownTypeService.downPackageAndDelTrayAndIsUpdate(upShelfPackageList,warehouseId,remark,isOrNo);
}else{
return R.fail(403,"处理失败");
}
}
@Override
public R downTray(String trayCode, Long warehouseId) {
return warehouseUpdownTypeService.downTrayCode(trayCode,warehouseId);

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java

@ -39,6 +39,8 @@ public interface IWarehouseUpdownTypeService extends BaseService<WarehouseUpdown
R downPackageOrDelTray(List<UpShelfPackageDTO> upShelfPackageList,Long warehouseId,String remark);
R downPackageAndDelTrayAndIsUpdate(List<UpShelfPackageDTO> upShelfPackageList,Long warehouseId,String remark,boolean isOrNO);
R downZeroOrder(List<UpShelfZeroOrderDTO> upShelfPackageList,Long warehouseId,String remark);
R downEnterStock(String code, Integer stockType, Long marketId,Long warehouseId);

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

@ -1582,6 +1582,77 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
return Resp.scanSuccess("下架成功","成功下架"+num+"件");
}
@Override
public R downPackageAndDelTrayAndIsUpdate(List<UpShelfPackageDTO> upShelfPackageList,Long warehouseId,String remark,boolean isOrNo) {
int num = 0;
Set<String> orderSet = new TreeSet<>();
for (UpShelfPackageDTO upShelfPackageDTO:upShelfPackageList){
String orderPackageCode = upShelfPackageDTO.getOrderPackageCode();
//查询包件在哪个库位上
QueryWrapper<WarehouseUpdownGoodsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("association_type","3")
.eq("warehouse_id",warehouseId)
.eq("association_value",orderPackageCode);
WarehouseUpdownGoodsEntity updownGoodsEntity = warehouseUpdownGoodsService.getOne(queryWrapper);
if(Objects.isNull(updownGoodsEntity)){
log.warn("##############downPackage: 包件没有上架记录 orderPackageCode={}",orderPackageCode);
//判断是否有打托记录
QueryWrapper<WarehouseTrayGoodsEntity> trayGoodsEntityQueryWrapper = new QueryWrapper<>();
trayGoodsEntityQueryWrapper.eq("association_type","3")
.eq("warehouse_id",warehouseId)
.eq("association_value",orderPackageCode);
WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = warehouseTrayGoodsService.getOne(trayGoodsEntityQueryWrapper);
if(!Objects.isNull(warehouseTrayGoodsEntity)){
//有托盘,托盘下托
warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode,remark,warehouseId);
}
continue;
}
Long allocationId = updownGoodsEntity.getAllocationId();
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode,warehouseId);
Integer quantity = parcelListEntity.getQuantity();
String orderCode = parcelListEntity.getOrderCode();
Long updownGoodsId = updownGoodsEntity.getId();
Long updownTypeId = updownGoodsEntity.getUpdownTypeId();
WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId);
QueryWrapper<WarehouseTaryAllocationEntity> taryAllocationEntityQueryWrapper = new QueryWrapper<>();
taryAllocationEntityQueryWrapper.eq("allocation_id",allocationId)
.eq("is_deleted",0);
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.getOne(taryAllocationEntityQueryWrapper);
// BasicdataTrayEntity trayEntity = warehouseTaryAllocationService.getTrayByAllocationId(allocationId);
if(!Objects.isNull(taryAllocationEntity)){
//有托盘,托盘下托
warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode,remark,warehouseId);
}
Integer residue = warehouseUpdownGoodsService.deleteByUpdownGoodsId(updownGoodsId);
if(residue == 0){
//删除上架方式
removeById(updownTypeId);
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1");
//如果有托盘还要删除托盘与库位的绑定
if(!Objects.isNull(taryAllocationEntity)){
warehouseTaryAllocationService.deleteById(taryAllocationEntity);
}
}
warehouseUpdownGoodsLogService.saveAllocationAndPackage(updownTypeEntity,parcelListEntity,"2",0,remark);
if (isOrNo){
updatePackageGroundingStatus(orderPackageCode,"10",warehouseId);
}
updateUpdownTypeNum(updownTypeEntity);
orderSet.add(orderCode);
num = num + quantity;
warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString());
}
for (String orderCode : orderSet) {
distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId);
}
return Resp.scanSuccess("下架成功","成功下架"+num+"件");
}
@Override
public R downZeroOrder(List<UpShelfZeroOrderDTO> upShelfPackageList,Long warehouseId,String remark) {
StringBuffer stringBuffer = new StringBuffer("下架零担订单成功");

Loading…
Cancel
Save