@ -2958,10 +2958,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadScanService . save ( carsLoadScanEntity ) ;
trunklineCarsLoadScanService . save ( carsLoadScanEntity ) ;
loadScanId = carsLoadScanEntity . getId ( ) ;
loadScanId = carsLoadScanEntity . getId ( ) ;
List < String > orderPackageCodes = new ArrayList < > ( ) ;
String loadType = carsLoadEntity . getLoadType ( ) ;
orderPackageCodes . add ( orderPackageCode ) ;
if ( ! "4" . equals ( loadType ) ) {
String content = "包件在 " + warehouseName + " " + ( StringUtil . isBlank ( trayName ) ? "扫码" : "托盘(" + trayName + ")" ) + " 装车, 车次号:" + loadCode + " ,配载计划目的仓 " + carsLoadScanEntity . getFinalNodeName ( ) + ",数据来源仓库 " + fromWarehouseName ;
List < String > orderPackageCodes = new ArrayList < > ( ) ;
packageTrackLogAsyncService . addPackageTrackLog ( AuthUtil . getTenantId ( ) , AuthUtil . getUserId ( ) , Func . firstLong ( AuthUtil . getDeptId ( ) ) , AuthUtil . getNickName ( ) , orderPackageCodes , warehouseId , warehouseName , WorkNodeEnums . INITIAL_WAREHOUSE_LOADING . getCode ( ) , content ) ;
orderPackageCodes . add ( orderPackageCode ) ;
String content = "包件在 " + warehouseName + " " + ( StringUtil . isBlank ( trayName ) ? "扫码" : "托盘(" + trayName + ")" ) + " 装车, 车次号:" + loadCode + " ,配载计划目的仓 " + carsLoadScanEntity . getFinalNodeName ( ) + ",数据来源仓库 " + fromWarehouseName ;
packageTrackLogAsyncService . addPackageTrackLog ( AuthUtil . getTenantId ( ) , AuthUtil . getUserId ( ) , Func . firstLong ( AuthUtil . getDeptId ( ) ) , AuthUtil . getNickName ( ) , orderPackageCodes , warehouseId , warehouseName , WorkNodeEnums . INITIAL_WAREHOUSE_LOADING . getCode ( ) , content ) ;
}
trunklineCarsLoadingLogService . savaLoadingLog ( warehouseId , warehouseName , loadId , loadCode , waybillId , waybillNo , orderCode , orderPackageCode , 1 ,
trunklineCarsLoadingLogService . savaLoadingLog ( warehouseId , warehouseName , loadId , loadCode , waybillId , waybillNo , orderCode , orderPackageCode , 1 ,
1 , isData , isAbnormal , trayId , trayCode , trayName , fromWarehouseId , loadScanId , remark ) ;
1 , isData , isAbnormal , trayId , trayCode , trayName , fromWarehouseId , loadScanId , remark ) ;
@ -4329,10 +4332,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Long waybillId = carsLoadScanEntity . getWaybillId ( ) ;
Long waybillId = carsLoadScanEntity . getWaybillId ( ) ;
String scanCode = carsLoadScanEntity . getScanCode ( ) ;
String scanCode = carsLoadScanEntity . getScanCode ( ) ;
Long loadScanId = carsLoadScanEntity . getId ( ) ;
Long loadScanId = carsLoadScanEntity . getId ( ) ;
if ( ! Objects . equals ( enterNum , num ) ) {
// if (!Objects.equals(enterNum, num)) {
log . warn ( "#############transferUnloadZero: 零担信息卸车数量不正确 enterNun={} num={}" , enterNum , num ) ;
// log.warn( "#############transferUnloadZero: 零担信息卸车数量不正确 enterNun={} num={}", enterNum, num);
return R . fail ( 405 , "零担信息卸车数量不正确" ) ;
// return R.fail(405, "零担信息卸车数量不正确");
}
// }
carsLoadScanEntity . setUnloadNum ( enterNum ) ;
carsLoadScanEntity . setUnloadNum ( enterNum ) ;
carsLoadScanEntity . setUnloadNodeId ( warehouseId ) ;
carsLoadScanEntity . setUnloadNodeId ( warehouseId ) ;
@ -5680,11 +5683,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//重新计算签收单的数量
//重新计算签收单的数量
updateSignOrderNumBySignOrderId ( signOrderId ) ;
updateSignOrderNumBySignOrderId ( signOrderId ) ;
Long waybillId = carsLoadScanEntity . getWaybillId ( ) ;
// Long waybillId = carsLoadScanEntity.getWaybillId();
if ( ! Objects . isNull ( waybillId ) ) {
// if(!Objects.isNull(waybillId)){
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient . findByWaybillId ( waybillId ) ;
// WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
waybillPackageService . updateWaybillStatus ( waybillEntity ) ;
// waybillPackageService.updateWaybillStatus(waybillEntity);
}
// }
// return Resp.scanSuccess("签收成功",enterNum+"件");
// return Resp.scanSuccess("签收成功",enterNum+"件");
return R . success ( "签收成功" ) ;
return R . success ( "签收成功" ) ;
@ -6523,11 +6526,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Integer unloadNum = carsLoadScanEntity . getUnloadNum ( ) ;
Integer unloadNum = carsLoadScanEntity . getUnloadNum ( ) ;
String orderCode = carsLoadScanEntity . getOrderCode ( ) ;
String orderCode = carsLoadScanEntity . getOrderCode ( ) ;
Long fromWarehouseId = carsLoadScanEntity . getFromWarehouseId ( ) ;
Long fromWarehouseId = carsLoadScanEntity . getFromWarehouseId ( ) ;
DistributionStockArticleEntity stockArticle = distributionStockArticleClient . findZeroByOrderCodeAndWarehouseId ( orderCode , fromWarehouseId ) ;
if ( unloadNum ! = num ) {
if ( unloadNum ! = num ) {
int diff = num - unloadNum ;
int diff = num - unloadNum ;
DistributionStockArticleEntity stockArticle = distributionStockArticleClient . findZeroByOrderCodeAndWarehouseId ( orderCode , fromWarehouseId ) ;
distributionStockArticleClient . addHandQuantity ( stockArticle . getId ( ) , diff ) ;
distributionStockArticleClient . addHandQuantity ( stockArticle . getId ( ) , diff ) ;
}
}
distributionStockArticleClient . addSignNum ( stockArticle . getId ( ) , unloadNum ) ;
} ) ;
} ) ;
trunklineLoadSignOrderService . updateById ( signOrderEntity ) ;
trunklineLoadSignOrderService . updateById ( signOrderEntity ) ;