@ -963,7 +963,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
@Transactional ( rollbackFor = Exception . class )
@Override
public R openLabelHasPacakage ( Long warehouseId , String warehouseName , MultipartFile file ) throws IOException {
public R < List < TrunklineAdvanceEntity > > openLabelHasPacakage ( Long warehouseId , String warehouseName , MultipartFile file ) throws IOException {
if ( Objects . isNull ( file ) ) {
log . warn ( "##################openLabelHasPacakage: 文件不存在" ) ;
return R . fail ( 405 , "文件不存在" ) ;
@ -979,7 +979,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Set < String > set = listMap . keySet ( ) ;
List < TrunklineAdvanceDetailEntity > advanceDetailEntities = new ArrayList < > ( ) ;
List < TrunklineAdvanceEntity > advanceEntityList = new ArrayList < > ( ) ;
for ( String str : set ) {
List < PacakgeDetailExcelDTO > detailExcelDTOS = listMap . get ( str ) ;
PacakgeDetailExcelDTO pacakgeDetailExcelDTO = detailExcelDTOS . get ( 0 ) ;
@ -1026,6 +1026,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceEntity . setLegacyStatus ( "0" ) ;
advanceEntity . setCreateUserName ( AuthUtil . getNickName ( ) ) ;
advanceService . save ( advanceEntity ) ;
advanceEntityList . add ( advanceEntity ) ;
} else {
Long advanceId = advanceEntity . getId ( ) ;
orderPackageCodes = advanceDetailService . findOrderPackageCodesByAdvanceId ( advanceId ) ;
@ -1100,12 +1101,12 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
advanceDetailService . saveBatch ( advanceDetailEntities ) ;
return R . success ( "导入成功" ) ;
return R . data ( advanceEntityList ) ;
}
@Transactional ( rollbackFor = Exception . class )
@Override
public R importCustomizedOuPai ( Long warehouseId , String warehouseName , MultipartFile file ) throws IOException {
public R < List < TrunklineAdvanceEntity > > importCustomizedOuPai ( Long warehouseId , String warehouseName , MultipartFile file ) throws IOException {
if ( Objects . isNull ( file ) ) {
log . warn ( "##################openLabelHasPacakage: 文件不存在" ) ;
return R . fail ( 405 , "文件不存在" ) ;
@ -1122,7 +1123,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Set < String > set = listMap . keySet ( ) ;
List < TrunklineAdvanceEntity > advanceEntityList = new ArrayList < > ( ) ;
List < TrunklineAdvanceDetailEntity > advanceDetailEntities = new ArrayList < > ( ) ;
for ( String str : set ) {
List < ImportCustomizedOuPaiDTO > paiDTOList = listMap . get ( str ) ;
@ -1161,12 +1162,12 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
trunklineAdvanceEntity . setDeliveryDate ( CommonUtil . StringToDate ( importCustomizedOuPaiDTO . getDueDateStr ( ) ) ) ;
trunklineAdvanceEntity . setCreateUserName ( AuthUtil . getNickName ( ) ) ;
advanceService . save ( trunklineAdvanceEntity ) ;
advanceEntityList . add ( trunklineAdvanceEntity ) ;
} else {
Long advanceId = trunklineAdvanceEntity . getId ( ) ;
orderPackageCodes = advanceDetailService . findOrderPackageCodesByAdvanceId ( advanceId ) ;
}
for ( ImportCustomizedOuPaiDTO customizedOuPaiDTO : paiDTOList ) {
String orderPackageCode = customizedOuPaiDTO . getOrderPackageCode ( ) ;
if ( orderPackageCodes . contains ( orderPackageCode ) ) {
@ -1219,12 +1220,12 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
log . info ( "################本次耗时 " + ( end - start ) + "ms" ) ;
return R . success ( "导入成功" ) ;
return R . data ( advanceEntityList ) ;
}
@Transactional ( rollbackFor = Exception . class )
@Override
public R importStandardOuPai ( Long warehouseId , String warehouseName , MultipartFile file ) throws IOException {
public R < List < TrunklineAdvanceEntity > > importStandardOuPai ( Long warehouseId , String warehouseName , MultipartFile file ) throws IOException {
if ( Objects . isNull ( file ) ) {
log . warn ( "##################importStandardOuPai: 文件不存在" ) ;
return R . fail ( 405 , "文件不存在" ) ;
@ -1238,6 +1239,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Set < String > set = listMap . keySet ( ) ;
List < TrunklineAdvanceEntity > advanceEntityList = new ArrayList < > ( ) ;
List < TrunklineAdvanceDetailEntity > advanceDetailEntities = new ArrayList < > ( ) ;
for ( String str : set ) {
List < ImportStandardOuPaiDTO > paiDTOList = listMap . get ( str ) ;
@ -1274,11 +1276,13 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
trunklineAdvanceEntity . setDeliveryDate ( CommonUtil . StringToDate ( importStandardOuPaiDTO . getDueDateStr ( ) ) ) ;
trunklineAdvanceEntity . setCreateUserName ( AuthUtil . getNickName ( ) ) ;
advanceService . save ( trunklineAdvanceEntity ) ;
advanceEntityList . add ( trunklineAdvanceEntity ) ;
} else {
Long advanceId = trunklineAdvanceEntity . getId ( ) ;
orderPackageCodes = advanceDetailService . findOrderPackageCodesByAdvanceId ( advanceId ) ;
}
for ( ImportStandardOuPaiDTO standardOuPaiDTO : paiDTOList ) {
String orderPackageCode = standardOuPaiDTO . getOrderPackageCode ( ) ;
if ( orderPackageCodes . contains ( orderPackageCode ) ) {
@ -1376,7 +1380,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
advanceDetailService . saveBatch ( advanceDetailEntities ) ;
return R . success ( "导入成功" ) ;
return R . data ( advanceEntityList ) ;
}
@Override
@ -1556,7 +1560,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
@Override
public R importOrderNoPackage ( Long warehouseId , String warehouseName , MultipartFile file ) throws IOException {
public R < List < TrunklineAdvanceEntity > > importOrderNoPackage ( Long warehouseId , String warehouseName , MultipartFile file ) throws IOException {
if ( Objects . isNull ( file ) ) {
log . warn ( "##################importOrderNoPackage: 文件不存在" ) ;
return R . fail ( 405 , "文件不存在" ) ;
@ -1597,7 +1601,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
advanceService . saveBatch ( list ) ;
return R . success ( "导入成功" ) ;
return R . data ( list ) ;
}
@Override