修改使用fastjson包,修复部分bug,优化代码
This commit is contained in:
parent
c1f2a06150
commit
da04f124cf
716
pom.xml
716
pom.xml
|
@ -1,365 +1,357 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.seagull</groupId>
|
<groupId>com.seagull</groupId>
|
||||||
<artifactId>LuckyFrameServer</artifactId>
|
<artifactId>LuckyFrameServer</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>LuckyFrameServer Maven Webapp</name>
|
<name>LuckyFrameServer Maven Webapp</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
<build>
|
<build>
|
||||||
<finalName>LuckyFrameServer</finalName>
|
<finalName>LuckyFrameServer</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.3</version>
|
<version>3.3</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.7</source>
|
<source>1.7</source>
|
||||||
<target>1.7</target>
|
<target>1.7</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*.properties</include>
|
<include>**/*.properties</include>
|
||||||
<include>**/*.xml</include>
|
<include>**/*.xml</include>
|
||||||
</includes>
|
</includes>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
</build>
|
</build>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>antlr</groupId>
|
<groupId>antlr</groupId>
|
||||||
<artifactId>antlr</artifactId>
|
<artifactId>antlr</artifactId>
|
||||||
<version>2.7.7</version>
|
<version>2.7.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>aopalliance</groupId>
|
<groupId>aopalliance</groupId>
|
||||||
<artifactId>aopalliance</artifactId>
|
<artifactId>aopalliance</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.aspectj</groupId>
|
<groupId>org.aspectj</groupId>
|
||||||
<artifactId>aspectjweaver</artifactId>
|
<artifactId>aspectjweaver</artifactId>
|
||||||
<version>1.8.10</version>
|
<version>1.8.10</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate</groupId>
|
||||||
<artifactId>hibernate-validator</artifactId>
|
<artifactId>hibernate-validator</artifactId>
|
||||||
<version>5.4.0.Final</version>
|
<version>5.4.0.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>c3p0</groupId>
|
<groupId>c3p0</groupId>
|
||||||
<artifactId>c3p0</artifactId>
|
<artifactId>c3p0</artifactId>
|
||||||
<version>0.9.1.2</version>
|
<version>0.9.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>
|
<!-- <dependency> <groupId>commons-attributes</groupId> <artifactId>commons-attributes-api</artifactId>
|
||||||
<groupId>commons-attributes</groupId>
|
<version>2.2</version> </dependency> <dependency> <groupId>commons-attributes</groupId>
|
||||||
<artifactId>commons-attributes-api</artifactId>
|
<artifactId>commons-attributes-compiler</artifactId> <version>2.2</version>
|
||||||
<version>2.2</version>
|
</dependency> -->
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-beanutils</groupId>
|
||||||
<groupId>commons-attributes</groupId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
<artifactId>commons-attributes-compiler</artifactId>
|
<version>1.9.3</version>
|
||||||
<version>2.2</version>
|
</dependency>
|
||||||
</dependency> -->
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-codec</groupId>
|
||||||
<groupId>commons-beanutils</groupId>
|
<artifactId>commons-codec</artifactId>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<version>1.10</version>
|
||||||
<version>1.9.3</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-collections</groupId>
|
||||||
<groupId>commons-codec</groupId>
|
<artifactId>commons-collections</artifactId>
|
||||||
<artifactId>commons-codec</artifactId>
|
<version>3.2.2</version>
|
||||||
<version>1.10</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-dbcp</groupId>
|
||||||
<groupId>commons-collections</groupId>
|
<artifactId>commons-dbcp</artifactId>
|
||||||
<artifactId>commons-collections</artifactId>
|
<version>1.4</version>
|
||||||
<version>3.2.2</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-digester</groupId>
|
||||||
<groupId>commons-dbcp</groupId>
|
<artifactId>commons-digester</artifactId>
|
||||||
<artifactId>commons-dbcp</artifactId>
|
<version>2.1</version>
|
||||||
<version>1.4</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-discovery</groupId>
|
||||||
<groupId>commons-digester</groupId>
|
<artifactId>commons-discovery</artifactId>
|
||||||
<artifactId>commons-digester</artifactId>
|
<version>0.5</version>
|
||||||
<version>2.1</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-fileupload</groupId>
|
||||||
<groupId>commons-discovery</groupId>
|
<artifactId>commons-fileupload</artifactId>
|
||||||
<artifactId>commons-discovery</artifactId>
|
<version>1.3.2</version>
|
||||||
<version>0.5</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-httpclient</groupId>
|
||||||
<groupId>commons-fileupload</groupId>
|
<artifactId>commons-httpclient</artifactId>
|
||||||
<artifactId>commons-fileupload</artifactId>
|
<version>3.1</version>
|
||||||
<version>1.3.2</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-io</groupId>
|
||||||
<groupId>commons-httpclient</groupId>
|
<artifactId>commons-io</artifactId>
|
||||||
<artifactId>commons-httpclient</artifactId>
|
<version>2.5</version>
|
||||||
<version>3.1</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-lang</groupId>
|
||||||
<groupId>commons-io</groupId>
|
<artifactId>commons-lang</artifactId>
|
||||||
<artifactId>commons-io</artifactId>
|
<version>2.6</version>
|
||||||
<version>2.5</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-logging</groupId>
|
||||||
<groupId>commons-lang</groupId>
|
<artifactId>commons-logging</artifactId>
|
||||||
<artifactId>commons-lang</artifactId>
|
<version>1.2</version>
|
||||||
<version>2.6</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-pool</groupId>
|
||||||
<groupId>commons-logging</groupId>
|
<artifactId>commons-pool</artifactId>
|
||||||
<artifactId>commons-logging</artifactId>
|
<version>1.6</version>
|
||||||
<version>1.2</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>dom4j</groupId>
|
||||||
<groupId>commons-pool</groupId>
|
<artifactId>dom4j</artifactId>
|
||||||
<artifactId>commons-pool</artifactId>
|
<version>1.6.1</version>
|
||||||
<version>1.6</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>commons-validator</groupId>
|
||||||
<groupId>dom4j</groupId>
|
<artifactId>commons-validator</artifactId>
|
||||||
<artifactId>dom4j</artifactId>
|
<version>1.5.1</version>
|
||||||
<version>1.6.1</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>org.hibernate</groupId>
|
||||||
<groupId>commons-validator</groupId>
|
<artifactId>ejb3-persistence</artifactId>
|
||||||
<artifactId>commons-validator</artifactId>
|
<version>3.3.2.Beta1</version>
|
||||||
<version>1.5.1</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>net.sf.ezmorph</groupId>
|
||||||
<groupId>org.hibernate</groupId>
|
<artifactId>ezmorph</artifactId>
|
||||||
<artifactId>ejb3-persistence</artifactId>
|
<version>1.0.6</version>
|
||||||
<version>3.3.2.Beta1</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>org.springframework</groupId>
|
||||||
<groupId>net.sf.ezmorph</groupId>
|
<artifactId>spring-hibernate3</artifactId>
|
||||||
<artifactId>ezmorph</artifactId>
|
<version>2.0.8</version>
|
||||||
<version>1.0.6</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>org.hibernate</groupId>
|
||||||
<groupId>org.springframework</groupId>
|
<artifactId>hibernate-annotations</artifactId>
|
||||||
<artifactId>spring-hibernate3</artifactId>
|
<version>3.5.6-Final</version>
|
||||||
<version>2.0.8</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>org.hibernate.javax.persistence</groupId>
|
||||||
<groupId>org.hibernate</groupId>
|
<artifactId>hibernate-jpa-2.0-api</artifactId>
|
||||||
<artifactId>hibernate-annotations</artifactId>
|
<version>1.0.1.Final</version>
|
||||||
<version>3.5.6-Final</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>org.hibernate</groupId>
|
||||||
<groupId>org.hibernate.javax.persistence</groupId>
|
<artifactId>hibernate-validator-annotation-processor</artifactId>
|
||||||
<artifactId>hibernate-jpa-2.0-api</artifactId>
|
<version>5.3.4.Final</version>
|
||||||
<version>1.0.1.Final</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>org.javassist</groupId>
|
||||||
<groupId>org.hibernate</groupId>
|
<artifactId>javassist</artifactId>
|
||||||
<artifactId>hibernate-validator-annotation-processor</artifactId>
|
<version>3.21.0-GA</version>
|
||||||
<version>5.3.4.Final</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>javax.servlet.jsp</groupId>
|
||||||
<groupId>org.javassist</groupId>
|
<artifactId>javax.servlet.jsp-api</artifactId>
|
||||||
<artifactId>javassist</artifactId>
|
<version>2.3.1</version>
|
||||||
<version>3.21.0-GA</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>javax.servlet</groupId>
|
||||||
<groupId>javax.servlet.jsp</groupId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
<artifactId>javax.servlet.jsp-api</artifactId>
|
<version>3.1.0</version>
|
||||||
<version>2.3.1</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>com.alibaba</groupId>
|
||||||
<groupId>javax.servlet</groupId>
|
<artifactId>fastjson</artifactId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<version>1.2.47</version>
|
||||||
<version>3.1.0</version>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
<dependency>
|
<groupId>jstl</groupId>
|
||||||
<groupId>net.sf.json-lib</groupId>
|
<artifactId>jstl</artifactId>
|
||||||
<artifactId>json-lib</artifactId>
|
<version>1.2</version>
|
||||||
<version>2.4</version>
|
</dependency>
|
||||||
<classifier>jdk15</classifier>
|
<dependency>
|
||||||
</dependency>
|
<groupId>javax.transaction</groupId>
|
||||||
|
<artifactId>jta</artifactId>
|
||||||
|
<version>1.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>log4j</groupId>
|
||||||
|
<artifactId>log4j</artifactId>
|
||||||
|
<version>1.2.17</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>8.0.11</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
|
<artifactId>quartz</artifactId>
|
||||||
|
<version>1.8.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>opensymphony</groupId>
|
||||||
|
<artifactId>quartz-all</artifactId>
|
||||||
|
<version>1.6.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
|
<artifactId>quartz-commonj</artifactId>
|
||||||
|
<version>1.8.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
|
<artifactId>quartz-oracle</artifactId>
|
||||||
|
<version>1.8.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.w3c.css</groupId>
|
||||||
|
<artifactId>sac</artifactId>
|
||||||
|
<version>1.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<version>1.7.22</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<version>1.7.22</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-aop</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-aspects</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-beans</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context-support</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-core</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-expression</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-instrument</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-instrument-tomcat</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-jdbc</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-jms</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-orm</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-oxm</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-struts</artifactId>
|
||||||
|
<version>3.2.18.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-test</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-tx</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-web</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
<version>4.3.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>taglibs</groupId>
|
||||||
|
<artifactId>standard</artifactId>
|
||||||
|
<version>1.1.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.validation</groupId>
|
||||||
|
<artifactId>validation-api</artifactId>
|
||||||
|
<version>1.1.0.Final</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>jstl</groupId>
|
|
||||||
<artifactId>jstl</artifactId>
|
|
||||||
<version>1.2</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.transaction</groupId>
|
|
||||||
<artifactId>jta</artifactId>
|
|
||||||
<version>1.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>log4j</groupId>
|
|
||||||
<artifactId>log4j</artifactId>
|
|
||||||
<version>1.2.17</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
<version>8.0.11</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
|
||||||
<artifactId>quartz</artifactId>
|
|
||||||
<version>1.8.6</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>opensymphony</groupId>
|
|
||||||
<artifactId>quartz-all</artifactId>
|
|
||||||
<version>1.6.2</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
|
||||||
<artifactId>quartz-commonj</artifactId>
|
|
||||||
<version>1.8.6</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
|
||||||
<artifactId>quartz-oracle</artifactId>
|
|
||||||
<version>1.8.6</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.w3c.css</groupId>
|
|
||||||
<artifactId>sac</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>1.7.22</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
|
||||||
<version>1.7.22</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-aop</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-aspects</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-beans</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-context</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-context-support</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-core</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-expression</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-instrument</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-instrument-tomcat</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-jdbc</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-jms</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-orm</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-oxm</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-struts</artifactId>
|
|
||||||
<version>3.2.18.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-test</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-tx</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-web</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-webmvc</artifactId>
|
|
||||||
<version>4.3.6.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>taglibs</groupId>
|
|
||||||
<artifactId>standard</artifactId>
|
|
||||||
<version>1.1.2</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.validation</groupId>
|
|
||||||
<artifactId>validation-api</artifactId>
|
|
||||||
<version>1.1.0.Final</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -24,6 +24,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.Accident;
|
import luckyweb.seagull.spring.entity.Accident;
|
||||||
|
@ -33,8 +36,7 @@ import luckyweb.seagull.spring.service.AccidentService;
|
||||||
import luckyweb.seagull.spring.service.OperationLogService;
|
import luckyweb.seagull.spring.service.OperationLogService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -127,7 +129,7 @@ public class AccidentController {
|
||||||
List<Accident> acclist = accidentservice.findByPage(accident, offset, limit);
|
List<Accident> acclist = accidentservice.findByPage(accident, offset, limit);
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(acclist);
|
JSONArray recordJson = StrLib.listToJson(acclist);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = accidentservice.findRows(accident);
|
int total = accidentservice.findRows(accident);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -375,8 +377,8 @@ public class AccidentController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("ids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("ids"));
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除故障记录失败!";
|
String ms="删除故障记录失败!";
|
||||||
int suc=0;
|
int suc=0;
|
||||||
|
@ -528,7 +530,7 @@ public class AccidentController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
JSONArray jsondata = JSONArray.fromObject(data);
|
JSONArray jsondata = (JSONArray)JSONArray.toJSON(data);
|
||||||
|
|
||||||
req.setAttribute("gdata", jsondata.toString());
|
req.setAttribute("gdata", jsondata.toString());
|
||||||
model.addAttribute("title1", title1);
|
model.addAttribute("title1", title1);
|
||||||
|
|
|
@ -9,11 +9,11 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TestCasedetail;
|
import luckyweb.seagull.spring.entity.TestCasedetail;
|
||||||
import luckyweb.seagull.spring.service.TestTastExcuteService;
|
import luckyweb.seagull.spring.service.TestTastExcuteService;
|
||||||
|
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
* 这是一个受限制的自由软件!您不能在任何未经允许的前提下对程序代码进行修改和用于商业用途;也不允许对程序代码修改后以任何形式任何目的的再发布。
|
* 这是一个受限制的自由软件!您不能在任何未经允许的前提下对程序代码进行修改和用于商业用途;也不允许对程序代码修改后以任何形式任何目的的再发布。
|
||||||
|
@ -72,14 +72,14 @@ public class AutoTestChartController {
|
||||||
createtime[i] = taskinfo.get(i)[7].toString();
|
createtime[i] = taskinfo.get(i)[7].toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray jsontaskid=JSONArray.fromObject(taskid);
|
JSONArray jsontaskid=(JSONArray)JSONArray.toJSON(taskid);
|
||||||
JSONArray jsonjobname=JSONArray.fromObject(jobname);
|
JSONArray jsonjobname=(JSONArray)JSONArray.toJSON(jobname);
|
||||||
JSONArray jsoncasetotal=JSONArray.fromObject(casetotal);
|
JSONArray jsoncasetotal=(JSONArray)JSONArray.toJSON(casetotal);
|
||||||
JSONArray jsoncasesuc=JSONArray.fromObject(casesuc);
|
JSONArray jsoncasesuc=(JSONArray)JSONArray.toJSON(casesuc);
|
||||||
JSONArray jsoncasefail=JSONArray.fromObject(casefail);
|
JSONArray jsoncasefail=(JSONArray)JSONArray.toJSON(casefail);
|
||||||
JSONArray jsoncaselock=JSONArray.fromObject(caselock);
|
JSONArray jsoncaselock=(JSONArray)JSONArray.toJSON(caselock);
|
||||||
JSONArray jsoncasenoex=JSONArray.fromObject(casenoex);
|
JSONArray jsoncasenoex=(JSONArray)JSONArray.toJSON(casenoex);
|
||||||
JSONArray jsoncreatetime=JSONArray.fromObject(createtime);
|
JSONArray jsoncreatetime=(JSONArray)JSONArray.toJSON(createtime);
|
||||||
|
|
||||||
req.setAttribute("taskid", jsontaskid);
|
req.setAttribute("taskid", jsontaskid);
|
||||||
req.setAttribute("jobname", jsonjobname);
|
req.setAttribute("jobname", jsonjobname);
|
||||||
|
|
|
@ -16,6 +16,10 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.quartz.QuartzJob;
|
import luckyweb.seagull.quartz.QuartzJob;
|
||||||
import luckyweb.seagull.spring.entity.SectorProjects;
|
import luckyweb.seagull.spring.entity.SectorProjects;
|
||||||
|
@ -27,8 +31,6 @@ import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.TestTastExcuteService;
|
import luckyweb.seagull.spring.service.TestTastExcuteService;
|
||||||
import luckyweb.seagull.util.DateLib;
|
import luckyweb.seagull.util.DateLib;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -146,7 +148,7 @@ public class CasedetailController
|
||||||
|
|
||||||
List<TestCasedetail> caselist = casedetailService.findByPage(caseDetail, offset, limit);
|
List<TestCasedetail> caselist = casedetailService.findByPage(caseDetail, offset, limit);
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(caselist);
|
JSONArray recordJson = StrLib.listToJson(caselist);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = casedetailService.findRows(caseDetail);
|
int total = casedetailService.findRows(caseDetail);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -189,8 +191,8 @@ public class CasedetailController
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("caseids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("caseids"));
|
||||||
String status="success";
|
String status="success";
|
||||||
String ms="执行任务成功!";
|
String ms="执行任务成功!";
|
||||||
|
|
||||||
|
@ -272,7 +274,7 @@ public class CasedetailController
|
||||||
String endDate = req.getParameter("endDate");
|
String endDate = req.getParameter("endDate");
|
||||||
String projid = req.getParameter("projid");
|
String projid = req.getParameter("projid");
|
||||||
List<Object[]> tasks = tastExcuteService.findTastList(startDate, projid, endDate);
|
List<Object[]> tasks = tastExcuteService.findTastList(startDate, projid, endDate);
|
||||||
JSONArray array = JSONArray.fromObject(tasks);
|
JSONArray array = JSONArray.parseArray(JSON.toJSONString(tasks));
|
||||||
pw.write(array.toString());
|
pw.write(array.toString());
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
|
|
|
@ -25,6 +25,10 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.Barchart4;
|
import luckyweb.seagull.spring.entity.Barchart4;
|
||||||
|
@ -36,8 +40,6 @@ import luckyweb.seagull.spring.service.OperationLogService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.UserInfoService;
|
import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -158,14 +160,13 @@ public class FlowCheckController {
|
||||||
|
|
||||||
jsonArr.add(jsonobj);
|
jsonArr.add(jsonobj);
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
|
||||||
String recordJson = jsonArr.toString();
|
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = flowcheckservice.findRows(flowcheck);
|
int total = flowcheckservice.findRows(flowcheck);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("total", total);
|
json.put("total", total);
|
||||||
json.put("rows", recordJson);
|
json.put("rows", jsonArr);
|
||||||
pw.print(json.toString());
|
pw.print(json.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,7 +257,7 @@ public class FlowCheckController {
|
||||||
fclist.set(i, fc);
|
fclist.set(i, fc);
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(fclist);
|
JSONArray recordJson = StrLib.listToJson(fclist);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = flowcheckservice.findRowsTable(flowcheck);
|
int total = flowcheckservice.findRowsTable(flowcheck);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -715,8 +716,8 @@ public class FlowCheckController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("ids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("ids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除流程检查信息失败!";
|
String ms="删除流程检查信息失败!";
|
||||||
|
@ -849,7 +850,7 @@ public class FlowCheckController {
|
||||||
}
|
}
|
||||||
// 取集合
|
// 取集合
|
||||||
rsp.setContentType("text/xml;charset=utf-8");
|
rsp.setContentType("text/xml;charset=utf-8");
|
||||||
JSONArray jsonArray = JSONArray.fromObject(list);
|
JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(list));
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
@ -962,9 +963,9 @@ public class FlowCheckController {
|
||||||
title = "当前选择日期段内无数据";
|
title = "当前选择日期段内无数据";
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray jsondata=JSONArray.fromObject(data);
|
JSONArray jsondata=(JSONArray) JSONArray.toJSON(data);
|
||||||
JSONArray jsonprojectname=JSONArray.fromObject(projectname);
|
JSONArray jsonprojectname=(JSONArray) JSONArray.toJSON(projectname);
|
||||||
JSONArray jsoncolumnname=JSONArray.fromObject(columnname);
|
JSONArray jsoncolumnname=(JSONArray) JSONArray.toJSON(columnname);
|
||||||
|
|
||||||
req.setAttribute("gdata", jsondata.toString());
|
req.setAttribute("gdata", jsondata.toString());
|
||||||
req.setAttribute("labels", jsonprojectname.toString());
|
req.setAttribute("labels", jsonprojectname.toString());
|
||||||
|
|
|
@ -22,6 +22,9 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
import luckyweb.seagull.spring.entity.ProjectCase;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
||||||
|
@ -36,8 +39,6 @@ import luckyweb.seagull.spring.service.TestJobsService;
|
||||||
import luckyweb.seagull.spring.service.TestTastExcuteService;
|
import luckyweb.seagull.spring.service.TestTastExcuteService;
|
||||||
import luckyweb.seagull.util.DateLib;
|
import luckyweb.seagull.util.DateLib;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
import rmi.service.RunService;
|
import rmi.service.RunService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,7 +92,7 @@ public class LogdetailController
|
||||||
loglist.set(i, log);
|
loglist.set(i, log);
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(loglist);
|
JSONArray recordJson = StrLib.listToJson(loglist);
|
||||||
pw.print(recordJson);
|
pw.print(recordJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +197,7 @@ public class LogdetailController
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
String logid = jsonObject.getString("logid");
|
String logid = jsonObject.getString("logid");
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="更新用例预期结果失败!";
|
String ms="更新用例预期结果失败!";
|
||||||
|
@ -299,10 +300,10 @@ public class LogdetailController
|
||||||
|
|
||||||
rsp.setContentType("application/json");
|
rsp.setContentType("application/json");
|
||||||
rsp.setCharacterEncoding("utf-8");
|
rsp.setCharacterEncoding("utf-8");
|
||||||
JSONArray taskArray = JSONArray.fromObject(taskdata);
|
JSONArray taskArray = (JSONArray) JSONArray.toJSON(taskdata);
|
||||||
JSONArray caseArray = JSONArray.fromObject(casedata);
|
JSONArray caseArray = (JSONArray) JSONArray.toJSON(casedata);
|
||||||
JSONArray logArray = JSONArray.fromObject(logdata);
|
JSONArray logArray = (JSONArray) JSONArray.toJSON(logdata);
|
||||||
JSONArray caseaddArray = JSONArray.fromObject(caseadddata);
|
JSONArray caseaddArray = (JSONArray) JSONArray.toJSON(caseadddata);
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("taskdata", taskArray);
|
jsobjcet.put("taskdata", taskArray);
|
||||||
jsobjcet.put("casedata", caseArray);
|
jsobjcet.put("casedata", caseArray);
|
||||||
|
@ -356,12 +357,12 @@ public class LogdetailController
|
||||||
createdate[i] = taskreport.get(i)[5].toString();
|
createdate[i] = taskreport.get(i)[5].toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray jsoncasetotal=JSONArray.fromObject(casetotal);
|
JSONArray jsoncasetotal=(JSONArray) JSONArray.toJSON(casetotal);
|
||||||
JSONArray jsoncasesuc=JSONArray.fromObject(casesuc);
|
JSONArray jsoncasesuc=(JSONArray) JSONArray.toJSON(casesuc);
|
||||||
JSONArray jsoncasefail=JSONArray.fromObject(casefail);
|
JSONArray jsoncasefail=(JSONArray) JSONArray.toJSON(casefail);
|
||||||
JSONArray jsoncaselock=JSONArray.fromObject(caselock);
|
JSONArray jsoncaselock=(JSONArray) JSONArray.toJSON(caselock);
|
||||||
JSONArray jsoncasenoex=JSONArray.fromObject(casenoex);
|
JSONArray jsoncasenoex=(JSONArray) JSONArray.toJSON(casenoex);
|
||||||
JSONArray jsoncreatedate=JSONArray.fromObject(createdate);
|
JSONArray jsoncreatedate=(JSONArray) JSONArray.toJSON(createdate);
|
||||||
|
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("casetotal", jsoncasetotal);
|
jsobjcet.put("casetotal", jsoncasetotal);
|
||||||
|
|
|
@ -13,14 +13,15 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.OperationLog;
|
import luckyweb.seagull.spring.entity.OperationLog;
|
||||||
import luckyweb.seagull.spring.entity.SectorProjects;
|
import luckyweb.seagull.spring.entity.SectorProjects;
|
||||||
import luckyweb.seagull.spring.service.OperationLogService;
|
import luckyweb.seagull.spring.service.OperationLogService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.util.DateLib;
|
import luckyweb.seagull.util.DateLib;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -113,7 +114,7 @@ public class OperationLogController {
|
||||||
|
|
||||||
List<OperationLog> loglist = operationlogservice.findByPage(oplog, offset, limit);
|
List<OperationLog> loglist = operationlogservice.findByPage(oplog, offset, limit);
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(loglist);
|
JSONArray recordJson = StrLib.listToJson(loglist);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = operationlogservice.findRows(oplog);
|
int total = operationlogservice.findRows(oplog);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -161,8 +162,8 @@ public class OperationLogController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray jsonname=JSONArray.fromObject(name);
|
JSONArray jsonname=(JSONArray) JSONArray.toJSON(name);
|
||||||
JSONArray jsonintegral=JSONArray.fromObject(integral);
|
JSONArray jsonintegral=(JSONArray) JSONArray.toJSON(integral);
|
||||||
|
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("name", jsonname);
|
jsobjcet.put("name", jsonname);
|
||||||
|
|
|
@ -18,6 +18,10 @@ import org.springframework.validation.FieldError;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.FlowCheck;
|
import luckyweb.seagull.spring.entity.FlowCheck;
|
||||||
|
@ -29,8 +33,6 @@ import luckyweb.seagull.spring.service.FlowInfoService;
|
||||||
import luckyweb.seagull.spring.service.OperationLogService;
|
import luckyweb.seagull.spring.service.OperationLogService;
|
||||||
import luckyweb.seagull.spring.service.PlanFlowCheckService;
|
import luckyweb.seagull.spring.service.PlanFlowCheckService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -109,7 +111,7 @@ public class PlanFlowCheckController {
|
||||||
pfclist.get(i).setCheckphase(fi.getPhasename());
|
pfclist.get(i).setCheckphase(fi.getPhasename());
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(pfclist);
|
JSONArray recordJson = StrLib.listToJson(pfclist);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = planflowcheckservice.findRows(pfcheck);
|
int total = planflowcheckservice.findRows(pfcheck);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -412,8 +414,8 @@ public class PlanFlowCheckController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("ids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("ids"));
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除检查计划失败!";
|
String ms="删除检查计划失败!";
|
||||||
int suc=0;
|
int suc=0;
|
||||||
|
@ -640,7 +642,7 @@ public class PlanFlowCheckController {
|
||||||
}
|
}
|
||||||
// 取集合
|
// 取集合
|
||||||
rsp.setContentType("text/xml;charset=utf-8");
|
rsp.setContentType("text/xml;charset=utf-8");
|
||||||
JSONArray jsonArray = JSONArray.fromObject(list);
|
JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(list));
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,9 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
import luckyweb.seagull.spring.entity.ProjectCase;
|
||||||
|
@ -35,8 +38,6 @@ import luckyweb.seagull.spring.service.ProjectPlanCaseService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.UserInfoService;
|
import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -167,7 +168,7 @@ public class ProjectCaseController {
|
||||||
|
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(projectcases);
|
JSONArray recordJson = StrLib.listToJson(projectcases);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = projectcaseservice.findRows(projectcase);
|
int total = projectcaseservice.findRows(projectcase);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -336,8 +337,8 @@ public class ProjectCaseController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("caseids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("caseids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除用例失败!";
|
String ms="删除用例失败!";
|
||||||
|
@ -402,7 +403,7 @@ public class ProjectCaseController {
|
||||||
String sign = req.getParameter("sign");
|
String sign = req.getParameter("sign");
|
||||||
|
|
||||||
ProjectCase pc = projectcaseservice.getCaseBySign(sign);
|
ProjectCase pc = projectcaseservice.getCaseBySign(sign);
|
||||||
String jsonStr = JSONObject.fromObject(pc).toString();
|
String jsonStr = JSONObject.toJSONString(pc);
|
||||||
pw.print(jsonStr);
|
pw.print(jsonStr);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
|
@ -445,7 +446,7 @@ public class ProjectCaseController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
String ms="保存用例集失败!";
|
String ms="保存用例集失败!";
|
||||||
String status="fail";
|
String status="fail";
|
||||||
int projectid = Integer.valueOf(jsonObject.getString("projectid"));
|
int projectid = Integer.valueOf(jsonObject.getString("projectid"));
|
||||||
|
@ -526,7 +527,7 @@ public class ProjectCaseController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
|
|
||||||
int id = Integer.valueOf(jsonObject.getString("id"));
|
int id = Integer.valueOf(jsonObject.getString("id"));
|
||||||
ProjectModule projectmodule = moduleservice.load(id);
|
ProjectModule projectmodule = moduleservice.load(id);
|
||||||
|
@ -601,7 +602,7 @@ public class ProjectCaseController {
|
||||||
modulejson.setName(projectmodule.getModulename());
|
modulejson.setName(projectmodule.getModulename());
|
||||||
boolean isParent = moduleservice.getModuleIsParent(projectmodule.getId());
|
boolean isParent = moduleservice.getModuleIsParent(projectmodule.getId());
|
||||||
modulejson.setisParent(isParent);
|
modulejson.setisParent(isParent);
|
||||||
jsonarr.add(JSONObject.fromObject(modulejson));
|
jsonarr.add(JSONObject.toJSONString(modulejson));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
List<SectorProjects> prolist = QueueListener.qa_projlist;
|
List<SectorProjects> prolist = QueueListener.qa_projlist;
|
||||||
|
@ -617,7 +618,7 @@ public class ProjectCaseController {
|
||||||
modulejson.setisParent(false);
|
modulejson.setisParent(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonarr.add(JSONObject.fromObject(modulejson));
|
jsonarr.add(JSONObject.toJSONString(modulejson));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,10 @@ import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
import luckyweb.seagull.spring.entity.ProjectCase;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
||||||
|
@ -35,9 +39,6 @@ import luckyweb.seagull.spring.service.TempCasestepDebugService;
|
||||||
import luckyweb.seagull.spring.service.TestClientService;
|
import luckyweb.seagull.spring.service.TestClientService;
|
||||||
import luckyweb.seagull.spring.service.UserInfoService;
|
import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
import net.sf.json.JsonConfig;
|
|
||||||
import rmi.service.RunService;
|
import rmi.service.RunService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -192,9 +193,7 @@ public class ProjectCasestepsController {
|
||||||
jsonstr = jsonstr.replace("\\\"", "\"");
|
jsonstr = jsonstr.replace("\\\"", "\"");
|
||||||
jsonstr = jsonstr.replace("undefined", "0");
|
jsonstr = jsonstr.replace("undefined", "0");
|
||||||
|
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonstr);
|
List<ProjectCasesteps> list = JSON.parseArray(jsonstr, ProjectCasesteps.class);
|
||||||
// 参数1为要转换的JSONArray数据,参数2为要转换的目标数据,即List盛装的数据
|
|
||||||
List<?> list = JSONArray.toList(jsonarr, new ProjectCasesteps(), new JsonConfig());
|
|
||||||
String usercode = "";
|
String usercode = "";
|
||||||
if (null != request.getSession().getAttribute(PublicConst.SESSIONKEYUSERCODE)
|
if (null != request.getSession().getAttribute(PublicConst.SESSIONKEYUSERCODE)
|
||||||
&& null != request.getSession().getAttribute(PublicConst.SESSIONKEYUSERNAME)) {
|
&& null != request.getSession().getAttribute(PublicConst.SESSIONKEYUSERNAME)) {
|
||||||
|
@ -205,19 +204,19 @@ public class ProjectCasestepsController {
|
||||||
String time = formatter.format(currentTime);
|
String time = formatter.format(currentTime);
|
||||||
ProjectCase projectcase = new ProjectCase();
|
ProjectCase projectcase = new ProjectCase();
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
ProjectCasesteps step = (ProjectCasesteps) list.get(i);
|
ProjectCasesteps step = list.get(i);
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
casestepsservice.delforcaseid(step.getCaseid());
|
casestepsservice.delforcaseid(step.getCaseid());
|
||||||
projectcase = projectcaseservice.load(step.getCaseid());
|
projectcase = projectcaseservice.load(step.getCaseid());
|
||||||
}
|
}
|
||||||
step.setOperationer(usercode);
|
step.setOperationer(usercode);
|
||||||
step.setTime(time);
|
step.setTime(time);
|
||||||
step.setOperation(step.getOperation().replaceAll(""", "\""));
|
step.setOperation(step.getOperation().replace(""", "\""));
|
||||||
step.setPath(step.getPath().replaceAll(""", "\""));
|
step.setPath(step.getPath().replace(""", "\""));
|
||||||
step.setParameters(step.getParameters().replaceAll(""", "\""));
|
step.setParameters(step.getParameters().replace(""", "\""));
|
||||||
step.setAction(step.getAction().replaceAll(""", "\""));
|
step.setAction(step.getAction().replace(""", "\""));
|
||||||
step.setExpectedresult(step.getExpectedresult().replaceAll(""", "\""));
|
step.setExpectedresult(step.getExpectedresult().replace(""", "\""));
|
||||||
step.setRemark(step.getRemark().replaceAll(""", "\""));
|
step.setRemark(step.getRemark().replace(""", "\""));
|
||||||
casestepsservice.add(step);
|
casestepsservice.add(step);
|
||||||
|
|
||||||
projectcase.setOperationer(usercode);
|
projectcase.setOperationer(usercode);
|
||||||
|
@ -256,7 +255,7 @@ public class ProjectCasestepsController {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(casesteps);
|
JSONArray recordJson = StrLib.listToJson(casesteps);
|
||||||
pw.print(recordJson);
|
pw.print(recordJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,7 +428,7 @@ public class ProjectCasestepsController {
|
||||||
List<ProjectCasesteps> steps = casestepsservice.getSteps(Integer.valueOf(caseid));
|
List<ProjectCasesteps> steps = casestepsservice.getSteps(Integer.valueOf(caseid));
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(steps);
|
JSONArray recordJson = StrLib.listToJson(steps);
|
||||||
|
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
json.put("steps", recordJson);
|
json.put("steps", recordJson);
|
||||||
|
|
|
@ -16,6 +16,9 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
import luckyweb.seagull.spring.entity.ProjectCase;
|
||||||
import luckyweb.seagull.spring.entity.ProjectModule;
|
import luckyweb.seagull.spring.entity.ProjectModule;
|
||||||
|
@ -30,8 +33,6 @@ import luckyweb.seagull.spring.service.ProjectPlanService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.UserInfoService;
|
import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -213,7 +214,7 @@ public class ProjectPlanCaseController {
|
||||||
|
|
||||||
viewToSaveCase = projectcases;
|
viewToSaveCase = projectcases;
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(projectcases);
|
JSONArray recordJson = StrLib.listToJson(projectcases);
|
||||||
|
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
|
@ -259,8 +260,8 @@ public class ProjectPlanCaseController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("caseids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("caseids"));
|
||||||
List<ProjectCase> caselist=viewToSaveCase;
|
List<ProjectCase> caselist=viewToSaveCase;
|
||||||
// 添加列表中多的用例
|
// 添加列表中多的用例
|
||||||
for (int i = 0; i < jsonarr.size(); i++) {
|
for (int i = 0; i < jsonarr.size(); i++) {
|
||||||
|
@ -379,7 +380,7 @@ public class ProjectPlanCaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(projectcases);
|
JSONArray recordJson = StrLib.listToJson(projectcases);
|
||||||
|
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
json.put("cases", recordJson);
|
json.put("cases", recordJson);
|
||||||
|
@ -411,7 +412,7 @@ public class ProjectPlanCaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(projectcases);
|
JSONArray recordJson = StrLib.listToJson(projectcases);
|
||||||
|
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
json.put("cases", recordJson);
|
json.put("cases", recordJson);
|
||||||
|
|
|
@ -17,21 +17,21 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectPlan;
|
import luckyweb.seagull.spring.entity.ProjectPlan;
|
||||||
import luckyweb.seagull.spring.entity.SectorProjects;
|
import luckyweb.seagull.spring.entity.SectorProjects;
|
||||||
import luckyweb.seagull.spring.entity.UserInfo;
|
import luckyweb.seagull.spring.entity.UserInfo;
|
||||||
import luckyweb.seagull.spring.service.OperationLogService;
|
import luckyweb.seagull.spring.service.OperationLogService;
|
||||||
import luckyweb.seagull.spring.service.ProjectCaseService;
|
|
||||||
import luckyweb.seagull.spring.service.ProjectPlanCaseService;
|
import luckyweb.seagull.spring.service.ProjectPlanCaseService;
|
||||||
import luckyweb.seagull.spring.service.ProjectPlanService;
|
import luckyweb.seagull.spring.service.ProjectPlanService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.UserInfoService;
|
import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -133,7 +133,7 @@ public class ProjectPlanController {
|
||||||
|
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(projectplans);
|
JSONArray recordJson = StrLib.listToJson(projectplans);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = projectplanservice.findRows(projectplan);
|
int total = projectplanservice.findRows(projectplan);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -279,8 +279,8 @@ public class ProjectPlanController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("planids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("planids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除计划失败!";
|
String ms="删除计划失败!";
|
||||||
|
@ -342,7 +342,7 @@ public class ProjectPlanController {
|
||||||
// 取集合
|
// 取集合
|
||||||
rsp.setContentType("text/xml;charset=utf-8");
|
rsp.setContentType("text/xml;charset=utf-8");
|
||||||
|
|
||||||
JSONArray jsonArray = JSONArray.fromObject(listplan);
|
JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(listplan));
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,11 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectPlan;
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectProtocolTemplate;
|
import luckyweb.seagull.spring.entity.ProjectProtocolTemplate;
|
||||||
import luckyweb.seagull.spring.entity.ProjectTemplateParams;
|
import luckyweb.seagull.spring.entity.ProjectTemplateParams;
|
||||||
import luckyweb.seagull.spring.entity.SectorProjects;
|
import luckyweb.seagull.spring.entity.SectorProjects;
|
||||||
|
@ -32,8 +32,6 @@ import luckyweb.seagull.spring.service.ProjectTemplateParamsService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.UserInfoService;
|
import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -137,7 +135,7 @@ public class ProjectProtocolTemplateController {
|
||||||
|
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(ptlist);
|
JSONArray recordJson = StrLib.listToJson(ptlist);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = ptemplateservice.findRows(ppt);
|
int total = ptemplateservice.findRows(ppt);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -301,8 +299,8 @@ public class ProjectProtocolTemplateController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("templateids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("templateids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除协议模板失败!";
|
String ms="删除协议模板失败!";
|
||||||
|
@ -371,7 +369,7 @@ public class ProjectProtocolTemplateController {
|
||||||
String recordJson = jsonarr.toString();
|
String recordJson = jsonarr.toString();
|
||||||
String str = "{\"message\": \"\",\"value\": "+recordJson+",\"code\": 200,\"redirect\": \"\" }";
|
String str = "{\"message\": \"\",\"value\": "+recordJson+",\"code\": 200,\"redirect\": \"\" }";
|
||||||
|
|
||||||
json = JSONObject.fromObject(str);
|
json = JSONObject.parseObject(str);
|
||||||
pw.print(json.toString());
|
pw.print(json.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
|
@ -410,7 +408,7 @@ public class ProjectProtocolTemplateController {
|
||||||
String recordJson = jsonarr.toString();
|
String recordJson = jsonarr.toString();
|
||||||
String str = "{\"message\": \"\",\"value\": "+recordJson+",\"code\": 200,\"redirect\": \"\" }";
|
String str = "{\"message\": \"\",\"value\": "+recordJson+",\"code\": 200,\"redirect\": \"\" }";
|
||||||
|
|
||||||
json = JSONObject.fromObject(str);
|
json = JSONObject.parseObject(str);
|
||||||
pw.print(json.toString());
|
pw.print(json.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
|
@ -428,7 +426,7 @@ public class ProjectProtocolTemplateController {
|
||||||
String templateid = req.getParameter("templateid");
|
String templateid = req.getParameter("templateid");
|
||||||
|
|
||||||
ProjectProtocolTemplate ppt = ptemplateservice.load(Integer.valueOf(templateid));
|
ProjectProtocolTemplate ppt = ptemplateservice.load(Integer.valueOf(templateid));
|
||||||
String jsonStr = JSONObject.fromObject(ppt).toString();
|
String jsonStr = JSONObject.toJSONString(ppt);
|
||||||
pw.print(jsonStr);
|
pw.print(jsonStr);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
|
|
|
@ -15,6 +15,10 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.ProjectProtocolTemplate;
|
import luckyweb.seagull.spring.entity.ProjectProtocolTemplate;
|
||||||
|
@ -26,9 +30,6 @@ import luckyweb.seagull.spring.service.ProjectTemplateParamsService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.UserInfoService;
|
import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
import net.sf.json.JsonConfig;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -112,7 +113,7 @@ public class ProjectTemplateParamsController {
|
||||||
}else{
|
}else{
|
||||||
for(int i=0;i<paramslist.size();i++){
|
for(int i=0;i<paramslist.size();i++){
|
||||||
ProjectTemplateParams ptp = paramslist.get(i);
|
ProjectTemplateParams ptp = paramslist.get(i);
|
||||||
ptp.setParam(ptp.getParam().replaceAll("\"", """));
|
ptp.setParam(ptp.getParam().replace("\"", """));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,26 +161,12 @@ public class ProjectTemplateParamsController {
|
||||||
}
|
}
|
||||||
String jsonstr = sb.toString().substring(1, sb.toString().length() - 1);
|
String jsonstr = sb.toString().substring(1, sb.toString().length() - 1);
|
||||||
jsonstr = jsonstr.replace("\\\"", "\"");
|
jsonstr = jsonstr.replace("\\\"", "\"");
|
||||||
jsonstr = jsonstr.replaceAll(""", "\\\\\"");
|
jsonstr = jsonstr.replace(""", "\"");
|
||||||
jsonstr = jsonstr.replace("undefined", "0");
|
jsonstr = jsonstr.replace("undefined", "0");
|
||||||
|
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonstr);
|
|
||||||
|
|
||||||
//处理json-lib 2.4版本当遇到json格式字符串时,把它当成对象处理的bug
|
|
||||||
for(int i=0;i<jsonarr.size();i++){
|
|
||||||
JSONObject tempobj=(JSONObject) jsonarr.get(i);
|
|
||||||
String str=tempobj.get("param").toString();
|
|
||||||
if(str.length()>0&&str.startsWith("[")&&str.endsWith("]")){
|
|
||||||
tempobj.element("param", str+" ");
|
|
||||||
jsonarr.set(i, tempobj);
|
|
||||||
}
|
|
||||||
if (str.length() > 0 && str.startsWith("{") && str.endsWith("}")) {
|
|
||||||
tempobj.element("param", str + " ");
|
|
||||||
jsonarr.set(i, tempobj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 参数1为要转换的JSONArray数据,参数2为要转换的目标数据,即List盛装的数据
|
// 参数1为要转换的JSONArray数据,参数2为要转换的目标数据,即List盛装的数据
|
||||||
List<?> list = JSONArray.toList(jsonarr, new ProjectTemplateParams(), new JsonConfig());
|
//List<?> list = JSONArray.toList(jsonarr, new ProjectTemplateParams(), new JsonConfig());
|
||||||
|
List<ProjectTemplateParams> list = JSON.parseArray(jsonstr, ProjectTemplateParams.class);
|
||||||
String usercode = "";
|
String usercode = "";
|
||||||
if (null != request.getSession().getAttribute(PublicConst.SESSIONKEYUSERCODE)
|
if (null != request.getSession().getAttribute(PublicConst.SESSIONKEYUSERCODE)
|
||||||
&& null != request.getSession().getAttribute(PublicConst.SESSIONKEYUSERNAME)) {
|
&& null != request.getSession().getAttribute(PublicConst.SESSIONKEYUSERNAME)) {
|
||||||
|
@ -189,7 +176,7 @@ public class ProjectTemplateParamsController {
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
String time = formatter.format(currentTime);
|
String time = formatter.format(currentTime);
|
||||||
|
|
||||||
ProjectTemplateParams oldtempparam = (ProjectTemplateParams) list.get(0);
|
ProjectTemplateParams oldtempparam = list.get(0);
|
||||||
ProjectProtocolTemplate ppt = ptemplateservice.load(oldtempparam.getTemplateid());
|
ProjectProtocolTemplate ppt = ptemplateservice.load(oldtempparam.getTemplateid());
|
||||||
List<ProjectTemplateParams> paramslist =ptemplateparamsService.getParamsList(oldtempparam.getTemplateid());
|
List<ProjectTemplateParams> paramslist =ptemplateparamsService.getParamsList(oldtempparam.getTemplateid());
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
@ -203,8 +190,8 @@ public class ProjectTemplateParamsController {
|
||||||
for (ProjectTemplateParams oldparam:paramslist) {
|
for (ProjectTemplateParams oldparam:paramslist) {
|
||||||
if(param.getId()==oldparam.getId()&&oldparam.getId()!=0){
|
if(param.getId()==oldparam.getId()&&oldparam.getId()!=0){
|
||||||
tag=1;
|
tag=1;
|
||||||
param.setParam(param.getParam().replaceAll(""", "\""));
|
param.setParam(param.getParam().replace(""", "\""));
|
||||||
param.setParamname(param.getParamname().replaceAll(""", "\""));
|
param.setParamname(param.getParamname().replace(""", "\""));
|
||||||
ptemplateparamsService.modify(param);
|
ptemplateparamsService.modify(param);
|
||||||
paramslist.remove(oldparam);
|
paramslist.remove(oldparam);
|
||||||
break;
|
break;
|
||||||
|
@ -212,8 +199,8 @@ public class ProjectTemplateParamsController {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tag==0){
|
if(tag==0){
|
||||||
param.setParam(param.getParam().replaceAll(""", "\""));
|
param.setParam(param.getParam().replace(""", "\""));
|
||||||
param.setParamname(param.getParamname().replaceAll(""", "\""));
|
param.setParamname(param.getParamname().replace(""", "\""));
|
||||||
ptemplateparamsService.add(param);
|
ptemplateparamsService.add(param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -245,8 +232,7 @@ public class ProjectTemplateParamsController {
|
||||||
List<ProjectTemplateParams> params = ptemplateparamsService.getParamsList(Integer.valueOf(templateid));
|
List<ProjectTemplateParams> params = ptemplateparamsService.getParamsList(Integer.valueOf(templateid));
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(params);
|
JSONArray recordJson = StrLib.listToJson(params);
|
||||||
recordJson = recordJson.replaceAll(""", "\\\\\"");
|
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
json.put("params", recordJson);
|
json.put("params", recordJson);
|
||||||
pw.print(json.toString());
|
pw.print(json.toString());
|
||||||
|
|
|
@ -23,6 +23,9 @@ import org.springframework.validation.FieldError;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.Barchart3;
|
import luckyweb.seagull.spring.entity.Barchart3;
|
||||||
|
@ -33,8 +36,6 @@ import luckyweb.seagull.spring.service.OperationLogService;
|
||||||
import luckyweb.seagull.spring.service.ProjectsVersionService;
|
import luckyweb.seagull.spring.service.ProjectsVersionService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -146,7 +147,7 @@ public class ProjectVersionController {
|
||||||
List<ProjectVersion> projectversions = projectsversionservice.findByPage(projectversion, offset, limit);
|
List<ProjectVersion> projectversions = projectsversionservice.findByPage(projectversion, offset, limit);
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(projectversions);
|
JSONArray recordJson = StrLib.listToJson(projectversions);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = projectsversionservice.findRows(projectversion);
|
int total = projectsversionservice.findRows(projectversion);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -1097,9 +1098,9 @@ public class ProjectVersionController {
|
||||||
title = "当前选择日期段内无数据";
|
title = "当前选择日期段内无数据";
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray jsondata=JSONArray.fromObject(data);
|
JSONArray jsondata= (JSONArray)JSONArray.toJSON(data);
|
||||||
JSONArray jsonprojectname=JSONArray.fromObject(projectname);
|
JSONArray jsonprojectname= (JSONArray)JSONArray.toJSON(projectname);
|
||||||
JSONArray jsoncolumnname=JSONArray.fromObject(columnname);
|
JSONArray jsoncolumnname= (JSONArray)JSONArray.toJSON(columnname);
|
||||||
|
|
||||||
req.setAttribute("gdata", jsondata.toString());
|
req.setAttribute("gdata", jsondata.toString());
|
||||||
req.setAttribute("labels", jsonprojectname.toString());
|
req.setAttribute("labels", jsonprojectname.toString());
|
||||||
|
@ -1217,9 +1218,9 @@ public class ProjectVersionController {
|
||||||
title = "当前项目无数据";
|
title = "当前项目无数据";
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray jsondata=JSONArray.fromObject(data);
|
JSONArray jsondata= (JSONArray)JSONArray.toJSON(data);
|
||||||
JSONArray jsonlaunchdate=JSONArray.fromObject(launchdate);
|
JSONArray jsonlaunchdate= (JSONArray)JSONArray.toJSON(launchdate);
|
||||||
JSONArray jsoncolumnname=JSONArray.fromObject(columnname);
|
JSONArray jsoncolumnname= (JSONArray)JSONArray.toJSON(columnname);
|
||||||
|
|
||||||
req.setAttribute("gdata", jsondata.toString());
|
req.setAttribute("gdata", jsondata.toString());
|
||||||
req.setAttribute("launchdate", jsonlaunchdate.toString());
|
req.setAttribute("launchdate", jsonlaunchdate.toString());
|
||||||
|
@ -1336,9 +1337,9 @@ public class ProjectVersionController {
|
||||||
title = "当前项目无数据";
|
title = "当前项目无数据";
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray jsondata=JSONArray.fromObject(data);
|
JSONArray jsondata= (JSONArray)JSONArray.toJSON(data);
|
||||||
JSONArray jsonlaunchdate=JSONArray.fromObject(launchdate);
|
JSONArray jsonlaunchdate= (JSONArray)JSONArray.toJSON(launchdate);
|
||||||
JSONArray jsoncolumnname=JSONArray.fromObject(columnname);
|
JSONArray jsoncolumnname= (JSONArray)JSONArray.toJSON(columnname);
|
||||||
|
|
||||||
req.setAttribute("gdata", jsondata.toString());
|
req.setAttribute("gdata", jsondata.toString());
|
||||||
req.setAttribute("labels", jsonlaunchdate.toString());
|
req.setAttribute("labels", jsonlaunchdate.toString());
|
||||||
|
|
|
@ -15,6 +15,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.spring.entity.PublicCaseParams;
|
import luckyweb.seagull.spring.entity.PublicCaseParams;
|
||||||
import luckyweb.seagull.spring.entity.SectorProjects;
|
import luckyweb.seagull.spring.entity.SectorProjects;
|
||||||
|
@ -24,8 +27,6 @@ import luckyweb.seagull.spring.service.PublicCaseParamsService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.UserInfoService;
|
import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -118,7 +119,7 @@ public class PublicCaseParamsController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(pcps);
|
JSONArray recordJson = StrLib.listToJson(pcps);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = pcpservice.findRows(pcp);
|
int total = pcpservice.findRows(pcp);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -237,8 +238,8 @@ public class PublicCaseParamsController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("ids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("ids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除参数失败!";
|
String ms="删除参数失败!";
|
||||||
|
@ -317,7 +318,7 @@ public class PublicCaseParamsController {
|
||||||
|
|
||||||
List<PublicCaseParams> pcplist = pcpservice.getParamListByProjectid(projectid);
|
List<PublicCaseParams> pcplist = pcpservice.getParamListByProjectid(projectid);
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(pcplist);
|
JSONArray recordJson = StrLib.listToJson(pcplist);
|
||||||
|
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
json.put("params", recordJson);
|
json.put("params", recordJson);
|
||||||
|
|
|
@ -16,6 +16,9 @@ import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.Review;
|
import luckyweb.seagull.spring.entity.Review;
|
||||||
|
@ -25,8 +28,6 @@ import luckyweb.seagull.spring.service.ReviewInfoService;
|
||||||
import luckyweb.seagull.spring.service.ReviewService;
|
import luckyweb.seagull.spring.service.ReviewService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -119,7 +120,7 @@ public class ReviewController {
|
||||||
List<Review> reviewlist = reviewservice.findByPage(review, offset, limit);
|
List<Review> reviewlist = reviewservice.findByPage(review, offset, limit);
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(reviewlist);
|
JSONArray recordJson = StrLib.listToJson(reviewlist);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = reviewservice.findRows(review);
|
int total = reviewservice.findRows(review);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -159,8 +160,8 @@ public class ReviewController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("ids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("ids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除评审记录失败!";
|
String ms="删除评审记录失败!";
|
||||||
|
|
|
@ -16,6 +16,9 @@ import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.Review;
|
import luckyweb.seagull.spring.entity.Review;
|
||||||
|
@ -26,8 +29,6 @@ import luckyweb.seagull.spring.service.ReviewInfoService;
|
||||||
import luckyweb.seagull.spring.service.ReviewService;
|
import luckyweb.seagull.spring.service.ReviewService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -99,7 +100,7 @@ public class ReviewInfoController {
|
||||||
List<ReviewInfo> reviewlist = reviewinfoservice.findByPage(reviewinfo, offset, limit);
|
List<ReviewInfo> reviewlist = reviewinfoservice.findByPage(reviewinfo, offset, limit);
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(reviewlist);
|
JSONArray recordJson = StrLib.listToJson(reviewlist);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = reviewinfoservice.findRows(reviewinfo);
|
int total = reviewinfoservice.findRows(reviewinfo);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -277,8 +278,8 @@ public class ReviewInfoController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("ids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("ids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除评审明细信息失败!";
|
String ms="删除评审明细信息失败!";
|
||||||
|
|
|
@ -13,14 +13,15 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.spring.entity.SecondarySector;
|
import luckyweb.seagull.spring.entity.SecondarySector;
|
||||||
import luckyweb.seagull.spring.service.OperationLogService;
|
import luckyweb.seagull.spring.service.OperationLogService;
|
||||||
import luckyweb.seagull.spring.service.SecondarySectorService;
|
import luckyweb.seagull.spring.service.SecondarySectorService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -78,7 +79,7 @@ public class SecondarySectorController {
|
||||||
List<SecondarySector> sectors = secondarysectorservice.findByPage(ss, offset, limit);
|
List<SecondarySector> sectors = secondarysectorservice.findByPage(ss, offset, limit);
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(sectors);
|
JSONArray recordJson = StrLib.listToJson(sectors);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = secondarysectorservice.findRows(ss);
|
int total = secondarysectorservice.findRows(ss);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -186,8 +187,8 @@ public class SecondarySectorController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("seids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("seids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除失败!";
|
String ms="删除失败!";
|
||||||
|
|
|
@ -5,7 +5,6 @@ import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -14,6 +13,9 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
import luckyweb.seagull.spring.entity.ProjectCase;
|
||||||
|
@ -35,8 +37,6 @@ import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.TestClientService;
|
import luckyweb.seagull.spring.service.TestClientService;
|
||||||
import luckyweb.seagull.spring.service.TestJobsService;
|
import luckyweb.seagull.spring.service.TestJobsService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -137,7 +137,7 @@ public class SectorProjectsController {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(projects);
|
JSONArray recordJson = StrLib.listToJson(projects);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = sectorprojectsservice.findRows(sectorprojects);
|
int total = sectorprojectsservice.findRows(sectorprojects);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -273,8 +273,8 @@ public class SectorProjectsController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("proids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("proids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除项目失败!";
|
String ms="删除项目失败!";
|
||||||
|
|
|
@ -16,6 +16,9 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.spring.entity.TestCasedetail;
|
import luckyweb.seagull.spring.entity.TestCasedetail;
|
||||||
import luckyweb.seagull.spring.entity.TestJobs;
|
import luckyweb.seagull.spring.entity.TestJobs;
|
||||||
|
@ -29,9 +32,6 @@ import luckyweb.seagull.spring.service.TestTastExcuteService;
|
||||||
import luckyweb.seagull.util.DateLib;
|
import luckyweb.seagull.util.DateLib;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
|
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
* 这是一个受限制的自由软件!您不能在任何未经允许的前提下对程序代码进行修改和用于商业用途;也不允许对程序代码修改后以任何形式任何目的的再发布。
|
* 这是一个受限制的自由软件!您不能在任何未经允许的前提下对程序代码进行修改和用于商业用途;也不允许对程序代码修改后以任何形式任何目的的再发布。
|
||||||
|
@ -136,7 +136,7 @@ public class TastExcuteController {
|
||||||
}
|
}
|
||||||
List<TestTaskexcute> tasklist = tastExcuteService.findByPage(task, offset, limit);
|
List<TestTaskexcute> tasklist = tastExcuteService.findByPage(task, offset, limit);
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(tasklist);
|
JSONArray recordJson = StrLib.listToJson(tasklist);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = tastExcuteService.findRows(task);
|
int total = tastExcuteService.findRows(task);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -179,8 +179,8 @@ public class TastExcuteController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("taskids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("taskids"));
|
||||||
|
|
||||||
String status="success";
|
String status="success";
|
||||||
String ms="删除任务成功!";
|
String ms="删除任务成功!";
|
||||||
|
@ -276,7 +276,7 @@ public class TastExcuteController {
|
||||||
}
|
}
|
||||||
|
|
||||||
rsp.setContentType("text/xml;charset=utf-8");
|
rsp.setContentType("text/xml;charset=utf-8");
|
||||||
JSONArray jsonArray = JSONArray.fromObject(per);
|
JSONArray jsonArray = (JSONArray)JSONArray.toJSON(per);
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ public class TastExcuteController {
|
||||||
String taskid = req.getParameter("taskid");
|
String taskid = req.getParameter("taskid");
|
||||||
|
|
||||||
TestTaskexcute task = tastExcuteService.load(Integer.valueOf(taskid));
|
TestTaskexcute task = tastExcuteService.load(Integer.valueOf(taskid));
|
||||||
String jsonStr = JSONObject.fromObject(task).toString();
|
String jsonStr = JSONObject.toJSONString(task);
|
||||||
pw.print(jsonStr);
|
pw.print(jsonStr);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
|
|
|
@ -14,6 +14,10 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.quartz.QuartzManager;
|
import luckyweb.seagull.quartz.QuartzManager;
|
||||||
|
@ -24,8 +28,6 @@ import luckyweb.seagull.spring.service.OperationLogService;
|
||||||
import luckyweb.seagull.spring.service.SectorProjectsService;
|
import luckyweb.seagull.spring.service.SectorProjectsService;
|
||||||
import luckyweb.seagull.spring.service.TestClientService;
|
import luckyweb.seagull.spring.service.TestClientService;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -111,7 +113,7 @@ public class TestClientController {
|
||||||
tct.setProjectpername(sbnames.toString());
|
tct.setProjectpername(sbnames.toString());
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(tcs);
|
JSONArray recordJson = StrLib.listToJson(tcs);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = tcservice.findRows(tc);
|
int total = tcservice.findRows(tc);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -253,8 +255,8 @@ public class TestClientController {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.fromObject(sb.toString());
|
JSONObject jsonObject = JSONObject.parseObject(sb.toString());
|
||||||
JSONArray jsonarr = JSONArray.fromObject(jsonObject.getString("ids"));
|
JSONArray jsonarr = JSONArray.parseArray(jsonObject.getString("ids"));
|
||||||
|
|
||||||
String status="fail";
|
String status="fail";
|
||||||
String ms="删除客户端失败!";
|
String ms="删除客户端失败!";
|
||||||
|
@ -302,7 +304,7 @@ public class TestClientController {
|
||||||
// 取集合
|
// 取集合
|
||||||
rsp.setContentType("text/xml;charset=utf-8");
|
rsp.setContentType("text/xml;charset=utf-8");
|
||||||
|
|
||||||
JSONArray jsonArray = JSONArray.fromObject(listc);
|
JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(listc));
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
@ -337,7 +339,7 @@ public class TestClientController {
|
||||||
// 取集合
|
// 取集合
|
||||||
rsp.setContentType("text/xml;charset=utf-8");
|
rsp.setContentType("text/xml;charset=utf-8");
|
||||||
|
|
||||||
JSONArray jsonArray = JSONArray.fromObject(pathlist);
|
JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(pathlist));
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.quartz.QuartzJob;
|
import luckyweb.seagull.quartz.QuartzJob;
|
||||||
|
@ -50,7 +53,6 @@ import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.util.DateLib;
|
import luckyweb.seagull.util.DateLib;
|
||||||
import luckyweb.seagull.util.DateUtil;
|
import luckyweb.seagull.util.DateUtil;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
import rmi.service.RunService;
|
import rmi.service.RunService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -182,7 +184,7 @@ public class TestJobsController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(jobs);
|
JSONArray recordJson = StrLib.listToJson(jobs);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = testJobsService.findRows(tj);
|
int total = testJobsService.findRows(tj);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -1175,18 +1177,18 @@ public class TestJobsController
|
||||||
{
|
{
|
||||||
QuartzJob qj = new QuartzJob();
|
QuartzJob qj = new QuartzJob();
|
||||||
String message = qj.toRunTask(tj.getPlanproj(), jobid,tj.getTaskName(),tj.getClientip(),tj.getClientpath());
|
String message = qj.toRunTask(tj.getPlanproj(), jobid,tj.getTaskName(),tj.getClientip(),tj.getClientpath());
|
||||||
pw.write(JSONObject.fromObject("{result:\""+message+"\"}").toString());
|
pw.write(JSONObject.parseObject("{result:\""+message+"\"}").toString());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
String message = "当前项目在服务器不存在!";
|
String message = "当前项目在服务器不存在!";
|
||||||
pw.write(JSONObject.fromObject("{result:"+message+"}").toString());
|
pw.write(JSONObject.parseObject("{result:"+message+"}").toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
pw.write(JSONObject.fromObject("{result:"+e.getMessage()+"}").toString());
|
pw.write(JSONObject.parseObject("{result:"+e.getMessage()+"}").toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,10 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.SecondarySector;
|
import luckyweb.seagull.spring.entity.SecondarySector;
|
||||||
|
@ -31,8 +35,6 @@ import luckyweb.seagull.spring.service.UserInfoService;
|
||||||
import luckyweb.seagull.spring.service.UserRoleService;
|
import luckyweb.seagull.spring.service.UserRoleService;
|
||||||
import luckyweb.seagull.util.Endecrypt;
|
import luckyweb.seagull.util.Endecrypt;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -128,7 +130,7 @@ public class UserInfoController {
|
||||||
users.get(i).setPassword("");
|
users.get(i).setPassword("");
|
||||||
}
|
}
|
||||||
// 转换成json字符串
|
// 转换成json字符串
|
||||||
String recordJson = StrLib.listToJson(users);
|
JSONArray recordJson = StrLib.listToJson(users);
|
||||||
// 得到总记录数
|
// 得到总记录数
|
||||||
int total = userinfoservice.findRows(userinfo);
|
int total = userinfoservice.findRows(userinfo);
|
||||||
// 需要返回的数据有总记录数和行数据
|
// 需要返回的数据有总记录数和行数据
|
||||||
|
@ -856,8 +858,8 @@ public class UserInfoController {
|
||||||
|
|
||||||
// 取集合
|
// 取集合
|
||||||
rsp.setContentType("text/xml;charset=utf-8");
|
rsp.setContentType("text/xml;charset=utf-8");
|
||||||
JSONArray jsonArraypermi = JSONArray.fromObject(templistpermi);
|
JSONArray jsonArraypermi = JSONArray.parseArray(JSON.toJSONString(templistpermi));
|
||||||
JSONArray jsonArrayoppro = JSONArray.fromObject(templistoppro);
|
JSONArray jsonArrayoppro = JSONArray.parseArray(JSON.toJSONString(templistoppro));
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("permi", jsonArraypermi);
|
jsobjcet.put("permi", jsonArraypermi);
|
||||||
jsobjcet.put("oppro", jsonArrayoppro);
|
jsobjcet.put("oppro", jsonArrayoppro);
|
||||||
|
|
|
@ -8,12 +8,12 @@ import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.PublicConst;
|
import luckyweb.seagull.comm.PublicConst;
|
||||||
import luckyweb.seagull.spring.entity.UserAuthority;
|
import luckyweb.seagull.spring.entity.UserAuthority;
|
||||||
import luckyweb.seagull.spring.entity.UserInfo;
|
import luckyweb.seagull.spring.entity.UserInfo;
|
||||||
|
@ -89,7 +89,7 @@ public class UserLoginController {
|
||||||
|
|
||||||
rsp.setContentType("application/json");
|
rsp.setContentType("application/json");
|
||||||
rsp.setCharacterEncoding("utf-8");
|
rsp.setCharacterEncoding("utf-8");
|
||||||
JSONArray jsonArray = JSONArray.fromObject(result);
|
JSONArray jsonArray = (JSONArray)JSONArray.toJSON(result);
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ public class UserLoginController {
|
||||||
|
|
||||||
rsp.setContentType("application/json");
|
rsp.setContentType("application/json");
|
||||||
rsp.setCharacterEncoding("utf-8");
|
rsp.setCharacterEncoding("utf-8");
|
||||||
JSONArray jsonArray = JSONArray.fromObject(result);
|
JSONArray jsonArray = (JSONArray)JSONArray.toJSON(result);
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ public class UserLoginController {
|
||||||
|
|
||||||
rsp.setContentType("application/json");
|
rsp.setContentType("application/json");
|
||||||
rsp.setCharacterEncoding("utf-8");
|
rsp.setCharacterEncoding("utf-8");
|
||||||
JSONArray jsonArray = JSONArray.fromObject(status);
|
JSONArray jsonArray = (JSONArray)JSONArray.toJSON(status);
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ public class UserLoginController {
|
||||||
|
|
||||||
rsp.setContentType("application/json");
|
rsp.setContentType("application/json");
|
||||||
rsp.setCharacterEncoding("utf-8");
|
rsp.setCharacterEncoding("utf-8");
|
||||||
JSONArray jsonArray = JSONArray.fromObject(status);
|
JSONArray jsonArray = (JSONArray)JSONArray.toJSON(status);
|
||||||
JSONObject jsobjcet = new JSONObject();
|
JSONObject jsobjcet = new JSONObject();
|
||||||
jsobjcet.put("data", jsonArray);
|
jsobjcet.put("data", jsonArray);
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,12 @@ import java.io.UnsupportedEncodingException;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import net.sf.json.JSONArray;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================================================================
|
* =================================================================
|
||||||
|
@ -201,12 +202,34 @@ public class StrLib {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:通过传入一个列表对象,调用指定方法将列表中的数据生成一个JSON规格指定字符串
|
* 功能描述:通过传入一个列表对象,调用指定方法将列表中的数据生成一个JSON规格指定字符串
|
||||||
* @param list列表对象
|
* @param list列表对象
|
||||||
* @return java.lang.String
|
* @return java.lang.String
|
||||||
*/
|
*/
|
||||||
public static String listToJson(List<?> list) {
|
public static JSONArray listToJson(List<?> list) {
|
||||||
|
StringBuilder jsonarr = new StringBuilder();
|
||||||
|
jsonarr.append("[");
|
||||||
|
//fastjson在转化list>string的过程中,如果List中的对象中还有实体对象,存在bug,所以循环转换
|
||||||
|
for(Object obj:list){
|
||||||
|
String jsonObject = JSON.toJSONString(obj,SerializerFeature.WriteMapNullValue,
|
||||||
|
SerializerFeature.WriteNullListAsEmpty,SerializerFeature.WriteNullStringAsEmpty,SerializerFeature.WriteNullNumberAsZero,
|
||||||
|
SerializerFeature.WriteNullBooleanAsFalse);
|
||||||
|
jsonarr.append(jsonObject).append(",");
|
||||||
|
}
|
||||||
|
jsonarr.append("]");
|
||||||
|
JSONArray recordJson = JSONArray.parseArray(jsonarr.toString());
|
||||||
|
return recordJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功能描述:通过传入一个列表对象,调用指定方法将列表中的数据生成一个JSON规格指定字符串
|
||||||
|
* @param list列表对象
|
||||||
|
* @return java.lang.String
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
public static String listToJsonOld(List<?> list) {
|
||||||
StringBuilder json = new StringBuilder();
|
StringBuilder json = new StringBuilder();
|
||||||
json.append("[");
|
json.append("[");
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
|
@ -224,14 +247,14 @@ public class StrLib {
|
||||||
/**
|
/**
|
||||||
* @param object 任意对象
|
* @param object 任意对象
|
||||||
* @return java.lang.String
|
* @return java.lang.String
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public static String objectToJson(Object object) {
|
public static String objectToJson(Object object) {
|
||||||
StringBuilder json = new StringBuilder();
|
StringBuilder json = new StringBuilder();
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
json.append("\"\"");
|
json.append("\"\"");
|
||||||
} else if (object.getClass().isArray()) {
|
} else if (object.getClass().isArray()) {
|
||||||
JSONArray jsonarray = JSONArray.fromObject(object);
|
json.append("\"").append(JSON.toJSONString(object).replace("\"", """)).append("\"");
|
||||||
json.append("\"").append(jsonarray.toString().replace("\"", """)).append("\"");
|
|
||||||
} else if (object instanceof Timestamp) {
|
} else if (object instanceof Timestamp) {
|
||||||
//定义格式,不显示毫秒
|
//定义格式,不显示毫秒
|
||||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
@ -255,6 +278,7 @@ public class StrLib {
|
||||||
* 功能描述:传入任意一个 javabean 对象生成一个指定规格的字符串
|
* 功能描述:传入任意一个 javabean 对象生成一个指定规格的字符串
|
||||||
* @param bean bean对象
|
* @param bean bean对象
|
||||||
* @return String
|
* @return String
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
private static String beanToJson(Object bean) {
|
private static String beanToJson(Object bean) {
|
||||||
StringBuilder json = new StringBuilder();
|
StringBuilder json = new StringBuilder();
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -235,6 +235,19 @@
|
||||||
field : 'runTime',
|
field : 'runTime',
|
||||||
title : '开始时间',
|
title : '开始时间',
|
||||||
width : '10%',
|
width : '10%',
|
||||||
|
formatter : function(value,
|
||||||
|
row, index) {
|
||||||
|
var now = new Date(value);
|
||||||
|
var year=now.getFullYear();
|
||||||
|
var month=now.getMonth()+1;
|
||||||
|
var date=now.getDate();
|
||||||
|
var hour=now.getHours();
|
||||||
|
var minute=now.getMinutes();
|
||||||
|
var second=now.getSeconds();
|
||||||
|
//var time= year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
|
||||||
|
var time=year+'-'+add0(month)+'-'+add0(date)+' '+add0(hour)+':'+add0(minute)+':'+add0(second);
|
||||||
|
return time;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field : 'startTimestr',
|
field : 'startTimestr',
|
||||||
|
@ -519,6 +532,8 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function add0(m){return m<10?'0'+m:m }
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,405 +1,427 @@
|
||||||
<%@ page contentType="text/html; charset=utf-8" language="java"
|
<%@ page contentType="text/html; charset=utf-8" language="java"
|
||||||
import="java.sql.*" errorPage=""%>
|
import="java.sql.*" errorPage=""%>
|
||||||
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
|
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>任务执行列表</title>
|
<title>任务执行列表</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
<%@ include file="/head.jsp"%>
|
<%@ include file="/head.jsp"%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<header id="head" class="secondary"></header>
|
<header id="head" class="secondary"></header>
|
||||||
|
|
||||||
<!-- container -->
|
<!-- container -->
|
||||||
<div class="container" style="width: auto; font-size: 14px;">
|
<div class="container" style="width: auto; font-size: 14px;">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="/">主页</a></li>
|
<li><a href="/">主页</a></li>
|
||||||
<li class="active">UTP</li>
|
<li class="active">UTP</li>
|
||||||
<li class="active">任务查询</li>
|
<li class="active">任务查询</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Article main content -->
|
<!-- Article main content -->
|
||||||
<article class="col-sm-9 maincontent" style="width:100%;">
|
<article class="col-sm-9 maincontent" style="width:100%;">
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
<h1 class="page-title" style="text-align: center;">任务执行列表</h1>
|
<h1 class="page-title" style="text-align: center;">任务执行列表</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="panel-body" style="padding-bottom: 0px;">
|
<div class="panel-body" style="padding-bottom: 0px;">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">查询条件</div>
|
<div class="panel-heading">查询条件</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="form-group" style="margin-top: 15px">
|
<div class="form-group" style="margin-top: 15px">
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label class="control-label" for="txt_search_job" style="float: left;">调度名称:</label>
|
<label class="control-label" for="txt_search_job" style="float: left;">调度名称:</label>
|
||||||
<div class="select-group col-md-3">
|
<div class="select-group col-md-3">
|
||||||
<select class="form-control" id="search_job"
|
<select class="form-control" id="search_job"
|
||||||
onchange="searchjob()">
|
onchange="searchjob()">
|
||||||
<option value="0">全部调度</option>
|
<option value="0">全部调度</option>
|
||||||
<c:forEach var="job" items="${jobs }">
|
<c:forEach var="job" items="${jobs }">
|
||||||
<option value="${job[0]}">【${job[2]}】—${job[1]}</option>
|
<option value="${job[0]}">【${job[2]}】—${job[1]}</option>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="control-label" for="txt_search_job" style="float: left;">日期段: </label>
|
<label class="control-label" for="txt_search_job" style="float: left;">日期段: </label>
|
||||||
<div class="input-group date form_date col-md-3" id="datepicker" style="float: left;">
|
<div class="input-group date form_date col-md-3" id="datepicker" style="float: left;">
|
||||||
<input type="text" class="form-control" name="start" id="qBeginTime" readonly/>
|
<input type="text" class="form-control" name="start" id="qBeginTime" readonly/>
|
||||||
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span></span>
|
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span></span>
|
||||||
<span class="input-group-addon">至</span>
|
<span class="input-group-addon">至</span>
|
||||||
<input type="text" class="form-control" name="end" id="qEndTime" readonly/>
|
<input type="text" class="form-control" name="end" id="qEndTime" readonly/>
|
||||||
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span></span>
|
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="control-label" for="txt_search_job" style="float: left;"> 任务状态:</label>
|
<label class="control-label" for="txt_search_job" style="float: left;"> 任务状态:</label>
|
||||||
<div class="select-group col-md-2" style="float: left;">
|
<div class="select-group col-md-2" style="float: left;">
|
||||||
<select class="form-control" id="search_status" onchange="searchstatus()">
|
<select class="form-control" id="search_status" onchange="searchstatus()">
|
||||||
<option value="">全部</option>
|
<option value="">全部</option>
|
||||||
<option value="0">未执行</option>
|
<option value="0">未执行</option>
|
||||||
<option value="1">执行中</option>
|
<option value="1">执行中</option>
|
||||||
<option value="2">执行成功</option>
|
<option value="2">执行成功</option>
|
||||||
<option value="3">调起失败|超时</option>
|
<option value="3">调起失败|超时</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="toolbar" class="btn-group">
|
<div id="toolbar" class="btn-group">
|
||||||
<button id="btn_del" type="button" class="btn btn-default">
|
<button id="btn_del" type="button" class="btn btn-default">
|
||||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除任务
|
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除任务
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<table id="tb_testexcute"></table>
|
<table id="tb_testexcute"></table>
|
||||||
|
|
||||||
<div id="delModal" class="modal fade" data-keyboard="false"
|
<div id="delModal" class="modal fade" data-keyboard="false"
|
||||||
data-backdrop="static" data-role="dialog"
|
data-backdrop="static" data-role="dialog"
|
||||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div id="loading" class="loading">删除中,请稍候...</div>
|
<div id="loading" class="loading">删除中,请稍候...</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#search_job').val('${jobid }');
|
$('#search_job').val('${jobid }');
|
||||||
|
|
||||||
$('#qBeginTime').datetimepicker({
|
$('#qBeginTime').datetimepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
language: 'zh-CN',
|
language: 'zh-CN',
|
||||||
todayBtn : "linked",
|
todayBtn : "linked",
|
||||||
autoclose : true,
|
autoclose : true,
|
||||||
todayHighlight : true,
|
todayHighlight : true,
|
||||||
forceParse: 0,
|
forceParse: 0,
|
||||||
weekStart: 1,
|
weekStart: 1,
|
||||||
minView: "month",//设置只显示到月份
|
minView: "month",//设置只显示到月份
|
||||||
startView: 2,
|
startView: 2,
|
||||||
endDate : new Date(),
|
endDate : new Date(),
|
||||||
}).on('changeDate',function(e){
|
}).on('changeDate',function(e){
|
||||||
var startTime = e.date;
|
var startTime = e.date;
|
||||||
$('#qEndTime').datetimepicker('setStartDate',startTime);
|
$('#qEndTime').datetimepicker('setStartDate',startTime);
|
||||||
//1.初始化Table
|
//1.初始化Table
|
||||||
var oTable = new TableInit();
|
var oTable = new TableInit();
|
||||||
$('#tb_testexcute').bootstrapTable('destroy');
|
$('#tb_testexcute').bootstrapTable('destroy');
|
||||||
oTable.Init();
|
oTable.Init();
|
||||||
});
|
});
|
||||||
//结束时间:
|
//结束时间:
|
||||||
$('#qEndTime').datetimepicker({
|
$('#qEndTime').datetimepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
language: 'zh-CN',
|
language: 'zh-CN',
|
||||||
todayBtn : "linked",
|
todayBtn : "linked",
|
||||||
autoclose : true,
|
autoclose : true,
|
||||||
todayHighlight : true,
|
todayHighlight : true,
|
||||||
forceParse: 0,
|
forceParse: 0,
|
||||||
minView: "month",//设置只显示到月份
|
minView: "month",//设置只显示到月份
|
||||||
weekStart: 1,
|
weekStart: 1,
|
||||||
endDate : new Date()
|
endDate : new Date()
|
||||||
}).on('changeDate',function(e){
|
}).on('changeDate',function(e){
|
||||||
var endTime = e.date;
|
var endTime = e.date;
|
||||||
$('#qBeginTime').datetimepicker('setEndDate',endTime);
|
$('#qBeginTime').datetimepicker('setEndDate',endTime);
|
||||||
//1.初始化Table
|
//1.初始化Table
|
||||||
var oTable = new TableInit();
|
var oTable = new TableInit();
|
||||||
$('#tb_testexcute').bootstrapTable('destroy');
|
$('#tb_testexcute').bootstrapTable('destroy');
|
||||||
oTable.Init();
|
oTable.Init();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#qBeginTime').datetimepicker('setDate',new Date(new Date()-7*24*60*60*1000));
|
$('#qBeginTime').datetimepicker('setDate',new Date(new Date()-7*24*60*60*1000));
|
||||||
$('#qEndTime').datetimepicker('setDate',new Date(new Date()-1000));
|
$('#qEndTime').datetimepicker('setDate',new Date(new Date()-1000));
|
||||||
|
|
||||||
//1.初始化Table
|
//1.初始化Table
|
||||||
var oTable = new TableInit();
|
var oTable = new TableInit();
|
||||||
oTable.Init();
|
oTable.Init();
|
||||||
});
|
});
|
||||||
|
|
||||||
var TableInit = function() {
|
var TableInit = function() {
|
||||||
var oTableInit = new Object();
|
var oTableInit = new Object();
|
||||||
//初始化Table
|
//初始化Table
|
||||||
oTableInit.Init = function() {
|
oTableInit.Init = function() {
|
||||||
$('#tb_testexcute')
|
$('#tb_testexcute')
|
||||||
.bootstrapTable(
|
.bootstrapTable(
|
||||||
{
|
{
|
||||||
url : '/tastExecute/list.do', //请求后台的URL(*)
|
url : '/tastExecute/list.do', //请求后台的URL(*)
|
||||||
method : 'get', //请求方式(*)
|
method : 'get', //请求方式(*)
|
||||||
toolbar : '#toolbar', //工具按钮用哪个容器
|
toolbar : '#toolbar', //工具按钮用哪个容器
|
||||||
striped : true, //是否显示行间隔色
|
striped : true, //是否显示行间隔色
|
||||||
cache : false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
cache : false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
||||||
pagination : true, //是否显示分页(*)
|
pagination : true, //是否显示分页(*)
|
||||||
sortable : false, //是否启用排序
|
sortable : false, //是否启用排序
|
||||||
sortOrder : "asc", //排序方式
|
sortOrder : "asc", //排序方式
|
||||||
queryParams : oTableInit.queryParams,//传递参数(*)
|
queryParams : oTableInit.queryParams,//传递参数(*)
|
||||||
sidePagination : "server", //分页方式:client客户端分页,server服务端分页(*)
|
sidePagination : "server", //分页方式:client客户端分页,server服务端分页(*)
|
||||||
pageNumber : 1, //初始化加载第一页,默认第一页
|
pageNumber : 1, //初始化加载第一页,默认第一页
|
||||||
pageSize : 10, //每页的记录行数(*)
|
pageSize : 10, //每页的记录行数(*)
|
||||||
pageList : [ 10, 25, 50, 100 ], //可供选择的每页的行数(*)
|
pageList : [ 10, 25, 50, 100 ], //可供选择的每页的行数(*)
|
||||||
search : true, //是否显示表格搜索,此搜索会进服务端
|
search : true, //是否显示表格搜索,此搜索会进服务端
|
||||||
strictSearch : true,
|
strictSearch : true,
|
||||||
showColumns : false, //是否显示所有的列
|
showColumns : false, //是否显示所有的列
|
||||||
showRefresh : true, //是否显示刷新按钮
|
showRefresh : true, //是否显示刷新按钮
|
||||||
minimumCountColumns : 2, //最少允许的列数
|
minimumCountColumns : 2, //最少允许的列数
|
||||||
clickToSelect : true, //是否启用点击选中行
|
clickToSelect : true, //是否启用点击选中行
|
||||||
height : 500, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度
|
height : 500, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度
|
||||||
uniqueId : "ID", //每一行的唯一标识,一般为主键列
|
uniqueId : "ID", //每一行的唯一标识,一般为主键列
|
||||||
showToggle : false, //是否显示详细视图和列表视图的切换按钮
|
showToggle : false, //是否显示详细视图和列表视图的切换按钮
|
||||||
cardView : false, //是否显示详细视图
|
cardView : false, //是否显示详细视图
|
||||||
detailView : false, //是否显示父子表
|
detailView : false, //是否显示父子表
|
||||||
columns : [
|
columns : [
|
||||||
{
|
{
|
||||||
checkbox : true,
|
checkbox : true,
|
||||||
width : '3%',
|
width : '3%',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field : 'id',
|
field : 'id',
|
||||||
title : 'id',
|
title : 'id',
|
||||||
visible : false
|
visible : false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field : 'taskId',
|
field : 'taskId',
|
||||||
title : '任务名称',
|
title : '任务名称',
|
||||||
width : '25%',
|
width : '25%',
|
||||||
formatter : function(value,
|
formatter : function(value,
|
||||||
row, index) {
|
row, index) {
|
||||||
return '<a href="/caseDetail/load.do?taskId='
|
return '<a href="/caseDetail/load.do?taskId='
|
||||||
+ row.id
|
+ row.id
|
||||||
+ '">'
|
+ '">'
|
||||||
+ value + '</a> ';
|
+ value + '</a> ';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field : 'testJob.planproj',
|
field : 'testJob.planproj',
|
||||||
title : '项目名称',
|
title : '项目名称',
|
||||||
width : '13%',
|
width : '13%',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field : 'createTime',
|
field : 'createTime',
|
||||||
title : '开始时间',
|
title : '开始时间',
|
||||||
width : '10%',
|
width : '10%',
|
||||||
},
|
formatter : function(value,
|
||||||
{
|
row, index) {
|
||||||
field : 'finishtime',
|
var now = new Date(value);
|
||||||
title : '结束时间',
|
var year=now.getFullYear();
|
||||||
width : '10%',
|
var month=now.getMonth()+1;
|
||||||
formatter : function(value,
|
var date=now.getDate();
|
||||||
row, index) {
|
var hour=now.getHours();
|
||||||
return '<font id="finishtime' + row.id + '">'+value+'</font>';
|
var minute=now.getMinutes();
|
||||||
}
|
var second=now.getSeconds();
|
||||||
},
|
var time=year+'-'+add0(month)+'-'+add0(date)+' '+add0(hour)+':'+add0(minute)+':'+add0(second);
|
||||||
{
|
return time;
|
||||||
field : 'taskStatus',
|
}
|
||||||
title : '运行状态',
|
},
|
||||||
width : '15%',
|
{
|
||||||
align : 'center',
|
field : 'finishtime',
|
||||||
formatter : function(value,
|
title : '结束时间',
|
||||||
row, index) {
|
width : '10%',
|
||||||
if(value==1||value==0){
|
formatter : function(value,
|
||||||
var hdiv = '<div class="progress progress-striped active progress-bar-warning" style="margin-bottom:0px">'+
|
row, index) {
|
||||||
'<div id="progress'+row.id+'" class="progress-bar progress-bar-success" aria-valuemax="100"'+
|
var now = new Date(value);
|
||||||
'aria-valuemin="0" aria-valuenow="0" style="width:0%;text-align:center">0%</div></div>';
|
var year=now.getFullYear();
|
||||||
refreshProgress(row.id);
|
var month=now.getMonth()+1;
|
||||||
return hdiv;
|
var date=now.getDate();
|
||||||
}else{
|
var hour=now.getHours();
|
||||||
return row.taskStatus_str;
|
var minute=now.getMinutes();
|
||||||
}
|
var second=now.getSeconds();
|
||||||
|
var time=year+'-'+add0(month)+'-'+add0(date)+' '+add0(hour)+':'+add0(minute)+':'+add0(second);
|
||||||
}
|
return '<font id="finishtime' + row.id + '">'+time+'</font>';
|
||||||
},
|
}
|
||||||
{
|
},
|
||||||
field : 'casetotalCount',
|
{
|
||||||
title : '总用例数',
|
field : 'taskStatus',
|
||||||
width : '5%',
|
title : '运行状态',
|
||||||
formatter : function(value,
|
width : '15%',
|
||||||
row, index) {
|
align : 'center',
|
||||||
return '<a href="/caseDetail/load.do?taskId='
|
formatter : function(value,
|
||||||
+ row.id
|
row, index) {
|
||||||
+ '" id="casetotal'+row.id+'">'
|
if(value==1||value==0){
|
||||||
+ value + '</a> ';
|
var hdiv = '<div class="progress progress-striped active progress-bar-warning" style="margin-bottom:0px">'+
|
||||||
}
|
'<div id="progress'+row.id+'" class="progress-bar progress-bar-success" aria-valuemax="100"'+
|
||||||
},
|
'aria-valuemin="0" aria-valuenow="0" style="width:0%;text-align:center">0%</div></div>';
|
||||||
{
|
refreshProgress(row.id);
|
||||||
field : 'casesuccCount',
|
return hdiv;
|
||||||
title : '成功',
|
}else{
|
||||||
width : '5%',
|
return row.taskStatus_str;
|
||||||
formatter : function(value,
|
}
|
||||||
row, index) {
|
|
||||||
return '<a href="/caseDetail/load.do?taskId='+ row.id+ '&status=0" id="casesucc'+row.id+'" style="color:#00bf5f">' + value + '</a> ';
|
}
|
||||||
}
|
},
|
||||||
},
|
{
|
||||||
{
|
field : 'casetotalCount',
|
||||||
field : 'casefailCount',
|
title : '总用例数',
|
||||||
title : '失败',
|
width : '5%',
|
||||||
width : '5%',
|
formatter : function(value,
|
||||||
formatter : function(value,
|
row, index) {
|
||||||
row, index) {
|
return '<a href="/caseDetail/load.do?taskId='
|
||||||
return '<a href="/caseDetail/load.do?taskId='+ row.id+ '&status=1" id="casefail'+row.id+'" style="color:#ff0000">' + value + '</a> ';
|
+ row.id
|
||||||
}
|
+ '" id="casetotal'+row.id+'">'
|
||||||
},
|
+ value + '</a> ';
|
||||||
{
|
}
|
||||||
field : 'caselockCount',
|
},
|
||||||
title : '锁定',
|
{
|
||||||
width : '5%',
|
field : 'casesuccCount',
|
||||||
formatter : function(value,
|
title : '成功',
|
||||||
row, index) {
|
width : '5%',
|
||||||
return '<a href="/caseDetail/load.do?taskId='+ row.id+ '&status=2" id="caselock'+row.id+'" style="color:#FF7F00">' + value + '</a> ';
|
formatter : function(value,
|
||||||
}
|
row, index) {
|
||||||
},
|
return '<a href="/caseDetail/load.do?taskId='+ row.id+ '&status=0" id="casesucc'+row.id+'" style="color:#00bf5f">' + value + '</a> ';
|
||||||
{
|
}
|
||||||
field : 'casenoexecCount',
|
},
|
||||||
title : '未执行',
|
{
|
||||||
width : '5%',
|
field : 'casefailCount',
|
||||||
formatter : function(value,
|
title : '失败',
|
||||||
row, index) {
|
width : '5%',
|
||||||
return '<a href="/caseDetail/load.do?taskId='+ row.id+ '&status=4" id="casenoexec'+row.id+'">' + value + '</a> ';
|
formatter : function(value,
|
||||||
}
|
row, index) {
|
||||||
} ],
|
return '<a href="/caseDetail/load.do?taskId='+ row.id+ '&status=1" id="casefail'+row.id+'" style="color:#ff0000">' + value + '</a> ';
|
||||||
});
|
}
|
||||||
};
|
},
|
||||||
//得到查询的参数
|
{
|
||||||
oTableInit.queryParams = function(params) {
|
field : 'caselockCount',
|
||||||
var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的
|
title : '锁定',
|
||||||
limit : params.limit, //页面大小
|
width : '5%',
|
||||||
offset : params.offset, //页码偏移量
|
formatter : function(value,
|
||||||
search : params.search, //搜索参数
|
row, index) {
|
||||||
jobid : $('#search_job').val(), //项目ID
|
return '<a href="/caseDetail/load.do?taskId='+ row.id+ '&status=2" id="caselock'+row.id+'" style="color:#FF7F00">' + value + '</a> ';
|
||||||
startDate: $('#qBeginTime').val(), //查询日期段
|
}
|
||||||
endDate: $('#qEndTime').val(), //查询日期段
|
},
|
||||||
status: $('#search_status').val(), //查询状态
|
{
|
||||||
};
|
field : 'casenoexecCount',
|
||||||
return temp;
|
title : '未执行',
|
||||||
};
|
width : '5%',
|
||||||
|
formatter : function(value,
|
||||||
return oTableInit;
|
row, index) {
|
||||||
};
|
return '<a href="/caseDetail/load.do?taskId='+ row.id+ '&status=4" id="casenoexec'+row.id+'">' + value + '</a> ';
|
||||||
|
}
|
||||||
var searchjob = function() {
|
} ],
|
||||||
//1.初始化Table
|
});
|
||||||
var oTable = new TableInit();
|
};
|
||||||
$('#tb_testexcute').bootstrapTable('destroy');
|
//得到查询的参数
|
||||||
oTable.Init();
|
oTableInit.queryParams = function(params) {
|
||||||
};
|
var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的
|
||||||
|
limit : params.limit, //页面大小
|
||||||
var searchstatus = function() {
|
offset : params.offset, //页码偏移量
|
||||||
//1.初始化Table
|
search : params.search, //搜索参数
|
||||||
var oTable = new TableInit();
|
jobid : $('#search_job').val(), //项目ID
|
||||||
$('#tb_testexcute').bootstrapTable('destroy');
|
startDate: $('#qBeginTime').val(), //查询日期段
|
||||||
oTable.Init();
|
endDate: $('#qEndTime').val(), //查询日期段
|
||||||
};
|
status: $('#search_status').val(), //查询状态
|
||||||
|
};
|
||||||
function refreshProgress(id){
|
return temp;
|
||||||
var url ="/tastExecute/progressdata.do?id="+id;
|
};
|
||||||
$.ajax({
|
|
||||||
type:"GET",
|
return oTableInit;
|
||||||
url:url,
|
};
|
||||||
cache:false,
|
|
||||||
dataType:"json",
|
var searchjob = function() {
|
||||||
success:function (result){
|
//1.初始化Table
|
||||||
if(result.data[1]!=null&&result.data[1]<=100&&result.data[1]>0){
|
var oTable = new TableInit();
|
||||||
document.getElementById("casetotal"+id).innerText = result.data[7];
|
$('#tb_testexcute').bootstrapTable('destroy');
|
||||||
$('#progress'+id).css('width', result.data[1]+'%');
|
oTable.Init();
|
||||||
document.getElementById("progress"+id).innerText = result.data[1]+'%';
|
};
|
||||||
$('#progress'+id).attr("aria-valuenow",result.data[1]);
|
|
||||||
}
|
var searchstatus = function() {
|
||||||
if(result.data[1]==100){
|
//1.初始化Table
|
||||||
document.getElementById("finishtime"+id).innerText = result.data[2];
|
var oTable = new TableInit();
|
||||||
document.getElementById("casesucc"+id).innerText = result.data[3];
|
$('#tb_testexcute').bootstrapTable('destroy');
|
||||||
document.getElementById("casefail"+id).innerText = result.data[4];
|
oTable.Init();
|
||||||
document.getElementById("caselock"+id).innerText = result.data[5];
|
};
|
||||||
document.getElementById("casenoexec"+id).innerText = result.data[6];
|
|
||||||
|
function refreshProgress(id){
|
||||||
if(result.data[2]!=null){
|
var url ="/tastExecute/progressdata.do?id="+id;
|
||||||
clearTimeout(t);
|
$.ajax({
|
||||||
}
|
type:"GET",
|
||||||
}
|
url:url,
|
||||||
}
|
cache:false,
|
||||||
});
|
dataType:"json",
|
||||||
var t=setTimeout("refreshProgress("+id+")", 3000);
|
success:function (result){
|
||||||
}
|
if(result.data[1]!=null&&result.data[1]<=100&&result.data[1]>0){
|
||||||
|
document.getElementById("casetotal"+id).innerText = result.data[7];
|
||||||
btn_del.onclick=function(){
|
$('#progress'+id).css('width', result.data[1]+'%');
|
||||||
var status = document.getElementById("loginstatus").value;
|
document.getElementById("progress"+id).innerText = result.data[1]+'%';
|
||||||
if(status=="false"){
|
$('#progress'+id).attr("aria-valuenow",result.data[1]);
|
||||||
if(window.confirm("你未登录哦,要先去登录吗?")){
|
}
|
||||||
var url = '/progressus/signin.jsp';
|
if(result.data[1]==100){
|
||||||
window.location.href=url;
|
document.getElementById("finishtime"+id).innerText = result.data[2];
|
||||||
return true;
|
document.getElementById("casesucc"+id).innerText = result.data[3];
|
||||||
}else{
|
document.getElementById("casefail"+id).innerText = result.data[4];
|
||||||
return false;
|
document.getElementById("caselock"+id).innerText = result.data[5];
|
||||||
}
|
document.getElementById("casenoexec"+id).innerText = result.data[6];
|
||||||
}
|
|
||||||
|
if(result.data[2]!=null){
|
||||||
var selectIndex = $('input[name="btSelectItem"]:checked ').val();
|
clearTimeout(t);
|
||||||
deleteItem($('#tb_testexcute'), selectIndex, true);
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function deleteItem($table, selectIndex, reLoad){
|
});
|
||||||
var ids = $.map($table.bootstrapTable('getSelections'), function (row) {
|
var t=setTimeout("refreshProgress("+id+")", 3000);
|
||||||
return row.id;
|
}
|
||||||
});
|
|
||||||
if(ids.length != 0 ){
|
btn_del.onclick=function(){
|
||||||
if(confirm("真的要删除选择的任务吗?")){
|
var status = document.getElementById("loginstatus").value;
|
||||||
$('#delModal').modal('show');
|
if(status=="false"){
|
||||||
$.ajax({
|
if(window.confirm("你未登录哦,要先去登录吗?")){
|
||||||
type: "POST",
|
var url = '/progressus/signin.jsp';
|
||||||
cache:false,
|
window.location.href=url;
|
||||||
async : true,
|
return true;
|
||||||
dataType : "json",
|
}else{
|
||||||
url: "delete.do",
|
return false;
|
||||||
contentType: "application/json", //必须有
|
}
|
||||||
data: JSON.stringify({"taskids":ids}),
|
}
|
||||||
success: function(data, status){
|
|
||||||
if (data.status == "success"){
|
var selectIndex = $('input[name="btSelectItem"]:checked ').val();
|
||||||
toastr.success(data.ms);
|
deleteItem($('#tb_testexcute'), selectIndex, true);
|
||||||
$('#delModal').modal('hide');
|
}
|
||||||
$table.bootstrapTable('hideRow', {index:selectIndex});
|
|
||||||
if(reLoad){
|
function deleteItem($table, selectIndex, reLoad){
|
||||||
$table.bootstrapTable('refresh');
|
var ids = $.map($table.bootstrapTable('getSelections'), function (row) {
|
||||||
}
|
return row.id;
|
||||||
}else{
|
});
|
||||||
$('#delModal').modal('hide');
|
if(ids.length != 0 ){
|
||||||
toastr.info(data.ms);
|
if(confirm("真的要删除选择的任务吗?")){
|
||||||
}
|
$('#delModal').modal('show');
|
||||||
},error:function()
|
$.ajax({
|
||||||
{
|
type: "POST",
|
||||||
$('#myModal').modal('hide');
|
cache:false,
|
||||||
toastr.error('删除出错!');
|
async : true,
|
||||||
}
|
dataType : "json",
|
||||||
});
|
url: "delete.do",
|
||||||
}
|
contentType: "application/json", //必须有
|
||||||
}else{
|
data: JSON.stringify({"taskids":ids}),
|
||||||
toastr.warning('请选取要删除的任务!');
|
success: function(data, status){
|
||||||
}
|
if (data.status == "success"){
|
||||||
}
|
toastr.success(data.ms);
|
||||||
</script>
|
$('#delModal').modal('hide');
|
||||||
</body>
|
$table.bootstrapTable('hideRow', {index:selectIndex});
|
||||||
|
if(reLoad){
|
||||||
|
$table.bootstrapTable('refresh');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$('#delModal').modal('hide');
|
||||||
|
toastr.info(data.ms);
|
||||||
|
}
|
||||||
|
},error:function()
|
||||||
|
{
|
||||||
|
$('#myModal').modal('hide');
|
||||||
|
toastr.error('删除出错!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
toastr.warning('请选取要删除的任务!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function add0(m){return m<10?'0'+m:m }
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue