Browse Source

fix:修改异步注解名称

dist.1.3.0
pref_mail@163.com 11 months ago
parent
commit
b66612cdbf
  1. 12
      blade-biz-common/src/main/java/org/springblade/common/annotations/LogpmAsync.java
  2. 4
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/AsyncAnnotationAspect.java
  3. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  4. 4
      blade-service/logpm-basic/src/main/java/com/logpm/basic/aspect/AsyncAnnotationAspect.java
  5. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/AsyncAnnotationAspect.java
  6. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/AsyncAnnotationAspect.java
  7. 49
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  8. 4
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/aspect/AnnotationAspect.java
  9. 3
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/job/AdvanceJob.java
  10. 3
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/FactoryOrderListener.java
  11. 4
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/aspect/AnnotationAspect.java
  12. 3
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/mq/FactoryOrderListener.java
  13. 4
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/aspect/AnnotationAspect.java
  14. 3
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mq/FactoryOrderListener.java
  15. 4
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/aspect/AnnotationAspect.java
  16. 3
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomFactoryOrderListener.java
  17. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/LocalServerTenantIdAnnotationAspect.java
  18. 9
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java
  19. 3
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OpFailRetryPushPackageServiceImpl.java
  20. 3
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/AsyncDataServiceImpl.java
  21. 4
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/aspect/AsyncAnnotationAspect.java
  22. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/aspect/AsyncAnnotationAspect.java
  23. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/AsyncServiceImpl.java
  24. 19
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  25. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java
  26. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/PackageTrackLogAsyncServiceImpl.java
  27. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/aspect/AsyncAnnotationAspect.java
  28. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/AsyncDataServiceImpl.java

12
blade-biz-common/src/main/java/org/springblade/common/annotations/LogpmAsync.java

@ -0,0 +1,12 @@
package org.springblade.common.annotations;
import org.springframework.scheduling.annotation.Async;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
@Async("asyncExecutor")
public @interface LogpmAsync {
String value();
}

4
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/AsyncAnnotationAspect.java

@ -36,8 +36,8 @@ public class AsyncAnnotationAspect {
private final BladeRedis bladeRedis;
private final Environment environment;
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object logAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -44,6 +44,7 @@ import com.logpm.distribution.vo.DistributionDeliveryListVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.DictTimeoutEnum;
import org.springblade.common.constant.aftersales.*;
@ -1932,7 +1933,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
* @return
*/
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public Boolean addSurveyRecord(BladeUser user, Long workOrderId, String results, String difference) {
//添加跟踪记录
AftersaleSurveyRecordDTO aftersaleSurveyRecordDTO = changName(new AftersalesWorkOrderDTO(), user);
@ -2088,7 +2089,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
*
* @param aftersalesWorkOrderDTO
*/
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void addAssignCustomerService(AftersalesWorkOrderDTO aftersalesWorkOrderDTO, BladeUser user) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();

4
blade-service/logpm-basic/src/main/java/com/logpm/basic/aspect/AsyncAnnotationAspect.java

@ -17,8 +17,8 @@ import java.lang.reflect.Method;
public class AsyncAnnotationAspect {
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object logAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/AsyncAnnotationAspect.java

@ -36,8 +36,8 @@ public class AsyncAnnotationAspect {
private final BladeRedis bladeRedis;
private final Environment environment;
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object logAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/AsyncAnnotationAspect.java

@ -1,10 +1,12 @@
package com.logpm.distribution.aspect;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.scheduling.annotation.Async;
@ -14,24 +16,28 @@ import java.lang.reflect.Method;
@Aspect
@Component
@Slf4j
public class AsyncAnnotationAspect {
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
@Around("@annotation(org.springblade.common.annotations.LogpmAsync)")
public Object logAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method method = signature.getMethod();
Async myAsync = method.getAnnotation(Async.class);
LogpmAsync myAsync = method.getAnnotation(LogpmAsync.class);
String annotationValue = myAsync.value();
log.info(">>>>>>>>>>>>>>>>>> annotationValue={}",annotationValue);
log.info("@LogpmAsync注解的值为asyncExecutor,进行数据源切换 ");
if(StringUtil.isNotBlank(annotationValue) && annotationValue.equals("asyncExecutor")){
// 在方法执行前的操作
String tenantId = AuthUtil.getTenantId();
log.info(">> tenandId {} ",tenantId);
DynamicDataSourceContextHolder.push(tenantId);
// 执行原方法
@ -41,9 +47,7 @@ public class AsyncAnnotationAspect {
DynamicDataSourceContextHolder.poll();
return result;
}else{
return joinPoint.proceed();
}
}

49
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -37,6 +37,7 @@ import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant;
import org.springblade.common.constant.Inventory.InventoryPackageStatusConstant;
@ -121,7 +122,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
// private final
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void makeSureByPackage(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
log.info("[makeSureByPackage]线程开启>>>>>>>>>>>>>>>>>>>>>>>>{}", distrilbutionloadingscanDTO);
@ -176,7 +177,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
* @return
*/
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Transactional(rollbackFor = Exception.class)
public Boolean getSelfPickup(Long id) {
DistributionParcelListEntity entity = new DistributionParcelListEntity();
@ -192,7 +193,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
* @return
*/
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Transactional(rollbackFor = Exception.class)
public Boolean getOrderSelfPickup(Long id) {
DistributionStockArticleEntity entity = new DistributionStockArticleEntity();
@ -202,7 +203,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Transactional(rollbackFor = Exception.class)
public Boolean getInventorySelfPickup(Long id) {
DistributionStockEntity distributionStock = new DistributionStockEntity();
@ -213,7 +214,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Transactional(rollbackFor = Exception.class)
public Boolean getInventoryOrderSelfPickup(Long id) {
DistributionDeliveryDetailsEntity deliveryDetails = new DistributionDeliveryDetailsEntity();
@ -241,7 +242,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
*
* @param id 订单ID
*/
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void updateStockArticleStock(Long id) {
log.debug("###查询订单备货状态");
@ -269,7 +270,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
*
* @param ids 订单ID
*/
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void updateParcelListReservation(List<Long> ids) {
log.debug("####修改包件预约状态");
@ -294,7 +295,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public Boolean getInventoryNumUpdate(Long id, Integer num, Integer type) {
//查询
@ -317,7 +318,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void changeOrderSignforStatus(DistributionParcelListEntity parcelListEntity) {
@ -338,7 +339,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void changeDiscussDeliveryListStatus(String barcode, Long deliveryId) {
@ -398,7 +399,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
});
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void changeMarketDeliveryListStatus(String barcode, Long deliveryId, Long reservationId) {
@ -444,7 +445,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
checkReservationAndDeliveryLoadingStatus(deliveryId, reservationId);
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void checkDeliverySignStatus(String barcode, Long deliveryId) {
@ -635,7 +636,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
distributionDeliveryListMapper.updateById(deliveryListEntity);
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void checkDeliverySignStatusByReservation(Long deliveryId) {
@ -1441,7 +1442,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void sendFactory(DistributionParcelListEntity distributionParcelListEntity, String signingTime, Long reservationId, String reservationCode, String warehouseName, String userName) {
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(distributionParcelListEntity.getStockArticleId());
log.info(">>>>>>>>>>> 签收推送 对象 {}", distributionParcelListEntity);
@ -1475,7 +1476,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
@Override
@Transactional(rollbackFor = Exception.class)
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void sendReviewFactory(Long signingId, String warehouseName, Long warehouseId) {
String brands = "梦天,欧派,志邦";//可追加
log.info(">>>>>>>>>>> 签收推送 对象 {}", "signingId:=" + signingId + "warehouseName:=" + warehouseName + "warehouseId:=" + warehouseId);
@ -1628,7 +1629,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Transactional
public void maintenanceOrderStatus(String orderCode, Long warehouseId) {
distributionStockArticleService.updateOrderInfo(orderCode, warehouseId);
@ -1636,7 +1637,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
@Override
@Transactional
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void releaseSource(Long reservationId, Long warehouseId) {
String method = "##########################DistributionAsyncServiceImpl.releaseSource";
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(reservationId);
@ -1828,7 +1829,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
* @param stockupDTO
*/
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void updateStockupDate(StockupDTO stockupDTO) {
Integer scanType = stockupDTO.getScanType();//扫码类型 1 包件 2库存品
@ -1957,7 +1958,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
* 备货库存品备货时间回显
*/
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void updateStockupStockListDate(StockupDTO stockupDTO) {
Integer scanType = stockupDTO.getScanType();//扫码类型 1 包件 2库存品
Long reservationId = stockupDTO.getReservationId();//预约ID
@ -2179,7 +2180,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
/**
* 自提签收片段是否签收完全
*/
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(rollbackFor = Exception.class)
public void getStockUPstate(Long billLadingId) {
@ -2265,7 +2266,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void checkStockArticleSignStatus(DistributionParcelListEntity parcelListEntity) {
@ -2322,7 +2323,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void changeOrderStatus(String barcode, Long deliveryId) {
@ -2341,7 +2342,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
distributionStockArticleService.updateById(stockArticleEntity);
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void changeDeliverySignforListStatus(Long deliveryId, DistributionParcelListEntity parcelListEntity) {
@ -2465,7 +2466,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
distributionStockArticleService.updateById(stockArticleEntity);
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void checkStockArticleLoadingStatus(DistributionParcelListEntity parcelListEntity) {

4
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/aspect/AnnotationAspect.java

@ -37,8 +37,8 @@ public class AnnotationAspect {
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object asyncAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

3
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/job/AdvanceJob.java

@ -28,6 +28,7 @@ import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.HttpConstants;
import org.springblade.common.constant.factorydata.FactoryDataConstants;
import org.springblade.common.model.IDict;
@ -116,7 +117,7 @@ public class AdvanceJob {
return ReturnT.SUCCESS;
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void buildAdvance(Map<String, List<PackageInfoEntity>> packageMap, Map<String, DeliveryNoteEntity> deliveryMap,
Map<String, OrderInfoEntity> orderInfoMap) {
// 新起线程构建暂存单发送mq

3
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/FactoryOrderListener.java

@ -42,6 +42,7 @@ import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.HttpConstants;
import org.springblade.common.constant.factorydata.FactoryDataConstants;
import org.springblade.core.redis.cache.BladeRedis;
@ -184,7 +185,7 @@ public class FactoryOrderListener {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void buildAdvance(PushOrderVO vo) {
// 新起线程构建暂存单发送mq
Long startWarehouseId = null;

4
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/aspect/AnnotationAspect.java

@ -17,8 +17,8 @@ import java.lang.reflect.Method;
public class AnnotationAspect {
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object asyncAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

3
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/mq/FactoryOrderListener.java

@ -29,6 +29,7 @@ import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.HttpConstants;
import org.springblade.common.constant.factorydata.FactoryDataConstants;
import org.springblade.core.redis.cache.BladeRedis;
@ -173,7 +174,7 @@ public class FactoryOrderListener {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void buildAdvance(List<DeliveryNoteEntity> vos) {
// 新起线程构建暂存单发送mq
// ThreadPoolUtil.getThreadPool().submit(() -> {

4
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/aspect/AnnotationAspect.java

@ -17,8 +17,8 @@ import java.lang.reflect.Method;
public class AnnotationAspect {
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object asyncAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

3
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mq/FactoryOrderListener.java

@ -31,6 +31,7 @@ import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.HttpConstants;
import org.springblade.common.constant.factorydata.FactoryDataConstants;
import org.springblade.core.redis.cache.BladeRedis;
@ -150,7 +151,7 @@ public class FactoryOrderListener {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void buildAdvance(DeliveryNoteVO vo) {
// 新起线程构建暂存单发送mq
Long startWarehouseId = null;

4
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/aspect/AnnotationAspect.java

@ -17,8 +17,8 @@ import java.lang.reflect.Method;
public class AnnotationAspect {
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object asyncAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

3
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomFactoryOrderListener.java

@ -37,6 +37,7 @@ import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import com.logpm.trunkline.entity.TrunklineDetailProductEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.HttpConstants;
import org.springblade.common.constant.PatternConstant;
import org.springblade.common.constant.TenantNum;
@ -195,7 +196,7 @@ public class ZbomFactoryOrderListener {
buildAdvance(zbReceiptDTO, packageCode);
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void buildAdvance(ZBReceiptDTO zbReceiptDTO, Set packageCode) {
// 新起线程构建暂存单发送mq
Long startWarehouseId = null;

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/LocalServerTenantIdAnnotationAspect.java

@ -25,8 +25,8 @@
//
//
// /**
// * 定义一个切点,匹配所有带有@Async("asyncExecutor")注解的方法。
// * 注意:实际上Spring Framework自带对@Async("asyncExecutor")的处理,直接这样配置可能会导致预期之外的行为。
// * 定义一个切点,匹配所有带有@LogpmAsync("asyncExecutor")注解的方法。
// * 注意:实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理,直接这样配置可能会导致预期之外的行为。
// */
//
// // 定义一个

9
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java

@ -62,6 +62,7 @@ import com.logpm.trunkline.entity.TrunklineDetailProductEntity;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.jetbrains.annotations.Nullable;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.HttpConstants;
import org.springblade.common.constant.PackagesTypeEnum;
import org.springblade.common.constant.PatternConstant;
@ -141,7 +142,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
* 处理皮阿诺数据推送到汇通老库
*/
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void handlerPanDataToHt(Long id) {
log.info("################handlerDataToHt: 处理皮阿诺订单数据到");
//查询需要同步的订单
@ -336,7 +337,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
}
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void handlerPanDataToHtNew(Long id) {
log.info("################handlerPanDataToHtNew: 处理皮阿诺订单数据到");
//查询需要同步的订单
@ -520,7 +521,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void handlerMtDataToHt(Long mainId) {
log.info("################handlerMtDataToHt: 处理梦天订单数据到");
//查询需要同步的订单
@ -599,7 +600,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
}
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void handlerMtDataToHtNew(Long mainId) {
log.info("################handlerMtDataToHtNew: 处理梦天订单数据到");
//查询需要同步的订单

3
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OpFailRetryPushPackageServiceImpl.java

@ -8,6 +8,7 @@ import com.logpm.factory.oupai.service.IOuPaiFactoryService;
import com.logpm.factory.oupai.service.OpFailRetryPushPackageService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@ -31,7 +32,7 @@ public class OpFailRetryPushPackageServiceImpl implements OpFailRetryPushPackage
protected final int MAX_RETRY_TIMES = 7;
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void retry(List<OpFailRetryPushPackageEntity> waitData){
ArrayList<Long> completeIds = new ArrayList<>();

3
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/AsyncDataServiceImpl.java

@ -13,6 +13,7 @@ import com.logpm.patch.service.ISyncOrderInfoService;
import com.logpm.patch.service.IWarehouseMappingDataService;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.exception.CustomerException;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@ -40,7 +41,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void syncInventoryToPlatform(SyncInventoryEntity syncInventoryEntity) {
Integer pageSize = 500;//处理的每页条数

4
blade-service/logpm-supervise/src/main/java/com/logpm/supervise/aspect/AsyncAnnotationAspect.java

@ -17,8 +17,8 @@ import java.lang.reflect.Method;
public class AsyncAnnotationAspect {
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object logAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/aspect/AsyncAnnotationAspect.java

@ -17,8 +17,8 @@ import java.lang.reflect.Method;
public class AsyncAnnotationAspect {
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object logAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/AsyncServiceImpl.java

@ -5,6 +5,7 @@ import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import com.logpm.trunkline.service.IAsyncService;
import com.logpm.trunkline.service.ITrunklineAdvanceDetailService;
import com.logpm.trunkline.service.ITrunklineAdvanceService;
import org.springblade.common.annotations.LogpmAsync;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@ -20,7 +21,7 @@ public class AsyncServiceImpl implements IAsyncService {
@Autowired
private ITrunklineAdvanceDetailService advanceDetailService;
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public CompletableFuture<Boolean> getResponseFromCp(List<TrunklineAdvanceDetailEntity> list, int queryType) {
return CompletableFuture
@ -29,7 +30,7 @@ public class AsyncServiceImpl implements IAsyncService {
);
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public CompletableFuture<Boolean> saveAdvanceEntity(List<TrunklineAdvanceEntity> list, int queryType) {
return CompletableFuture

19
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java

@ -15,6 +15,7 @@ import com.logpm.trunkline.vo.UnloadReportVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.constant.TenantNum;
@ -61,7 +62,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
@Autowired
private RabbitTemplate rabbitTemplate;
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void saveLog(TrunklineCarsLoadEntity carsLoadEntity, TrunklineCarsLoadLineEntity carsLoadLineEntity, int cardLoadType,String nickName,Long userId) {
String nodeName = null;
@ -171,7 +172,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
trunklineCarsLoadLogService.save(carsLoadLogEntity);
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void saveCostShareRecord(Long loadId, TrunklineCarsLoadEntity carsLoadEntity, Long userId, String tenantId, String deptIds) {
Long deptId = null;
@ -256,7 +257,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void costShareByLoadId(Long loadId,TrunklineCarsLoadEntity carsLoadEntity) {
@ -337,7 +338,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void abnormalListStartCarByLoadIdAndWarehouseId(Long loadId, Long warehouseId,Long userId,Long deptId,String nickName,String tenantId,String warehouseName) {
@ -378,7 +379,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void abnormalListUnloadByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String warehouseName, Long loadScanId, String tenantId, Long userId, String nickName, Long deptId) {
TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanService.getById(loadScanId);
@ -413,7 +414,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void abnormalListUnloadCheckByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String warehouseName, String tenantId, Long userId, String nickName, Long deptId) {
@ -494,7 +495,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void dealwithAfterAbnormalPackage(String orderPackageCode, Long warehouseId, String warehouseName, String carsNo, Long userId, Long aLong, String nickName) {
@ -517,13 +518,13 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void savaUnloadLogBatch(List<TrunklineCarsUnloadLogEntity> unloadLogList) {
trunklineCarsUnloadLogService.savaUnloadLogBatch(unloadLogList);
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void sendRabbitMessageLoadScanData(List<TrunklineAdvanceEntity> data) {
String queue = RabbitConstant.INCOMING_TO_LOAD_QUEUE;

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java

@ -9,6 +9,7 @@ import com.logpm.trunkline.vo.LoadScanWaybillVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
@ -42,7 +43,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
@Autowired
private IInComingService inComingService;
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void saveLog(Long waybillId, String waybillNo, String trackType, String refer, String operationRemark, String nickName,Long userId,Long warehouseId,String warehouseName) {
// String tenantId = AuthUtil.getTenantId();
@ -65,7 +66,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
// DynamicDataSourceContextHolder.clear();
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void saveStartCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity,String nickName,Long userId) {
Long loadId = carsLoadLineEntity.getLoadId();
@ -135,7 +136,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void saveCancelStartCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity, String nickName,Long userId) {
Long loadId = carsLoadLineEntity.getLoadId();
@ -165,7 +166,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void saveArriveCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity, String nickName,Long userId) {
Long loadId = carsLoadLineEntity.getLoadId();
@ -195,7 +196,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void saveCancelArriveCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity, String nickName,Long userId) {
Long loadId = carsLoadLineEntity.getLoadId();
@ -225,7 +226,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void saveUnloadStartCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity, String nickName,Long userId) {
Long loadId = carsLoadLineEntity.getLoadId();
@ -257,7 +258,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
}
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void incomingPackageBatch(List<Long> advanceIds, Long userId, Long deptId, String tenantId, String nickName,Integer incomingType,Long warehouseId,String warehouseName) {
InComingDTO inComingDTO = new InComingDTO();

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/PackageTrackLogAsyncServiceImpl.java

@ -6,6 +6,7 @@ import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity;
import com.logpm.warehouse.feign.IWarehousePackageTrackLogClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@ -21,7 +22,7 @@ public class PackageTrackLogAsyncServiceImpl implements IPackageTrackLogAsyncSer
private final IWarehousePackageTrackLogClient warehousePackageTrackLogClient;
private final ITrunklineWaybillPackageService waybillPackageService;
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void addPackageTrackLog(String tenantId, Long userId, Long deptId, String nickName, List<String> orderPackageCodes, Long warehouseId, String warehouseName, Integer workNode, String content) {
List<WarehousePackageTrackLogEntity> list = new ArrayList<>();
@ -49,7 +50,7 @@ public class PackageTrackLogAsyncServiceImpl implements IPackageTrackLogAsyncSer
waybillPackageService.updatePackageStatus(orderPackageCodes, workNode);
}
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
@Override
public void addBatchPackageTrackLog(List<WarehousePackageTrackLogEntity> addPackageTrackLogList, List<String> orderPackageCodes, Integer workNode) {
warehousePackageTrackLogClient.addLogList(addPackageTrackLogList);

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/aspect/AsyncAnnotationAspect.java

@ -17,8 +17,8 @@ import java.lang.reflect.Method;
public class AsyncAnnotationAspect {
/**
* 定义一个切点匹配所有带有@Async("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@Async("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
* 定义一个切点匹配所有带有@LogpmAsync("asyncExecutor")注解的方法
* 注意实际上Spring Framework自带对@LogpmAsync("asyncExecutor")的处理直接这样配置可能会导致预期之外的行为
*/
@Around("@annotation(org.springframework.scheduling.annotation.Async)")
public Object logAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {

3
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/AsyncDataServiceImpl.java

@ -21,6 +21,7 @@ import com.logpm.warehouse.service.*;
import com.logpm.warehouse.vo.QuestDetailVO;
import com.logpm.warehouse.vo.TrayTypeDataVO;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.TenantNum;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
@ -79,7 +80,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
private ISyncTaskErrorLogService syncTaskErrorLogService;
@Override
@Async("asyncExecutor")
@LogpmAsync("asyncExecutor")
public void syncTaskData(String questNum, Long warehouseId,String tenantId,Long userId,String nickName,Long deptId) {
log.info("###############syncTaskData: 同步盘点任务数据开始 questNum={}",questNum);
QueryWrapper<TaskQuestEntity> queryWrapper = new QueryWrapper<>();

Loading…
Cancel
Save