@ -907,7 +907,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
Integer isStrictLoading = 0 ;
WarehouseConfigEntity warehouseConfig = warehouseConfigClient . getWarehouseConfig ( myCurrentWarehouse . getId ( ) ) ;
if ( ! Objects . isNull ( warehouseConfig . getIsStrictLoading ( ) ) ) {
if ( ! Objects . isNull ( warehouseConfig . getIsStrictLoading ( ) ) ) {
isStrictLoading = warehouseConfig . getIsStrictLoading ( ) ;
}
String [ ] split = distrilbutionloadingscanDTO . getBarcodes ( ) . split ( "," ) ;
@ -943,7 +943,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//更新签收人
Integer i = distributionSignforMapper . updateSignUser ( loadscaninvnEntity . getDeliveryId ( ) , loadscaninvnEntity . getReservationId ( ) , user ) ;
} else {
if ( isStrictLoading = = Integer . parseInt ( IsOrNoConstant . yes . getValue ( ) ) ) {
if ( isStrictLoading = = Integer . parseInt ( IsOrNoConstant . yes . getValue ( ) ) ) {
return R . fail ( "操作失败,存在未装车包件" ) ;
}
//不存在装车数据,需要进行装车数据的补录
@ -1474,7 +1474,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
int d = 0 ;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.sss" ) ;
if ( Func . isEmpty ( loadscanEntity ) ) {
if ( isStrictLoading = = Integer . parseInt ( IsOrNoConstant . yes . getValue ( ) ) ) {
if ( isStrictLoading = = Integer . parseInt ( IsOrNoConstant . yes . getValue ( ) ) ) {
return R . fail ( "操作失败,存在未装车包件" ) ;
}
a = distributionParcelNumberDTO . getHandQuantity ( ) - reservationZeroPackageEntities . getQuantity ( ) ;
@ -1500,7 +1500,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
unLoadscanEntity . setScanStatus ( LoadingStatusConstant . buluzhuangche . getValue ( ) ) ;
unLoadscanEntity . setIsInsert ( 2 ) ;
unLoadscanEntity . setLoadingId ( distributionDeliverySelfEntity . getId ( ) + "" ) ;
unLoadscanEntity . setLoadingId ( distributionDeliverySelfEntity . getId ( ) + "" ) ;
unLoadscanEntity . setOrderId ( reservationZeroPackageEntities . getStockArticleId ( ) ) ;
unLoadscanEntity . setPackageId ( reservationZeroPackageEntities . getParcelListId ( ) ) ;
unLoadscanEntity . setReservationId ( reservationId ) ;
@ -1548,8 +1548,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
jsonObject . put ( "remark" , "文员签收" ) ;
jsonObjects . add ( jsonObject ) ;
} else {
if ( isStrictLoading = = Integer . parseInt ( IsOrNoConstant . yes . getValue ( ) ) ) {
if ( loadscanEntity . getPackageNub ( ) < reservationZeroPackageEntities . getQuantity ( ) ) {
if ( isStrictLoading = = Integer . parseInt ( IsOrNoConstant . yes . getValue ( ) ) ) {
if ( loadscanEntity . getPackageNub ( ) < reservationZeroPackageEntities . getQuantity ( ) ) {
return R . fail ( "装车未完成,无法完成签收" ) ;
}
}
@ -3197,8 +3197,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// }
Integer isStrictLoading = 0 ;
WarehouseConfigEntity warehouseConfig = warehouseConfigClient . getWarehouseConfig ( myCurrentWarehouse . getId ( ) ) ;
if ( ! Objects . isNull ( warehouseConfig . getIsStrictLoading ( ) ) ) {
isStrictLoading = warehouseConfig . getIsStrictLoading ( ) ;
if ( ! Objects . isNull ( warehouseConfig . getIsStrictLoading ( ) ) ) {
isStrictLoading = warehouseConfig . getIsStrictLoading ( ) ;
}
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper . selectById ( distrilbutionloadingscanDTO . getReservationId ( ) ) ;
@ -3299,7 +3299,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
aaa . add ( trunklinePackageTrackLog ) ;
} else {
if ( isStrictLoading = = Integer . parseInt ( IsOrNoConstant . yes . getValue ( ) ) ) {
if ( isStrictLoading = = Integer . parseInt ( IsOrNoConstant . yes . getValue ( ) ) ) {
return R . fail ( "操作失败,存在未装车包件" ) ;
}
//这里装车的数据需要进行补录
@ -6515,34 +6515,47 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
@Transactional ( rollbackFor = Exception . class )
public Boolean updatePicture ( DistributionSignforDTO distributionSignfor ) {
List < DistributionSignPrintEntity > saveDate = new ArrayList < > ( ) ;
if ( ObjectUtils . isNotNull ( distributionSignfor . getMap ( ) ) ) {
List < DistributionSignPrintEntity > distributionSignPrintList = new ArrayList < > ( ) ;
distributionSignfor . getMap ( ) . forEach ( ( k , v ) - > {
List < DistributionSignPrintEntity > list = iDistributionSignPrintService . list ( Wrappers . < DistributionSignPrintEntity > query ( ) . lambda ( )
Map < String , List < DistributionSignPrintDTO > > map2 = distributionSignfor . getMap ( ) ;
map2 . forEach ( ( k , v ) - > {
List < DistributionSignPrintEntity > printEntities = iDistributionSignPrintService . list ( Wrappers . < DistributionSignPrintEntity > query ( ) . lambda ( )
. eq ( DistributionSignPrintEntity : : getReservationId , distributionSignfor . getReservationId ( ) )
. eq ( DistributionSignPrintEntity : : getType , k )
. eq ( DistributionSignPrintEntity : : getIsDeleted , "0" )
) ;
if ( ! list . isEmpty ( ) ) {
//删除
log . info ( ">>> 预约单 {}删除之前的图片 start" , distributionSignfor . getReservationId ( ) ) ;
iDistributionSignPrintService . deleteLogic ( list . stream ( ) . map ( DistributionSignPrintEntity : : getId ) . collect ( Collectors . toList ( ) ) ) ;
log . info ( ">>> 预约单 {}删除之前的图片 start" , distributionSignfor . getReservationId ( ) ) ;
Map < String , List < DistributionSignPrintEntity > > map = new HashMap < > ( ) ;
if ( ! printEntities . isEmpty ( ) ) {
map = printEntities . stream ( ) . collect ( Collectors . groupingBy ( DistributionSignPrintEntity : : getUrlRoute ) ) ;
} else {
if ( Objects . isNull ( map . get ( k ) ) ) {
v . forEach ( a - > {
a . setOperatorId ( AuthUtil . getUserId ( ) ) ;
a . setOperatorUsername ( AuthUtil . getNickName ( ) ) ;
} ) ;
saveDate . addAll ( v ) ;
}
}
if ( ! map . isEmpty ( ) ) {
for ( DistributionSignPrintDTO distributionSignPrintDTO : v ) {
if ( Objects . isNull ( map . get ( distributionSignPrintDTO . getUrlRoute ( ) ) ) ) {
distributionSignPrintDTO . setOperatorId ( AuthUtil . getUserId ( ) ) ;
distributionSignPrintDTO . setOperatorUsername ( AuthUtil . getNickName ( ) ) ;
saveDate . add ( distributionSignPrintDTO ) ;
} else {
map . remove ( distributionSignPrintDTO . getUrlRoute ( ) ) ;
}
}
if ( ! map . isEmpty ( ) ) {
List < DistributionSignPrintEntity > distributionSignPrintEntities = map . get ( k ) ;
iDistributionSignPrintService . removeBatchByIds ( distributionSignPrintEntities ) ;
}
}
v . forEach ( i - > {
DistributionSignPrintEntity distributionSignPrint = new DistributionSignPrintEntity ( ) ;
BeanUtils . copyProperties ( i , distributionSignPrint ) ;
distributionSignPrint . setReservationId ( distributionSignfor . getReservationId ( ) ) ;
distributionSignPrint . setId ( null ) ;
distributionSignPrintList . add ( distributionSignPrint ) ;
log . info ( ">>> 需要重新保存的数据 {}" , distributionSignPrint ) ;
} ) ;
} ) ;
if ( ! saveDate . isEmpty ( ) ) {
iDistributionSignPrintService . saveBatch ( saveDate ) ;
}
if ( ! distributionSignPrintList . isEmpty ( ) ) {
//添加
this . update ( Wrappers . < DistributionSignforEntity > update ( ) . lambda ( )
@ -7846,7 +7859,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if ( OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) . equals ( parcelListEntity . getOrderPackageReservationStatus ( ) ) ) {
return Resp . scanFail ( "当前包件存在配送计划" , "当前包件存在配送计划" ) ;
}
if ( deliveryListEntity . getKind ( ) . equals ( "2" ) ) {
if ( deliveryListEntity . getKind ( ) . equals ( "2" ) ) {
return Resp . scanFail ( "外协无法异常签收" , "外协无法异常签收" ) ;
}
return R . fail ( 3006 , null ) ;
@ -8231,7 +8244,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// String str = checkSignNum(distrilbutionloadingscanDTO);
Integer integer = distributionSignforMapper . signforNum ( distrilbutionloadingscanDTO . getReservationId ( ) ) ;
return Resp . scanSuccess ( integer + "件" , integer + "件" ) ;
return Resp . scanSuccess ( integer + "件" , integer + "件" ) ;
}
@Override