田源
2024-09-27 8bb85606a294d2c6d2d4840d42a62744d7ef909b
Merge remote-tracking branch 'origin/master'
已修改26个文件
已重命名3个文件
已添加6个文件
1341 ■■■■■ 文件已修改
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/LogInfoDTO.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/LogPeriodInfoDTO.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/LogQueryCriteriaDTO.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLTabButtonVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/pom.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/constant/VConstant.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/interceptor/VciLogAfterInterceptor.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/interceptor/VciSecurityInterceptor.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/pagemodel/Tree.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/redis/FastJson2JsonRedisSerializer.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/redis/RedisConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/redis/RedisService.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/pom.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmHMSysModConfigServiceI.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmHMSysModConfigServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmSessionForLoginImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/LogBasicController.java 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LogBasicServiceI.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LogBasicServiceImpl.java 390 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LoginServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java 220 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/PlatformClientUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/resources/properties/ice.properties 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/systemModel/systemConfig/api.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/wel/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/LogInfoDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
package com.vci.dto;
import lombok.Data;
import java.io.Serializable;
/**
 * æ—¥å¿—传输对象
 * @author yuxc
 * @date 2024-09-18
 */
@Data
public class LogInfoDTO implements Serializable {
    /**
     * ç¦æ­¢ä¿®æ”¹è¿™ä¸ªå€¼
     */
    private static final long serialVersionUID = 2492852474710986720L;
    private String puid;
    private String username;
    private String truename;
    private String userIp;
    private String result;
    private String content;
    private String date;
    private String type;
    private String moduleName;
    private String entityDesc;
    private String property;
    private String previousVal;
    private String newVal;
    private String logType;
}
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/LogPeriodInfoDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
package com.vci.dto;
import lombok.Data;
import java.io.Serializable;
/**
 * ä¿å­˜æœŸé™ä¼ è¾“对象
 * @author yuxc
 * @date 2024-09-11
 */
@Data
public class LogPeriodInfoDTO implements Serializable {
    /**
     * ç¦æ­¢ä¿®æ”¹è¿™ä¸ªå€¼
     */
    private static final long serialVersionUID = 2492852474710986720L;
    //编码
    public String code;
    //值
    public String value;
    //是否选中
    public boolean choose;
}
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/LogQueryCriteriaDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.vci.dto;
import lombok.Data;
import java.io.Serializable;
/**
 * æ—¥å¿—查询传输对象
 * @author yuxc
 * @date 2024-09-18
 */
@Data
public class LogQueryCriteriaDTO implements Serializable {
    /**
     * ç¦æ­¢ä¿®æ”¹è¿™ä¸ªå€¼
     */
    private static final long serialVersionUID = 2492852474710986720L;
    //开始时间
    private String startDate;
    //结束日期
    private String endDate;
    //日志类型,1:登录;2:登出;3:授权;4:一般操作;5:集成应用
    int logType;
    //用户IP
    String ipText;
    //操作用户
    String userName;
    //操作类型
    String typeText;
    //页码
    int pageNo;
    //页面条数
    int pageSize;
}
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLTabButtonVO.java
@@ -76,7 +76,7 @@
    private List<PLTabButtonVO> children;
    /**
     * æ˜¯å¦æ˜¾ç¤º
     * æ˜¾ç¤ºæ–¹å¼
     */
    private String displayMode;
@@ -91,7 +91,7 @@
    private String authorization;
    /**
     * æ˜¾ç¤ºæ–¹å¼
     * æ˜¯å¦æ˜¾ç¤º
     */
    private String show;
Source/plt-web/plt-web-parent/plt-web-base/pom.xml
@@ -73,6 +73,23 @@
            <artifactId>icegridgui</artifactId>
            <version>1.0.RELEASE</version>
        </dependency>
        <!--redis start-->
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-redis</artifactId>
            <version>2.1.5.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>2.9.0</version>
        </dependency>
        <!--redis end-->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.13.3</version>
        </dependency>
    </dependencies>
</project>
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/constant/VConstant.java
@@ -82,6 +82,11 @@
    public static final String SYS_ENUM_KEY = "sys_enum:";
    /**
     * å½“前登录的用户总数cache key
     */
    public static final String CURRENT_LOGGED_USERS_KEY = "current_logged_users";
    /**
     * èµ„源映射路径 å‰ç¼€
     */
    public static final String RESOURCE_PREFIX = "/profile";
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/interceptor/VciLogAfterInterceptor.java
@@ -1,8 +1,6 @@
package com.vci.starter.web.interceptor;
import com.vci.starter.web.constant.TokenKeyConstant;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.starter.web.util.WebThreadLocalUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/interceptor/VciSecurityInterceptor.java
@@ -4,9 +4,11 @@
import com.vci.starter.web.annotation.controller.VciUnCheckRight;
import com.vci.starter.web.autoconfigure.SpringMVCConfig;
import com.vci.starter.web.constant.TokenKeyConstant;
import com.vci.starter.web.constant.VConstant;
import com.vci.starter.web.enumpck.ResultCodeEnum;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.SessionInfo;
import com.vci.starter.web.redis.RedisService;
import com.vci.starter.web.util.ApplicationContextProvider;
import com.vci.starter.web.util.LangBaseUtil;
import com.vci.starter.web.util.VciBaseUtil;
@@ -15,15 +17,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -55,6 +53,9 @@
     */
    @Autowired
    private VciSessionForLoginI vciSessionForLoginI;
    @Autowired
    private RedisService redisService;
    /**
     * æ‰§è¡Œæ‹¦æˆª
@@ -127,6 +128,11 @@
                if(logger.isErrorEnabled()) {
                    logger.error("token值非法,或过期,或者用户已经被踢下线," + userToken);
                }
                //删除缓存中统计的用户信息
                if(redisService == null){
                    redisService = ApplicationContextProvider.getBean(RedisService.class);
                }
                redisService.decreOnlineUser(VConstant.CURRENT_LOGGED_USERS_KEY);
                sendErrorMsg(response,"token值非法,或过期,或者用户已经被踢下线," + userToken,1);
                return false;
            }else{
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/pagemodel/Tree.java
@@ -58,6 +58,10 @@
     */
    private String text;
    /**
     * ç¼–号
     */
    private String id;
    /**
     * æ˜¯å¦å¶å­
     */
    private boolean leaf = false;
@@ -158,6 +162,21 @@
    }
    /**
     * è®¾ç½®ç¼–号
     * @param id
     */
    public void setId(String id) {
        this.id = id;
    }
    /**
     * èŽ·å–ç¼–å·
     */
    public String getId() {
        return id;
    }
    /**
     * æ˜¯å¦å¶å­èŠ‚ç‚¹
     * @return true è¡¨ç¤ºå¶å­èŠ‚ç‚¹
     */
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/redis/FastJson2JsonRedisSerializer.java
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/redis/FastJson2JsonRedisSerializer.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.vci.web.redis;
package com.vci.starter.web.redis;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/redis/RedisConfig.java
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/redis/RedisConfig.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.vci.web.redis;
package com.vci.starter.web.redis;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cache.annotation.CachingConfigurerSupport;
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/redis/RedisService.java
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/redis/RedisService.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.vci.web.redis;
package com.vci.starter.web.redis;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -11,6 +11,7 @@
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.util.*;
@@ -21,10 +22,9 @@
 * @author dangsn
 **/
@SuppressWarnings(value = { "unchecked", "rawtypes" })
@Component
@Service
@Slf4j
public class RedisService
{
public class RedisService {
    @Autowired(required = false)
    public RedisTemplate redisTemplate;
@@ -390,6 +390,55 @@
        return new ArrayList<>();
    }
    /**
     * ç”¨æˆ·ç™»å½•
     * @param currentLoggedUserKey
     */
    public void increOnlineUser(String currentLoggedUserKey) {
        // æ£€æŸ¥é”®æ˜¯å¦å­˜åœ¨
        if (!redisTemplate.hasKey(currentLoggedUserKey)) {
            // å¦‚果键不存在,初始化为0
            redisTemplate.opsForValue().set(currentLoggedUserKey, 0);
        }
        // è‡ªå¢žåœ¨çº¿ç”¨æˆ·æ•°
        redisTemplate.opsForValue().increment(currentLoggedUserKey);
    }
    /**
     * ç”¨æˆ·ç™»å‡º
     * @param currentLoggedUserKey
     */
    public void decreOnlineUser(String currentLoggedUserKey) {
        // æ£€æŸ¥å½“前在线用户数
        String currentLoggedUser = (String)redisTemplate.opsForValue().get(currentLoggedUserKey);
        if (currentLoggedUser != null) {
            Long currentCount = Long.parseLong((String)redisTemplate.opsForValue().get(currentLoggedUserKey));
            if(currentCount > 0){
            }
            // è‡ªå‡åœ¨çº¿ç”¨æˆ·æ•°
            redisTemplate.opsForValue().decrement(currentLoggedUserKey);
        }
    }
    /**
     * èŽ·å–å½“å‰ç™»å½•ç”¨æˆ·æ€»äººæ•°
     * @param currentLoggedUserKey
     * @return
     */
    public long getCurrentOnlineUserCount(String currentLoggedUserKey) {
        return Long.parseLong(redisTemplate.opsForValue().get(currentLoggedUserKey).toString());
    }
    /**
     * èŽ·å–å½“å‰ç™»å½•ç”¨æˆ·çš„ç”¨æˆ·ååˆ—è¡¨
     * @param currentLoggedUserKey
     * @return
     */
    public Set<String> getCurrentLoggedUsers(String currentLoggedUserKey) {
        return redisTemplate.opsForSet().members(currentLoggedUserKey);
    }
    /**
     * åŸºäºŽLua脚本实现原子查询并删除
Source/plt-web/plt-web-parent/plt-web/pom.xml
@@ -106,23 +106,6 @@
            <version>0.9.11</version>
        </dependency>
        <!--redis start-->
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-redis</artifactId>
            <version>2.1.5.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>2.9.0</version>
        </dependency>
        <!--redis end-->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.13.3</version>
        </dependency>
    </dependencies>
    <build>
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmHMSysModConfigServiceI.java
@@ -158,4 +158,10 @@
     */
    String exportSysConf(ExpExcelConditionVO expExcelConditionVO, HttpServletResponse response) throws IOException;
    /**
     * èŽ·å–å½“å‰åœ¨çº¿äººæ•°
     * @return
     */
    long getOnlineUsersNum();
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmHMSysModConfigServiceImpl.java
@@ -12,12 +12,14 @@
import com.vci.starter.poi.bo.WriteExcelData;
import com.vci.starter.poi.bo.WriteExcelOption;
import com.vci.starter.poi.util.ExcelUtil;
import com.vci.starter.web.constant.VConstant;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.SessionInfo;
import com.vci.starter.web.util.LocalFileUtil;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.starter.web.util.WebThreadLocalUtil;
import com.vci.starter.web.redis.RedisService;
import com.vci.web.util.Func;
import com.vci.web.util.PlatformClientUtil;
import org.slf4j.Logger;
@@ -45,13 +47,22 @@
    private int count = 0;
    /**
     * åŒ…含保存模块方法等操作类
     */
    private static FunctionOperateDelegate foDelegate;
    /**
     * åˆå§‹åŒ–foDelegate
     */
    {
        if(Func.isEmpty(foDelegate)){
            foDelegate = new FunctionOperateDelegate();
        }
    }
    @Autowired
    private RedisService redisService;
    /**
     * æ—¥å¿—
@@ -770,6 +781,16 @@
        WriteExcelOption excelOption = new WriteExcelOption(excelDataList);
        ExcelUtil.writeDataToFile(excelPath, excelOption);
        return excelPath;
    }
    /**
     * èŽ·å–å½“å‰åœ¨çº¿äººæ•°
     * @return
     */
    @Override
    public long getOnlineUsersNum() {
        long currentLoggedUserCount = redisService.getCurrentOnlineUserCount(VConstant.CURRENT_LOGGED_USERS_KEY);
        return currentLoggedUserCount;
    }
    /**
@@ -1585,6 +1606,5 @@
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmSessionForLoginImpl.java
@@ -13,7 +13,7 @@
import com.vci.starter.web.util.*;
import com.vci.constant.CacheNameConstant;
import com.vci.web.properties.WebProperties;
import com.vci.web.redis.RedisService;
import com.vci.starter.web.redis.RedisService;
import com.vci.web.service.WebBoServiceI;
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.WebUtil;
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
@@ -506,4 +506,20 @@
        }
    }
    /**
     * èŽ·å–å½“å‰ç”¨æˆ·åœ¨çº¿äººæ•°
     * @return
     */
    @GetMapping("/getOnlineUsersNum")
    public BaseResult getOnlineUsersNum() {
        try {
            long onlineUsersNum = hmSysModConfigService.getOnlineUsersNum();
            return BaseResult.success(onlineUsersNum);
        } catch (Exception e) {
            String errorMsg = "获取当前用户在线人数时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(errorMsg);
            throw new VciBaseException(errorMsg);
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/LogBasicController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,127 @@
package com.vci.web.controller;
import com.vci.corba.common.PLException;
import com.vci.dto.LogQueryCriteriaDTO;
import com.vci.starter.web.annotation.log.VciBusinessLog;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.service.LogBasicServiceI;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
/**
 * å¹³å°æ—¥å¿—控制器
 * @author yuxc
 * @date 2024-9-11
 */
@Controller
@RequestMapping("/loginBasicController")
@VciBusinessLog(modelName="日志服务")
public class LogBasicController {
    /**
     * ç™»å½•服务
     */
    @Autowired
    private LogBasicServiceI logBasicServiceI;
    /**
     * æ—¥å¿—
     */
    private Logger logger = LoggerFactory.getLogger(getClass());
    /**
     * èŽ·å–æ—¥æœŸä¿å­˜æœŸé™ä¸‹æ‹‰åˆ—è¡¨æ¡†
     * @return æŸ¥è¯¢ç»“æžœ
     */
    @VciBusinessLog(operateName="日期保存期限")
    @GetMapping(value = "/getPeroid")
    @ResponseBody
    public BaseResult getPeroid(){
        try {
            return logBasicServiceI.getPeroid();
        }catch (Exception e){
            e.printStackTrace();
            String errorMsg = "查询出现错误,原因:"+ VciBaseUtil.getExceptionMessage(e);
            logger.error(errorMsg);
            throw new VciBaseException(errorMsg);
        }
    }
    /**
     * ä¿å­˜æœŸé™è®¾ç½®
     * period æœŸé™ç¼–码
     * @return ä¿å­˜ç»“æžœ
     */
    @VciBusinessLog(operateName="保存期限设置")
    @PostMapping(value = "/savePeriod")
    @ResponseBody
    public BaseResult savePeriod(String period){
        try {
            return logBasicServiceI.savePeriod(period);
        }catch (Exception e){
            e.printStackTrace();
            String errorMsg = "保存出现错误,原因:"+ VciBaseUtil.getExceptionMessage(e);
            logger.error(errorMsg);
            throw new VciBaseException(errorMsg);
        }
    }
    /**
     * åˆ é™¤æ—¥å¿—
     * period æœŸé™ç¼–码
     * @return ä¿å­˜ç»“æžœ
     */
    @VciBusinessLog(operateName="删除日志")
    @DeleteMapping(value = "/deleteLog")
    @ResponseBody
    public BaseResult deleteLog(String deleteDate){
        try {
            return logBasicServiceI.deleteLog(deleteDate);
        }catch (Exception e){
            e.printStackTrace();
            String errorMsg = "删除出现错误,原因:"+ VciBaseUtil.getExceptionMessage(e);
            logger.error(errorMsg);
            throw new VciBaseException(errorMsg);
        }
    }
    /**
     * æŸ¥è¯¢æ—¥å¿—
     * @param dto æŸ¥è¯¢æ¡ä»¶ä¼ è¾“对象
     * @return æŸ¥è¯¢æ•°æ®
     * @throws PLException
     */
    @VciBusinessLog(operateName="日志查询")
    @GetMapping(value = "/getLogListByContion")
    @ResponseBody
    public BaseResult getLogListByContion(@RequestBody LogQueryCriteriaDTO dto){
        try {
            return logBasicServiceI.getLogListByContion(dto);
        }catch (Exception e){
            e.printStackTrace();
            String errorMsg = "查询日志出现错误,原因:"+ VciBaseUtil.getExceptionMessage(e);
            logger.error(errorMsg);
            throw new VciBaseException(errorMsg);
        }
    }
    /**
     * æ“ä½œç”¨æˆ·èŽ·å–
     */
    @VciBusinessLog(operateName="获取操作用户")
    @GetMapping(value = "/getOperatingUsers")
    @ResponseBody
    public BaseResult getOperatingUsers(){
        try {
            return logBasicServiceI.getOperatingUsers();
        }catch (Exception e){
            e.printStackTrace();
            String errorMsg = "查询日志出现错误,原因:"+ VciBaseUtil.getExceptionMessage(e);
            logger.error(errorMsg);
            throw new VciBaseException(errorMsg);
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java
@@ -397,6 +397,84 @@
        }
    }
    /**
     * ä¸šåŠ¡ç±»åž‹ä¸‹æ‹‰æŸ¥è¯¢
     * @param baseQueryObject selectBtmType é€‰æ‹©çš„æºå¯¹è±¡,带分页信息
     * @return
     * @throws PLException
     */
    @GetMapping( "/getBtmDatasByPage")
    @VciBusinessLog(operateName = "业务类型下拉查询")
    public BaseResult getBtmDatasByPage(BaseQueryObject baseQueryObject){
        try {
            return BaseResult.dataGrid(uiManagerService.getBtmDatasByPage(baseQueryObject));
        }catch (Throwable e) {
            e.printStackTrace();
            String exceptionMessage = "业务类型下拉查询时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * UI定义下拉查询(templateType为UI定义时的选择对象下拉查询)
     * @param baseQueryObject selectBtmType é€‰æ‹©çš„æºå¯¹è±¡,带分页信息
     * @return
     * @throws PLException
     */
    @GetMapping( "/getUILayoutDatasByPage")
    @VciBusinessLog(operateName = "UI定义下拉查询")
    public BaseResult getUILayoutDatasByPage(BaseQueryObject baseQueryObject){
        try {
            return BaseResult.dataGrid(uiManagerService.getUILayoutDatasByPage(baseQueryObject));
        }catch (Throwable e) {
            e.printStackTrace();
            String exceptionMessage = "UI定义下拉查询时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * é€‰æ‹©æ¨¡æ¿ä¸‹æ‹‰æŸ¥è¯¢
     * @param baseQueryObject
     * @return
     * @throws PLException
     */
    @GetMapping( "/getPortalVIDatasByPage")
    @VciBusinessLog(operateName = "选择模板下拉查询")
    public BaseResult getPortalVIDatasByPage(BaseQueryObject baseQueryObject){
        try {
            return BaseResult.dataGrid(uiManagerService.getPortalVIDatasByPage(baseQueryObject));
        }catch (Throwable e) {
            e.printStackTrace();
            String exceptionMessage = "选择模板下拉查询时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * æŸ¥è¯¢æ¨¡æ¿ä¸‹æ‹‰æŸ¥è¯¢
     * @param baseQueryObject
     * @return
     * @throws PLException
     */
    @GetMapping( "/getQTInfoDatasByPage")
    @VciBusinessLog(operateName = "查询模板下拉查询")
    public BaseResult getQTInfoDatasByPage(BaseQueryObject baseQueryObject){
        try {
            return BaseResult.dataGrid(uiManagerService.getQTInfoDatasByPage(baseQueryObject));
        }catch (Throwable e) {
            e.printStackTrace();
            String exceptionMessage = "查询模板下拉查询时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    //页面设计下配置按钮相关接口
    /**
     * èŽ·å–é¡µç­¾åŒºåŸŸæŒ‰é’®é…ç½®ä¿¡æ¯
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LogBasicServiceI.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
package com.vci.web.service;
import com.vci.corba.common.PLException;
import com.vci.dto.LogQueryCriteriaDTO;
import com.vci.starter.web.pagemodel.BaseResult;
/**
 * å¹³å°æ—¥å¿—服务
 * @author yuxc
 * @date 2024-9-11
 */
public interface LogBasicServiceI {
    /**
     * èŽ·å–æ—¥æœŸä¿å­˜æœŸé™ä¸‹æ‹‰åˆ—è¡¨æ¡†
     * @return æŸ¥è¯¢ç»“æžœ
     */
    BaseResult getPeroid() throws PLException;
    /**
     * ä¿å­˜æœŸé™è®¾ç½®
     * period æœŸé™ç¼–码
     * @return ä¿å­˜ç»“æžœ
     */
    BaseResult savePeriod(String period) throws PLException;
    /**
     * åˆ é™¤æ—¥å¿—
     * period æœŸé™ç¼–码
     * @return ä¿å­˜ç»“æžœ
     */
    BaseResult deleteLog(String deleteDate) throws PLException;
    /**
     * æŸ¥è¯¢æ—¥å¿—
     * @param dto æŸ¥è¯¢æ¡ä»¶ä¼ è¾“对象
     * @return æŸ¥è¯¢æ•°æ®
     * @throws PLException
     */
    BaseResult getLogListByContion(LogQueryCriteriaDTO dto) throws PLException;
    /**
     * æ“ä½œç”¨æˆ·èŽ·å–
     */
    BaseResult getOperatingUsers() throws PLException;
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java
@@ -1,8 +1,11 @@
package com.vci.web.service;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.btm.BizType;
import com.vci.corba.omd.qtm.QTInfo;
import com.vci.corba.portal.data.PLUILayout;
import com.vci.corba.portal.data.PLTabPage;
import com.vci.corba.portal.data.PortalVI;
import com.vci.pagemodel.PLTabButtonVO;
import com.vci.pagemodel.PLUILayoutCloneVO;
import com.vci.starter.web.exception.VciBaseException;
@@ -212,4 +215,36 @@
     */
    boolean authorizedUI(UIAuthorDTO uiAuthorDTO)throws Exception;
    /**
     * ä¸šåŠ¡ç±»åž‹ã€æºå¯¹è±¡ç±»åž‹ã€é¡¶å±‚èŠ‚ç‚¹æ˜¾ç¤ºç±»åž‹ç­‰éƒ½è°ƒç”¨è¿™ä¸ªæŽ¥å£æŸ¥è¯¢
     * @param baseQueryObject
     * @return
     * @throws PLException
     */
    DataGrid<BizType> getBtmDatasByPage(BaseQueryObject baseQueryObject) throws Throwable;
    /**
     * UI定义下拉查询(templateType为UI定义时的选择对象下拉查询)
     * @param baseQueryObject selectBtmType é€‰æ‹©çš„æºå¯¹è±¡,带分页信息
     * @return
     * @throws PLException
     */
    DataGrid<PLUILayout> getUILayoutDatasByPage(BaseQueryObject baseQueryObject)throws Throwable;
    /**
     * é€‰æ‹©æ¨¡æ¿ä¸‹æ‹‰æŸ¥è¯¢ï¼ˆtemplateType为表格、表单、树表时的选择对象下拉查询)
     * @param baseQueryObject
     * @return
     * @throws PLException
     */
    DataGrid<PortalVI> getPortalVIDatasByPage(BaseQueryObject baseQueryObject) throws Throwable;
    /**
     * æŸ¥è¯¢æ¨¡æ¿ä¸‹æ‹‰æŸ¥è¯¢
     * @param baseQueryObject
     * @return
     * @throws PLException
     */
    DataGrid<QTInfo> getQTInfoDatasByPage(BaseQueryObject baseQueryObject)throws Throwable;
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LogBasicServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,390 @@
package com.vci.web.service.impl;
import com.vci.client.common.objects.UserObject;
import com.vci.corba.common.PLException;
import com.vci.corba.common.data.UserEntityInfo;
import com.vci.corba.framework.data.UserInfo;
import com.vci.corba.pllog.data.LogInfo;
import com.vci.corba.pllog.data.LogPeriodInfo;
import com.vci.corba.pllog.data.LogType;
import com.vci.dto.LogInfoDTO;
import com.vci.dto.LogPeriodInfoDTO;
import com.vci.dto.LogQueryCriteriaDTO;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.web.service.*;
import com.vci.web.util.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
 * ä¸šåŠ¡ç±»åž‹æœåŠ¡
 * @author yuxc
 * @date 2024-9-11
 */
@Service
public class LogBasicServiceImpl implements LogBasicServiceI {
    /**
     * æ—¥å¿—
     */
    private Logger logger = LoggerFactory.getLogger(getClass());
    /**
     * å¹³å°çš„调用工具类
     */
    @Autowired
    private PlatformClientUtil platformClientUtil;
    public static final String UTF8_BOM="\uFEFF";
    private final String LOG_SAVE_PERIOD = "logSavePeriod";//日志保存期限
    /**
     * èŽ·å–æ—¥æœŸä¿å­˜æœŸé™ä¸‹æ‹‰åˆ—è¡¨æ¡†
     * @return æŸ¥è¯¢ç»“æžœ
     */
    @Override
    public BaseResult getPeroid() throws PLException {
        //获取当前期限设置
        int curPeriod = platformClientUtil.getLogService().getCurPeriod();
        LogPeriodInfo[] periods = platformClientUtil.getLogService().getPeriods();
        List<LogPeriodInfoDTO> logDTOs = new ArrayList<>();
        for (LogPeriodInfo period : periods) {
            LogPeriodInfoDTO dto = new LogPeriodInfoDTO();
            dto.setValue(period.value);
            if(period.code.startsWith(UTF8_BOM)) {
                period.code=period.code.substring(1);
            }
            if (Integer.valueOf(period.code) == curPeriod){
                dto.setChoose(true);
            }
            dto.setCode(period.code);
            logDTOs.add(dto);
        }
        return BaseResult.dataList(logDTOs);
    }
    /**
     * ä¿å­˜æœŸé™è®¾ç½®
     * period æœŸé™ç¼–码
     * @return ä¿å­˜ç»“æžœ
     */
    @Override
    public BaseResult savePeriod(String period) throws PLException {
        UserEntityInfo userEntityInfo = new UserEntityInfo();
        userEntityInfo.setModules("com.vci.client.log.ui.LogBasicConfPanel");
        userEntityInfo.setUserName(WebUtil.getCurrentUserId());
        boolean b = platformClientUtil.getLogService().savePeriod(period, userEntityInfo);
        if(!b){
            return BaseResult.fail("保存失败!");
        }
        return BaseResult.success("保存成功!");
    }
    /**
     * åˆ é™¤æ—¥å¿—
     * @param deleteDate åˆ é™¤çš„æ—¥æœŸ
     * @return åˆ é™¤ç»“æžœ
     * @throws PLException
     */
    @Override
    public BaseResult deleteLog(String deleteDate) throws PLException {
        if(StringUtils.isBlank(deleteDate)){
            throw new PLException("500", new String[]{"日期不能为空!"});
        }
        //获取当前期限设置
        int curSavePeriod = platformClientUtil.getLogService().getCurPeriod();
        int monthSpan = 1;
        String monthLabel = "";
        LogPeriodInfo[] periods = platformClientUtil.getLogService().getPeriods();
        Map<String, String> periodMap = Arrays.stream(periods).collect(Collectors.toMap(e -> e.code, e -> e.value));
        if(curSavePeriod <= 0){
            // æœªé…ç½®æ—¶ï¼Œåªèƒ½åˆ é™¤
            monthLabel = periods[0].value;
            monthSpan = Integer.valueOf(periods[0].code);
        } else {
            monthSpan = curSavePeriod;//期限code
            monthLabel = periodMap.get(String.valueOf(curSavePeriod));//期限显示值
        }
        //检查删除逻辑
        checkCanDelete(deleteDate, monthSpan, monthLabel);
        boolean res = false;
        res = platformClientUtil.getLogService().deleteLog(getDeleteDateString(deleteDate));//删除日志
        if(!res){
            return BaseResult.fail("删除失败!");
        }
        return BaseResult.success("删除成功!");
    }
    /**
     * æŸ¥è¯¢æ—¥å¿—
     * @param queryDto æŸ¥è¯¢æ¡ä»¶ä¼ è¾“对象
     * @return æŸ¥è¯¢æ•°æ®
     * @throws PLException
     */
    @Override
    public BaseResult getLogListByContion(LogQueryCriteriaDTO queryDto) throws PLException {
        String querySql = getSQL(queryDto);
        LogInfo[] logInfos = platformClientUtil.getLogService().getLogListByContion(queryDto.getPageNo(),queryDto.getPageSize(),querySql);
        List<LogInfoDTO> dtos = new ArrayList<>();
        for (LogInfo logInfo : logInfos) {
            LogInfoDTO dto = new LogInfoDTO();
            dto.setLogType(logInfo.logType);
            dto.setDate(logInfo.date);
            dto.setContent(logInfo.content);
            dto.setPuid(logInfo.puid);
            dto.setModuleName(logInfo.moduleName);
            dto.setEntityDesc(logInfo.entityDesc);
            dto.setResult(logInfo.result);
            dto.setType(logInfo.type);
            dto.setProperty(logInfo.property);
            dto.setTruename(logInfo.truename);
            dto.setNewVal(logInfo.newVal);
            dto.setUserIp(logInfo.userIp);
            dto.setUsername(logInfo.username);
            dto.setPreviousVal(logInfo.previousVal);
            dtos.add(dto);
        }
        long sumLogRows = platformClientUtil.getLogService().getSumLogRows(querySql);
        BaseResult result = new BaseResult();
        result.setSuccess(true);
        result.setCode(200);
        result.setData(dtos);
        result.setTotal(sumLogRows);
        return result;
    }
    /**
     * æ“ä½œç”¨æˆ·èŽ·å–
     */
    @Override
    public BaseResult getOperatingUsers() throws PLException {
        List<UserObject> users = new ArrayList<UserObject>();
        if("secAdmin".equals(WebUtil.getCurrentUserId())){
            users.addAll(getUsersByUserNames(Arrays.asList("auditAdmin")));
            users.addAll(getUsersByUserNames(getUserNameByUserType(2)));
        }
        else if("auditAdmin".equals(WebUtil.getCurrentUserId())){
            users.addAll(getUsersByUserNames(Arrays.asList("secAdmin", "sysAdmin")));
        } else if("sysAdmin".equals(WebUtil.getCurrentUserId())){
        }
        return BaseResult.dataList(users);
    }
    /**
     * èŽ·å–ç”¨æˆ·ä¿¡æ¯
     * @param userNames ç”¨æˆ·åç§°
     * @return ç”¨æˆ·ä¿¡æ¯
     * @throws PLException
     */
    private List<UserObject> getUsersByUserNames(List<String> userNames) throws PLException {
        List<UserObject> userList = new ArrayList<UserObject>();
        for(String userName : userNames){
            UserInfo userInfo = platformClientUtil.getFrameworkService().fetchUserInfoByName(userName);
            UserObject user = new UserObject();
            user.setId(userInfo.id);
            user.setUserName(userInfo.userName);
            user.setPwd(userInfo.pwd);
            user.setEmail(userInfo.email);
            user.setTrueName(userInfo.trueName);
            user.setSpecialties(userInfo.specialties);
            user.setDesc(userInfo.desc);
            user.setUserType(userInfo.userType);
            user.setStatus(userInfo.status);
            user.setCreateTime(userInfo.createTime);
            user.setCreateUser(userInfo.createUser);
            user.setUpdateTime(userInfo.updateTime);
            user.setUpdateUser(userInfo.updateUser);
            user.setPwdUpdateTime(userInfo.pwdUpdateTime);
            user.setGrantor(userInfo.grantor);
            user.setSecretGrade(userInfo.secretGrade);
            user.setIsDeptLeader(userInfo.isDeptLeader);
            userList.add(user);
        }
        Collections.sort(userList, new Comparator<UserObject>(){
            @Override
            public int compare(UserObject o1, UserObject o2) {
                return o1.getUserName().compareTo(o2.getUserName());
            }
        });
        return userList;
    }
    /**
     * æ ¹æ®ç”¨æˆ·ç±»åž‹èŽ·å–ç”¨æˆ·æ•°æ®
     * @param userType ç”¨æˆ·ç±»åž‹
     * @return ç”¨æˆ·æ•°æ®
     * @throws PLException
     */
    private List<String> getUserNameByUserType(int userType) throws PLException{
        List<String> userNames = new ArrayList<String>();
        String sql = "select plusername,pltruename from pluser u where u.plusertype = " + String.valueOf(userType);
        String[][] valss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
        for(String[] vals : valss){
            userNames.add(vals[0]);
        }
        return userNames;
    }
    /**
     * èŽ·å–æŸ¥è¯¢æ¡ä»¶å¹¶æ‹¼æˆSQL,只拼where子句后面的SQL
     * @return
     */
    public String getSQL(LogQueryCriteriaDTO dto) throws PLException {
        StringBuffer sql = new StringBuffer("");
//        int period = getPeriod(LOG_SAVE_PERIOD);//获取保存期限,以月为单位
        int period = platformClientUtil.getLogService().getCurPeriod();;//获取保存期限,以月为单位
        //下面是拼出SQL
        if(period != 0){
            sql.append(" to_date(PLDATE) >= add_months(to_date(sysdate),"+(-period)+")");
        }
        if(dto.getStartDate()!=null&&!dto.getStartDate().trim().equals("")&&!dto.getStartDate().equals("null")){//起始日期
            if(!sql.toString().equals("")){
                sql.append(" and ");
            }
            sql.append(" to_date(PLDATE) >= to_date('"+dto.getStartDate().trim()+"','yyyy-MM-dd') ");
        }
        if(dto.getEndDate()!=null&&!dto.getEndDate().trim().equals("")&&!dto.getEndDate().equals("null")){//结束日期
            if(!sql.toString().equals("")){
                sql.append(" and ");
            }
            sql.append(" trunc(PLDATE) <= to_date('"+dto.getEndDate().trim()+"','yyyy-MM-dd')");
        }
        if(dto.getLogType() == LogType.Login.value()) {//登入登出日志
            if(!sql.toString().equals("")){
                sql.append(" and ");
            }
            sql.append("PLLOGTYPE in ('" + getLogTypeString(LogType.Login) +"','" + getLogTypeString(LogType.Logout)+ "')");
        } else if(dto.getLogType() == LogType.Grant.value()) {//授权日志
            if(!sql.toString().equals("")){
                sql.append(" and ");
            }
            sql.append("PLLOGTYPE in('" + getLogTypeString(LogType.Grant) + "')");
        } else if(dto.getLogType() == LogType.General.value()) {//一般操作日志
            if(!sql.toString().equals("")){
                sql.append(" and ");
            }
            sql.append("PLLOGTYPE in('" + getLogTypeString(LogType.General) + "')");
        }
        if(StringUtils.isNotBlank(dto.getUserName())){//操作用户
            if(!dto.getUserName().trim().equals("")){//如果用户名为空格则不加用户条件
                if(!sql.toString().equals("")){
                    sql.append(" and ");
                }
                if(dto.getUserName().contains("*")){
                    dto.setUserName(dto.getUserName().trim().replaceAll("\\*", "%"));
                    sql.append(" PLUSER like '").append(dto.getUserName().trim()).append("'");
                }else{
                    sql.append(" PLUSER = '").append(dto.getUserName().trim()).append("'");
                }
            }
        }
        //按IP查询
        if(StringUtils.isNotBlank(dto.getIpText())){
            String ip = dto.getIpText().trim();
            if(!sql.toString().equals("")){
                sql.append(" and ");
            }
            if(ip.trim().contains("*")){//模糊查询
                ip = ip.trim().replaceAll("\\*", "%");
                sql.append(" PLIP like '").append(ip.trim()).append("'");
            }else{
                sql.append(" PLIP = '").append(ip.trim()).append("'");
            }
        }
        if(StringUtils.isNotBlank(dto.getTypeText())){
            String typeValue = dto.getTypeText();
            sql.append(" and pltype like '%").append(typeValue).append("%'");
        }
        //过滤掉admin和developer用户的日志记录
        sql.append(" and PLUSER !='admin' and  PLUSER !='developer' ");
        sql.append(" and pluser != '" + WebUtil.getCurrentUserId() + "' ");
        // å®‰å…¨ä¿å¯†å‘˜ä¸çœ‹ç³»ç»Ÿç®¡ç†å‘˜çš„æ—¥å¿—
        if("secAdmin".equals(WebUtil.getCurrentUserId())){
            sql.append(" and pluser != 'sysAdmin' ");
        }
        // å®¡è®¡ç®¡ç†å‘˜åªçœ‹ç³»ç»Ÿç®¡ç†å‘˜å’Œå®‰å…¨ä¿å¯†å‘˜çš„æ—¥å¿—
        else if("auditAdmin".equals(WebUtil.getCurrentUserId())){
            sql.append(" and pluser in ('secAdmin', 'sysAdmin')");
        }
        return sql.toString();
    }
    protected String getLogTypeString(LogType logType){
        String res = "";
        if(logType == LogType.Login) {
            res = "登录";
        } else if(logType == LogType.Logout) {
            res = "登出";
        } else if(logType == LogType.Grant) {
            res = "授权";
        } else if(logType == LogType.General) {
            res = "一般操作";
        } else if(logType == LogType.Integration) {
            res = "集成应用";
        }
        return res;
    }
    /**
     * æ—¥æœŸå­—符串处理
     * @param deleteDate æ—¥æœŸå­—符串
     * @return å¤„理完成的日期字符串
     */
    protected String getDeleteDateString(String deleteDate){
        int s = Integer.parseInt(deleteDate.substring(8))+1;
        StringBuffer buff = new StringBuffer();
        buff.append(deleteDate.substring(0, 8));
        if(("0"+s).length()>2){
            buff.append(s+"");
        }else{
            buff.append("0"+s);
        }
        return buff.toString();
    }
    /**
     * åˆ é™¤é€»è¾‘检查
     * @param deleteDate æ—¥æœŸå­—符串
     * @param monthSpan æœŸé™code
     * @param monthLabel æœŸé™æ˜¾ç¤ºå€¼
     * @return
     * @throws PLException
     */
    private boolean checkCanDelete(String deleteDate, int monthSpan, String monthLabel) throws PLException {
        boolean res = false;
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            sdf.parse(deleteDate);
        } catch (ParseException  e1) {
            throw new PLException("500", new String[]{"将" + deleteDate + "转换日期时发生错误!"});
        }
        String sql = "SELECT FLOOR(MONTHS_BETWEEN(SYSDATE, to_date('" + deleteDate + "','yyyy-mm-dd'))) from dual";
        String[][] vals;
        try {
            vals = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
            if(vals != null && vals.length > 0 && vals[0].length > 0){
                int spval = Integer.valueOf(vals[0][0]);
                if(spval <= monthSpan){
                    throw new PLException("500", new String[]{"只能删除 " + monthLabel + " ä¹‹å‰çš„æ•°æ®ï¼"});
                }
            }
        } catch (PLException e) {
            e.printStackTrace();
            e.messages[0] += "计算是否可以删除指定日期之前的数据时发生错误!";
            throw new PLException("500", e.messages);
        }
        res = true;
        return res;
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LoginServiceImpl.java
@@ -19,6 +19,7 @@
import com.vci.starter.web.annotation.bus.VciLoginAfter;
import com.vci.starter.web.annotation.bus.VciLogoutBefore;
import com.vci.starter.web.annotation.bus.VciLogoutPlugin;
import com.vci.starter.web.constant.VConstant;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.interceptor.VciSessionForLoginI;
import com.vci.starter.web.pagemodel.RequestClientInfo;
@@ -30,7 +31,7 @@
import com.vci.constant.CacheNameConstant;
import com.vci.dto.LoginUserDTO;
import com.vci.web.properties.WebProperties;
import com.vci.web.redis.RedisService;
import com.vci.starter.web.redis.RedisService;
import com.vci.web.service.LoginServiceI;
import com.vci.web.util.Func;
import com.vci.web.util.PlatformClientUtil;
@@ -146,7 +147,7 @@
     * @return æ‰§è¡Œç»“æžœ
     * @throws VciBaseException å‚数错误,用户不能登录等会抛出异常
     */
    private LoginResultBO login(LoginUserDTO userDTO, RequestClientInfo clientInfo, boolean checkPassword/*单点登录不需要校验密码*/) throws VciBaseException, PLException {
    private LoginResultBO login(LoginUserDTO userDTO, RequestClientInfo clientInfo, boolean checkPassword/*单点登录不需要校验密码*/) throws VciBaseException {
        LoginResultBO loginResult = new LoginResultBO();
        loginResult.setSuccess(false);
@@ -167,6 +168,7 @@
            String tokenKey = redisService.getCacheObject(userIdTokenKey);
            redisService.deleteObject(tokenKey);
            redisService.deleteObject(userIdTokenKey);
            redisService.decreOnlineUser(VConstant.CURRENT_LOGGED_USERS_KEY);
        }
        //3.获取用户的对象(对象中包含角色部门还有密码策略信息(当前用户没设置密码策略就是取的默认密码策略))
@@ -242,6 +244,8 @@
        sessionInfo.setToken(token);
        //初始化平台的token
        sessionForLogin.initInvocationInfo(sessionInfo);
        //记录当前登录人数的总数
        redisService.increOnlineUser(VConstant.CURRENT_LOGGED_USERS_KEY);
        //拷贝用户到新的session会话中
        copyUser2SessionInfo(user, sessionInfo, userDTO.getLangCode());
        //拷贝请求信息到session会话中
@@ -558,6 +562,8 @@
                }
            });
        }
        //清除存当前登录的用户(总数-1)
        redisService.decreOnlineUser(VConstant.CURRENT_LOGGED_USERS_KEY);
        sessionForLogin.logout(userToken);
        if(!CollectionUtils.isEmpty(logoutpluginBeanMap)){
            logoutpluginBeanMap.forEach((k,v) -> {
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java
@@ -98,6 +98,7 @@
        PLActionCls pac = new PLActionCls();
        pac.name = pLActionCls.getName();
        pac.pid = pLActionCls.getPid();
        pac.id = pLActionCls.getId();
        pac.description = pLActionCls.getDescription() == null ? "" : pLActionCls.getDescription();
        pac.creator = WebUtil.getCurrentUserId();
        pac.createTime = System.currentTimeMillis();
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
@@ -412,6 +412,7 @@
    /**
     * ä¿®æ”¹ä¸šåŠ¡ç±»åž‹ä¸­å¯¹åº”å±žæ€§åçš„å±žæ€§
     *
     * @param apName
     * @return
     * @throws PLException
@@ -456,6 +457,7 @@
    /**
     * åˆ¤æ–­è¯¥å±žæ€§æ˜¯å¦å·²ç»åœ¨ä¸šåŠ¡ç±»åž‹ä¸­äº§ç”Ÿäº†æ•°æ®
     *
     * @param abName
     * @return
     * @throws PLException
@@ -480,6 +482,7 @@
    /**
     * èŽ·å–åå­—ä»¥filter开始的业务类型(for æŸ¥è¯¢),主要用于属性池的业务类型选择对话框
     * èŽ·å–å…¨éƒ¨ä¸šåŠ¡ç±»åž‹ï¼Œä¼ å‚filter为""
     *
     * @param btmName
     * @return
     * @throws PLException
@@ -494,6 +497,7 @@
    /**
     * ä¸šåŠ¡ç±»åž‹åˆ—è¡¨æŸ¥è¯¢ï¼Œéžæ ‘ç»“æž„ï¼šç”¨äºŽUI定义左侧业务类型查询,只返回name和lable
     *
     * @param btmName
     * @return
     * @throws PLException
@@ -634,6 +638,7 @@
    /**
     * èŽ·å–æ‰€æœ‰ä¸šåŠ¡ç±»åž‹ï¼ˆæ ‘å½¢ç»“æž„ï¼‰
     *
     * @return æŸ¥è¯¢ç»“æžœ
     */
    @Override
@@ -651,6 +656,7 @@
                tree.setParentName(null);
                tree.setParentId(null);
                tree.setLeaf(true);
                tree.setId(osBtmTypeVO.getId());
                tree.setText(osBtmTypeVO.getDescription());
                tree.setAttributes(WebUtil.objectToMapString(osBtmTypeVO));
                tree.setChildren(getChildren(osBtmTypeVOS,osBtmTypeVO));
@@ -663,6 +669,7 @@
    /**
     * èŽ·å–æ‰€æœ‰ä¸šåŠ¡ç±»åž‹åç§°é›†åˆ
     *
     * @return
     */
    @Override
@@ -676,6 +683,7 @@
    /**
     * èŽ·å–ä¸šåŠ¡å…¨éƒ¨å±žæ€§ç±»åž‹
     *
     * @param btmName ä¸šåŠ¡ç±»åž‹åç§°
     * @return å±žæ€§çš„信息
     */
@@ -733,6 +741,7 @@
    /**
     * dto转do对象
     *
     * @return
     */
    private BizType dto2BizType(OsBtmTypeDTO dto){
@@ -776,6 +785,7 @@
    /**
     * åˆ›å»ºæ–°çš„业务类型
     *
     * @return
     * @throws PLException
     */
@@ -815,6 +825,7 @@
    /**
     * æ£€æŸ¥ä¸šåŠ¡ç±»åž‹åç§°æ˜¯å¦åˆè§„
     *
     * @param btmName
     * @throws PLException
     */
@@ -851,6 +862,7 @@
    /**
     * é€‰æ‹©ä¸€çº§ç‰ˆæœ¬ï¼šå¿…须选择或手工输入版本号规则; é€‰æ‹©äºŒçº§ç‰ˆæœ¬ï¼šå¿…须选择或手工输入版本号规则, (版次号已经默认选择).
     *
     * @return
     */
    private void checkVersionInfo(OsBtmTypeDTO dto) throws PLException {
@@ -865,6 +877,7 @@
    /**
     * ç‰ˆæœ¬æœºåˆ¶ä¿®æ”¹: ä»…允许类型从"不可修订"变更至"一级版本管理机制","二级版本管理机制进行调整"; "一级版本管理机制"变更至"二级版本管理机制";
     * ä¸¤ç§æ–¹å¼.
     *
     * @param dbBizType å½“前修改前的业务类型(库中存储的)
     * @param dto å½“前修改业务类型
     * @throws PLException
@@ -880,6 +893,7 @@
    /**
     * ä¿®æ”¹ä¸šåŠ¡ç±»åž‹
     *
     * @param btmTypeDTO
     * @return
     * @throws PLException
@@ -939,6 +953,7 @@
    /**
     * åˆ é™¤ä¸šåŠ¡ç±»åž‹
     *
     * @param btmTypeDTO
     * @return
     * @throws PLException
@@ -970,6 +985,7 @@
    /**
     * ä¸€è‡´æ€§æ£€æŸ¥
     *
     * @return
     * @throws PLException
     */
@@ -1001,12 +1017,14 @@
    /**
     * ä¸€è‡´æ€§æ£€æŸ¥ä¿®å¤åŠŸèƒ½
     *
     * @param repairData
     * @return
     */
    @Override
    public BaseResult executeRepair(String repairData) throws Exception {
        Map<String, String> dbCheckMap = new ObjectMapper().readValue(repairData, new TypeReference<Map<String,String>>(){});
        Map<String, String> dbCheckMap = new ObjectMapper().readValue(repairData, new TypeReference<Map<String, String>>() {
        });
        List<String> list = this.getRepairDML(dbCheckMap);
        if(list.size() < 1){
            return BaseResult.success();
@@ -1021,6 +1039,7 @@
    /**
     * åˆ›å»ºè§†å›¾
     *
     * @return
     * @throws PLException
     */
@@ -1031,6 +1050,7 @@
    /**
     * åˆ é™¤æ•°æ®ç•Œé¢çš„æŸ¥è¯¢
     *
     * @return ä¸šåŠ¡ç±»åž‹ï¼Œé“¾æŽ¥ç±»åž‹
     */
    @Override
@@ -1051,6 +1071,7 @@
    /**
     * åˆ é™¤æ•°æ®
     *
     * @param btmNames ä¸šåŠ¡ç±»åž‹å
     * @param linkNames é“¾æŽ¥ç±»åž‹å
     * @return
@@ -1101,6 +1122,7 @@
    /**
     * åˆ é™¤å…¨éƒ¨ç±»åž‹
     *
     * @return
     * @throws PLException
     */
@@ -1183,6 +1205,7 @@
    /**
     * æ ¹æ®ä¸šåŠ¡ç±»åž‹åç§°å’Œå…¶ä¸‹çš„å±žæ€§åç§°èŽ·å–å·²æœ‰çš„ç´¢å¼•
     *
     * @param conditionMap æ ¹æ®æŸ¥è¯¢æ¡ä»¶ä¼ å‚: typename:业务类型名;
     * @return
     */
@@ -1221,6 +1244,7 @@
    /**
     * æ ¹æ®ä¸šåŠ¡ç±»åž‹åç§°å’Œå…¶ä¸‹çš„å±žæ€§åç§°åˆ é™¤ç´¢å¼•
     *
     * @param btmName
     * @param indexName
     * @return
@@ -1251,6 +1275,7 @@
    /**
     * ç»™ä¸šåŠ¡ç±»åž‹ä¸‹çš„æŒ‡å®šå±žæ€§æ–°å¢žç´¢å¼•
     *
     * @param indexObjectList
     * @return
     */
@@ -1309,6 +1334,7 @@
    /**
     * å¯¼å‡ºä¸šåŠ¡ç±»åž‹
     * oid ä¸šåŠ¡ç±»åž‹åç§°
     *
     * @return åˆ›å»ºç»“æžœ
     */
    @Override
@@ -1367,6 +1393,7 @@
    /**
     * å¯¼å…¥ä¸šåŠ¡ç±»åž‹
     *
     * @param file ä¸Šä¼ çš„æ–‡ä»¶
     * @return
     */
@@ -1411,7 +1438,8 @@
        try{
            //1、读取excel中的数据,组成对象
            ReadExcelOption excelOption = new ReadExcelOption();
            List<OsBtmTypePO> poList = ExcelUtil.readDataObjectFromExcel(btmExcel, OsBtmTypePO.class,excelOption,(value, po, fieldName)->{});
            List<OsBtmTypePO> poList = ExcelUtil.readDataObjectFromExcel(btmExcel, OsBtmTypePO.class, excelOption, (value, po, fieldName) -> {
            });
            //去除都是空的情况
            if(CollectionUtils.isEmpty(poList)){
                return BaseResult.fail(ExcelLangCodeConstant.IMPORT_CONTENT_NULL,new String[]{});
@@ -1486,6 +1514,7 @@
    /**
     * èŽ·å–éœ€è¦ä¿®å¤çš„ä¼ªsql
     *
     * @param dbCheckMap
     * @return
     */
@@ -1710,6 +1739,7 @@
    /**
     * é“¾æŽ¥ç±»åž‹å…³é”®çš„业务类型
     *
     * @param nodeVOList å¯¹è±¡åˆ—表
     * @param relationVOList å…³è”关系列表
     * @param link é“¾æŽ¥ç±»åž‹
@@ -1786,6 +1816,7 @@
        /**
         * èŽ·å–éœ€è¦åˆ é™¤çš„ä¸šåŠ¡ç±»åž‹
         *
         * @return
         */
        public List<BizType> getDelBtList() throws PLException {
@@ -1808,6 +1839,7 @@
        /**
         * èŽ·å–éœ€è¦åˆ é™¤çš„é“¾æŽ¥ç±»åž‹
         *
         * @return
         */
        public List<LinkType> getDelLtList() throws PLException {
@@ -1817,6 +1849,7 @@
        /**
         * èŽ·å–å¾…åˆ é™¤çš„å±žæ€§
         *
         * @return
         */
        public List<String> getDelAbList() {
@@ -1858,6 +1891,7 @@
        /**
         * èŽ·å–å¾…åˆ é™¤çš„æžšä¸¾ç±»åž‹
         *
         * @return
         */
        public List<EnumType> getDelEnumList() {
@@ -1887,6 +1921,7 @@
        /**
         * èŽ·å–å¾…åˆ é™¤çš„ç”Ÿå‘½å‘¨æœŸ
         *
         * @return
         */
        public List<LifeCycle> getDelLCList(){
@@ -1931,6 +1966,7 @@
        /**
         * èŽ·å–å¾…åˆ é™¤çš„çŠ¶æ€
         *
         * @return
         */
        public List<StatePool> getDelSPList(){
@@ -1954,6 +1990,7 @@
        /**
         * èŽ·å–å¾…åˆ é™¤çš„ç‰ˆæœ¬è§„åˆ™
         *
         * @return
         */
        public List<VersionRule> getDelVRList(){
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
@@ -5,6 +5,7 @@
import com.vci.corba.common.data.UserEntityInfo;
import com.vci.corba.framework.data.RoleRightInfo;
import com.vci.corba.omd.btm.BizType;
import com.vci.corba.omd.qtm.QTInfo;
import com.vci.corba.portal.PortalService;
import com.vci.corba.portal.data.*;
import com.vci.dto.RoleRightDTO;
@@ -20,7 +21,7 @@
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.pagemodel.SessionInfo;
import com.vci.starter.web.util.*;
import com.vci.web.redis.RedisService;
import com.vci.starter.web.redis.RedisService;
import com.vci.web.service.OsBtmServiceI;
import com.vci.web.service.UIManagerServiceI;
import com.vci.web.util.*;
@@ -2118,7 +2119,6 @@
        return roleRightVOS;
    }
    /**
     * UI角色对象转换
     * @param infos
@@ -2267,7 +2267,7 @@
     * @param obj
     * @throws PLException
     */
    public void checkCodeName(PLUILayout obj) throws PLException {
    private void checkCodeName(PLUILayout obj) throws PLException {
        PLUILayout[] plUILayouts = platformClientUtil.getUIService().getPLUILayoutsByRelatedType(obj.plRelatedType);
        int length = plUILayouts.length;
        String code = obj.plCode;
@@ -2333,6 +2333,220 @@
        return res;
    }
    /**
     * ä¸šåŠ¡ç±»åž‹ã€æºå¯¹è±¡ç±»åž‹ã€é¡¶å±‚èŠ‚ç‚¹æ˜¾ç¤ºç±»åž‹ç­‰éƒ½è°ƒç”¨è¿™ä¸ªæŽ¥å£æŸ¥è¯¢
     * @param baseQueryObject
     * @return
     * @throws PLException
     */
    public DataGrid<BizType> getBtmDatasByPage(BaseQueryObject baseQueryObject) throws PLException{
        BizType[] btmNames = null;
        int start = baseQueryObject.getPage() <= 1 ? 1 : (baseQueryObject.getPage() - 1) * baseQueryObject.getLimit() + 1;
        int end = baseQueryObject.getPage() <= 1 ? baseQueryObject.getLimit() : (baseQueryObject.getPage() * baseQueryObject.getLimit());
        String where = " 1=1 ";
        String text = "";
        Map<String, String> conditionMap = baseQueryObject.getConditionMap();
        if(Func.isNotEmpty(conditionMap)){
            //过滤条件
            String filterInputValue = conditionMap.get("filterInputValue");
            if(Func.isNotBlank(filterInputValue)){
                where += String.format(" and (bt.name like '%%%s%%' or bt.label like '%%%s%%')", text, text);
            }
        }
        String fromWhere = String.format(" from plbtmtype bt where %s ", where);
        String fromWhereOrderBy = String.format(" %s order by bt.name", fromWhere);
        String sql = String.format("select * from(" +
                "  select row_.*,rownum rownum_ from( " +
                "         select bt.name, bt.label %s" +
                "  ) row_ " +
                ") where rownum_ >= %d and rownum_ <= %d ", fromWhereOrderBy, start, end);
        List<BizType> list = new LinkedList<BizType>();
        String[][] kvss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
        for(String[] kvs : kvss){
            BizType bi = new BizType();
            bi.name = kvs[0];
            bi.label = kvs[1];
            list.add(bi);
        }
        btmNames = list.toArray(new BizType[]{});
        sql = String.format("select count(1) count_ %s", fromWhere);
        kvss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
        int total = Integer.valueOf(kvss[0][0]);
        DataGrid<BizType> res = new DataGrid<>();
        res.setData(Arrays.asList(btmNames));
        res.setTotal(total);
        return res;
    }
    /**
     * UI定义下拉查询(templateType为UI定义时的UI定义下拉查询)
     * @param baseQueryObject selectBtmType é€‰æ‹©çš„æºå¯¹è±¡,带分页信息
     * @return
     * @throws PLException
     */
    public DataGrid<PLUILayout> getUILayoutDatasByPage(BaseQueryObject baseQueryObject) throws PLException{
        PLUILayout[] datas = null;
        int start = baseQueryObject.getPage() <= 1 ? 1 : (baseQueryObject.getPage() - 1) * baseQueryObject.getLimit() + 1;
        int end = baseQueryObject.getPage() <= 1 ? baseQueryObject.getLimit() : (baseQueryObject.getPage() * baseQueryObject.getLimit());
        String where = " 1=1 ";
        Map<String, String> conditionMap = baseQueryObject.getConditionMap();
        if(Func.isNotEmpty(conditionMap)){
            //选择的对象类型
            String selectBtmType = conditionMap.get("selectBtmType");
            if(selectBtmType != null){
                where += String.format(" and ui.PLRELATEDTYPE = '%s' ", selectBtmType);
            }
            //过滤条件
            String filterInputValue = conditionMap.get("filterInputValue");
            if(Func.isNotBlank(filterInputValue)){
                where += String.format(" and (ui.plname like '%%%s%%') ", filterInputValue, filterInputValue);
            }
        }
        String fromWhere = String.format(" from PLUILAYOUT ui where %s ", where);
        String fromWhereOrderBy = String.format(" %s order by ui.plname", fromWhere);
        String sql = String.format("select * from(" +
                "  select row_.*,rownum rownum_ from( " +
                "         select ui.plname, ui.plcode %s" +
                "  ) row_ " +
                ") where rownum_ >= %d and rownum_ <= %d ", fromWhereOrderBy, start, end);
        List<PLUILayout> list = new LinkedList<PLUILayout>();
        String[][] kvss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
        for(String[] kvs : kvss){
            PLUILayout bi = new PLUILayout();
            bi.plName = kvs[0];
            bi.plCode = kvs[1];
            list.add(bi);
        }
        datas = list.toArray(new PLUILayout[0]);
        sql = String.format("select count(1) count_ %s", fromWhere);
        kvss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
        int total = Integer.valueOf(kvss[0][0]);
        DataGrid<PLUILayout> res = new DataGrid<PLUILayout>();
        res.setData(Arrays.asList(datas));
        res.setTotal(total);
        return res;
    }
    /**
     * é€‰æ‹©æ¨¡æ¿ä¸‹æ‹‰æŸ¥è¯¢ï¼ˆtemplateType为表格、表单、树表时的选择对象下拉查询)
     * @param baseQueryObject
     * @return
     * @throws PLException
     */
    public DataGrid<PortalVI> getPortalVIDatasByPage(BaseQueryObject baseQueryObject) throws PLException{
        PortalVI[] datas = null;
        int start = baseQueryObject.getPage() <= 1 ? 1 : (baseQueryObject.getPage() - 1) * baseQueryObject.getLimit() + 1;
        int end = baseQueryObject.getPage() <= 1 ? baseQueryObject.getLimit() : (baseQueryObject.getPage() * baseQueryObject.getLimit());
        String where = " 1=1 ";
        Map<String, String> conditionMap = baseQueryObject.getConditionMap();
        if(Func.isNotEmpty(conditionMap)){
            //选择的源对象或者是选择的父节点显示类型
            String selectBtmType = conditionMap.get("selectBtmType");
            if(selectBtmType != null){
                where += String.format(" and vi.typename = '%s' ", selectBtmType);
            }
            /*if(getPopupDialog().getPortalVIType() != null){
                where += String.format(" and vi.vitype = %d ", getPopupDialog().getPortalVIType().getIntVal());
            }*/
            //过滤条件
            String filterInputValue = conditionMap.get("filterInputValue");
            if(Func.isNotBlank(filterInputValue)){
                where += String.format(" and (vi.viname like '%%%s%%') ", filterInputValue, filterInputValue);
            }
        }
        String fromWhere = String.format(" from plportalvi vi where %s ", where);
        String fromWhereOrderBy = String.format(" %s order by vi.viname", fromWhere);
        String sql = String.format("select * from(" +
                "  select row_.*,rownum rownum_ from( " +
                "         select vi.viname,vi.vitype  %s" +
                "  ) row_ " +
                ") where rownum_ >= %d and rownum_ <= %d ", fromWhereOrderBy, start, end);
        List<PortalVI> list = new LinkedList<>();
        String[][] kvss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
        for(String[] kvs : kvss){
            PortalVI bi = new PortalVI();
            bi.viName = kvs[0];
            bi.viType = Short.valueOf(kvs[1]);
            list.add(bi);
        }
        datas = list.toArray(new PortalVI[]{});
        sql = String.format("select count(1) count_ %s", fromWhere);
        kvss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
        int total = Integer.valueOf(kvss[0][0]);
        DataGrid<PortalVI> res = new DataGrid<>();
        res.setData(Arrays.asList(datas));
        res.setTotal(total);
        return res;
    }
    /**
     * æŸ¥è¯¢æ¨¡æ¿ä¸‹æ‹‰æŸ¥è¯¢
     * @param baseQueryObject
     * @return
     * @throws PLException
     */
    public DataGrid<QTInfo> getQTInfoDatasByPage(BaseQueryObject baseQueryObject) throws PLException{
        QTInfo[] datas = null;
        int start = baseQueryObject.getPage() <= 1 ? 1 : (baseQueryObject.getPage() - 1) * baseQueryObject.getLimit() + 1;
        int end = baseQueryObject.getPage() <= 1 ? baseQueryObject.getLimit() : (baseQueryObject.getPage() * baseQueryObject.getLimit());
        String where = " 1=1 ";
        Map<String, String> conditionMap = baseQueryObject.getConditionMap();
        if(Func.isNotEmpty(conditionMap)){
            //选择的源对象或者是选择的父节点显示类型
            String selectBtmType = conditionMap.get("selectBtmType");
            if(selectBtmType != null){
                where += String.format(" and qt.btmname = '%s' ", selectBtmType);
            }
            //过滤条件
            String filterInputValue = conditionMap.get("filterInputValue");
            if(Func.isNotBlank(filterInputValue)){
                where += String.format(" and (qt.qtname like '%%%s%%') ", filterInputValue, filterInputValue);
            }
        }
        String fromWhere = String.format(" from PL_QTEMPLATE qt where %s ", where);
        String fromWhereOrderBy = String.format(" %s order by qt.qtname ", fromWhere);
        String sql = String.format("select * from(" +
                "  select row_.*,rownum rownum_ from( " +
                "         select qt.qtname,qt.btmname  %s" +
                "  ) row_ " +
                ") where rownum_ >= %d and rownum_ <= %d ", fromWhereOrderBy, start, end);
        List<QTInfo> list = new LinkedList<QTInfo>();
        String[][] kvss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
        for(String[] kvs : kvss){
            QTInfo bi = new QTInfo();
            bi.qtName = kvs[0];
            bi.btmName = kvs[1];
            list.add(bi);
        }
        datas = list.toArray(new QTInfo[]{});
        sql = String.format("select count(1) count_ %s", fromWhere);
        kvss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
        int total = Integer.valueOf(kvss[0][0]);
        DataGrid<QTInfo> res = new DataGrid<QTInfo>();
        res.setData(Arrays.asList(datas));
        res.setTotal(total);
        return res;
    }
    //基础公共检查接口
    private abstract class BaseComptInter {
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/PlatformClientUtil.java
@@ -4,7 +4,6 @@
import com.vci.corba.bofactory.BOFactoryServicePrx;
import com.vci.corba.common.PLException;
import com.vci.corba.framework.FrameworkServicePrx;
import com.vci.corba.log.LogServicePrx;
import com.vci.corba.omd.atm.AttPoolServicePrx;
import com.vci.corba.omd.btm.BTMServicePrx;
import com.vci.corba.omd.data.AttributeValue;
@@ -14,6 +13,7 @@
import com.vci.corba.omd.qtm.QTDServicePrx;
import com.vci.corba.omd.stm.StatePoolServicePrx;
import com.vci.corba.omd.vrm.VersionRuleServicePrx;
import com.vci.corba.pllog.LogServicePrx;
import com.vci.corba.portal.PortalServicePrx;
import com.vci.corba.query.ObjectQueryServicePrx;
import com.vci.corba.volume.VolumeServicePrx;
Source/plt-web/plt-web-parent/plt-web/src/main/resources/properties/ice.properties
@@ -1,4 +1,5 @@
#NameService=PLT
Adapter=PLT
Endpoints=default -h localhost -p 4601
Endpoints=default -h localhost -p 4061
Ice.MessageSizeMax=1048576
#Endpoints=VCI-PLT/Locator:default -h localhost -p 4601
Source/plt-web/plt-web-ui/src/api/systemModel/systemConfig/api.js
@@ -9,6 +9,14 @@
  });
}
// èŽ·å–å½“å‰ç”¨æˆ·åœ¨çº¿äººæ•°
export function getOnlineUsersNum() {
  return request({
    url: "/api/hmSysModConfigController/getOnlineUsersNum",
    method: "get",
  });
}
// é…ç½®é¡¹æŸ¥è¯¢
export function getAppConfigDetailsByID(params) {
  return request({
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue
@@ -151,6 +151,8 @@
        });
        this.treeData[0].children = data;
        loading.close();
      }).catch(error=>{
        loading.close();
      })
    },
    // å¤„理树形结构
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue
@@ -185,6 +185,8 @@
        });
        this.treeData[0].children = data;
        loading.close();
      }).catch(error=>{
        loading.close();
      })
    },
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
@@ -202,6 +202,8 @@
        });
        this.treeData = data;
        loading.close();
      }).catch(error=>{
        loading.close();
      })
    },
    // å¤„理业务类型树形结构
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
@@ -1,26 +1,10 @@
<template>
  <el-container>
    <el-aside>
      <basic-container>
        <div ref="TreeBox" style="height: calc(100vh - 144px);!important;">
          <div class="headerCon">
            <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">创建
            </el-button>
            <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">修改
            </el-button>
            <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">删除
            </el-button>
            <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导出
            </el-button>
            <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导入
            </el-button>
            <el-button class="smallBtn" plain size="small" type="primary"
                       @click="checkViewClickHandler">查看使用范围
            </el-button>
          </div>
        <div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
          <!-- å·¦ä¾§æ ‘         -->
          <div style="height:  calc(100vh - 280px);">
          <div style="height:  calc(100vh - 190px);">
            <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span style="font-size: 15px">
@@ -36,6 +20,7 @@
    <el-main>
      <basic-container>
      </basic-container>
    </el-main>
@@ -43,8 +28,53 @@
</template>
<script>
import {getBizTypes} from "@/api/modeling/businessType/api";
export default {
  name: "index"
  name: "index",
  data() {
    return {
      treeOption: {
        height: 'auto',
        defaultExpandedKeys: ['topNode'],
        menu: false,
        addBtn: false,
        props: {
          label: 'label',
          value: 'oid',
          children: 'children'
        }
      },
      nodeRow: {},
      treeData: [{
        label: '业务类型树',
        oid: 'topNode',
        children: []
      }],
    }
  },
  created() {
    this.getTreeList();
  },
  methods: {
    //树表查询
    getTreeList() {
      const loading = this.$loading({});
      getBizTypes().then(res => {
        const data = res.data.data.map(item => {
          item.attributes.label = item.attributes.id;
          return item.attributes;
        });
        this.treeData[0].children = data;
        loading.close();
      }).catch(error => {
        loading.close();
      })
    },
    // æ ‘点击
    nodeClick(row) {
      this.nodeRow = row;
    },
  }
}
</script>
Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue
@@ -4,8 +4,8 @@
      <el-form ref="form" :model="form" label-width="150px">
        <el-form-item label="当前在线用户人数">
          <div style="display: flex;">
            <el-input v-model="form.name" :readOnly="true"></el-input>
            <el-button plain style="margin-left: 10px"> åˆ·æ–°</el-button>
            <el-input v-model="form.currentOnlineUser" :readOnly="true"></el-input>
            <el-button plain type="primary" style="margin-left: 10px" @click="getOnlineUsersNum"> åˆ·æ–°</el-button>
          </div>
        </el-form-item>
      </el-form>
@@ -14,14 +14,31 @@
</template>
<script>
import {
  getOnlineUsersNum
} from "@/api/systemModel/systemConfig/api"
export default {
  name: "index",
  data() {
    return {
      form: {
        name: '0'
        currentOnlineUser: '0'
      }
    }
  },
  created() {
    this.getOnlineUsersNum();
  },
  methods: {
    // å·¦ä¾§æ ‘查询
    getOnlineUsersNum() {
      getOnlineUsersNum().then(res => {
        if (res.data.code === 200) {
          const data = res.data.obj;
          this.form.currentOnlineUser = data;
        }
      })
    }
  }
}
</script>
Source/plt-web/plt-web-ui/src/views/wel/index.vue
@@ -13,12 +13,6 @@
            <img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status"/>
            <img src="https://img.shields.io/badge/Spring%20Cloud-2021-blue.svg" alt="Coverage Status"/>
            <img src="https://img.shields.io/badge/Spring%20Boot-2.7-blue.svg" alt="Downloads"/>
            <a target="_blank" href="https://bladex.vip">
              <img src="https://img.shields.io/badge/Saber%20Author-Small%20Chill-ff69b4.svg" alt="Downloads"/>
            </a>
            <a target="_blank" href="https://bladex.vip">
              <img src="https://img.shields.io/badge/Copyright%20-@BladeX-%23ff3f59.svg" alt="Downloads"/>
            </a>
          </p>
        </basic-container>
      </el-col>