Browse Source

备货BUG修、滞留包条修改

dist.1.3.0
汤建军 7 months ago
parent
commit
859a851eff
  1. 16
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java
  2. 12
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java
  3. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionRecordVO.java
  4. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  6. 362
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  7. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  8. 56
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java
  9. 13
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java

16
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java

@ -94,6 +94,22 @@ public class DistributionRetentionScanVo {
*/
private Long waybillId;
/**
* 装车ID
*/
private Long loadingId;
/**
* 仓库Id
*/
private Long warehouseId;
/**
* 仓库名称
*/
private String warehouseName;
/**
* 零担滞留最大数
*/

12
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java

@ -241,4 +241,16 @@ public class WarehouseRetentionScanEntity extends TenantEntity {
@ApiModelProperty(value = "运单Id")
private Long waybillId;
/**
* 仓库Id
*/
@ApiModelProperty(value = "运单Id")
private Long warehouseId;
/**
* 仓库名称
*/
@ApiModelProperty(value = "运单Id")
private Long warehouseName;
}

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionRecordVO.java

@ -22,6 +22,7 @@ import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.List;
/**
@ -31,8 +32,7 @@ import java.util.List;
* @since 2023-08-09
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WarehouseRetentionRecordVO extends WarehouseRetentionRecordEntity {
public class WarehouseRetentionRecordVO implements Serializable {
private static final long serialVersionUID = 1L;

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -2029,6 +2029,7 @@
ldpl.waybill_number AS waybillNumber,
ldpl.waybill_id AS waybillId,
ldpl.order_package_status AS orderPackageStatus,
ldpl.warehouse_id AS warehouseId,
1 AS scanType
FROM
logpm_distribution_delivery_list AS lddl

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -1083,7 +1083,7 @@
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id = lds.id
LEFT JOIN logpm_distribution_delivery_details lddd on ldsi.reservation_id = lddd.bill_lading_id
<where>
ldsi.stockup_id =#{id} and lddd.inventory_status in (1,2)
ldsi.stockup_id =#{id} and lddd.inventory_status in (1,3)
</where>
</select>
<select id="detailOrderOwnSelf" resultType="com.logpm.distribution.vo.DistributionStockupVO">

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

@ -656,14 +656,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (parcelList.getConditions().equals(2)) {
return Resp.scanFail("此包件不是订制品", "此包件不是订制品");
}
if (OrderPackageStatusConstant.yiqianshou.getValue().equals(parcelList.getOrderPackageStatus())) {
return Resp.scanFail("包件已签收", "包件已签收");
}
if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelList.getOrderPackageLoadingStatus())) {
return Resp.scanFail("包件已装车", "包件已装车");
}
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
if (OrderPackageStatusConstant.yiqianshou.getValue().equals(parcelList.getOrderPackageStatus())) {
return Resp.scanFail("包件已签收", "包件已签收");
}
if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelList.getOrderPackageLoadingStatus())) {
return Resp.scanFail("包件已装车", "包件已装车");
}
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode())
.eq(DistributionLoadscanAbnormalEntity::getPackageId, parcelList.getId())
);
@ -676,15 +676,15 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}", distributionDeliveryListEntity.getTrainNumber(), collect);
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}else {
} else {
//这里需要判定文员是否对该异常进行驳回操作
List<DistributionLoadscanAbnormalEntity> collect = abnormalEntities.stream().filter(f -> distributionDeliveryListEntity.getId().equals(f.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(f.getReservationId())).collect(Collectors.toList());
if (!collect.isEmpty()) {
//存在异常操作
if (collect.size() == 1){
if (collect.size() == 1) {
//判断是否进行审核以及驳货操作
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = collect.get(0);
if (distributionLoadscanAbnormalEntity.getAuditingStatus().equals(3)){
if (distributionLoadscanAbnormalEntity.getAuditingStatus().equals(3)) {
return Resp.scanFail("包件异常已驳回", "包件异常已驳回");
}
}
@ -800,8 +800,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} else if (parcelListEntityList.isEmpty()) {
//查找出该包件信息
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getOne(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()).eq(DistributionParcelListEntity::getWarehouseId, myCurrentWarehouse.getId()));
@ -2685,8 +2683,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
private void checkArgs(DistributionDeliveryListDTO deliveryListDTO,BasicdataWarehouseEntity myCurrentWarehouse ){
private void checkArgs(DistributionDeliveryListDTO deliveryListDTO, BasicdataWarehouseEntity myCurrentWarehouse) {
if (Func.isEmpty(deliveryListDTO)) {
log.error("deliveryListDTO参数异常+{" + deliveryListDTO + "}");
throw new CustomerException("请求参数异常");
@ -2723,7 +2720,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Long deliveryListEntityId = deliveryListEntity.getId();
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
checkArgs(deliveryListDTO,myCurrentWarehouse);
checkArgs(deliveryListDTO, myCurrentWarehouse);
List<JSONObject> logs = new ArrayList<>();
List<JSONObject> pushDatas = new ArrayList<>();
@ -3296,9 +3293,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
reservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
reservationPackageEntity.setParceListId(p.getId());
// 对当前保存的包件再次进行验证
boolean isExit = checkList(list,reservationEntity.getId(),reservationStockarticleEntity.getStockArticleId(),p.getOrderPackageCode());
log.info(">>>>> 修改计划 验证包件是否存在 {}",isExit);
if(!isExit){
boolean isExit = checkList(list, reservationEntity.getId(), reservationStockarticleEntity.getStockArticleId(), p.getOrderPackageCode());
log.info(">>>>> 修改计划 验证包件是否存在 {}", isExit);
if (!isExit) {
distributionReservationPackageService.save(reservationPackageEntity);
distributionAsyncService.checkStockArticleReservationStatus(p);
packageLockIds.add(p.getId());
@ -4903,8 +4900,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
Map<String, Object> map = new HashMap<>();
map.put("自提单号", distrilbutionBillLadingEntity.getPickupBatch());
String fileTypeName = QRCodeUtil.createCodeToFile(map.get("自提单号").toString());
@ -4912,7 +4907,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// map.put("收货单单位", reservationEntity.getReceivingUnit());//收货单单位
// map.put("商场名称", reservationEntity.getStoreName());//商场名称
// 构建map集合中收货单和商场名称
buildMapByDistrilbutionBillLadingEntity(map, distrilbutionBillStockEntities, distributionParcelListEntities, distrilbutionBillLadingEntity);
buildMapByDistrilbutionBillLadingEntity(map, distrilbutionBillStockEntities, distributionParcelListEntities, distrilbutionBillLadingEntity);
map.put("提货人", distrilbutionBillLadingEntity.getConsignee());//提货人
map.put("联系电话", distrilbutionBillLadingEntity.getConsigneePhone());//收货人电话
@ -4976,7 +4971,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Map<String, Object> m = new HashMap<>();
// 查询库存品信息
List<DistributionDeliveryDetailsEntity> detailsEntities = distributionDeliveryDetailsService.list(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda()
.eq(DistributionDeliveryDetailsEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
@ -4996,14 +4990,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
tempMap.put("合同号", distributionStockListEntity.getOrderCode());
tempMap.put("物料名称", distributionStockListEntity.getDescriptionGoods());
//构建产品明细
Map<String,Object> map1 = new HashMap<>();
map1.put("物料编码",distributionStockListEntity.getCargoNumber());
map1.put("物料单位",distributionStockListEntity.getCargoUnit());
map1.put("物料规格",distributionStockListEntity.getCargoNorms());
Map<String, Object> map1 = new HashMap<>();
map1.put("物料编码", distributionStockListEntity.getCargoNumber());
map1.put("物料单位", distributionStockListEntity.getCargoUnit());
map1.put("物料规格", distributionStockListEntity.getCargoNorms());
//查询此订制品库位信息
DistributionDeliveryDetailsEntity distributionDeliveryDetailsEntity = inventoryMap.get(distributionStockListEntity.getId()).get(0);
Integer quantity = distributionDeliveryDetailsEntity.getQuantity();
map1.put("计划数量",quantity);
map1.put("计划数量", quantity);
hejiNum += quantity;
tempMap.put("小计", quantity);
tempMap.put("货位", "");
@ -5048,91 +5042,86 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (!distrilbutionBillStockEntities.isEmpty()) {
List<Long> ids = distrilbutionBillStockEntities.stream().map(DistrilbutionBillStockEntity::getStockArticleId).collect(Collectors.toList());
// 得到所以的订单列表
List<DistributionStockArticleEntity> distributionStockArticleEntities = distributionStockArticleMapper.selectBatchIds(ids);
for (DistributionStockArticleEntity distributionStockArticleEntity : distributionStockArticleEntities) {
Map<String, Object> tempMap = new HashMap<>();
// 需要从所有的包件的
List<DistributionParcelListEntity> ts = new ArrayList<>();
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
if (distributionParcelListEntity.getStockArticleId().equals(distributionStockArticleEntity.getId())) {
ts.add(distributionParcelListEntity);
}
// 得到所以的订单列表
List<DistributionStockArticleEntity> distributionStockArticleEntities = distributionStockArticleMapper.selectBatchIds(ids);
for (DistributionStockArticleEntity distributionStockArticleEntity : distributionStockArticleEntities) {
Map<String, Object> tempMap = new HashMap<>();
// 需要从所有的包件的
List<DistributionParcelListEntity> ts = new ArrayList<>();
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
if (distributionParcelListEntity.getStockArticleId().equals(distributionStockArticleEntity.getId())) {
ts.add(distributionParcelListEntity);
}
}
if (!mailNames.toString().contains(distributionStockArticleEntity.getMallName())) {
if (!mailNames.toString().isEmpty()) {
mailNames.append(",");
}
mailNames.append(distributionStockArticleEntity.getMallName());
if (!mailNames.toString().contains(distributionStockArticleEntity.getMallName())) {
if (!mailNames.toString().isEmpty()) {
mailNames.append(",");
}
if (!consigneeUnit.toString().contains(distributionStockArticleEntity.getConsigneeUnit())) {
if (!consigneeUnit.toString().isEmpty()) {
consigneeUnit.append(",");
}
consigneeUnit.append(distributionStockArticleEntity.getConsigneeUnit());
mailNames.append(distributionStockArticleEntity.getMallName());
}
if (!consigneeUnit.toString().contains(distributionStockArticleEntity.getConsigneeUnit())) {
if (!consigneeUnit.toString().isEmpty()) {
consigneeUnit.append(",");
}
consigneeUnit.append(distributionStockArticleEntity.getConsigneeUnit());
}
tempMap.put("序号", a);
tempMap.put("运单号", distributionStockArticleEntity.getWaybillNumber());
tempMap.put("合同号", distributionStockArticleEntity.getOrderCode());
String materialNameStr = buildMaterialNameStr(distributionParcelListEntities);
tempMap.put("物料名称", materialNameStr);
tempMap.put("序号", a);
tempMap.put("运单号", distributionStockArticleEntity.getWaybillNumber());
tempMap.put("合同号", distributionStockArticleEntity.getOrderCode());
String materialNameStr = buildMaterialNameStr(distributionParcelListEntities);
tempMap.put("物料名称", materialNameStr);
// 构建产品明细 --对于每一个订单
buildProductDetail(tempMap, m, ts);
Map<String, Object> os = (Map<String, Object>) tempMap.get("产品明细");
// 构建产品明细 --对于每一个订单
buildProductDetail(tempMap, m, ts);
Set<String> strings = os.keySet();
int sumNum = 0;
for (String string : strings) {
Object o = os.get(string);
sumNum += (o != null) ? (int) o : 0;
}
tempMap.put("小计", sumNum);
hejiNum += sumNum;
// 查询货物货位
Map<String, Object> os = (Map<String, Object>) tempMap.get("产品明细");
//通过订单id和预约id查询对应包件的库位信息
List<String> orderPackageCodes = ts.stream()
.map(DistributionParcelListEntity::getOrderPackageCode) // 获取每个对象的orderPackageCode
.collect(Collectors.toList());
Set<String> strings = os.keySet();
int sumNum = 0;
for (String string : strings) {
Object o = os.get(string);
sumNum += (o != null) ? (int) o : 0;
}
tempMap.put("小计", sumNum);
hejiNum += sumNum;
// 查询货物货位
//通过订单id和预约id查询对应包件的库位信息
List<String> orderPackageCodes = ts.stream()
.map(DistributionParcelListEntity::getOrderPackageCode) // 获取每个对象的orderPackageCode
.collect(Collectors.toList());
List<Long> orderPackageIds = ts.stream()
.map(DistributionParcelListEntity::getId) // 获取每个对象的包件ID
.collect(Collectors.toList());
if (Func.isNotEmpty(orderPackageCodes)) {
List<String> allocationStrList = distributionParcelListMapper.selectAllocationInforByOrderPackageCode(orderPackageCodes, distrilbutionBillLadingEntity.getWarehouseId());
String allocationStr = StringUtils.join(allocationStrList, ",");
tempMap.put("货位", allocationStr);
}
//通过订单id和预约id查询对应包件的备货区信息
LambdaQueryWrapper<DistributionStockEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(DistributionStockEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
.in(DistributionStockEntity::getParcelListId, orderPackageIds);
List<DistributionStockEntity> distributionStockEntities = distributionStockMapper.selectList(lambdaQueryWrapper);
if (!distributionStockEntities.isEmpty()) {
Set<String> stockupAreaStrList = distributionStockEntities.stream().map(DistributionStockEntity::getStockupArea).collect(Collectors.toSet());
String stockupAreaStr = StringUtils.join(stockupAreaStrList, ",");
tempMap.put("备货区", stockupAreaStr);
}
ls.add(tempMap);
a++;
List<Long> orderPackageIds = ts.stream()
.map(DistributionParcelListEntity::getId) // 获取每个对象的包件ID
.collect(Collectors.toList());
if (Func.isNotEmpty(orderPackageCodes)) {
List<String> allocationStrList = distributionParcelListMapper.selectAllocationInforByOrderPackageCode(orderPackageCodes, distrilbutionBillLadingEntity.getWarehouseId());
String allocationStr = StringUtils.join(allocationStrList, ",");
tempMap.put("货位", allocationStr);
}
}
//通过订单id和预约id查询对应包件的备货区信息
LambdaQueryWrapper<DistributionStockEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(DistributionStockEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
.in(DistributionStockEntity::getParcelListId, orderPackageIds);
List<DistributionStockEntity> distributionStockEntities = distributionStockMapper.selectList(lambdaQueryWrapper);
if (!distributionStockEntities.isEmpty()) {
Set<String> stockupAreaStrList = distributionStockEntities.stream().map(DistributionStockEntity::getStockupArea).collect(Collectors.toSet());
String stockupAreaStr = StringUtils.join(stockupAreaStrList, ",");
tempMap.put("备货区", stockupAreaStr);
}
ls.add(tempMap);
a++;
}
}
map.put("收货单单位", consigneeUnit.toString());
@ -5301,9 +5290,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
@Override
public List<DistributionAppReservationVO> getAppDeliveryreservationTraysPage( DistributionAppDeliveryListDTO distributionDeliveryList) {
public List<DistributionAppReservationVO> getAppDeliveryreservationTraysPage(DistributionAppDeliveryListDTO distributionDeliveryList) {
// ---------------------------------2023-09-25 新增托盘详情---------------------------------------------------------------------------------------
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppTarysListPage( Long.parseLong(distributionDeliveryList.getReservationId()));
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppTarysListPage(Long.parseLong(distributionDeliveryList.getReservationId()));
List<DistributionAppReservationVO> a = new ArrayList<>();
customList.forEach(c -> {
String trayCode = c.getTrayCode();
@ -5563,8 +5552,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public R getPackageListByDeliveryIdAndOrderId(IPage<Object> page, Long deliveryId, Long orderId) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
return R.fail(403,"未授权!!!");
if (Func.isEmpty(myCurrentWarehouse)) {
return R.fail(403, "未授权!!!");
}
List<DistributionParcelListVO> allPackageList = new ArrayList<>();
List<DistributionParcelListEntity> reservationPackageList = baseMapper.getPackageListByDeliveryId(deliveryId, orderId);
@ -5922,16 +5911,45 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public R retentionScan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
if (distrilbutionloadingscanDTO.getBarcode().isEmpty()) {
log.error("参数缺失Barcode:{}",distrilbutionloadingscanDTO.getBarcode());
log.error("参数缺失Barcode:{}", distrilbutionloadingscanDTO.getBarcode());
}
Integer retentionType = distrilbutionloadingscanDTO.getRetentionType();
DistributionDeliveryListEntity deliveryListEntity = this.getById(distrilbutionloadingscanDTO.getDeliveryId());
List<DistributionRetentionScanVo> retentionScanVos = new ArrayList<>();
//查询包件
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
return Resp.scanFail("未授权!!!","未授权!!!");
if (Func.isEmpty(myCurrentWarehouse)) {
return Resp.scanFail("未授权!!!", "未授权!!!");
}
Integer retentionType = distrilbutionloadingscanDTO.getRetentionType();
Long deliveryId = null;
if (Func.isEmpty(distrilbutionloadingscanDTO.getDeliveryId())) {
//不在车次任务内进行扫描
//查询此包件属于哪个车次
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
.ne(DistributionLoadscanEntity::getSignforState, LoadScanSigningStatusConstant.yiqianshou.getValue())
);
if (loadscanEntityList.isEmpty()) {
//查询库存品
List<DistributionLoadscaninvnEntity> loadscaninvnEntityList = distributionLoadscaninvnService.list(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
.ne(DistributionLoadscaninvnEntity::getSignforState, LoadScanSigningStatusConstant.yiqianshou.getValue())
);
if (!loadscaninvnEntityList.isEmpty()) {
deliveryId = loadscaninvnEntityList.stream().map(DistributionLoadscaninvnEntity::getDeliveryId).distinct().collect(Collectors.toList()).get(0);
}
} else {
deliveryId = loadscanEntityList.stream().map(DistributionLoadscanEntity::getDeliveryId).distinct().collect(Collectors.toList()).get(0);
}
if (deliveryId == null) {
return Resp.scanFail("此包件无装车记录", "此包件无装车记录");
}
} else {
deliveryId = distrilbutionloadingscanDTO.getDeliveryId();
}
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId);
List<DistributionRetentionScanVo> retentionScanVos = new ArrayList<>();
switch (retentionType) {
case 1:
//包件--库存品 和包件
@ -5940,21 +5958,44 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
.eq(DistributionLoadscanEntity::getWarehouseId, myCurrentWarehouse.getId())
);
// List<DistributionParcelListEntity> parcelListEntities = baseMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isNotEmpty(loadscanEntityList)) {
if (loadscanEntityList.size() == 1) {
//包件存在装车才能进行滞留
//通过配送任务和包件确定预约信息
DistributionLoadscanEntity distributionLoadscanEntity = loadscanEntityList.get(0);
if (2 == distributionLoadscanEntity.getIsAbnormalLoading()){
//异常装车未进行审核
return Resp.scanFail("包件存在异常", "包件存在异常");
}
// if (2 == distributionLoadscanEntity.getIsAbnormalLoading()) {
// //异常装车未进行审核
// return Resp.scanFail("包件存在异常操作,请先处理异常", "包件存在异常操作,请先处理异常");
// }
if (2 == distributionLoadscanEntity.getSignforState()) {
log.info("滞留扫描失败,包件已签收>>>>>>>>>>>>>>>>>>>>>>>reservationId:{},packageCode:{}", distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getOrderPackageCode());
return Resp.scanFail("包件已签收", "包件已签收");
}
DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(distributionLoadscanEntity.getOrderPackageCode(), distributionLoadscanEntity.getDeliveryId(),myCurrentWarehouse.getId());
DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(distributionLoadscanEntity.getOrderPackageCode(), distributionLoadscanEntity.getDeliveryId(), myCurrentWarehouse.getId());
if (Func.isEmpty(retentionScanVo)){
//不存在计划之中属于异常驳回的情况
retentionScanVo = new DistributionRetentionScanVo();
retentionScanVo.setDeliveryId(distributionLoadscanEntity.getDeliveryId());
retentionScanVo.setOrderId(distributionLoadscanEntity.getOrderId());
retentionScanVo.setReservationId(distributionLoadscanEntity.getReservationId());
retentionScanVo.setTrainNumber(distributionLoadscanEntity.getTrainNumber());
retentionScanVo.setConditions(1);
retentionScanVo.setScanType(1);
retentionScanVo.setRetentionQuantity(1);
retentionScanVo.setOrderPackageId(distributionLoadscanEntity.getPackageId());
//查询包件
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(distributionLoadscanEntity.getPackageId());
retentionScanVo.setOrderCode(parcelListEntity.getOrderCode());
retentionScanVo.setOrderPackageStatus(parcelListEntity.getOrderPackageStatus());
retentionScanVo.setOrderPackageCode(parcelListEntity.getOrderPackageCode());
retentionScanVo.setWaybillNumber(parcelListEntity.getWaybillNumber());
retentionScanVo.setWaybillId(parcelListEntity.getWaybillId());
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(distributionLoadscanEntity.getReservationId());
retentionScanVo.setReservationCode(reservationEntity.getReservationCode());
}
retentionScanVo.setWarehouseId(myCurrentWarehouse.getId());
retentionScanVo.setWarehouseName(myCurrentWarehouse.getName());
retentionScanVo.setLoadingId(distributionLoadscanEntity.getId());
retentionScanVos.add(retentionScanVo);
}
} else {
@ -5972,6 +6013,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return Resp.scanFail("包件已签收", "包件已签收");
}
DistributionRetentionScanVo inventoryPackage = baseMapper.selectRetentionInventoryPackage(loadscaninvnEntity.getOrderPackageCode(), loadscaninvnEntity.getDeliveryId());
inventoryPackage.setWarehouseId(myCurrentWarehouse.getId());
inventoryPackage.setWarehouseName(myCurrentWarehouse.getName());
inventoryPackage.setLoadingId(loadscaninvnEntity.getId());
retentionScanVos.add(inventoryPackage);
}
}
@ -5984,6 +6028,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
}
if (Func.isEmpty(retentionScanVos)) {
List<DistributionLoadscanAbnormalEntity> list = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode())
);
if (!list.isEmpty()) {
//存在异常进行是否均完成审核判断
boolean AuditingStatusFlag = list.stream().allMatch(l -> !l.getAuditingStatus().equals(LoadingAbnormalAuditingStatusConstant.daishenhe.getValue()));
if (AuditingStatusFlag){
return Resp.scanFail("请先处理包件异常操作", "请先处理包件异常操作");
}
}
//如果均不存在则就该判断该货物是否属于当前的配送任务,如果属于则是未装车,如果不属于则此码无效
List<DistributionParcelListEntity> distributionParcelListEntities = baseMapper.selectPackageListByDeliveryListId(deliveryListEntity.getId());
boolean flag = false;
@ -5991,6 +6045,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListEntity> isHave = distributionParcelListEntities.stream().filter(p -> p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
if (Func.isNotEmpty(isHave)) {
flag = isHave.size() == 1;
//判断是否存在有待处理的异常
}
} else {
List<DisStockListDetailEntity> disStockListDetailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
@ -6008,7 +6063,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} else {
//该配送任务查询无该包件信息
return Resp.scanFail("系统无编码", "系统无编码");
}
}
return R.data(retentionScanVos);
@ -6118,7 +6172,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//托盘货物都存在该配送任务的包件列表
//进行客户划分
for (WarehouseTrayGoodsEntity warehouseTrayGoodsEntity : goodsLsit) {
DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(warehouseTrayGoodsEntity.getAssociationValue(), distrilbutionloadingscanDTO.getDeliveryId(),myCurrentWarehouse.getId());
DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(warehouseTrayGoodsEntity.getAssociationValue(), distrilbutionloadingscanDTO.getDeliveryId(), myCurrentWarehouse.getId());
if (Func.isNotEmpty(retentionScanVo)) {
if (retentionScanVo.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) {
log.error("滞留扫描出现签收包件>>>>>>>>>>>>>>>:{}", retentionScanVo.getOrderPackageCode());
@ -6168,45 +6222,55 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//需要对该配送任务下的该包件进行取消状态标识
int row = distributionReservationMapper.cancelReservationPackage(reservationId, orderPackageId);
// 查询该包件是否进行装车
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getDeliveryId, deliveryId).eq(DistributionLoadscanEntity::getReservationId, reservationId)
.eq(DistributionLoadscanEntity::getPackageId, orderPackageId)
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
if (row == 1) {
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getDeliveryId, deliveryId).eq(DistributionLoadscanEntity::getReservationId, reservationId)
.eq(DistributionLoadscanEntity::getPackageId, orderPackageId)
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
if (Func.isNotEmpty(loadscanEntity)) {
//修改包件状态 达到回库的状态
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(loadscanEntity.getPackageId());
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.weizhuancghe.getValue());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue());
distributionParcelListService.updateById(parcelListEntity);
//已经进行装车
loadscanEntity.setScanStatus(LoadingStatusConstant.quxiao.getValue());
distributionLoadscanService.updateById(loadscanEntity);
// 对应签收信息的装车数量要进行扣减
int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub());
//维护订单状态
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), parcelListEntity.getWarehouseId());
//增加滞留信息
String content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getScanUser() + "取消配车,取消方式:滞留扫描,取消计划,配送车次号:" + loadscanEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.CANCEL_DISTRIBUTION.getCode());
aaa.add(js);
//对滞留包件进行签收信息数量减少
// distributionSignforMapper.deductionLoadingPacjageNum(reservationId,deliveryId,1);
//存在计划
}
if (!aaa.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
//进行了一条包件任务的取消,此时就应该对预约、配送任务进行数量的维护
distributionAsyncService.checkRetentionReservationAndDeliveryInfo(reservationId, deliveryId);
return true;
} else {
//包件未预约 处于异常驳回状态
//查询异常信息,对异常信息进行清理
DistributionLoadscanAbnormalEntity abnormalEntity = distributionLoadscanAbnormalService.getOne(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getPackageId, orderPackageId)
.eq(DistributionLoadscanAbnormalEntity::getAuditingStatus, 3)
);
if (!Objects.isNull(abnormalEntity)){
//清理异常信息
distributionLoadscanAbnormalService.removeById(abnormalEntity);
}else {
log.error(">>>>>>>>>>>>>>>查询异常信息错误:{}",orderPackageId);
}
//查询出多个包件信息
log.info("######################,reservationId:{}", reservationId);
log.error("############查询预约包件信息错误:{}", orderPackageId);
return false;
}
if (Func.isNotEmpty(loadscanEntity)) {
//修改包件状态 达到回库的状态
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(loadscanEntity.getPackageId());
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.weizhuancghe.getValue());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue());
distributionParcelListService.updateById(parcelListEntity);
//已经进行装车
loadscanEntity.setScanStatus(LoadingStatusConstant.quxiao.getValue());
distributionLoadscanService.updateById(loadscanEntity);
// 对应签收信息的装车数量要进行扣减
int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub());
//维护订单状态
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), parcelListEntity.getWarehouseId());
//增加滞留信息
String content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getScanUser() + "取消配车,取消方式:滞留扫描,取消计划,配送车次号:" + loadscanEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.CANCEL_DISTRIBUTION.getCode());
aaa.add(js);
//对滞留包件进行签收信息数量减少
}
if (!aaa.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
return true;
}
@Override
@ -7658,9 +7722,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity);
//进行异常审核的标识
distributionSignforService.update(Wrappers.<DistributionSignforEntity>update().lambda()
.eq(DistributionSignforEntity::getReservationId,reservationList.get(0).getId())
.eq(DistributionSignforEntity::getDeliveryId,deliveryListEntity.getId())
.set(DistributionSignforEntity::getIsHaveAbnormalPackage,2)
.eq(DistributionSignforEntity::getReservationId, reservationList.get(0).getId())
.eq(DistributionSignforEntity::getDeliveryId, deliveryListEntity.getId())
.set(DistributionSignforEntity::getIsHaveAbnormalPackage, 2)
);
}
} else {
@ -7696,8 +7760,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
@Override
@Transactional
public void maintenanceDeliveryInfo(Long deliveryId) {
@ -7836,7 +7898,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
JSONObject js = new JSONObject();
//查询司机用户
BasicdataDriverArteryEntity driverArtery = arteryClient.getDriverArteryById(userId);
if (!Func.isEmpty(driverArtery)){
if (!Func.isEmpty(driverArtery)) {
R<User> userR = userClient.userInfoById(driverArtery.getUserId());
User user = userR.getData();
js.put("tenantId", user.getTenantId());

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -6560,8 +6560,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<Long> list = Func.toLongList(ids);
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.listByIds(list);
int loadingNum = 0;
int signforNum = 0;
List<Long> packageIdList = new ArrayList<>();
List<Long> orderIds = new ArrayList<>();
Long reservationId = null;
@ -6607,15 +6605,15 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//获取装车记录
DistributionLoadscanEntity distributionLoadscanEntity = loadscanMap.get(abnormalEntity.getPackageId());
orderIds.add(distributionLoadscanEntity.getOrderId());
if (distributionLoadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) {
signforNum++;
}
distributionLoadscanEntity.setIsAbnormalLoading(LoadingAbnormalAuditingStatusConstant.daishenhe.getValue());
//对异常装车记录进行异常标识的取消
distributionLoadscanService.updateById(distributionLoadscanEntity);
} else {
//异常驳回无装车记录
log.error(method + "异常驳回无装车记录");
throw new RuntimeException("异常驳货列表存在无装车信息");
}
loadingNum++;
}
}
@ -6625,9 +6623,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
//进行装车记录的统计
}
//扣减装车和签收数
distributionSignforMapper.deductionLoadingAndSignforPacjageNum(reservationId, deliveryId, loadingNum, signforNum);
if (yesOrNo) {
//恢复包件数据
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda()

56
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

@ -89,16 +89,16 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if ("admin".equals(AuthUtil.getUser().getUserName())) {
if (Func.isNotEmpty(myCurrentWarehouse)) {
warehouseRetentionRecord.setRetentionWarehouseId(myCurrentWarehouse.getId());
}
} else {
if (Func.isEmpty(myCurrentWarehouse)) {
return null;
}
warehouseRetentionRecord.setRetentionWarehouseId(myCurrentWarehouse.getId());
}
// if ("admin".equals(AuthUtil.getUser().getUserName())) {
// if (Func.isNotEmpty(myCurrentWarehouse)) {
// warehouseRetentionRecord.setRetentionWarehouseId(myCurrentWarehouse.getId());
// }
// } else {
// if (Func.isEmpty(myCurrentWarehouse)) {
// return null;
// }
// warehouseRetentionRecord.setRetentionWarehouseId(myCurrentWarehouse.getId());
// }
return page.setRecords(baseMapper.selectWarehouseRetentionRecordPage(page, warehouseRetentionRecord));
}
@ -154,25 +154,19 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
@Override
public WarehouseRetentionRecordVO initRetentionList(Long deliveryId) {
WarehouseRetentionRecordEntity retentionRecordEntity = this.getOne(Wrappers.<WarehouseRetentionRecordEntity>query().lambda()
.eq(WarehouseRetentionRecordEntity::getRetentionType, RetentionTypeConstant.peisongzhiliu.getValue())
.eq(WarehouseRetentionRecordEntity::getTaskId, deliveryId));
if (Func.isEmpty(retentionRecordEntity)) {
return null;
}
WarehouseRetentionRecordVO warehouseRetentionRecordVO = WarehouseRetentionRecordWrapper.build().entityVO(retentionRecordEntity);
//查询是否存在有对应的扫描列表
List<WarehouseRetentionScanEntity> retentionScanEntityList = warehouseRetentionScanService.list(Wrappers.<WarehouseRetentionScanEntity>query().lambda()
.eq(WarehouseRetentionScanEntity::getDeliveryId, retentionRecordEntity.getTaskId())
.eq(WarehouseRetentionScanEntity::getRefId, retentionRecordEntity.getId()));
if (Func.isNotEmpty(retentionScanEntityList)) {
warehouseRetentionRecordVO.setRetentionScanVOList(WarehouseRetentionScanWrapper.build().listVO(retentionScanEntityList));
}
warehouseRetentionRecordVO.setRetentionTotal(0);
if (Func.isNotEmpty(retentionScanEntityList)) {
int retentionTotal = retentionScanEntityList.stream().mapToInt(WarehouseRetentionScanEntity::getRetentionQuantity).sum();
warehouseRetentionRecordVO.setRetentionTotal(retentionTotal);
WarehouseRetentionRecordVO warehouseRetentionRecordVO = new WarehouseRetentionRecordVO();
if (Func.isEmpty(deliveryId)){
//外层列表进行滞留
}else {
List<WarehouseRetentionScanEntity> retentionScanEntityList = warehouseRetentionScanService.list(Wrappers.<WarehouseRetentionScanEntity>query().lambda()
.eq(WarehouseRetentionScanEntity::getDeliveryId, deliveryId)
);
if (Func.isNotEmpty(retentionScanEntityList)) {
warehouseRetentionRecordVO.setRetentionScanVOList(WarehouseRetentionScanWrapper.build().listVO(retentionScanEntityList));
int retentionTotal = retentionScanEntityList.stream().mapToInt(WarehouseRetentionScanEntity::getRetentionQuantity).sum();
warehouseRetentionRecordVO.setRetentionTotal(retentionTotal);
}
}
return warehouseRetentionRecordVO;
}
@ -257,8 +251,7 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
//查询出该滞留任务是否存在
List<WarehouseRetentionScanEntity> retentionScanEntityList = warehouseRetentionScanService.list(Wrappers.<WarehouseRetentionScanEntity>query().lambda()
.eq(WarehouseRetentionScanEntity::getDeliveryId, warehouseRetentionScanDTOS.getDeliveryId())
.eq(WarehouseRetentionScanEntity::getRefId, warehouseRetentionScanDTOS.getId()));
WarehouseRetentionRecordEntity retentionRecordEntity = this.getById(warehouseRetentionScanDTOS.getId());
);
AtomicBoolean saveFlah = new AtomicBoolean(false);
if (Func.isNotEmpty(retentionScanEntityList)) {
BladeUser user = AuthUtil.getUser();
@ -283,7 +276,6 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
// rs.setRetentionQuantity(r.getRetentionQuantity());
// retentionTotal.getAndAdd(r.getRetentionQuantity());
rs.setDeliveryId(warehouseRetentionScanDTOS.getDeliveryId());
rs.setRefId(retentionRecordEntity.getId());
warehouseRetentionScanService.save(Func.copy(rs, WarehouseRetentionScanEntity.class));
switch (rs.getConditions()) {
case 1:
@ -309,8 +301,6 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
int retentionTotal = warehouseRetentionScanService.list(Wrappers.<WarehouseRetentionScanEntity>query().lambda()
.eq(WarehouseRetentionScanEntity::getDeliveryId, warehouseRetentionScanDTOS.getDeliveryId())
.eq(WarehouseRetentionScanEntity::getRefId, warehouseRetentionScanDTOS.getId())).stream().mapToInt(WarehouseRetentionScanEntity::getRetentionQuantity).sum();
retentionRecordEntity.setRetentionQuantity(retentionTotal);
this.updateById(retentionRecordEntity);
if (saveFlah.get()) {
return Resp.scanSuccess("操作成功", "共计滞留" + retentionTotal + "件");
} else {

13
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java

@ -40,8 +40,10 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 滞留扫描记录 服务实现类
@ -60,6 +62,17 @@ public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl<Warehouse
@Override
public IPage<WarehouseRetentionScanVO> selectWarehouseRetentionRecordPage(IPage<WarehouseRetentionScanVO> page, WarehouseRetentionScanVO warehouseRetentionScanVO) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<Long> list = new ArrayList<>();
if (Func.isEmpty(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList();
if (!warehouseList.isEmpty()){
List<Long> warehouseIds = warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
list.addAll(warehouseIds);
}
}else {
list.add(myCurrentWarehouse.getId());
}
return page.setRecords(baseMapper.selectWarehouseRetentionRecordPage(page, warehouseRetentionScanVO));
}

Loading…
Cancel
Save