ludc
2023-11-17 ac8e8998235f247365280d1a1632115c43b10037
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeSerialAlgorithmServiceImpl.java
@@ -9,6 +9,7 @@
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@@ -36,8 +37,9 @@
                Object bean = ApplicationContextProvider.getApplicationContext().getBean(beanName);
                if(bean!=null){
                    CodeSerialAlgorithmVO algorithmVO = new CodeSerialAlgorithmVO();
                    Advised advised = (Advised)bean;
                    Class<?> targetClass = advised.getTargetSource().getTargetClass();
                    //Advised advised = (Advised)bean;
               Class<?> targetClass = AopUtils.getTargetClass(bean);
               //Class<?> targetClass = advised.getTargetSource().getTargetClass();
                    algorithmVO.setClassFullName(targetClass.getName());
                    MdmSerialAlgorithm serialAlgorithm = targetClass.getDeclaredAnnotation(MdmSerialAlgorithm.class);
                    if(serialAlgorithm==null){
@@ -47,6 +49,7 @@
                        algorithmVO.setName(serialAlgorithm.text());
                        algorithmVO.setDescription(serialAlgorithm.description());
                        algorithmVO.setId(serialAlgorithm.value());
                  algorithmVO.setSerialType(serialAlgorithm.serialType());
                        if(StringUtils.isBlank(algorithmVO.getId())){
                            algorithmVO.setId(beanName);
                        }
@@ -57,6 +60,7 @@
        }
      Query query=new Query();
      IPage<CodeSerialAlgorithmVO> queryIPage =Condition.getPage(query);
        return queryIPage;
      queryIPage.setRecords(voList);
      return queryIPage;
    }
}