|
|
|
@ -109,6 +109,7 @@ import com.logpm.oldproject.dto.SignPushDataUnitDTO;
|
|
|
|
|
import com.logpm.oldproject.feign.IOldSignPushClient; |
|
|
|
|
import com.logpm.trunkline.dto.WaybillLogDTO; |
|
|
|
|
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient; |
|
|
|
|
import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; |
|
|
|
|
import com.sun.org.apache.xpath.internal.operations.Bool; |
|
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
@ -126,6 +127,7 @@ import org.springblade.common.constant.order.OrderStatusConstant;
|
|
|
|
|
import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant; |
|
|
|
|
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant; |
|
|
|
|
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant; |
|
|
|
|
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant; |
|
|
|
|
import org.springblade.common.constant.pda.PdaAudioLingoStatus; |
|
|
|
|
import org.springblade.common.constant.reservation.ReservationOrderStatusConstant; |
|
|
|
|
import org.springblade.common.constant.reservation.ReservationPackageStatusConstant; |
|
|
|
@ -254,6 +256,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
@Autowired |
|
|
|
|
private IDistributionNodeWorkService iDistributionNodeWorkService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private ITrunklineWaybillTrackClient trunklineWaybillTrackClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<DistrilbutionBillLadingVO> selectDistrilbutionBillLadingPage(IPage<DistrilbutionBillLadingVO> page, DistrilbutionBillLadingVO distrilbutionBillLading) { |
|
|
|
@ -3614,7 +3619,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
// }
|
|
|
|
|
if (integer != sum) { |
|
|
|
|
//存在资源释放操作
|
|
|
|
|
distributionAsyncService.releaseBillLadingResource(Long.parseLong(s), myCurrentWarehouse.getId()); |
|
|
|
|
releaseBillLadingResource(Long.parseLong(s), myCurrentWarehouse,distrilbutionBillLadingEntity.getPickupBatch()); |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
if (sum > 0){ |
|
|
|
@ -3697,8 +3702,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
// 回传老系统自提数据
|
|
|
|
|
sendOldSystem(Long.parseLong(s)); |
|
|
|
|
//整理运单信息
|
|
|
|
|
// List<WaybillLogDTO> mapList = baseMapper.getWaybillSignforData(billLadingEntity.getId(),AuthUtil.getUser().getUserId(),AuthUtil.getUser().getNickName());
|
|
|
|
|
|
|
|
|
|
handletrunklineWaybillSignLog(billLadingEntity.getId()); |
|
|
|
|
} |
|
|
|
|
// 回传工厂数据
|
|
|
|
|
sendFactory(myCurrentWarehouse, parcelListIds); |
|
|
|
@ -3730,6 +3734,58 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void handletrunklineWaybillSignLog(Long id) { |
|
|
|
|
List<WaybillLogDTO> mapList = baseMapper.getWaybillSignforData(id, AuthUtil.getUser().getUserId(), AuthUtil.getUser().getNickName()); |
|
|
|
|
if (!mapList.isEmpty()) { |
|
|
|
|
for (WaybillLogDTO waybillLogDTO : mapList) { |
|
|
|
|
trunklineWaybillTrackClient.addSignWaybillLog(waybillLogDTO); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void releaseBillLadingResource(Long l, BasicdataWarehouseEntity warehouse,String pickupBatch) { |
|
|
|
|
List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda() |
|
|
|
|
.eq(DistrilbutionBillPackageEntity::getBillLadingId, l) |
|
|
|
|
.ne(DistrilbutionBillPackageEntity::getPacketBarStatus, 2) |
|
|
|
|
); |
|
|
|
|
if (Func.isNotEmpty(list)) { |
|
|
|
|
List<Long> ids = list.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList()); |
|
|
|
|
//查询包件
|
|
|
|
|
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(ids); |
|
|
|
|
List<Long> packageIds = distributionParcelListEntities.stream().filter(f -> !OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(f.getOrderPackageLoadingStatus()) || !OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())).map(DistributionParcelListEntity::getId).collect(Collectors.toList()); |
|
|
|
|
if (Func.isNotEmpty(packageIds)) { |
|
|
|
|
distributionParcelListService.update(new UpdateWrapper<DistributionParcelListEntity>().lambda() |
|
|
|
|
.set(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()) |
|
|
|
|
.set(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.weizhuancghe.getValue()) |
|
|
|
|
.set(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue()) |
|
|
|
|
.set(DistributionParcelListEntity::getOrderPackageStockupStatus, OrderPackageStockupStatusConstant.daibeihuo.getValue()) |
|
|
|
|
.in(DistributionParcelListEntity::getId, packageIds) |
|
|
|
|
); |
|
|
|
|
distrilbutionBillPackageService.update(new UpdateWrapper<DistrilbutionBillPackageEntity>().lambda() |
|
|
|
|
.set(DistrilbutionBillPackageEntity::getPacketBarStatus, 2) |
|
|
|
|
.eq(DistrilbutionBillPackageEntity::getBillLadingId, l) |
|
|
|
|
.in(DistrilbutionBillPackageEntity::getParceListId, packageIds) |
|
|
|
|
); |
|
|
|
|
List<JSONObject> logList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { |
|
|
|
|
String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "确认自提,取消包件计划,操作方式:复核自提单包件释放,自提批次号:" + pickupBatch; |
|
|
|
|
JSONObject logJS = handleLogJSONObject(warehouse, AuthUtil.getUser(), distributionParcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.CANCEL_BILLOFLADING.getCode()); |
|
|
|
|
logList.add(logJS); |
|
|
|
|
} |
|
|
|
|
if (!logList.isEmpty()) { |
|
|
|
|
trunklinePackageTrackLogClient.addPackageTrackLog(logList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
String collect = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).distinct().collect(Collectors.joining(",")); |
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(collect, warehouse.getId()); |
|
|
|
|
//维护自提单订单信息
|
|
|
|
|
distrilbutionBillStockService.maintenanceOrderInfo(l); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void sendFactory(BasicdataWarehouseEntity myCurrentWarehouse, Set<Long> parcelListIds) { |
|
|
|
|
try { |
|
|
|
|
// ladingScanEntities中的包件id数据封装为set
|
|
|
|
|