@ -102,7 +102,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
BusinessSanDTO businessSanDTO = new BusinessSanDTO ( ) ;
businessSanDTO . setOrderPackageCode ( distributionBusinessPreOrderEntity . getOrderPackageCode ( ) ) ;
businessSanDTO . setInWarehouseException ( 0 ) ;
businessSanDTO . setConditions ( distributionBusinessPreOrderEntity . getConditions ( ) + "" ) ;
businessSanDTO . setConditions ( distributionBusinessPreOrderEntity . getConditions ( ) + "" ) ;
businessSanDTO . setDistrCarNumber ( distributionBusinessPreOrderEntity . getDistrCarNumber ( ) ) ;
R r = inOrderWarehourse ( businessSanDTO ) ;
if ( r . isSuccess ( ) ) {
@ -234,13 +234,13 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
// 异常入库
if ( 1 = = businessSanDTO . getInWarehouseException ( ) ) {
Resp a = handleExceptionalWarehourse ( businessSanDTO , list , orderPackageCode , distrCarNumber ) ;
if ( a ! = null ) {
if ( a ! = null ) {
return a ;
}
} else {
//正常入口
Resp scanFail = handleNormalWarehourse ( businessSanDTO , orderPackageCode , list , distrCarNumber ) ;
if ( scanFail ! = null ) {
if ( scanFail ! = null ) {
return scanFail ;
}
@ -287,7 +287,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId . setWarehouse ( myCurrentWarehouse . getName ( ) ) ;
Long id = distributionParcelListClient . addReturnId ( distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId ) ;
Long id = distributionParcelListClient . addReturnId ( distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId ) ;
// 增加logpm_distribution_parcel_number 的数据
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity ( ) ;
@ -304,22 +304,21 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
ls . add ( parcelNumberEntity ) ;
distributionParcelNumberClient . addBatch ( ls ) ;
distributionStockArticleEntity . setHandQuantity ( distributionStockArticleEntity . getHandQuantity ( ) = = null ? 0 : distributionStockArticleEntity . getHandQuantity ( ) + businessSanDTO . getUnloadNum ( ) ) ;
distributionStockArticleEntity . setIncomingNum ( distributionStockArticleEntity . getIncomingNum ( ) = = null ? 0 : distributionStockArticleEntity . getIncomingNum ( ) + businessSanDTO . getUnloadNum ( ) ) ;
distributionStockArticleEntity . setHandQuantity ( distributionStockArticleEntity . getHandQuantity ( ) = = null ? 0 : distributionStockArticleEntity . getHandQuantity ( ) + businessSanDTO . getUnloadNum ( ) ) ;
distributionStockArticleEntity . setIncomingNum ( distributionStockArticleEntity . getIncomingNum ( ) = = null ? 0 : distributionStockArticleEntity . getIncomingNum ( ) + businessSanDTO . getUnloadNum ( ) ) ;
distributionStockArticleClient . saveOrUpdate ( distributionStockArticleEntity ) ;
// distributionParcelNumberClient.add(new DistributionParcelNumberEntity(distributionParcelListEntityByOrderCodeAndFirstName.getId(), distributionParcelListEntityByOrderCodeAndFirstName.getOrderPackageCode(), distributionParcelListEntityByOrderCodeAndFirstName.getOrderPackageReservationStatus(), distributionParcelListEntityByOrderCodeAndFirstName.getQuantity()));
temp = businessSanDTO . getUnloadNum ( ) ;
}
} else {
// 修改其入库数量
if ( distributionParcelListEntityByOrderCodeAndFirstName . getQuantity ( ) < businessSanDTO . getUnloadNum ( ) ) {
if ( distributionParcelListEntityByOrderCodeAndFirstName . getQuantity ( ) < businessSanDTO . getUnloadNum ( ) ) {
temp = distributionParcelListEntityByOrderCodeAndFirstName . getQuantity ( ) - businessSanDTO . getUnloadNum ( ) ;
} else {
} else {
temp = businessSanDTO . getUnloadNum ( ) - distributionParcelListEntityByOrderCodeAndFirstName . getQuantity ( ) ;
}
@ -336,7 +335,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
businessPreOrderEntity . setInWarehouse ( 1 ) ;
businessPreOrderEntity . setUnloadNum ( businessSanDTO . getUnloadNum ( ) ) ;
this . updateById ( businessPreOrderEntity ) ;
return Resp . scanSuccess ( "操作成功" , "入库" + businessSanDTO . getUnloadNum ( ) + "件" ) ;
return Resp . scanSuccess ( "操作成功" , "入库" + businessSanDTO . getUnloadNum ( ) + "件" ) ;
} else {
@ -546,6 +545,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
t . setAcceptWarehouseName ( distributionBusinessPreOrderEntity . getAcceptWarehouseName ( ) ) ;
t . setSendWarehouseId ( distributionBusinessPreOrderEntity . getSendWarehouseId ( ) ) ;
t . setSendWarehouseName ( distributionBusinessPreOrderEntity . getSendWarehouseName ( ) ) ;
t . setTaskTime ( distributionBusinessPreOrderEntity . getTaskTime ( ) ) ;
this . save ( t ) ;
}
R r = inOrderWarehourseByFeign ( businessSanDTO ) ;
@ -814,10 +814,10 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
for ( BusinessPreOrderEntity businessPreOrderEntity : list ) {
BusinessPreOrderVO t = businessPreOrderList . stream ( ) . filter ( a - > businessPreOrderEntity . getId ( ) . equals ( a . getId ( ) ) ) . findFirst ( ) . get ( ) ;
BusinessPreOrderVO t = businessPreOrderList . stream ( ) . filter ( a - > businessPreOrderEntity . getId ( ) . equals ( a . getId ( ) ) ) . findFirst ( ) . get ( ) ;
if ( 1 = = businessPreOrderEntity . getInWarehouse ( ) ) {
throw new CustomerException ( businessPreOrderEntity . getFirsts ( ) + "已入库" ) ;
throw new CustomerException ( businessPreOrderEntity . getFirsts ( ) + "已入库" ) ;
}
// 构建 订单
@ -847,7 +847,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId . setStockArticleId ( distributionStockArticleEntity . getId ( ) ) ;
// distributionParcelListClient.add(distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId);
Long id = distributionParcelListClient . addReturnId ( distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId ) ;
Long id = distributionParcelListClient . addReturnId ( distributionParcelListEntityByOrderCodeAndFirstNameAndTenantId ) ;
// 增加logpm_distribution_parcel_number 的数据
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity ( ) ;
@ -865,8 +865,8 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
ls . add ( parcelNumberEntity ) ;
distributionParcelNumberClient . addBatch ( ls ) ;
distributionStockArticleEntity . setHandQuantity ( distributionStockArticleEntity . getHandQuantity ( ) = = null ? 0 : distributionStockArticleEntity . getHandQuantity ( ) + t . getUnloadNum ( ) ) ;
distributionStockArticleEntity . setIncomingNum ( distributionStockArticleEntity . getIncomingNum ( ) = = null ? 0 : distributionStockArticleEntity . getIncomingNum ( ) + t . getUnloadNum ( ) ) ;
distributionStockArticleEntity . setHandQuantity ( distributionStockArticleEntity . getHandQuantity ( ) = = null ? 0 : distributionStockArticleEntity . getHandQuantity ( ) + t . getUnloadNum ( ) ) ;
distributionStockArticleEntity . setIncomingNum ( distributionStockArticleEntity . getIncomingNum ( ) = = null ? 0 : distributionStockArticleEntity . getIncomingNum ( ) + t . getUnloadNum ( ) ) ;
distributionStockArticleClient . saveOrUpdate ( distributionStockArticleEntity ) ;
temp = t . getUnloadNum ( ) ;
@ -874,16 +874,16 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
} else {
// 修改其入库数量
if ( distributionParcelListEntityByOrderCodeAndFirstName . getQuantity ( ) < t . getUnloadNum ( ) ) {
if ( distributionParcelListEntityByOrderCodeAndFirstName . getQuantity ( ) < t . getUnloadNum ( ) ) {
temp = distributionParcelListEntityByOrderCodeAndFirstName . getQuantity ( ) - t . getUnloadNum ( ) ;
} else {
} else {
temp = t . getUnloadNum ( ) - distributionParcelListEntityByOrderCodeAndFirstName . getQuantity ( ) ;
}
distributionParcelListEntityByOrderCodeAndFirstName . setQuantity ( t . getUnloadNum ( ) ) ;
distributionParcelListClient . update ( distributionParcelListEntityByOrderCodeAndFirstName ) ;
distributionStockArticleEntity . setHandQuantity ( distributionStockArticleEntity . getHandQuantity ( ) = = null ? 0 : distributionStockArticleEntity . getHandQuantity ( ) + t . getUnloadNum ( ) ) ;
distributionStockArticleEntity . setIncomingNum ( distributionStockArticleEntity . getIncomingNum ( ) = = null ? 0 : distributionStockArticleEntity . getIncomingNum ( ) + t . getUnloadNum ( ) ) ;
distributionStockArticleEntity . setHandQuantity ( distributionStockArticleEntity . getHandQuantity ( ) = = null ? 0 : distributionStockArticleEntity . getHandQuantity ( ) + t . getUnloadNum ( ) ) ;
distributionStockArticleEntity . setIncomingNum ( distributionStockArticleEntity . getIncomingNum ( ) = = null ? 0 : distributionStockArticleEntity . getIncomingNum ( ) + t . getUnloadNum ( ) ) ;
distributionStockArticleClient . saveOrUpdate ( distributionStockArticleEntity ) ;
}