Source/platformProject/vci-platform-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java
@@ -1,6 +1,8 @@
package com.vci.frameworkcore.compatibility.impl;
import com.vci.client.common.providers.ServiceProvider;
import com.vci.corba.common.VCIError;
import com.vci.corba.omd.data.AttributeValue;
import com.vci.frameworkcore.compatibility.SmUserQueryServiceI;
import com.vci.frameworkcore.pagemodel.SmPasswordStrategyVO;
import com.vci.frameworkcore.pagemodel.SmUserVO;
@@ -21,8 +23,6 @@
import com.vci.web.util.WebUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
@@ -35,6 +35,7 @@
import static com.vci.frameworkcore.constant.FrameWorkBusLangCodeConstant.DATA_OID_NOT_EXIST;
import static com.vci.web.constant.CacheNameConstant.VCI_OBJECT_SERVICE;
import static com.vci.web.constant.CacheNameConstant.VCI_USER;
import static com.vci.web.util.WebUtil.arryAndSqlToClientBusinessObject;
/**
 * 用户的查询相关的服务,可以兼容老平台和老的pdm
@@ -89,7 +90,7 @@
   @Autowired(required = false)
   @Lazy
   private SmUserQueryServiceI self;
   /**
     *  根据用户名获取用户的对象,不区分大小写
     * @param userId 用户名
@@ -121,10 +122,14 @@
            + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on  up.pldeptuid = pkDepartment.pluid " +
            " left join PLUSERPASSWORDSTRATEGY pkUserPassword on  " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " +
            queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):"");
      List<ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
      if(!CollectionUtils.isEmpty(dataList)){
         ClientBusinessObject cbo = dataList.get(0);
         return cbo2VO(cbo);
      try{
         String[][] sqlQueryResult = ServiceProvider.getBOFService().getSqlQueryResult(sql + fromSql, null);
         if(sqlQueryResult.length>0){
            com.vci.client.bof.ClientBusinessObject cbo = arryAndSqlToClientBusinessObject(queryWrapper.getSelectFieldSql(),sqlQueryResult[0]);
            return cbo2VO(cbo);
         }
      }catch (Exception e){
         throw new VciBaseException("数据解析错误:" + e );
      }
      return null;
   }
@@ -148,7 +153,7 @@
               + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on  up.pldeptuid = pkDepartment.pluid " +
               " left join PLUSERPASSWORDSTRATEGY pkUserPassword on  " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " +
               queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):"");
         List<ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
         List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
         if(!CollectionUtils.isEmpty(dataList)){
            dataList.stream().forEach(cbo->{
               userVOList.add(cbo2VO(cbo));
@@ -229,7 +234,7 @@
            + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on  up.pldeptuid = pkDepartment.pluid " +
            " left join PLUSERPASSWORDSTRATEGY pkUserPassword on  " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " + (QUERY_FIELD_ROLE.equalsIgnoreCase(queryField)?roleSql:"") +
            queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):"");
      List<ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
      List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
      if(!CollectionUtils.isEmpty(dataList)){
         dataList.stream().forEach(cbo->{
            userVOList.add(cbo2VO(cbo));
@@ -243,7 +248,7 @@
    * @param cbo 业务数据
    * @return 显示对象
    */
   private SmUserVO cbo2VO(ClientBusinessObject cbo){
   private SmUserVO cbo2VO(com.vci.client.bof.ClientBusinessObject cbo){
      SmUserDO userDO = new SmUserDO();
      SmUserVO userVO = new SmUserVO();
      WebUtil.copyValueToObjectFromCbos(cbo,userDO);
@@ -297,7 +302,7 @@
            }
         }
      }
      List<ClientBusinessObject> dataList = boService.queryBySql((isPage?("select " + pageSelectList.stream().collect(Collectors.joining(","))+ " from (select A.*,rownum RN from ( "):"") + sql + fromSql + (isPage?pageSubfix:""), null);
      List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql((isPage?("select " + pageSelectList.stream().collect(Collectors.joining(","))+ " from (select A.*,rownum RN from ( "):"") + sql + fromSql + (isPage?pageSubfix:""), null);
      if(!CollectionUtils.isEmpty(dataList)){
         dataList.stream().forEach(cbo->{
            userVOList.add(cbo2VO(cbo));
@@ -613,7 +618,7 @@
            + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on  up.pldeptuid = pkDepartment.pluid " +
            " left join PLUSERPASSWORDSTRATEGY pkUserPassword on  " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " +
            queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):"");
      List<ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
      List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
      List<Tree> treeList = new ArrayList<>();
      if(!CollectionUtils.isEmpty(dataList)){
         dataList.stream().forEach(cbo->{
@@ -643,7 +648,7 @@
      String sql = " select plpassword from pluser where pluid = :userOid";
      Map<String,String> conditionMap = new HashMap<>();
      conditionMap.put("userOid",userOid.trim());
      List<ClientBusinessObject> clientBusinessObjectList = boService.queryBySql(sql, conditionMap);
      List<com.vci.client.bof.ClientBusinessObject> clientBusinessObjectList = boService.queryBySql(sql, conditionMap);
      if(CollectionUtils.isEmpty(clientBusinessObjectList)){
         return  false;
      }
@@ -686,7 +691,7 @@
   public SmPasswordStrategyVO getPasswordStrategyVOByOid(String oid){
      VciQueryWrapperForDO queryWrapperForDO = new VciQueryWrapperForDO(null, SmPasswordStrategyDO.class);
      queryWrapperForDO.eq("oid",oid.trim());
      List<ClientBusinessObject> cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " +
      List<com.vci.client.bof.ClientBusinessObject> cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " +
            queryWrapperForDO.getTableNick() + queryWrapperForDO.getLinkTableSql() +
            (StringUtils.isBlank(queryWrapperForDO.getWhereSql()) ? "" : (" where " + queryWrapperForDO.getWhereSql())), null);
      if(!CollectionUtils.isEmpty(cboList)){