|
|
@ -39,6 +39,7 @@ import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.utils.BeanUtil; |
|
|
|
import org.springblade.core.tool.utils.BeanUtil; |
|
|
|
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
import org.springblade.system.cache.DictBizCache; |
|
|
|
import org.springblade.system.cache.DictBizCache; |
|
|
|
import org.springblade.system.entity.DictBiz; |
|
|
|
import org.springblade.system.entity.DictBiz; |
|
|
@ -84,7 +85,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
private final IDistributionParcelNumberClient distributionParcelNumberClient; |
|
|
|
private final IDistributionParcelNumberClient distributionParcelNumberClient; |
|
|
|
private final ITrunklineCostShareRecordService trunklineCostShareRecordService; |
|
|
|
private final ITrunklineCostShareRecordService trunklineCostShareRecordService; |
|
|
|
private final ITrunklineAdvanceService advanceService; |
|
|
|
private final ITrunklineAdvanceService advanceService; |
|
|
|
private final IWarehouseAbnormalRecordClient abnormalRecordClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) { |
|
|
|
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) { |
|
|
@ -286,6 +286,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
trunklineCarsOrderService.updateStartNumByLoadIdAndWarehouseId(loadId,warehouseId); |
|
|
|
trunklineCarsOrderService.updateStartNumByLoadIdAndWarehouseId(loadId,warehouseId); |
|
|
|
//生成直发商家签收单
|
|
|
|
//生成直发商家签收单
|
|
|
|
createCustomerSignOrder(loadId,warehouseId); |
|
|
|
createCustomerSignOrder(loadId,warehouseId); |
|
|
|
|
|
|
|
//生成异常列表
|
|
|
|
|
|
|
|
carsLoadAsyncService.abnormalListStartCarByLoadIdAndWarehouseId(loadId,warehouseId,AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),AuthUtil.getTenantId(), loadCarsDTO.getWarehouseName()); |
|
|
|
}catch (Exception e){ |
|
|
|
}catch (Exception e){ |
|
|
|
log.error("#############startCarByLoadId: 签收单或者更新数量失败",e); |
|
|
|
log.error("#############startCarByLoadId: 签收单或者更新数量失败",e); |
|
|
|
} |
|
|
|
} |
|
|
@ -755,10 +757,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
try{ |
|
|
|
try{ |
|
|
|
carsLoadAsyncService.saveLog(carsLoadEntity,currentCarsLoadLineEntity, CarsLoadLogTypeConstant.NET_UNLOAD_CARS_LOAD.getValue(),AuthUtil.getNickName(),AuthUtil.getUserId()); |
|
|
|
carsLoadAsyncService.saveLog(carsLoadEntity,currentCarsLoadLineEntity, CarsLoadLogTypeConstant.NET_UNLOAD_CARS_LOAD.getValue(),AuthUtil.getNickName(),AuthUtil.getUserId()); |
|
|
|
openOrderAsyncService.saveUnloadStartCarLog(currentCarsLoadLineEntity,AuthUtil.getNickName(),AuthUtil.getUserId()); |
|
|
|
openOrderAsyncService.saveUnloadStartCarLog(currentCarsLoadLineEntity,AuthUtil.getNickName(),AuthUtil.getUserId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}catch (Exception e){ |
|
|
|
}catch (Exception e){ |
|
|
|
log.warn("#############unloadByLoadId: 存入日志失败"); |
|
|
|
log.warn("#############unloadByLoadId: 存入日志失败"); |
|
|
|
} |
|
|
|
} |
|
|
@ -794,6 +792,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
throw new CustomerException(400,"未知的卸车确认类型"); |
|
|
|
throw new CustomerException(400,"未知的卸车确认类型"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//无装车记录异常日志记录
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
carsLoadAsyncService.abnormalListUnloadCheckByLoadIdAndWarehouseId(loadId,warehouseId,currentCarsLoadLineEntity.getNodeName(),AuthUtil.getTenantId(),AuthUtil.getUserId(),AuthUtil.getNickName(),Func.firstLong(AuthUtil.getDeptId())); |
|
|
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
log.warn("###############unloadPackage: 存入异常列表记录失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//MQ卸车确认推送工厂
|
|
|
|
//MQ卸车确认推送工厂
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
@ -809,6 +814,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_EXCHANGE, RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_ROUTING, map); |
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_EXCHANGE, RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_ROUTING, map); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@ -4158,6 +4164,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
//没有装车扫码记录
|
|
|
|
//没有装车扫码记录
|
|
|
|
//不在计划中,则查询在哪个仓库中
|
|
|
|
//不在计划中,则查询在哪个仓库中
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByOrderPackageCodeAndStatus(orderPackageCode); |
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByOrderPackageCodeAndStatus(orderPackageCode); |
|
|
|
|
|
|
|
Long loadScanId = null; |
|
|
|
if(Objects.isNull(parcelListEntity)){ |
|
|
|
if(Objects.isNull(parcelListEntity)){ |
|
|
|
//没有包件数据
|
|
|
|
//没有包件数据
|
|
|
|
|
|
|
|
|
|
|
@ -4189,7 +4196,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); |
|
|
|
trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); |
|
|
|
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); |
|
|
|
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); |
|
|
|
Long loadScanId = trunklineCarsLoadScanEntity.getId(); |
|
|
|
loadScanId = trunklineCarsLoadScanEntity.getId(); |
|
|
|
|
|
|
|
|
|
|
|
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId,warehouseName,loadId,loadCode,null,null,null,orderPackageCode,1, |
|
|
|
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId,warehouseName,loadId,loadCode,null,null,null,orderPackageCode,1, |
|
|
|
1,0,1,trayId,trayCode,trayName,null,loadScanId,"无数据,补装车计划,异常装车"); |
|
|
|
1,0,1,trayId,trayCode,trayName,null,loadScanId,"无数据,补装车计划,异常装车"); |
|
|
@ -4240,7 +4247,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); |
|
|
|
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); |
|
|
|
|
|
|
|
|
|
|
|
Long loadScanId = trunklineCarsLoadScanEntity.getId(); |
|
|
|
loadScanId = trunklineCarsLoadScanEntity.getId(); |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId,warehouseName,loadId,loadCode,waybillId,waybillNumber,orderCode,orderPackageCode,1, |
|
|
|
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId,warehouseName,loadId,loadCode,waybillId,waybillNumber,orderCode,orderPackageCode,1, |
|
|
@ -4313,18 +4320,27 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
distributionStockArticleClient.addIncomingNum(currentOrderId,1); |
|
|
|
distributionStockArticleClient.addIncomingNum(currentOrderId,1); |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
Long packageId = distributionParcelListEntity.getId(); |
|
|
|
distributionParcelListEntity.setOrderPackageStatus("20"); |
|
|
|
String packageStatus = "30"; |
|
|
|
|
|
|
|
if(!Objects.isNull(warehouseWaybillEntity)){ |
|
|
|
if(!Objects.isNull(warehouseWaybillEntity)){ |
|
|
|
Long destinationWarehouseId = warehouseWaybillEntity.getDestinationWarehouseId();//目的仓
|
|
|
|
Long destinationWarehouseId = warehouseWaybillEntity.getDestinationWarehouseId();//目的仓
|
|
|
|
if(destinationWarehouseId.equals(warehouseId)){ |
|
|
|
if(destinationWarehouseId.equals(warehouseId)){ |
|
|
|
packageStatus = "20"; |
|
|
|
distributionParcelListEntity.setIsTransfer(0); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
distributionParcelListEntity.setIsTransfer(1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
distributionParcelListClient.updateOrderPackageCodeById(packageId,packageStatus); |
|
|
|
distributionParcelListClient.update(distributionParcelListEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode,wid); |
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode,wid); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//无装车记录异常日志记录
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
carsLoadAsyncService.abnormalListUnloadByLoadIdAndWarehouseId(loadId,warehouseId,warehouseName,loadScanId,AuthUtil.getTenantId(),AuthUtil.getUserId(),AuthUtil.getNickName(),Func.firstLong(AuthUtil.getDeptId())); |
|
|
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
log.warn("###############unloadPackage: 存入异常列表记录失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
// carsLoadScanEntity.getS
|
|
|
|
// carsLoadScanEntity.getS
|
|
|
|
|
|
|
|
|
|
|
|