init():初始化项目

parent d6002ad5
# maven ignore
target/
*.war
*.zip
*.tar
*.tar.gz
# eclipse ignore
.settings/
.project
.classpath
.springBeans
# IntelliJ ignore
*.iml
*.ipr
*.iws
.git/
.idea/
out/
# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp
# system ignore
.DS_Store
Thumbs.db
*.factorypath
# maven version
pom.xml.versionsBackup
**/overlays/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.baosight.iplat4j</groupId>
<artifactId>iplat4j-smart-boot-starter</artifactId>
<version>1.0.8</version>
<relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>SmartDemo</artifactId>
<packaging>war</packaging>
<name>iPlat4J Smart Demo</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>true</maven.deploy.skip>
<oracle.jdbc.version>19.3.0.0</oracle.jdbc.version>
<smart.version>1.0.8</smart.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<version>2.1.5.RELEASE</version>
</dependency>
<!-- 任务管理开发组件 -->
<dependency>
<groupId>com.baosight.iplat4j</groupId>
<artifactId>xservices-smart-job</artifactId>
</dependency>
<!-- 流程管理开发组件 -->
<dependency>
<groupId>com.baosight.iplat4j</groupId>
<artifactId>xservices-smart-bpm</artifactId>
</dependency>
<!--单元测试-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>provided</scope>
</dependency>
<!--web 必备的api,用来提供request和response等上下文-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<!--web 必备api,用来提供jsp操作类-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<scope>provided</scope>
</dependency>
<!--bpm依赖jar-->
<!--单元测试需要,保证validta可以运行-->
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>com.baosight.iplat4j</groupId>
<artifactId>ui-plugin-all</artifactId>
<type>pom</type>
<version>1.0.1-SNAPSHOT</version>
</dependency>
-->
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>ui-plugin-front</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>ui-plugin-back</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.baosight.iplat4j</groupId>
<artifactId>message-plugin</artifactId>
<version>${smart.version}</version>
</dependency>
<dependency>
<groupId>com.baosight.iplat4j</groupId>
<artifactId>xdatashow-plugin</artifactId>
<version>${smart.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>datas-plugin</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>redis-plugin</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<!-- -->
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>doc-plugin</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>org-plugin</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>protal-plugin</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.baosight.iplat4j</groupId>
<artifactId>report-plugin</artifactId>
<version>${smart.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>widget-eco-plugin</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>log-plugin</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.baosight.iplat4j</groupId>
<artifactId>lowcode-plugin</artifactId>
<version>${smart.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>iplat4j-smart-license</artifactId>-->
<!-- <version>0.0.1</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.baosight.iplat4j</groupId>-->
<!-- <artifactId>netty-plugin</artifactId>-->
<!-- <version>1.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/com.lmax/disruptor -->
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>3.4.2</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<warSourceDirectory>${project.build.directory}/${project.build.finalName}</warSourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<warSourceDirectory>${project.build.directory}/${project.build.finalName}</warSourceDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<!-- skip默认deploy插件的执行 -->
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>baocloud-maven</id>
<name>baocloud maven</name>
<url>http://nexus.baocloud.cn/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>baocloud-maven</id>
<name>baocloud maven</name>
<url>http://nexus.baocloud.cn/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>baocloud-maven</id>
<name>宝之云的 Maven 库</name>
<url>http://nexus.baocloud.cn/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>baocloud-maven</id>
<name>宝之云的 Maven SNAPSHOT库</name>
<url>http://nexus.baocloud.cn/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>
package com.baosight.iplat4j;
import com.baosight.iplat4j.config.ApplicationProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;
@SpringBootApplication(scanBasePackages = "com.baosight")
@ServletComponentScan("com.baosight.iplat4j.core.web.servlet")
@ImportResource(locations = {"classpath*:spring/framework/platApplicationContext*.xml","classpath*:spring/framework/applicationContext*.xml"})
@EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class})
public class Iplat4jApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Iplat4jApplication.class);
app.run(args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Iplat4jApplication.class);
}
}
package com.baosight.iplat4j.ee.dm.service;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
public class ServiceEEDM01 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
public EiInfo sendMsg(EiInfo inInfo) {
List list= new ArrayList<>();
Random r = new Random();
int i1 = r.nextInt(10);
for (int i=0;i<i1;i++){
LocalTime now = LocalTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
String VALUE = now.format(formatter)+"--- 报警信息,当前报警是第"+i+"条";
list.add(VALUE);
}
EiInfo info = new EiInfo();
info.set(EiConstant.serviceName, "EMNT01");
info.set(EiConstant.methodName, "broadcastByUserForm");
info.set("formEname", "realAlarm");
info.set("alarmdatas", list);
info.set("alarmcount",i1);
info.set("user","admin");
EiInfo resultInfo = XLocalManager.call(info);
return inInfo;
}
public EiInfo sendServiceMsg(EiInfo inInfo) {
List list= new ArrayList<>();
Random r = new Random();
int i1 = r.nextInt(10);
for (int i=0;i<i1;i++){
LocalTime now = LocalTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
String VALUE = now.format(formatter)+"--- 报警信息,当前报警是第"+i+"条";
Map map =new HashMap<>();
map.put("alarmdatas",VALUE);
list.add(map);
}
EiBlock block = inInfo.addBlock("result");
block.setRows(list);
block.set("count",i1);
return inInfo;
}
}
spring.mvc.servlet.path=/
logging.level.org.springframework=info
logging.level.com.baosight=info
spring.security.user.name=admin
spring.security.user.password=12345
spring.main.allow-bean-definition-overriding=true
server.port=8083
spring.mvc.view.suffix=.jsp
spring.mvc.view.prefix=/**
spring.servlet.multipart.max-file-size=1073741824
spring.servlet.multipart.max-request-size=1073741824
server.tomcat.max-swallow-size = -1
spring.servlet.multipart.enabled =true
spring.servlet.multipart.file-size-threshold =0
#\u9879\u76EE\u540D\u79F0
projectName=iplat4j
moduleName=ep
projectEnv=dev
platSchema=iplat
eplatSchema=EPLAT
lowCodeSchema=LOWCODEDB
projectSchema=LOWCODEDB
customerName=\u4E2D\u56FD\u5B9D\u6B66\u94A2\u94C1\u96C6\u56E2\u6709\u9650\u516C\u53F8
enterpriseName=\u5b9d\u4fe1\u8f6f\u4ef6\u5e73\u53f0\u7814\u7a76\u4e8c\u6240
datasource.type=dbcp
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://10.24.1.94:3306/iplat?useSSL=false&useUnicode=true&characterEncoding=utf-8
jdbc.username=root
jdbc.password=fnvu~aKs9LTDYUxe
jdbc.maxActive=20
jdbc.validationQuery=SELECT 1 FROM ${platSchema}.TEDFA00
configEx=iplat4j.ed;xservices;xservices.xs;xservices.ej;xservices.em;xservices.ew;eplat;eplat.bedz;eplat.belv;
#appTopDomain=eplatdev.baocloud.cn
appTopDomain=/
log4j2.asyncLoggerRingBufferSize=256*1024
log4j2.asyncQueueFullPolicy=Discard
log4j2.discardThreshold=DEBUG
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" monitorInterval="10">
<Properties>
<Property name="PID">mylog</Property>
<Property name="LOG_EXCEPTION_CONVERSION_WORD">%xwEx</Property>
<Property name="LOG_LEVEL_PATTERN">%5p</Property> <!--<Property name="LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread][%file:%line] - %msg%n</Property>-->
<!--参考文档 https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout -->
<Property name="LOG_PATTERN">%highlight{%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{1.} - %msg%n%}</Property>
<Property name="filename">iplat.$${date:yyyy-MM-dd}.log</Property>
</Properties>
<Appenders> <!--<Console name="Console" target="SYSTEM_OUT" follow="true">--> <!--<PatternLayout pattern="${LOG_PATTERN}"/>--> <!--</Console>--> <!-- 用来定义输出到控制台的配置 -->
<Console name="Console" target="SYSTEM_OUT"> <!-- 设置控制台只输出error及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
<ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY" />
<PatternLayout pattern="${LOG_PATTERN}" />
</Console>
<RollingRandomAccessFile name="MyFile" fileName="apps/logs/iplat.log" filePattern="apps/logs/iplat.%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout>
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{1.} - %msg%n%throwable{short}</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
<SizeBasedTriggeringPolicy size="1024 MB" />
</Policies>
<DefaultRolloverStrategy max="50" />
</RollingRandomAccessFile>
<TextArea name="platLogAppender">
<PatternLayout pattern="%m%n" />
</TextArea>
</Appenders>
<Loggers> <!--用来增加sql的日志,无论下面root logger级别是什么都输出sql log-->
<logger name="com.baosight.iplat4j.core.data.ibatis.dao.SqlMapDaoLogProxy" level="ERROR" />
<AsyncLogger name="com.baosight.iplat4j" level="INFO" additivity="false">
<AppenderRef ref="Console" />
<AppenderRef ref="MyFile" />
<AppenderRef ref="platLogAppender" />
</AsyncLogger>
<logger name="org.springframework" level="ERROR" />
<logger name="org.thymeleaf" level="ERROR" />
<Root level="WARN">
<AppenderRef ref="Console" />
<AppenderRef ref="MyFile" />
<AppenderRef ref="platLogAppender" />
</Root>
</Loggers>
</Configuration>
#任务延时启动,单位:秒
xservices.job.startupDelay=60
org.quartz.scheduler.instanceName = iPlat4j_Scheduler
org.quartz.scheduler.instanceId = AUTO
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 20
org.quartz.threadPool.threadPriority = 5
org.quartz.jobStore.misfireThreshold = 60000
#内存方式
#org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
#数据库方式持久化定时任务
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.useProperties = false
org.quartz.jobStore.dataSource = appDS
org.quartz.jobStore.tablePrefix = EJ_QRTZ_
#集群模式下设置为true
org.quartz.jobStore.isClustered = true
##JNDI配置方式
#org.quartz.dataSource.appDS.jndiURL=appDS
#此处配置数据库持久化连接数据库相关的信息
org.quartz.jobStore.clusterCheckinInterval = 20000
org.quartz.dataSource.appDS.driver = com.mysql.jdbc.Driver
org.quartz.dataSource.appDS.URL = jdbc:mysql://10.25.10.152:13306/iplat?useSSL=false&useUnicode=true&characterEncoding=utf-8
org.quartz.dataSource.appDS.user = iplat
org.quartz.dataSource.appDS.password = iplat
org.quartz.dataSource.appDS.maxConnections = 30
#分区分表的日志记录插件
org.quartz.plugin.logging.class = com.baosight.xservices.ej.job.quartz.JobLoggingPluginWithPartition
org.quartz.plugin.logging.tablePrefix = EJ_QRTZ_P_
org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingTriggerHistoryPlugin
\ No newline at end of file
window.__PRODUCTION__VUE_IPLAT4JSMART_UI__CONF__={"VITE_GLOB_APP_TITLE":"iPlat4jSmart","VITE_GLOB_APP_SHORT_NAME":"vue_iPlat4jSmart_UI","VITE_GLOB_4J_MENU_ROOT_NAME":"XS","VITE_GLOB_PAGE_BASE_HOME":"/EDFA01","VITE_GLOB_PACKAGE_NAME":"UIDist","VITE_GLOB_VUE_VALIDATE_AUTH":"false","VITE_GLOB_FAVORITE_PAGE":"true","VITE_GLOB_MENU_WITH_LINE":"false","VITE_GLOB_WEBSOCKET_PORT":"8090","VITE_GLOB_API_URL":"/basic-api","VITE_GLOB_UPLOAD_URL":"/upload","VITE_GLOB_API_URL_PREFIX":""};Object.freeze(window.__PRODUCTION__VUE_IPLAT4JSMART_UI__CONF__);Object.defineProperty(window,"__PRODUCTION__VUE_IPLAT4JSMART_UI__CONF__",{configurable:false,writable:false,});
\ No newline at end of file
[
{
"path": "/comp",
"name": "Comp",
"component": "LAYOUT",
"meta": {
"title": "routes.demo.comp.comp",
"icon": "ion:tv-outline",
"orderNo": 2
},
"children": [
{
"path": "basic",
"name": "BasicDemo",
"pageNum": "BasicDemo",
"component": "/demo/comp/button/index",
"meta": {
"title": "基础组件",
"icon": "ion:grid-outline"
}
},
{
"path": "basicForm",
"name": "basicFormDemo",
"pageNum": "basicFormDemo",
"component": "/demo/form/index",
"meta": {
"title": "基础表单",
"icon": "ion:grid-outline"
}
},
{
"path": "UseTable",
"name": "UseTablecDemo",
"pageNum": "UseTablecDemo",
"component": "/demo/table/UseTable",
"meta": {
"title": "基础表格",
"icon": "ion:grid-outline"
}
}
]
},
{
"path": "/about",
"name": "About",
"component": "LAYOUT",
"redirect": "/about/index",
"meta": {
"title": "routes.dashboard.about",
"icon": "simple-icons:aboutdotme",
"hideChildrenInMenu": true,
"hideBreadcrumb": true,
"orderNo": 10000
},
"children": [
{
"path": "index",
"name": "AboutPage",
"pageNum": "AboutPage",
"component": "/sys/about/index",
"meta": {
"title": "routes.dashboard.about",
"icon": "simple-icons:aboutdotme",
"currentActiveMenu": "/about"
}
}
]
},
{
"path": "/EDFA01",
"name": "EDFA01",
"pageNum": "EDFA01",
"component": "IFrame",
"meta": {
"title": "首页",
"frameSrc": "/iplat4j-smart/web/EDFA01",
"hideMenu": true
}
}
]
<?xml version="1.0" encoding="UTF-8"?>
<licenses>
<license code="iPlat4J-Smart">
<LicenseCode desc="产品代码" type="fixed">iPlat4J-Smart</LicenseCode>
<ExpiringDate desc="过期时间" type="fixed">2033-11-21</ExpiringDate>
<AuthorizingCompany desc="签发单位" type="fixed">上海宝信软件股份有限公司</AuthorizingCompany>
<AuthorizingSoftware desc="产品名称" type="fixed">iPlat4J-Smart</AuthorizingSoftware>
<AuthorizedClient desc="授权部门名称" type="fixed">中国宝武钢铁集团有限公司</AuthorizedClient>
<AuthorizedEnterprise desc="授权企业名称" type="fixed">宝信软件平台研究二所</AuthorizedEnterprise>
<AuthorizedProject desc="项目名称" type="fixed">iplat4j</AuthorizedProject>
<AuthorizedOS desc="授权操作系统" type="fixed">Linux</AuthorizedOS>
<SigningDate desc="签发时间" type="fixed">20231121</SigningDate>
<StartDate desc="开始时间" type="fixed">2023-11-21</StartDate>
<LicenseID desc="许可证编号" type="fixed">LIC20231121iplat4j</LicenseID>
<LicenseMode desc="许可证模式" type="fixed">CheckHost</LicenseMode>
<HostMAC desc="主机MAC地址" type="fixed">5c:e9:1e:c3:6a:0b,00:50:56:95:50:7A,00:50:56:95:69:ed</HostMAC>
<PluginXdatashow desc="报屏" type="customized">1</PluginXdatashow>
<PluginReport desc="报表" type="customized">1</PluginReport>
<PluginOrg desc="组织机构" type="customized">1</PluginOrg>
<PluginRedis desc="Redis缓存" type="customized">1</PluginRedis>
<PluginLog desc="日志" type="customized">1</PluginLog>
<PluginProtal desc="门户" type="customized">1</PluginProtal>
<PluginNetty desc="高性能通信通信" type="customized">1</PluginNetty>
<signature desc="防伪签名" type="fixed">
302e02150091916888222303e90db2356a4a2560115a610d0a02150091aee09f139bedf1cba3708e1f709f72d43dd3fa
</signature>
</license>
</licenses>
<%@ page import="com.baosight.iplat4j.core.ei.EiInfo" %>
<%@ page import="com.baosight.iplat4j.core.log.Logger" %>
<%@ page import="com.baosight.iplat4j.core.log.LoggerFactory" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%@ page import="com.baosight.iplat4j.core.ei.EiConstant" %>
<%@ page import="com.baosight.iplat4j.core.service.soa.XLocalManager" %>
<%@ page import="com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext" %>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
final Logger logger = LoggerFactory.getLogger("index");
//门户插件跳转逻辑
String loginName = UserSession.getLoginName();
String userId = UserSession.getUserUuid();
String url = "";
String frameOpenWeb = "";
String frameOpenCname = "";
try {
EiInfo setInfo = new EiInfo();
setInfo.set("username", loginName);
setInfo.set(EiConstant.serviceName, "EDPR00");
setInfo.set(EiConstant.methodName, "queryIndexPageUrl");
logger.info("loginName" + loginName);
logger.info("调用EDPR00.queryIndexPageUrl!");
EiInfo getInfo = XLocalManager.call(setInfo);
int status = getInfo.getStatus();
if(status < 0){
logger.error("配置首页获取失败:调用EDPR00.queryIndexPageUrl失败!" + getInfo.getMsg());
}else{
if("1".equals(getInfo.get("enableStatus"))){
if ("openSeparately".equals(getInfo.get("openWith"))){
url = getInfo.get("url") + "";
}else {
frameOpenWeb = getInfo.get("url").toString();
frameOpenCname = getInfo.get("formCname").toString();
}
}
}
}catch (Exception e) {
logger.error("配置首页获取失败!" + e.getMessage(), e);
}
//以上门户插件跳转逻辑
//设置session过期时间
HttpSession currentSession = request.getSession();
String sessionTimeout= PlatApplicationContext.getProperty("iplat4j.ui.sessionTimeout");
if (!sessionTimeout.isEmpty()){
Integer sessionTimeoutNumber =Integer.valueOf(sessionTimeout)*60;
currentSession.setMaxInactiveInterval(sessionTimeoutNumber);
// 获取会话的最大非活动间隔时间(单位为秒)
int maxInactiveInterval = currentSession.getMaxInactiveInterval();
int maxInactiveIntervalMinutes = maxInactiveInterval / 60;
}
%>
<c:set var="url" value="<%=url%>"/>
<c:set var="frameOpenWeb" value="<%=frameOpenWeb%>"/>
<c:set var="frameOpenCname" value="<%=frameOpenCname%>"/>
<html lang="zh">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
</head>
<body>
</body>
<script type="text/javascript">
var load_time = new Date();
var load_label = "indexReal" + load_time.getTime();
let url = "${url}";
let frameOpenWeb = "${frameOpenWeb}";
let frameOpenCname = "${frameOpenCname}"
console.log("redirect to " + url);
var userId = '<%=userId%>';
var loginName = '<%=loginName%>';
sessionStorage.setItem("userId", userId);
sessionStorage.setItem("loginName", loginName);
if(url != null && url != "") {
window.location.href = '${ctx}/web/' + url;
sessionStorage.removeItem("frameOpenWeb");
sessionStorage.removeItem("frameOpenCname");
} else {
if (frameOpenWeb != null && frameOpenWeb != ""){
sessionStorage.setItem("frameOpenWeb", frameOpenWeb);
sessionStorage.setItem("frameOpenCname", frameOpenCname);
}else {
sessionStorage.removeItem("frameOpenWeb");
sessionStorage.removeItem("frameOpenCname");
}
window.location.href = '${ctx}/iPlatV6-index.jsp';
}
</script>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment