|
|
|
@ -45,12 +45,14 @@ import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
|
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
|
import org.springblade.common.constant.DictBizConstant; |
|
|
|
|
import org.springblade.common.constant.Inventory.InventoryStockUpStatusConstant; |
|
|
|
|
import org.springblade.common.constant.billLading.BillLadingStatusConstant; |
|
|
|
|
import org.springblade.common.constant.order.OrderReservationStatusConstant; |
|
|
|
|
import org.springblade.common.constant.order.OrderStatusConstant; |
|
|
|
|
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant; |
|
|
|
|
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant; |
|
|
|
|
import org.springblade.common.constant.pda.PdaAudioLingoStatus; |
|
|
|
|
import org.springblade.common.constant.reservation.ReservationPackageStatusConstant; |
|
|
|
|
import org.springblade.common.constant.stockup.StockAssignStatusConstant; |
|
|
|
|
import org.springblade.common.constant.stockup.StockupStatusConstant; |
|
|
|
|
import org.springblade.common.constant.stockup.StockupTypeConstant; |
|
|
|
@ -1729,18 +1731,36 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = JSONObject.parseObject(JSONObject.toJSONString(distrilbutionBillLading), DistrilbutionBillLadingEntity.class); |
|
|
|
|
IPage<DistrilbutionBillLadingAppVO> inventory = baseMapper.getInventory(page, distrilbutionBillLadingEntity); |
|
|
|
|
inventory.getRecords().forEach(i -> { |
|
|
|
|
|
|
|
|
|
if (i.getQuantity().equals(i.getDeliveryNum())) { |
|
|
|
|
//已备货
|
|
|
|
|
List<DistributionBillLadingScanEntity> list = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda() |
|
|
|
|
.eq(DistributionBillLadingScanEntity::getBillLadingId, distrilbutionBillLadingEntity.getId()) |
|
|
|
|
.eq(DistributionBillLadingScanEntity::getMaterialType, '1') |
|
|
|
|
); |
|
|
|
|
i.setEsauInventoryNum(list.size()); |
|
|
|
|
} else { |
|
|
|
|
//没有备货完成
|
|
|
|
|
List<DisStockListDetailEntity> listed = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda() |
|
|
|
|
.eq(DisStockListDetailEntity::getReservationId, i.getId()) |
|
|
|
|
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) |
|
|
|
|
); |
|
|
|
|
if (Func.isNotEmpty(listed)){ |
|
|
|
|
int sum = listed.stream().filter(f -> InventoryStockUpStatusConstant.yibeihuo.getValue().equals(f.getStockStatus()) && Func.isNotEmpty(f.getStockPackageCode())).mapToInt(DisStockListDetailEntity::getNum).sum(); |
|
|
|
|
log.info(i.getDescriptionGoods()+">>>>>>>>>>>>>>自提客户备货库存数量:",sum); |
|
|
|
|
if (sum == i.getQuantity()){ |
|
|
|
|
i.setEsauInventoryNum(sum); |
|
|
|
|
}else { |
|
|
|
|
i.setEsauInventoryNum(-1); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
i.setEsauInventoryNum(-1); |
|
|
|
|
} |
|
|
|
|
// if (i.getQuantity().equals(i.getDeliveryNum())) {
|
|
|
|
|
//已备货
|
|
|
|
|
// List<DistributionBillLadingScanEntity> list = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
|
|
|
|
|
// .eq(DistributionBillLadingScanEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
|
|
|
|
|
// .eq(DistributionBillLadingScanEntity::getMaterialType, '1')
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
// i.setEsauInventoryNum(list.size());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
//没有备货完成
|
|
|
|
|
// i.setEsauInventoryNum(-1);
|
|
|
|
|
// }
|
|
|
|
|
}); |
|
|
|
|
return inventory; |
|
|
|
|
|
|
|
|
@ -1808,6 +1828,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
distributionBillLadingScan.setStockListId(inventoryAppVO.getStockListId()); |
|
|
|
|
distributionBillLadingScan.setQuantity(1); |
|
|
|
|
distributionBillLadingScanService.save(distributionBillLadingScan); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
return Resp.scanFail("包件信息不存在", "包件信息不存在"); |
|
|
|
|
} |
|
|
|
@ -1914,7 +1936,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.info(coding + " > > 签收成功!!"); |
|
|
|
|
return Resp.scanSuccess("签收成功", ""); |
|
|
|
|
return Resp.scanSuccess("签收成功", "签收成功"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|