update .gitignore
This commit is contained in:
parent
1d87caf126
commit
e8df269c7c
66
.classpath
66
.classpath
|
@ -1,33 +1,33 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
|
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="owner.project.facets" value="jst.web"/>
|
<attribute name="owner.project.facets" value="jst.web"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
/target/
|
/target/
|
||||||
|
/src/main/resources/hibernate.cfg.xml
|
||||||
|
|
70
.project
70
.project
|
@ -1,35 +1,35 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>LuckyFrameWeb</name>
|
<name>LuckyFrameWeb</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry excluding="**/*.min.js|**/node_modules/*|**/bower_components/*" kind="src" path="src/main/webapp"/>
|
<classpathentry excluding="**/*.min.js|**/node_modules/*|**/bower_components/*" kind="src" path="src/main/webapp"/>
|
||||||
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
|
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="hide" value="true"/>
|
<attribute name="hide" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||||
<classpathentry kind="output" path=""/>
|
<classpathentry kind="output" path=""/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//src/main/java=UTF-8
|
encoding//src/main/java=UTF-8
|
||||||
encoding//src/main/resources=UTF-8
|
encoding//src/main/resources=UTF-8
|
||||||
encoding//src/main/webapp/down.jsp=UTF-8
|
encoding//src/main/webapp/down.jsp=UTF-8
|
||||||
encoding//src/main/webapp/footer.jsp=UTF-8
|
encoding//src/main/webapp/footer.jsp=UTF-8
|
||||||
encoding//src/main/webapp/head.jsp=UTF-8
|
encoding//src/main/webapp/head.jsp=UTF-8
|
||||||
encoding//src/main/webapp/index.jsp=UTF-8
|
encoding//src/main/webapp/index.jsp=UTF-8
|
||||||
encoding//src/test/java=UTF-8
|
encoding//src/test/java=UTF-8
|
||||||
encoding/<project>=UTF-8
|
encoding/<project>=UTF-8
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.7
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
activeProfiles=
|
activeProfiles=
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
resolveWorkspaceProjects=true
|
resolveWorkspaceProjects=true
|
||||||
version=1
|
version=1
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
|
org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
<wb-module deploy-name="LuckyFrameServer">
|
<wb-module deploy-name="LuckyFrameServer">
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
<property name="java-output-path" value="/LuckyFrameServer/target/classes"/>
|
<property name="java-output-path" value="/LuckyFrameServer/target/classes"/>
|
||||||
<property name="context-root" value="LuckyFrameServer"/>
|
<property name="context-root" value="LuckyFrameServer"/>
|
||||||
</wb-module>
|
</wb-module>
|
||||||
</project-modules>
|
</project-modules>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<faceted-project>
|
<faceted-project>
|
||||||
<runtime name="Apache Tomcat v7.0"/>
|
<runtime name="Apache Tomcat v7.0"/>
|
||||||
<fixed facet="wst.jsdt.web"/>
|
<fixed facet="wst.jsdt.web"/>
|
||||||
<installed facet="jst.web" version="3.0"/>
|
<installed facet="jst.web" version="3.0"/>
|
||||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||||
<installed facet="java" version="1.7"/>
|
<installed facet="java" version="1.7"/>
|
||||||
</faceted-project>
|
</faceted-project>
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
disabled=06target
|
disabled=06target
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
|
|
146
README.md
146
README.md
|
@ -1,74 +1,74 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="http://www.luckyframe.cn">
|
<a href="http://www.luckyframe.cn">
|
||||||
<img alt="luckyframe_Logo" src="http://git.oschina.net/seagull1985/LuckyFrameWeb/raw/master/src/main/webapp/pic/haiou-11.png">
|
<img alt="luckyframe_Logo" src="http://git.oschina.net/seagull1985/LuckyFrameWeb/raw/master/src/main/webapp/pic/haiou-11.png">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
让你的自动化体系建设更简单
|
让你的自动化体系建设更简单
|
||||||
<a href="http://www.luckyframe.cn">
|
<a href="http://www.luckyframe.cn">
|
||||||
LuckyFrame官网
|
LuckyFrame官网
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<img alt="maven" src="https://img.shields.io/maven-central/v/org.apache.maven/apache-maven.svg">
|
<img alt="maven" src="https://img.shields.io/maven-central/v/org.apache.maven/apache-maven.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<img alt="code style" src="https://img.shields.io/badge/%20LICENSE-GPL--2.0-blue.svg">
|
<img alt="code style" src="https://img.shields.io/badge/%20LICENSE-GPL--2.0-blue.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<img alt="code style" src="https://img.shields.io/badge/BUILD-PASSING-green.svg">
|
<img alt="code style" src="https://img.shields.io/badge/BUILD-PASSING-green.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="http://git.oschina.net/seagull1985/LuckyFrameWeb/releases">
|
<a href="http://git.oschina.net/seagull1985/LuckyFrameWeb/releases">
|
||||||
<img src="https://img.shields.io/badge/LuckyFrame-V2.3-green.svg" >
|
<img src="https://img.shields.io/badge/LuckyFrame-V2.3-green.svg" >
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
# 捐赠 | 感谢
|
# 捐赠 | 感谢
|
||||||
> [【捐赠支持(微信)】](https://git.oschina.net/uploads/images/2017/0913/175706_f58b543b_1215415.jpeg) [【捐赠支持(支付宝)】](https://git.oschina.net/uploads/images/2017/0913/175750_e96add72_1215415.jpeg)
|
> [【捐赠支持(微信)】](https://git.oschina.net/uploads/images/2017/0913/175706_f58b543b_1215415.jpeg) [【捐赠支持(支付宝)】](https://git.oschina.net/uploads/images/2017/0913/175750_e96add72_1215415.jpeg)
|
||||||
|
|
||||||
> 感谢你们的认可与支持 [【捐赠记录】](https://git.oschina.net/seagull1985/LuckyFrameWeb/wikis/pages?title=捐赠列表&parent=捐赠)
|
> 感谢你们的认可与支持 [【捐赠记录】](https://git.oschina.net/seagull1985/LuckyFrameWeb/wikis/pages?title=捐赠列表&parent=捐赠)
|
||||||
|
|
||||||
|
|
||||||
# 介绍
|
# 介绍
|
||||||
|
|
||||||
LuckyFrame 开源自动化测试平台 - 自动化测试 X 时代来了
|
LuckyFrame 开源自动化测试平台 - 自动化测试 X 时代来了
|
||||||
> LuckyFrame QQ官方交流群 487954492
|
> LuckyFrame QQ官方交流群 487954492
|
||||||
<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=32919cc1ee8595efa4c561920f3fdb606606ca8fdb6ff6b2430c5d97587551de"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="LuckyFrame自动化测试" title="LuckyFrame自动化测试"></a>
|
<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=32919cc1ee8595efa4c561920f3fdb606606ca8fdb6ff6b2430c5d97587551de"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="LuckyFrame自动化测试" title="LuckyFrame自动化测试"></a>
|
||||||
# 我能做什么?
|
# 我能做什么?
|
||||||
|
|
||||||
- **分布式测试**:使用Web-Client的方式,Web端负责基本信息管理展示,Client负责用例执行,任意无限扩展客户端。
|
- **分布式测试**:使用Web-Client的方式,Web端负责基本信息管理展示,Client负责用例执行,任意无限扩展客户端。
|
||||||
- **多途径用例管理**:您即可以使用Web端自带的用例管理模块,也可以使用testlink来管理自动化用例。
|
- **多途径用例管理**:您即可以使用Web端自带的用例管理模块,也可以使用testlink来管理自动化用例。
|
||||||
- **质量管理**:Web端不仅仅有用来管理自动化相关的模块,更可以做一些简单的质量数据收集分析以及数据的多图表展示。
|
- **质量管理**:Web端不仅仅有用来管理自动化相关的模块,更可以做一些简单的质量数据收集分析以及数据的多图表展示。
|
||||||
- **多线程执行用例**:客户端执行用例可以指定线程数量,用例运行更快速。
|
- **多线程执行用例**:客户端执行用例可以指定线程数量,用例运行更快速。
|
||||||
- **在线编辑用例**:专属自动化用例设计结构,使用bootstrap table x_edit插件,更快捷、方便的编辑、调试自动化用例。
|
- **在线编辑用例**:专属自动化用例设计结构,使用bootstrap table x_edit插件,更快捷、方便的编辑、调试自动化用例。
|
||||||
- **定时任务调度**:支持自定义配置调度任务,包括指定线程数,指定执行客户端,远程执行shell重启tomcat,对jenkins中的项目进行构建等。
|
- **定时任务调度**:支持自定义配置调度任务,包括指定线程数,指定执行客户端,远程执行shell重启tomcat,对jenkins中的项目进行构建等。
|
||||||
- **测试过程监控**:客户端运行用例采用命令行的方式,在客户端可以实时查看过程。Web端可以通过任务查询查看测试进度。
|
- **测试过程监控**:客户端运行用例采用命令行的方式,在客户端可以实时查看过程。Web端可以通过任务查询查看测试进度。
|
||||||
- **日志定位**:客户端LOG4J+数据库记录测试过程日志,2种方式都可以通过Web端实时查看定位问题。
|
- **日志定位**:客户端LOG4J+数据库记录测试过程日志,2种方式都可以通过Web端实时查看定位问题。
|
||||||
- **接口+Web UI双纬度自动化**:支持接口+Web UI自动化,客户端OS必须为Windows系统,UI自动化采用WebDriver3.0封装,纯关键字驱动,0编码。
|
- **接口+Web UI双纬度自动化**:支持接口+Web UI自动化,客户端OS必须为Windows系统,UI自动化采用WebDriver3.0封装,纯关键字驱动,0编码。
|
||||||
- **HTTP+Socket接口免编码**:完全封装HTTP以及Socket接口,协议模板+纯关键字驱动,免编码,初级测试人员的福音,与其他类似开源工具相比优势明显
|
- **HTTP+Socket接口免编码**:完全封装HTTP以及Socket接口,协议模板+纯关键字驱动,免编码,初级测试人员的福音,与其他类似开源工具相比优势明显
|
||||||
- **在线调试用例**:直接通过页面的步骤编辑界面调试用例,省心、省力、省脑子,但是不能不要脑子。
|
- **在线调试用例**:直接通过页面的步骤编辑界面调试用例,省心、省力、省脑子,但是不能不要脑子。
|
||||||
- **Bootstrap 小清新风格界面**:整套Web系统基于Bootstrap风格,以及多种其下的插件,构建清爽界面。
|
- **Bootstrap 小清新风格界面**:整套Web系统基于Bootstrap风格,以及多种其下的插件,构建清爽界面。
|
||||||
- **更多...**:还有更多自动化的创意,期待你的体验发现... <a href="https://git.oschina.net/seagull1985/LuckyFrameWeb/wikis/pages?title=项目介绍&parent=项目信息">更多详细介绍</a>
|
- **更多...**:还有更多自动化的创意,期待你的体验发现... <a href="https://git.oschina.net/seagull1985/LuckyFrameWeb/wikis/pages?title=项目介绍&parent=项目信息">更多详细介绍</a>
|
||||||
|
|
||||||
# 瞅一眼吧
|
# 瞅一眼吧
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
# 更新日志
|
# 更新日志
|
||||||
> [【查看版本Releases日志】](https://git.oschina.net/seagull1985/LuckyFrameWeb/wikis/pages?title=更新日志&parent=项目信息)
|
> [【查看版本Releases日志】](https://git.oschina.net/seagull1985/LuckyFrameWeb/wikis/pages?title=更新日志&parent=项目信息)
|
||||||
|
|
||||||
# 大家安静下,我再说一句
|
# 大家安静下,我再说一句
|
||||||
此项目是LuckyFrame的Web端项目,此外还有一个LuckyFrame的项目做为客户端,如果您只需要先看看界面,那么单独下载这个项目就够了,如果您需要搭建整套环境,那还要把LuckyFrame项目下载下来。
|
此项目是LuckyFrame的Web端项目,此外还有一个LuckyFrame的项目做为客户端,如果您只需要先看看界面,那么单独下载这个项目就够了,如果您需要搭建整套环境,那还要把LuckyFrame项目下载下来。
|
||||||
|
|
||||||
# 期待您更多的意见
|
# 期待您更多的意见
|
||||||
|
|
||||||
> 如果你有任何的想法或是建议那就给我留个言吧
|
> 如果你有任何的想法或是建议那就给我留个言吧
|
|
@ -1,451 +1,451 @@
|
||||||
create table OPERATION_LOG
|
create table OPERATION_LOG
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
tablename VARCHAR(30) not null COMMENT '被记录日志表名',
|
tablename VARCHAR(30) not null COMMENT '被记录日志表名',
|
||||||
tableid int(8) not null COMMENT '被记录日志ID',
|
tableid int(8) not null COMMENT '被记录日志ID',
|
||||||
operation_time VARCHAR(30) not null COMMENT '操作时间',
|
operation_time VARCHAR(30) not null COMMENT '操作时间',
|
||||||
operationer VARCHAR(20) not null COMMENT '操作人员',
|
operationer VARCHAR(20) not null COMMENT '操作人员',
|
||||||
operation_description VARCHAR(200) not null COMMENT '描述',
|
operation_description VARCHAR(200) not null COMMENT '描述',
|
||||||
projectid int(8) COMMENT '项目ID',
|
projectid int(8) COMMENT '项目ID',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_ACCIDENT
|
create table QA_ACCIDENT
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
accstatus VARCHAR(80) not null COMMENT '事故状态',
|
accstatus VARCHAR(80) not null COMMENT '事故状态',
|
||||||
eventtime VARCHAR(30) COMMENT '事故发生时间',
|
eventtime VARCHAR(30) COMMENT '事故发生时间',
|
||||||
reporter VARCHAR(20) not null COMMENT '报告人',
|
reporter VARCHAR(20) not null COMMENT '报告人',
|
||||||
reporttime VARCHAR(30) not null COMMENT '事故报告时间',
|
reporttime VARCHAR(30) not null COMMENT '事故报告时间',
|
||||||
accdescription VARCHAR(500) not null COMMENT '事故描述',
|
accdescription VARCHAR(500) not null COMMENT '事故描述',
|
||||||
acclevel VARCHAR(60) not null COMMENT '事故等级',
|
acclevel VARCHAR(60) not null COMMENT '事故等级',
|
||||||
causalanalysis VARCHAR(500) COMMENT '原因分析',
|
causalanalysis VARCHAR(500) COMMENT '原因分析',
|
||||||
causaltype VARCHAR(100) COMMENT '原因类型',
|
causaltype VARCHAR(100) COMMENT '原因类型',
|
||||||
consequenceanalysis VARCHAR(300) COMMENT '后果分析',
|
consequenceanalysis VARCHAR(300) COMMENT '后果分析',
|
||||||
correctiveaction VARCHAR(300) COMMENT '纠正措施',
|
correctiveaction VARCHAR(300) COMMENT '纠正措施',
|
||||||
resolutiontime VARCHAR(30) COMMENT '解决时间',
|
resolutiontime VARCHAR(30) COMMENT '解决时间',
|
||||||
resolutioner VARCHAR(20) COMMENT '解决处理人',
|
resolutioner VARCHAR(20) COMMENT '解决处理人',
|
||||||
preventiveaction VARCHAR(300) COMMENT '预防措施',
|
preventiveaction VARCHAR(300) COMMENT '预防措施',
|
||||||
preventiver VARCHAR(20) COMMENT '预防措施责任人',
|
preventiver VARCHAR(20) COMMENT '预防措施责任人',
|
||||||
preventiveplandate VARCHAR(30) COMMENT '预防措施计划完成时间',
|
preventiveplandate VARCHAR(30) COMMENT '预防措施计划完成时间',
|
||||||
preventiveaccdate VARCHAR(30) COMMENT '预防措施实际完成时间',
|
preventiveaccdate VARCHAR(30) COMMENT '预防措施实际完成时间',
|
||||||
trouble_duration int(8) COMMENT '事故持续时间',
|
trouble_duration int(8) COMMENT '事故持续时间',
|
||||||
impact_time int(8),
|
impact_time int(8),
|
||||||
filename VARCHAR(100) COMMENT '附件路径',
|
filename VARCHAR(100) COMMENT '附件路径',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_FLOWCHECK
|
create table QA_FLOWCHECK
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
checkid int(10) not null COMMENT '检查id',
|
checkid int(10) not null COMMENT '检查id',
|
||||||
projectid int(10) not null COMMENT '项目id',
|
projectid int(10) not null COMMENT '项目id',
|
||||||
projectphase VARCHAR(20) not null COMMENT '项目阶段',
|
projectphase VARCHAR(20) not null COMMENT '项目阶段',
|
||||||
phasenode VARCHAR(50) not null COMMENT '阶段节点',
|
phasenode VARCHAR(50) not null COMMENT '阶段节点',
|
||||||
checkentry VARCHAR(100) not null COMMENT '检查内容',
|
checkentry VARCHAR(100) not null COMMENT '检查内容',
|
||||||
checkresult VARCHAR(20) COMMENT '检查结果',
|
checkresult VARCHAR(20) COMMENT '检查结果',
|
||||||
checkdate VARCHAR(20) COMMENT '检查日期',
|
checkdate VARCHAR(20) COMMENT '检查日期',
|
||||||
checkdescriptions VARCHAR(400) COMMENT '不符合项描述',
|
checkdescriptions VARCHAR(400) COMMENT '不符合项描述',
|
||||||
stateupdate VARCHAR(20) COMMENT '状态更新',
|
stateupdate VARCHAR(20) COMMENT '状态更新',
|
||||||
updatedate VARCHAR(20) COMMENT '更新日期',
|
updatedate VARCHAR(20) COMMENT '更新日期',
|
||||||
remark VARCHAR(200) COMMENT '备注',
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
versionnum VARCHAR(30) COMMENT '版本号',
|
versionnum VARCHAR(30) COMMENT '版本号',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_FLOWINFO
|
create table QA_FLOWINFO
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
phaseid int(10) not null,
|
phaseid int(10) not null,
|
||||||
phasename VARCHAR(20) not null,
|
phasename VARCHAR(20) not null,
|
||||||
phasenodeid int(10) not null,
|
phasenodeid int(10) not null,
|
||||||
phasenodename VARCHAR(20) not null,
|
phasenodename VARCHAR(20) not null,
|
||||||
checkentryid int(10) not null,
|
checkentryid int(10) not null,
|
||||||
checkentry VARCHAR(200) not null,
|
checkentry VARCHAR(200) not null,
|
||||||
remark VARCHAR(100),
|
remark VARCHAR(100),
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_PLANFLOWCHECK
|
create table QA_PLANFLOWCHECK
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
versionnum VARCHAR(30) COMMENT '版本号',
|
versionnum VARCHAR(30) COMMENT '版本号',
|
||||||
checkentryid VARCHAR(20) not null COMMENT '检查ID',
|
checkentryid VARCHAR(20) not null COMMENT '检查ID',
|
||||||
plandate VARCHAR(20) not null COMMENT '计划检查日期',
|
plandate VARCHAR(20) not null COMMENT '计划检查日期',
|
||||||
status int(4) not null COMMENT '计划状态:1 检查计划 2 已检查',
|
status int(4) not null COMMENT '计划状态:1 检查计划 2 已检查',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_PROJECTVERSION
|
create table QA_PROJECTVERSION
|
||||||
(
|
(
|
||||||
versionid int(10) not null AUTO_INCREMENT,
|
versionid int(10) not null AUTO_INCREMENT,
|
||||||
versionnumber VARCHAR(20) COMMENT '版本号',
|
versionnumber VARCHAR(20) COMMENT '版本号',
|
||||||
plan_launchdate VARCHAR(20) COMMENT '计划上线日期',
|
plan_launchdate VARCHAR(20) COMMENT '计划上线日期',
|
||||||
actually_launchdate VARCHAR(20) COMMENT '实际上线日期',
|
actually_launchdate VARCHAR(20) COMMENT '实际上线日期',
|
||||||
plan_devstart VARCHAR(20) COMMENT '计划开发开始时间',
|
plan_devstart VARCHAR(20) COMMENT '计划开发开始时间',
|
||||||
plan_devend VARCHAR(20) COMMENT '计划开发结束时间',
|
plan_devend VARCHAR(20) COMMENT '计划开发结束时间',
|
||||||
actually_devstart VARCHAR(20) COMMENT '实际开发开始时间',
|
actually_devstart VARCHAR(20) COMMENT '实际开发开始时间',
|
||||||
actually_devend VARCHAR(20) COMMENT '实际开发结束时间',
|
actually_devend VARCHAR(20) COMMENT '实际开发结束时间',
|
||||||
plan_teststart VARCHAR(20) COMMENT '计划测试开始时间',
|
plan_teststart VARCHAR(20) COMMENT '计划测试开始时间',
|
||||||
plan_testend VARCHAR(20) COMMENT '计划测试结束时间',
|
plan_testend VARCHAR(20) COMMENT '计划测试结束时间',
|
||||||
actually_teststart VARCHAR(20) COMMENT '实际测试开始时间',
|
actually_teststart VARCHAR(20) COMMENT '实际测试开始时间',
|
||||||
actually_testend VARCHAR(20) COMMENT '实际测试结束时间',
|
actually_testend VARCHAR(20) COMMENT '实际测试结束时间',
|
||||||
plan_demand int(10) COMMENT '计划上线需求数',
|
plan_demand int(10) COMMENT '计划上线需求数',
|
||||||
actually_demand int(10) COMMENT '实际上线需求数',
|
actually_demand int(10) COMMENT '实际上线需求数',
|
||||||
codeline FLOAT(10) COMMENT '代码变动行数',
|
codeline FLOAT(10) COMMENT '代码变动行数',
|
||||||
testcasenum int(10) COMMENT '测试用例数',
|
testcasenum int(10) COMMENT '测试用例数',
|
||||||
changetestingreturn int(10) COMMENT '版本转测试打回次数',
|
changetestingreturn int(10) COMMENT '版本转测试打回次数',
|
||||||
dev_member VARCHAR(50) COMMENT '开发投入人力',
|
dev_member VARCHAR(50) COMMENT '开发投入人力',
|
||||||
test_member VARCHAR(50) COMMENT '测试投入人力',
|
test_member VARCHAR(50) COMMENT '测试投入人力',
|
||||||
human_cost VARCHAR(20) COMMENT '耗费人力 人/天',
|
human_cost VARCHAR(20) COMMENT '耗费人力 人/天',
|
||||||
per_dev VARCHAR(20) COMMENT '开发平均生产率 人/天/行',
|
per_dev VARCHAR(20) COMMENT '开发平均生产率 人/天/行',
|
||||||
per_test VARCHAR(20) COMMENT '用例编写/用例执行',
|
per_test VARCHAR(20) COMMENT '用例编写/用例执行',
|
||||||
code_di VARCHAR(20) COMMENT '代码DI值',
|
code_di VARCHAR(20) COMMENT '代码DI值',
|
||||||
qualityreview VARCHAR(500) COMMENT '质量回溯',
|
qualityreview VARCHAR(500) COMMENT '质量回溯',
|
||||||
imprint VARCHAR(500) COMMENT '版本说明',
|
imprint VARCHAR(500) COMMENT '版本说明',
|
||||||
remark VARCHAR(500) COMMENT '备注',
|
remark VARCHAR(500) COMMENT '备注',
|
||||||
projectid int(10) COMMENT '项目ID',
|
projectid int(10) COMMENT '项目ID',
|
||||||
devtime_deviation VARCHAR(20) COMMENT '开发偏移率',
|
devtime_deviation VARCHAR(20) COMMENT '开发偏移率',
|
||||||
devdelay_days VARCHAR(20) COMMENT '开发延迟时间',
|
devdelay_days VARCHAR(20) COMMENT '开发延迟时间',
|
||||||
testtime_deviation VARCHAR(20) COMMENT '测试偏移率',
|
testtime_deviation VARCHAR(20) COMMENT '测试偏移率',
|
||||||
testdelay_days VARCHAR(20) COMMENT '测试延迟时间',
|
testdelay_days VARCHAR(20) COMMENT '测试延迟时间',
|
||||||
protime_deviation VARCHAR(20),
|
protime_deviation VARCHAR(20),
|
||||||
prodelay_days VARCHAR(20),
|
prodelay_days VARCHAR(20),
|
||||||
bug_zm int(10),
|
bug_zm int(10),
|
||||||
bug_yz int(10),
|
bug_yz int(10),
|
||||||
bug_yb int(10),
|
bug_yb int(10),
|
||||||
bug_ts int(10),
|
bug_ts int(10),
|
||||||
versiontype int(8) default 1 not null COMMENT '版本类型',
|
versiontype int(8) default 1 not null COMMENT '版本类型',
|
||||||
perdemand FLOAT(8) default 0.00,
|
perdemand FLOAT(8) default 0.00,
|
||||||
codestandard_zd int(10) default 0 not null,
|
codestandard_zd int(10) default 0 not null,
|
||||||
codestandard_yz int(10) default 0 not null,
|
codestandard_yz int(10) default 0 not null,
|
||||||
codestandard_zy int(10) default 0 not null,
|
codestandard_zy int(10) default 0 not null,
|
||||||
zt_versionlink VARCHAR(100) COMMENT '禅道链接',
|
zt_versionlink VARCHAR(100) COMMENT '禅道链接',
|
||||||
human_costdev VARCHAR(20) default '0' COMMENT '开发人力成本',
|
human_costdev VARCHAR(20) default '0' COMMENT '开发人力成本',
|
||||||
human_costtest VARCHAR(20) default '0' COMMENT '测试人力成本',
|
human_costtest VARCHAR(20) default '0' COMMENT '测试人力成本',
|
||||||
primary key (versionid)
|
primary key (versionid)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_REVIEW
|
create table QA_REVIEW
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
version VARCHAR(20) not null COMMENT '版本号',
|
version VARCHAR(20) not null COMMENT '版本号',
|
||||||
review_type VARCHAR(20) COMMENT '评审类型',
|
review_type VARCHAR(20) COMMENT '评审类型',
|
||||||
review_date VARCHAR(20) COMMENT '评审日期',
|
review_date VARCHAR(20) COMMENT '评审日期',
|
||||||
bug_num int(8) COMMENT '问题数',
|
bug_num int(8) COMMENT '问题数',
|
||||||
repair_num int(8) COMMENT '已修复问题数',
|
repair_num int(8) COMMENT '已修复问题数',
|
||||||
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
||||||
review_object VARCHAR(100) COMMENT '评审对象',
|
review_object VARCHAR(100) COMMENT '评审对象',
|
||||||
review_result VARCHAR(50) COMMENT '评审结果',
|
review_result VARCHAR(50) COMMENT '评审结果',
|
||||||
result_confirmor VARCHAR(50) COMMENT '结果确认人',
|
result_confirmor VARCHAR(50) COMMENT '结果确认人',
|
||||||
remark VARCHAR(500) COMMENT '备注',
|
remark VARCHAR(500) COMMENT '备注',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_REVIEWINFO
|
create table QA_REVIEWINFO
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
review_id int(8) not null COMMENT '评审ID',
|
review_id int(8) not null COMMENT '评审ID',
|
||||||
bug_description VARCHAR(500) COMMENT '问题描述',
|
bug_description VARCHAR(500) COMMENT '问题描述',
|
||||||
status VARCHAR(20) COMMENT '状态',
|
status VARCHAR(20) COMMENT '状态',
|
||||||
duty_officer VARCHAR(100) COMMENT '责任人',
|
duty_officer VARCHAR(100) COMMENT '责任人',
|
||||||
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
||||||
corrective VARCHAR(500) COMMENT '纠正措施',
|
corrective VARCHAR(500) COMMENT '纠正措施',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_SECONDARYSECTOR
|
create table QA_SECONDARYSECTOR
|
||||||
(
|
(
|
||||||
sectorid int(10) not null AUTO_INCREMENT,
|
sectorid int(10) not null AUTO_INCREMENT,
|
||||||
departmenthead VARCHAR(20),
|
departmenthead VARCHAR(20),
|
||||||
departmentname VARCHAR(20),
|
departmentname VARCHAR(20),
|
||||||
primary key (sectorid)
|
primary key (sectorid)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_SECTORPROJECTS
|
create table QA_SECTORPROJECTS
|
||||||
(
|
(
|
||||||
projectid int(10) not null AUTO_INCREMENT,
|
projectid int(10) not null AUTO_INCREMENT,
|
||||||
projectname VARCHAR(100) not null,
|
projectname VARCHAR(100) not null,
|
||||||
projectmanager VARCHAR(100) not null,
|
projectmanager VARCHAR(100) not null,
|
||||||
sectorid int(10) not null,
|
sectorid int(10) not null,
|
||||||
projecttype int(4) default 0 not null,
|
projecttype int(4) default 0 not null,
|
||||||
primary key (projectid)
|
primary key (projectid)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_ZTTASK
|
create table QA_ZTTASK
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
versionid int(8) COMMENT '版本ID',
|
versionid int(8) COMMENT '版本ID',
|
||||||
versionname VARCHAR(100) COMMENT '版本名称',
|
versionname VARCHAR(100) COMMENT '版本名称',
|
||||||
taskname VARCHAR(300) COMMENT '任务名称',
|
taskname VARCHAR(300) COMMENT '任务名称',
|
||||||
assigneddate VARCHAR(50) COMMENT '完成时间',
|
assigneddate VARCHAR(50) COMMENT '完成时间',
|
||||||
estimate int(8) COMMENT '预期工时',
|
estimate int(8) COMMENT '预期工时',
|
||||||
consumed int(8) COMMENT '实际工时',
|
consumed int(8) COMMENT '实际工时',
|
||||||
finishedby VARCHAR(40) COMMENT '完成人账号',
|
finishedby VARCHAR(40) COMMENT '完成人账号',
|
||||||
finishedname VARCHAR(40) COMMENT '完成人姓名',
|
finishedname VARCHAR(40) COMMENT '完成人姓名',
|
||||||
deadline VARCHAR(40) COMMENT '计划截止日期',
|
deadline VARCHAR(40) COMMENT '计划截止日期',
|
||||||
delaystatus int(4) COMMENT '延期状态',
|
delaystatus int(4) COMMENT '延期状态',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table TEST_JOBS
|
create table TEST_JOBS
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
name VARCHAR(100) not null COMMENT '调度名称',
|
name VARCHAR(100) not null COMMENT '调度名称',
|
||||||
startdate VARCHAR(100) COMMENT '开始日期',
|
startdate VARCHAR(100) COMMENT '开始日期',
|
||||||
starttime VARCHAR(100) COMMENT '开始时间',
|
starttime VARCHAR(100) COMMENT '开始时间',
|
||||||
enddate VARCHAR(100) COMMENT '结束日期',
|
enddate VARCHAR(100) COMMENT '结束日期',
|
||||||
endtime VARCHAR(100) COMMENT '结束时间',
|
endtime VARCHAR(100) COMMENT '结束时间',
|
||||||
runtime datetime COMMENT '执行时间',
|
runtime datetime COMMENT '执行时间',
|
||||||
remark VARCHAR(800) COMMENT '备注',
|
remark VARCHAR(800) COMMENT '备注',
|
||||||
planproj VARCHAR(100) COMMENT '项目名(testlink)中',
|
planproj VARCHAR(100) COMMENT '项目名(testlink)中',
|
||||||
state VARCHAR(4) not null COMMENT '状态',
|
state VARCHAR(4) not null COMMENT '状态',
|
||||||
tasktype VARCHAR(4) not null COMMENT '执行类型 O执行一次 D每天执行',
|
tasktype VARCHAR(4) not null COMMENT '执行类型 O执行一次 D每天执行',
|
||||||
starttimestr VARCHAR(100) COMMENT '执行时间表达式',
|
starttimestr VARCHAR(100) COMMENT '执行时间表达式',
|
||||||
endtimestr VARCHAR(100) COMMENT '结束时间',
|
endtimestr VARCHAR(100) COMMENT '结束时间',
|
||||||
createtime datetime not null,
|
createtime datetime not null,
|
||||||
noenddate VARCHAR(10) COMMENT '是否有结束日期',
|
noenddate VARCHAR(10) COMMENT '是否有结束日期',
|
||||||
time int default 0,
|
time int default 0,
|
||||||
timetype VARCHAR(4),
|
timetype VARCHAR(4),
|
||||||
issendmail VARCHAR(4) default "0" COMMENT '是否发送邮件通知',
|
issendmail VARCHAR(4) default "0" COMMENT '是否发送邮件通知',
|
||||||
emailer VARCHAR(250) COMMENT '邮件地址',
|
emailer VARCHAR(250) COMMENT '邮件地址',
|
||||||
threadcount int default 1 COMMENT '客户端线程数(接口)',
|
threadcount int default 1 COMMENT '客户端线程数(接口)',
|
||||||
testlinkname VARCHAR(200) COMMENT 'TESTLINK中的计划名称',
|
testlinkname VARCHAR(200) COMMENT 'TESTLINK中的计划名称',
|
||||||
isbuilding VARCHAR(4) default '0' not null COMMENT '是否自动构建',
|
isbuilding VARCHAR(4) default '0' not null COMMENT '是否自动构建',
|
||||||
buildname VARCHAR(100) COMMENT '构建链接',
|
buildname VARCHAR(100) COMMENT '构建链接',
|
||||||
isrestart VARCHAR(4) default '0' not null COMMENT '是否自动重启',
|
isrestart VARCHAR(4) default '0' not null COMMENT '是否自动重启',
|
||||||
restartcomm VARCHAR(200) COMMENT '重启脚本',
|
restartcomm VARCHAR(200) COMMENT '重启脚本',
|
||||||
extype int(4) default 0 not null COMMENT '执行类型',
|
extype int(4) default 0 not null COMMENT '执行类型',
|
||||||
browsertype int(4) COMMENT 'UI自动化浏览器类型',
|
browsertype int(4) COMMENT 'UI自动化浏览器类型',
|
||||||
timeout int(8) default 60 not null COMMENT '任务超时中断时间(分钟)',
|
timeout int(8) default 60 not null COMMENT '任务超时中断时间(分钟)',
|
||||||
clientip VARCHAR(30) default '127.0.0.1' not null COMMENT '版本ID',
|
clientip VARCHAR(30) default '127.0.0.1' not null COMMENT '版本ID',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table TEST_CASEDETAIL
|
create table TEST_CASEDETAIL
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
taskid int(10) not null,
|
taskid int(10) not null,
|
||||||
caseno VARCHAR(20) not null COMMENT '用例编号',
|
caseno VARCHAR(20) not null COMMENT '用例编号',
|
||||||
caseversion VARCHAR(20) not null COMMENT '用例版本',
|
caseversion VARCHAR(20) not null COMMENT '用例版本',
|
||||||
casetime datetime not null COMMENT '执行时间',
|
casetime datetime not null COMMENT '执行时间',
|
||||||
casename VARCHAR(200) not null COMMENT '用例名称',
|
casename VARCHAR(200) not null COMMENT '用例名称',
|
||||||
casestatus VARCHAR(2) default '4' not null COMMENT ' pass:0 fail:1 lock:2 unexcute:4',
|
casestatus VARCHAR(2) default '4' not null COMMENT ' pass:0 fail:1 lock:2 unexcute:4',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table TEST_LOGDETAIL
|
create table TEST_LOGDETAIL
|
||||||
(
|
(
|
||||||
logid int(10) not null AUTO_INCREMENT,
|
logid int(10) not null AUTO_INCREMENT,
|
||||||
logtime datetime not null COMMENT '日志时间',
|
logtime datetime not null COMMENT '日志时间',
|
||||||
detail VARCHAR(1000) not null COMMENT '日志',
|
detail VARCHAR(1000) not null COMMENT '日志',
|
||||||
loggrade VARCHAR(20) COMMENT '日志级别',
|
loggrade VARCHAR(20) COMMENT '日志级别',
|
||||||
caseid int(10) not null COMMENT '用例编号',
|
caseid int(10) not null COMMENT '用例编号',
|
||||||
taskid int(10),
|
taskid int(10),
|
||||||
step VARCHAR(20) COMMENT '用例步骤',
|
step VARCHAR(20) COMMENT '用例步骤',
|
||||||
imgname VARCHAR(30) COMMENT 'UI自动化自动截图地址',
|
imgname VARCHAR(30) COMMENT 'UI自动化自动截图地址',
|
||||||
primary key (logid)
|
primary key (logid)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table TEST_TASKEXCUTE
|
create table TEST_TASKEXCUTE
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
taskid VARCHAR(150) not null,
|
taskid VARCHAR(150) not null,
|
||||||
casetotal_count int(10) COMMENT '总用例数',
|
casetotal_count int(10) COMMENT '总用例数',
|
||||||
casesucc_count int(10) COMMENT '成功数',
|
casesucc_count int(10) COMMENT '成功数',
|
||||||
casefail_count int(10) COMMENT '失败数',
|
casefail_count int(10) COMMENT '失败数',
|
||||||
caselock_count int(10) COMMENT '锁定数',
|
caselock_count int(10) COMMENT '锁定数',
|
||||||
createtime datetime COMMENT '时间',
|
createtime datetime COMMENT '时间',
|
||||||
jobid int(10) not null,
|
jobid int(10) not null,
|
||||||
finishtime datetime COMMENT '完成时间',
|
finishtime datetime COMMENT '完成时间',
|
||||||
taskstatus VARCHAR(2) default '' COMMENT '状态 0未执行 1执行中 2 成功 4失败 ',
|
taskstatus VARCHAR(2) default '' COMMENT '状态 0未执行 1执行中 2 成功 4失败 ',
|
||||||
casenoexec_count int default 0 COMMENT '未执行用例',
|
casenoexec_count int default 0 COMMENT '未执行用例',
|
||||||
caseisexec VARCHAR(2) COMMENT '任务是否被成功吊起 0 成功吊起 3 吊起失败',
|
caseisexec VARCHAR(2) COMMENT '任务是否被成功吊起 0 成功吊起 3 吊起失败',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table USERINFO
|
create table USERINFO
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
usercode VARCHAR(20) not null,
|
usercode VARCHAR(20) not null,
|
||||||
password VARCHAR(200) not null,
|
password VARCHAR(200) not null,
|
||||||
username VARCHAR(20),
|
username VARCHAR(20),
|
||||||
role VARCHAR(100) COMMENT '角色',
|
role VARCHAR(100) COMMENT '角色',
|
||||||
sectorid int(8) default 0 not null COMMENT '所属部门',
|
sectorid int(8) default 0 not null COMMENT '所属部门',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
create table USER_AUTHORITY
|
create table USER_AUTHORITY
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
module VARCHAR(50) not null COMMENT '模块',
|
module VARCHAR(50) not null COMMENT '模块',
|
||||||
auth_type VARCHAR(50) not null COMMENT '权限类型',
|
auth_type VARCHAR(50) not null COMMENT '权限类型',
|
||||||
alias VARCHAR(50) not null COMMENT '别名',
|
alias VARCHAR(50) not null COMMENT '别名',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table USER_ROLE
|
create table USER_ROLE
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
role VARCHAR(50) not null COMMENT '角色',
|
role VARCHAR(50) not null COMMENT '角色',
|
||||||
permission VARCHAR(1000) COMMENT '权限',
|
permission VARCHAR(1000) COMMENT '权限',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
/*插入索引
|
/*插入索引
|
||||||
CREATE INDEX index_caseid ON TEST_LOGDETAIL (caseid);
|
CREATE INDEX index_caseid ON TEST_LOGDETAIL (caseid);
|
||||||
CREATE INDEX index_taskid ON TEST_CASEDETAIL (taskid);*/
|
CREATE INDEX index_taskid ON TEST_CASEDETAIL (taskid);*/
|
||||||
|
|
||||||
/*插入权限默认定义*/
|
/*插入权限默认定义*/
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (1, '质量-版本信息', '增加', 'pv_1');
|
values (1, '质量-版本信息', '增加', 'pv_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (2, '质量-版本信息', '删除', 'pv_2');
|
values (2, '质量-版本信息', '删除', 'pv_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (3, '质量-版本信息', '修改', 'pv_3');
|
values (3, '质量-版本信息', '修改', 'pv_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (4, '质量-版本计划信息', '增加', 'pvp_1');
|
values (4, '质量-版本计划信息', '增加', 'pvp_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (5, '质量-流程检查信息', '增加', 'fc_1');
|
values (5, '质量-流程检查信息', '增加', 'fc_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (6, '质量-流程检查信息', '删除', 'fc_2');
|
values (6, '质量-流程检查信息', '删除', 'fc_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (7, '质量-流程检查信息', '修改', 'fc_3');
|
values (7, '质量-流程检查信息', '修改', 'fc_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (8, '质量-生产故障信息', '增加', 'acc_1');
|
values (8, '质量-生产故障信息', '增加', 'acc_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (9, '质量-生产故障信息', '删除', 'acc_2');
|
values (9, '质量-生产故障信息', '删除', 'acc_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (10, '质量-生产故障信息', '修改', 'acc_3');
|
values (10, '质量-生产故障信息', '修改', 'acc_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (21, '自动化-任务调度', '启动', 'tast_run');
|
values (21, '自动化-任务调度', '启动', 'tast_run');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (22, '自动化-任务调度', '移除', 'tast_remove');
|
values (22, '自动化-任务调度', '移除', 'tast_remove');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (23, '自动化-任务调度', '执行', 'tast_ex');
|
values (23, '自动化-任务调度', '执行', 'tast_ex');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (24, '自动化-任务调度', '增加', 'tast_1');
|
values (24, '自动化-任务调度', '增加', 'tast_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (25, '自动化-任务调度', '删除', 'tast_2');
|
values (25, '自动化-任务调度', '删除', 'tast_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (26, '自动化-任务调度', '修改', 'tast_3');
|
values (26, '自动化-任务调度', '修改', 'tast_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (27, '自动化-任务调度', '上传', 'tast_upload');
|
values (27, '自动化-任务调度', '上传', 'tast_upload');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (11, '质量-流程检查计划', '增加', 'pfc_1');
|
values (11, '质量-流程检查计划', '增加', 'pfc_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (12, '质量-流程检查计划', '删除', 'pfc_2');
|
values (12, '质量-流程检查计划', '删除', 'pfc_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (13, '质量-流程检查计划', '修改', 'pfc_3');
|
values (13, '质量-流程检查计划', '修改', 'pfc_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (14, '质量-流程检查计划', '转计划', 'fc_tocheck');
|
values (14, '质量-流程检查计划', '转计划', 'fc_tocheck');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (15, '质量-评审信息详情', '增加', 'revinfo_1');
|
values (15, '质量-评审信息详情', '增加', 'revinfo_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (16, '质量-评审信息详情', '删除', 'revinfo_2');
|
values (16, '质量-评审信息详情', '删除', 'revinfo_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (17, '质量-评审信息详情', '修改', 'revinfo_3');
|
values (17, '质量-评审信息详情', '修改', 'revinfo_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (18, '质量-评审信息', '删除', 'rev_2');
|
values (18, '质量-评审信息', '删除', 'rev_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (19, '质量-评审信息', '修改', 'rev_3');
|
values (19, '质量-评审信息', '修改', 'rev_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (20, '质量-生产故障信息', '上传', 'acc_upload');
|
values (20, '质量-生产故障信息', '上传', 'acc_upload');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (41, '用户管理', '增加', 'ui_1');
|
values (41, '用户管理', '增加', 'ui_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (42, '用户管理', '删除', 'ui_2');
|
values (42, '用户管理', '删除', 'ui_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (43, '用户管理', '修改', 'ui_3');
|
values (43, '用户管理', '修改', 'ui_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (44, '用户管理', '查看', 'ui_4');
|
values (44, '用户管理', '查看', 'ui_4');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (45, '用户管理-权限角色', '查看修改', 'role_3');
|
values (45, '用户管理-权限角色', '查看修改', 'role_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (28, '自动化-任务列表', '删除', 'tastex_2');
|
values (28, '自动化-任务列表', '删除', 'tastex_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (29, '自动化-用例列表', '执行', 'case_ex');
|
values (29, '自动化-用例列表', '执行', 'case_ex');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (46, '用户管理-权限角色', '增加', 'role_1');
|
values (46, '用户管理-权限角色', '增加', 'role_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (47, '用户管理-权限角色', '删除', 'role_2');
|
values (47, '用户管理-权限角色', '删除', 'role_2');
|
||||||
|
|
||||||
/*插入角色默认定义*/
|
/*插入角色默认定义*/
|
||||||
insert into USER_ROLE (id, role, permission)
|
insert into USER_ROLE (id, role, permission)
|
||||||
values (2, '测试工程师', 'acc_1,acc_2,acc_3,');
|
values (2, '测试工程师', 'acc_1,acc_2,acc_3,');
|
||||||
insert into USER_ROLE (id, role, permission)
|
insert into USER_ROLE (id, role, permission)
|
||||||
values (3, '自动化工程师', 'acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,');
|
values (3, '自动化工程师', 'acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,');
|
||||||
insert into USER_ROLE (id, role, permission)
|
insert into USER_ROLE (id, role, permission)
|
||||||
values (4, '质量工程师', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,');
|
values (4, '质量工程师', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,');
|
||||||
insert into USER_ROLE (id, role, permission)
|
insert into USER_ROLE (id, role, permission)
|
||||||
values (1, '管理员', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,ui_1,ui_2,ui_3,ui_4,role_3,role_1,role_2,');
|
values (1, '管理员', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,ui_1,ui_2,ui_3,ui_4,role_3,role_1,role_2,');
|
||||||
|
|
||||||
/*插入默认部门分级*/
|
/*插入默认部门分级*/
|
||||||
insert into QA_SECONDARYSECTOR (sectorid, departmenthead, departmentname)
|
insert into QA_SECONDARYSECTOR (sectorid, departmenthead, departmentname)
|
||||||
values (99, '系统管理员', '总部');
|
values (99, '系统管理员', '总部');
|
||||||
/*插入默认项目*/
|
/*插入默认项目*/
|
||||||
insert into QA_SECTORPROJECTS (projectid, projectname, projectmanager, sectorid, projecttype)
|
insert into QA_SECTORPROJECTS (projectid, projectname, projectmanager, sectorid, projecttype)
|
||||||
values (99, '全部项目/未知项目', '系统管理员', 99, 0);
|
values (99, '全部项目/未知项目', '系统管理员', 99, 0);
|
||||||
/*插入默认管理员*/
|
/*插入默认管理员*/
|
||||||
insert into USERINFO (id, usercode, password, username, role, sectorid)
|
insert into USERINFO (id, usercode, password, username, role, sectorid)
|
||||||
values (1, 'admin', 'uJ45aIeS9N80kaSFDjvk%2FA%3D%3D', '系统管理员', '1', 99);
|
values (1, 'admin', 'uJ45aIeS9N80kaSFDjvk%2FA%3D%3D', '系统管理员', '1', 99);
|
||||||
/*插入流程检查定义数据*/
|
/*插入流程检查定义数据*/
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (36, 5, '总结阶段', 2, '计划变更', 1, '如与计划不合,是否提交计划变更邮件', null);
|
values (36, 5, '总结阶段', 2, '计划变更', 1, '如与计划不合,是否提交计划变更邮件', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (37, 5, '总结阶段', 3, '代码质量', 1, 'sonar代码检查是否刷新构建', null);
|
values (37, 5, '总结阶段', 3, '代码质量', 1, 'sonar代码检查是否刷新构建', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (38, 5, '总结阶段', 3, '代码质量', 2, 'sonar代码问题数是否符合要求', null);
|
values (38, 5, '总结阶段', 3, '代码质量', 2, 'sonar代码问题数是否符合要求', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (35, 2, '开发阶段', 3, '开发与编码', 6, '是否每一条禅道开发任务都提交转测申请', null);
|
values (35, 2, '开发阶段', 3, '开发与编码', 6, '是否每一条禅道开发任务都提交转测申请', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (34, 4, '验收与上线', 2, '上线部署', 3, 'SVN代码是否提交并标注', null);
|
values (34, 4, '验收与上线', 2, '上线部署', 3, 'SVN代码是否提交并标注', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (1, 1, '需求阶段', 1, '需求编制', 1, '《产品需求说明书》是否组织评审会', null);
|
values (1, 1, '需求阶段', 1, '需求编制', 1, '《产品需求说明书》是否组织评审会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (2, 1, '需求阶段', 1, '需求编制', 2, '《产品需求说明书》评审是否通过', null);
|
values (2, 1, '需求阶段', 1, '需求编制', 2, '《产品需求说明书》评审是否通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (3, 1, '需求阶段', 1, '需求编制', 3, '《产品需求说明书》是否归档到SVN', null);
|
values (3, 1, '需求阶段', 1, '需求编制', 3, '《产品需求说明书》是否归档到SVN', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (4, 1, '需求阶段', 1, '需求编制', 4, '《产品需求说明书》评审记录表是否签字通过', null);
|
values (4, 1, '需求阶段', 1, '需求编制', 4, '《产品需求说明书》评审记录表是否签字通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (5, 2, '开发阶段', 1, '需求分解', 1, '是否有需求分解/任务讨论会', null);
|
values (5, 2, '开发阶段', 1, '需求分解', 1, '是否有需求分解/任务讨论会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (6, 2, '开发阶段', 1, '需求分解', 2, '《项目计划》邮件是否及时发出', null);
|
values (6, 2, '开发阶段', 1, '需求分解', 2, '《项目计划》邮件是否及时发出', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (7, 2, '开发阶段', 1, '需求分解', 3, '《项目计划》邮件内容是否完整', null);
|
values (7, 2, '开发阶段', 1, '需求分解', 3, '《项目计划》邮件内容是否完整', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (10, 2, '开发阶段', 2, '软件设计', 1, '《产品开发概要设计》是否组织评审会', null);
|
values (10, 2, '开发阶段', 2, '软件设计', 1, '《产品开发概要设计》是否组织评审会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (11, 2, '开发阶段', 2, '软件设计', 2, '《产品开发概要设计》评审是否通过', null);
|
values (11, 2, '开发阶段', 2, '软件设计', 2, '《产品开发概要设计》评审是否通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (12, 2, '开发阶段', 2, '软件设计', 3, '《产品开发概要设计》是否归档到SVN', null);
|
values (12, 2, '开发阶段', 2, '软件设计', 3, '《产品开发概要设计》是否归档到SVN', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (13, 2, '开发阶段', 2, '软件设计', 4, '《产品开发概要设计》评审记录表是否签字通过', null);
|
values (13, 2, '开发阶段', 2, '软件设计', 4, '《产品开发概要设计》评审记录表是否签字通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (14, 2, '开发阶段', 3, '开发与编码', 1, '是否进行每日晨会', null);
|
values (14, 2, '开发阶段', 3, '开发与编码', 1, '是否进行每日晨会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (15, 2, '开发阶段', 3, '开发与编码', 2, '是否进行代码走读', null);
|
values (15, 2, '开发阶段', 3, '开发与编码', 2, '是否进行代码走读', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (16, 2, '开发阶段', 3, '开发与编码', 3, '是否每一条禅道开发任务都提交转测申请', null);
|
values (16, 2, '开发阶段', 3, '开发与编码', 3, '是否每一条禅道开发任务都提交转测申请', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (17, 2, '开发阶段', 3, '开发与编码', 4, '转测邮件是否合格', null);
|
values (17, 2, '开发阶段', 3, '开发与编码', 4, '转测邮件是否合格', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (18, 2, '开发阶段', 3, '开发与编码', 5, '转测邮件打回次数为0', null);
|
values (18, 2, '开发阶段', 3, '开发与编码', 5, '转测邮件打回次数为0', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (19, 3, '测试阶段', 1, '软件测试', 1, '是否回复测试计划', null);
|
values (19, 3, '测试阶段', 1, '软件测试', 1, '是否回复测试计划', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (20, 3, '测试阶段', 1, '软件测试', 2, '是否回复测试用例', null);
|
values (20, 3, '测试阶段', 1, '软件测试', 2, '是否回复测试用例', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (21, 3, '测试阶段', 1, '软件测试', 3, '测试用例是否通过评审/确认', null);
|
values (21, 3, '测试阶段', 1, '软件测试', 3, '测试用例是否通过评审/确认', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (22, 3, '测试阶段', 1, '软件测试', 4, '《软件测试报告》是否组织评审会', null);
|
values (22, 3, '测试阶段', 1, '软件测试', 4, '《软件测试报告》是否组织评审会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (23, 3, '测试阶段', 1, '软件测试', 5, '《软件测试报告》是否评审通过', null);
|
values (23, 3, '测试阶段', 1, '软件测试', 5, '《软件测试报告》是否评审通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (24, 3, '测试阶段', 1, '软件测试', 6, '《软件测试报告》/测试结果是否发出邮件', null);
|
values (24, 3, '测试阶段', 1, '软件测试', 6, '《软件测试报告》/测试结果是否发出邮件', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (25, 3, '测试阶段', 1, '软件测试', 7, '《软件测试报告》评审记录表是否签字通过', null);
|
values (25, 3, '测试阶段', 1, '软件测试', 7, '《软件测试报告》评审记录表是否签字通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (26, 4, '验收与上线', 1, '产品验收', 1, '《产品验收报告》是否组织评审会', null);
|
values (26, 4, '验收与上线', 1, '产品验收', 1, '《产品验收报告》是否组织评审会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (27, 4, '验收与上线', 1, '产品验收', 2, '《产品验收报告》是否评审通过', null);
|
values (27, 4, '验收与上线', 1, '产品验收', 2, '《产品验收报告》是否评审通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (28, 4, '验收与上线', 1, '产品验收', 3, '《产品验收报告》是否归档到SVN', null);
|
values (28, 4, '验收与上线', 1, '产品验收', 3, '《产品验收报告》是否归档到SVN', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (29, 4, '验收与上线', 1, '产品验收', 4, '《产品验收报告》评审记录表是否签字通过', null);
|
values (29, 4, '验收与上线', 1, '产品验收', 4, '《产品验收报告》评审记录表是否签字通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (30, 4, '验收与上线', 2, '上线部署', 1, '产品/开发是否提交上线流程(OA)', null);
|
values (30, 4, '验收与上线', 2, '上线部署', 1, '产品/开发是否提交上线流程(OA)', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (31, 4, '验收与上线', 2, '上线部署', 2, '开发是否提交上线相关资料', null);
|
values (31, 4, '验收与上线', 2, '上线部署', 2, '开发是否提交上线相关资料', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (32, 5, '总结阶段', 1, '项目总结', 1, '《项目总结》邮件是否及时发出', null);
|
values (32, 5, '总结阶段', 1, '项目总结', 1, '《项目总结》邮件是否及时发出', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (33, 5, '总结阶段', 1, '项目总结', 2, '《项目总结》邮件内容是否完整', null);
|
values (33, 5, '总结阶段', 1, '项目总结', 2, '《项目总结》邮件内容是否完整', null);
|
|
@ -1,457 +1,457 @@
|
||||||
create table OPERATION_LOG
|
create table OPERATION_LOG
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
tablename VARCHAR(30) not null COMMENT '被记录日志表名',
|
tablename VARCHAR(30) not null COMMENT '被记录日志表名',
|
||||||
tableid int(8) not null COMMENT '被记录日志ID',
|
tableid int(8) not null COMMENT '被记录日志ID',
|
||||||
operation_time VARCHAR(30) not null COMMENT '操作时间',
|
operation_time VARCHAR(30) not null COMMENT '操作时间',
|
||||||
operationer VARCHAR(20) not null COMMENT '操作人员',
|
operationer VARCHAR(20) not null COMMENT '操作人员',
|
||||||
operation_description VARCHAR(200) not null COMMENT '描述',
|
operation_description VARCHAR(200) not null COMMENT '描述',
|
||||||
projectid int(8) COMMENT '项目ID',
|
projectid int(8) COMMENT '项目ID',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_ACCIDENT
|
create table QA_ACCIDENT
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
accstatus VARCHAR(80) not null COMMENT '事故状态',
|
accstatus VARCHAR(80) not null COMMENT '事故状态',
|
||||||
eventtime VARCHAR(30) COMMENT '事故发生时间',
|
eventtime VARCHAR(30) COMMENT '事故发生时间',
|
||||||
reporter VARCHAR(20) not null COMMENT '报告人',
|
reporter VARCHAR(20) not null COMMENT '报告人',
|
||||||
reporttime VARCHAR(30) not null COMMENT '事故报告时间',
|
reporttime VARCHAR(30) not null COMMENT '事故报告时间',
|
||||||
accdescription VARCHAR(500) not null COMMENT '事故描述',
|
accdescription VARCHAR(500) not null COMMENT '事故描述',
|
||||||
acclevel VARCHAR(60) not null COMMENT '事故等级',
|
acclevel VARCHAR(60) not null COMMENT '事故等级',
|
||||||
causalanalysis VARCHAR(500) COMMENT '原因分析',
|
causalanalysis VARCHAR(500) COMMENT '原因分析',
|
||||||
causaltype VARCHAR(100) COMMENT '原因类型',
|
causaltype VARCHAR(100) COMMENT '原因类型',
|
||||||
consequenceanalysis VARCHAR(300) COMMENT '后果分析',
|
consequenceanalysis VARCHAR(300) COMMENT '后果分析',
|
||||||
correctiveaction VARCHAR(300) COMMENT '纠正措施',
|
correctiveaction VARCHAR(300) COMMENT '纠正措施',
|
||||||
resolutiontime VARCHAR(30) COMMENT '解决时间',
|
resolutiontime VARCHAR(30) COMMENT '解决时间',
|
||||||
resolutioner VARCHAR(20) COMMENT '解决处理人',
|
resolutioner VARCHAR(20) COMMENT '解决处理人',
|
||||||
preventiveaction VARCHAR(300) COMMENT '预防措施',
|
preventiveaction VARCHAR(300) COMMENT '预防措施',
|
||||||
preventiver VARCHAR(20) COMMENT '预防措施责任人',
|
preventiver VARCHAR(20) COMMENT '预防措施责任人',
|
||||||
preventiveplandate VARCHAR(30) COMMENT '预防措施计划完成时间',
|
preventiveplandate VARCHAR(30) COMMENT '预防措施计划完成时间',
|
||||||
preventiveaccdate VARCHAR(30) COMMENT '预防措施实际完成时间',
|
preventiveaccdate VARCHAR(30) COMMENT '预防措施实际完成时间',
|
||||||
trouble_duration int(8) COMMENT '事故持续时间',
|
trouble_duration int(8) COMMENT '事故持续时间',
|
||||||
impact_time int(8),
|
impact_time int(8),
|
||||||
filename VARCHAR(100) COMMENT '附件路径',
|
filename VARCHAR(100) COMMENT '附件路径',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_FLOWCHECK
|
create table QA_FLOWCHECK
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
checkid int(10) not null COMMENT '检查id',
|
checkid int(10) not null COMMENT '检查id',
|
||||||
projectid int(10) not null COMMENT '项目id',
|
projectid int(10) not null COMMENT '项目id',
|
||||||
projectphase VARCHAR(20) not null COMMENT '项目阶段',
|
projectphase VARCHAR(20) not null COMMENT '项目阶段',
|
||||||
phasenode VARCHAR(50) not null COMMENT '阶段节点',
|
phasenode VARCHAR(50) not null COMMENT '阶段节点',
|
||||||
checkentry VARCHAR(100) not null COMMENT '检查内容',
|
checkentry VARCHAR(100) not null COMMENT '检查内容',
|
||||||
checkresult VARCHAR(20) COMMENT '检查结果',
|
checkresult VARCHAR(20) COMMENT '检查结果',
|
||||||
checkdate VARCHAR(20) COMMENT '检查日期',
|
checkdate VARCHAR(20) COMMENT '检查日期',
|
||||||
checkdescriptions VARCHAR(400) COMMENT '不符合项描述',
|
checkdescriptions VARCHAR(400) COMMENT '不符合项描述',
|
||||||
stateupdate VARCHAR(20) COMMENT '状态更新',
|
stateupdate VARCHAR(20) COMMENT '状态更新',
|
||||||
updatedate VARCHAR(20) COMMENT '更新日期',
|
updatedate VARCHAR(20) COMMENT '更新日期',
|
||||||
remark VARCHAR(200) COMMENT '备注',
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
versionnum VARCHAR(30) COMMENT '版本号',
|
versionnum VARCHAR(30) COMMENT '版本号',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_FLOWINFO
|
create table QA_FLOWINFO
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
phaseid int(10) not null,
|
phaseid int(10) not null,
|
||||||
phasename VARCHAR(20) not null,
|
phasename VARCHAR(20) not null,
|
||||||
phasenodeid int(10) not null,
|
phasenodeid int(10) not null,
|
||||||
phasenodename VARCHAR(20) not null,
|
phasenodename VARCHAR(20) not null,
|
||||||
checkentryid int(10) not null,
|
checkentryid int(10) not null,
|
||||||
checkentry VARCHAR(200) not null,
|
checkentry VARCHAR(200) not null,
|
||||||
remark VARCHAR(100),
|
remark VARCHAR(100),
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_PLANFLOWCHECK
|
create table QA_PLANFLOWCHECK
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
versionnum VARCHAR(30) COMMENT '版本号',
|
versionnum VARCHAR(30) COMMENT '版本号',
|
||||||
checkentryid VARCHAR(20) not null COMMENT '检查ID',
|
checkentryid VARCHAR(20) not null COMMENT '检查ID',
|
||||||
plandate VARCHAR(20) not null COMMENT '计划检查日期',
|
plandate VARCHAR(20) not null COMMENT '计划检查日期',
|
||||||
status int(4) not null COMMENT '计划状态:1 检查计划 2 已检查',
|
status int(4) not null COMMENT '计划状态:1 检查计划 2 已检查',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_PROJECTVERSION
|
create table QA_PROJECTVERSION
|
||||||
(
|
(
|
||||||
versionid int(10) not null AUTO_INCREMENT,
|
versionid int(10) not null AUTO_INCREMENT,
|
||||||
versionnumber VARCHAR(20) COMMENT '版本号',
|
versionnumber VARCHAR(20) COMMENT '版本号',
|
||||||
plan_launchdate VARCHAR(20) COMMENT '计划上线日期',
|
plan_launchdate VARCHAR(20) COMMENT '计划上线日期',
|
||||||
actually_launchdate VARCHAR(20) COMMENT '实际上线日期',
|
actually_launchdate VARCHAR(20) COMMENT '实际上线日期',
|
||||||
plan_devstart VARCHAR(20) COMMENT '计划开发开始时间',
|
plan_devstart VARCHAR(20) COMMENT '计划开发开始时间',
|
||||||
plan_devend VARCHAR(20) COMMENT '计划开发结束时间',
|
plan_devend VARCHAR(20) COMMENT '计划开发结束时间',
|
||||||
actually_devstart VARCHAR(20) COMMENT '实际开发开始时间',
|
actually_devstart VARCHAR(20) COMMENT '实际开发开始时间',
|
||||||
actually_devend VARCHAR(20) COMMENT '实际开发结束时间',
|
actually_devend VARCHAR(20) COMMENT '实际开发结束时间',
|
||||||
plan_teststart VARCHAR(20) COMMENT '计划测试开始时间',
|
plan_teststart VARCHAR(20) COMMENT '计划测试开始时间',
|
||||||
plan_testend VARCHAR(20) COMMENT '计划测试结束时间',
|
plan_testend VARCHAR(20) COMMENT '计划测试结束时间',
|
||||||
actually_teststart VARCHAR(20) COMMENT '实际测试开始时间',
|
actually_teststart VARCHAR(20) COMMENT '实际测试开始时间',
|
||||||
actually_testend VARCHAR(20) COMMENT '实际测试结束时间',
|
actually_testend VARCHAR(20) COMMENT '实际测试结束时间',
|
||||||
plan_demand int(10) COMMENT '计划上线需求数',
|
plan_demand int(10) COMMENT '计划上线需求数',
|
||||||
actually_demand int(10) COMMENT '实际上线需求数',
|
actually_demand int(10) COMMENT '实际上线需求数',
|
||||||
codeline FLOAT(10) COMMENT '代码变动行数',
|
codeline FLOAT(10) COMMENT '代码变动行数',
|
||||||
testcasenum int(10) COMMENT '测试用例数',
|
testcasenum int(10) COMMENT '测试用例数',
|
||||||
changetestingreturn int(10) COMMENT '版本转测试打回次数',
|
changetestingreturn int(10) COMMENT '版本转测试打回次数',
|
||||||
dev_member VARCHAR(50) COMMENT '开发投入人力',
|
dev_member VARCHAR(50) COMMENT '开发投入人力',
|
||||||
test_member VARCHAR(50) COMMENT '测试投入人力',
|
test_member VARCHAR(50) COMMENT '测试投入人力',
|
||||||
human_cost VARCHAR(20) COMMENT '耗费人力 人/天',
|
human_cost VARCHAR(20) COMMENT '耗费人力 人/天',
|
||||||
per_dev VARCHAR(20) COMMENT '开发平均生产率 人/天/行',
|
per_dev VARCHAR(20) COMMENT '开发平均生产率 人/天/行',
|
||||||
per_test VARCHAR(20) COMMENT '用例编写/用例执行',
|
per_test VARCHAR(20) COMMENT '用例编写/用例执行',
|
||||||
code_di VARCHAR(20) COMMENT '代码DI值',
|
code_di VARCHAR(20) COMMENT '代码DI值',
|
||||||
qualityreview VARCHAR(500) COMMENT '质量回溯',
|
qualityreview VARCHAR(500) COMMENT '质量回溯',
|
||||||
imprint VARCHAR(500) COMMENT '版本说明',
|
imprint VARCHAR(500) COMMENT '版本说明',
|
||||||
remark VARCHAR(500) COMMENT '备注',
|
remark VARCHAR(500) COMMENT '备注',
|
||||||
projectid int(10) COMMENT '项目ID',
|
projectid int(10) COMMENT '项目ID',
|
||||||
devtime_deviation VARCHAR(20) COMMENT '开发偏移率',
|
devtime_deviation VARCHAR(20) COMMENT '开发偏移率',
|
||||||
devdelay_days VARCHAR(20) COMMENT '开发延迟时间',
|
devdelay_days VARCHAR(20) COMMENT '开发延迟时间',
|
||||||
testtime_deviation VARCHAR(20) COMMENT '测试偏移率',
|
testtime_deviation VARCHAR(20) COMMENT '测试偏移率',
|
||||||
testdelay_days VARCHAR(20) COMMENT '测试延迟时间',
|
testdelay_days VARCHAR(20) COMMENT '测试延迟时间',
|
||||||
protime_deviation VARCHAR(20),
|
protime_deviation VARCHAR(20),
|
||||||
prodelay_days VARCHAR(20),
|
prodelay_days VARCHAR(20),
|
||||||
bug_zm int(10),
|
bug_zm int(10),
|
||||||
bug_yz int(10),
|
bug_yz int(10),
|
||||||
bug_yb int(10),
|
bug_yb int(10),
|
||||||
bug_ts int(10),
|
bug_ts int(10),
|
||||||
versiontype int(8) default 1 not null COMMENT '版本类型',
|
versiontype int(8) default 1 not null COMMENT '版本类型',
|
||||||
perdemand FLOAT(8) default 0.00,
|
perdemand FLOAT(8) default 0.00,
|
||||||
codestandard_zd int(10) default 0 not null,
|
codestandard_zd int(10) default 0 not null,
|
||||||
codestandard_yz int(10) default 0 not null,
|
codestandard_yz int(10) default 0 not null,
|
||||||
codestandard_zy int(10) default 0 not null,
|
codestandard_zy int(10) default 0 not null,
|
||||||
zt_versionlink VARCHAR(100) COMMENT '禅道链接',
|
zt_versionlink VARCHAR(100) COMMENT '禅道链接',
|
||||||
human_costdev VARCHAR(20) default '0' COMMENT '开发人力成本',
|
human_costdev VARCHAR(20) default '0' COMMENT '开发人力成本',
|
||||||
human_costtest VARCHAR(20) default '0' COMMENT '测试人力成本',
|
human_costtest VARCHAR(20) default '0' COMMENT '测试人力成本',
|
||||||
primary key (versionid)
|
primary key (versionid)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_REVIEW
|
create table QA_REVIEW
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
version VARCHAR(20) not null COMMENT '版本号',
|
version VARCHAR(20) not null COMMENT '版本号',
|
||||||
review_type VARCHAR(20) COMMENT '评审类型',
|
review_type VARCHAR(20) COMMENT '评审类型',
|
||||||
review_date VARCHAR(20) COMMENT '评审日期',
|
review_date VARCHAR(20) COMMENT '评审日期',
|
||||||
bug_num int(8) COMMENT '问题数',
|
bug_num int(8) COMMENT '问题数',
|
||||||
repair_num int(8) COMMENT '已修复问题数',
|
repair_num int(8) COMMENT '已修复问题数',
|
||||||
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
||||||
review_object VARCHAR(100) COMMENT '评审对象',
|
review_object VARCHAR(100) COMMENT '评审对象',
|
||||||
review_result VARCHAR(50) COMMENT '评审结果',
|
review_result VARCHAR(50) COMMENT '评审结果',
|
||||||
result_confirmor VARCHAR(50) COMMENT '结果确认人',
|
result_confirmor VARCHAR(50) COMMENT '结果确认人',
|
||||||
remark VARCHAR(500) COMMENT '备注',
|
remark VARCHAR(500) COMMENT '备注',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_REVIEWINFO
|
create table QA_REVIEWINFO
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
review_id int(8) not null COMMENT '评审ID',
|
review_id int(8) not null COMMENT '评审ID',
|
||||||
bug_description VARCHAR(500) COMMENT '问题描述',
|
bug_description VARCHAR(500) COMMENT '问题描述',
|
||||||
status VARCHAR(20) COMMENT '状态',
|
status VARCHAR(20) COMMENT '状态',
|
||||||
duty_officer VARCHAR(100) COMMENT '责任人',
|
duty_officer VARCHAR(100) COMMENT '责任人',
|
||||||
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
||||||
corrective VARCHAR(500) COMMENT '纠正措施',
|
corrective VARCHAR(500) COMMENT '纠正措施',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_SECONDARYSECTOR
|
create table QA_SECONDARYSECTOR
|
||||||
(
|
(
|
||||||
sectorid int(10) not null AUTO_INCREMENT,
|
sectorid int(10) not null AUTO_INCREMENT,
|
||||||
departmenthead VARCHAR(20),
|
departmenthead VARCHAR(20),
|
||||||
departmentname VARCHAR(20),
|
departmentname VARCHAR(20),
|
||||||
primary key (sectorid)
|
primary key (sectorid)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_SECTORPROJECTS
|
create table QA_SECTORPROJECTS
|
||||||
(
|
(
|
||||||
projectid int(10) not null AUTO_INCREMENT,
|
projectid int(10) not null AUTO_INCREMENT,
|
||||||
projectname VARCHAR(100) not null,
|
projectname VARCHAR(100) not null,
|
||||||
projectmanager VARCHAR(100) not null,
|
projectmanager VARCHAR(100) not null,
|
||||||
sectorid int(10) not null,
|
sectorid int(10) not null,
|
||||||
projecttype int(4) default 0 not null,
|
projecttype int(4) default 0 not null,
|
||||||
primary key (projectid)
|
primary key (projectid)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table QA_ZTTASK
|
create table QA_ZTTASK
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
versionid int(8) COMMENT '版本ID',
|
versionid int(8) COMMENT '版本ID',
|
||||||
versionname VARCHAR(100) COMMENT '版本名称',
|
versionname VARCHAR(100) COMMENT '版本名称',
|
||||||
taskname VARCHAR(300) COMMENT '任务名称',
|
taskname VARCHAR(300) COMMENT '任务名称',
|
||||||
assigneddate VARCHAR(50) COMMENT '完成时间',
|
assigneddate VARCHAR(50) COMMENT '完成时间',
|
||||||
estimate int(8) COMMENT '预期工时',
|
estimate int(8) COMMENT '预期工时',
|
||||||
consumed int(8) COMMENT '实际工时',
|
consumed int(8) COMMENT '实际工时',
|
||||||
finishedby VARCHAR(40) COMMENT '完成人账号',
|
finishedby VARCHAR(40) COMMENT '完成人账号',
|
||||||
finishedname VARCHAR(40) COMMENT '完成人姓名',
|
finishedname VARCHAR(40) COMMENT '完成人姓名',
|
||||||
deadline VARCHAR(40) COMMENT '计划截止日期',
|
deadline VARCHAR(40) COMMENT '计划截止日期',
|
||||||
delaystatus int(4) COMMENT '延期状态',
|
delaystatus int(4) COMMENT '延期状态',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table TEST_JOBS
|
create table TEST_JOBS
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
name VARCHAR(100) not null COMMENT '调度名称',
|
name VARCHAR(100) not null COMMENT '调度名称',
|
||||||
startdate VARCHAR(100) COMMENT '开始日期',
|
startdate VARCHAR(100) COMMENT '开始日期',
|
||||||
starttime VARCHAR(100) COMMENT '开始时间',
|
starttime VARCHAR(100) COMMENT '开始时间',
|
||||||
enddate VARCHAR(100) COMMENT '结束日期',
|
enddate VARCHAR(100) COMMENT '结束日期',
|
||||||
endtime VARCHAR(100) COMMENT '结束时间',
|
endtime VARCHAR(100) COMMENT '结束时间',
|
||||||
runtime datetime COMMENT '执行时间',
|
runtime datetime COMMENT '执行时间',
|
||||||
remark VARCHAR(800) COMMENT '备注',
|
remark VARCHAR(800) COMMENT '备注',
|
||||||
planproj VARCHAR(100) COMMENT '项目名(testlink)中',
|
planproj VARCHAR(100) COMMENT '项目名(testlink)中',
|
||||||
state VARCHAR(4) not null COMMENT '状态',
|
state VARCHAR(4) not null COMMENT '状态',
|
||||||
tasktype VARCHAR(4) not null COMMENT '执行类型 O执行一次 D每天执行',
|
tasktype VARCHAR(4) not null COMMENT '执行类型 O执行一次 D每天执行',
|
||||||
starttimestr VARCHAR(100) COMMENT '执行时间表达式',
|
starttimestr VARCHAR(100) COMMENT '执行时间表达式',
|
||||||
endtimestr VARCHAR(100) COMMENT '结束时间',
|
endtimestr VARCHAR(100) COMMENT '结束时间',
|
||||||
createtime datetime not null,
|
createtime datetime not null,
|
||||||
noenddate VARCHAR(10) COMMENT '是否有结束日期',
|
noenddate VARCHAR(10) COMMENT '是否有结束日期',
|
||||||
time int default 0,
|
time int default 0,
|
||||||
timetype VARCHAR(4),
|
timetype VARCHAR(4),
|
||||||
issendmail VARCHAR(4) default "0" COMMENT '是否发送邮件通知',
|
issendmail VARCHAR(4) default "0" COMMENT '是否发送邮件通知',
|
||||||
emailer VARCHAR(250) COMMENT '邮件地址',
|
emailer VARCHAR(250) COMMENT '邮件地址',
|
||||||
threadcount int default 1 COMMENT '客户端线程数(接口)',
|
threadcount int default 1 COMMENT '客户端线程数(接口)',
|
||||||
testlinkname VARCHAR(200) COMMENT 'TESTLINK中的计划名称',
|
testlinkname VARCHAR(200) COMMENT 'TESTLINK中的计划名称',
|
||||||
isbuilding VARCHAR(4) default '0' not null COMMENT '是否自动构建',
|
isbuilding VARCHAR(4) default '0' not null COMMENT '是否自动构建',
|
||||||
buildname VARCHAR(100) COMMENT '构建链接',
|
buildname VARCHAR(100) COMMENT '构建链接',
|
||||||
isrestart VARCHAR(4) default '0' not null COMMENT '是否自动重启',
|
isrestart VARCHAR(4) default '0' not null COMMENT '是否自动重启',
|
||||||
restartcomm VARCHAR(200) COMMENT '重启脚本',
|
restartcomm VARCHAR(200) COMMENT '重启脚本',
|
||||||
extype int(4) default 0 not null COMMENT '执行类型',
|
extype int(4) default 0 not null COMMENT '执行类型',
|
||||||
browsertype int(4) COMMENT 'UI自动化浏览器类型',
|
browsertype int(4) COMMENT 'UI自动化浏览器类型',
|
||||||
timeout int(8) default 60 not null COMMENT '任务超时中断时间(分钟)',
|
timeout int(8) default 60 not null COMMENT '任务超时中断时间(分钟)',
|
||||||
clientip VARCHAR(30) default '127.0.0.1' not null COMMENT '版本ID',
|
clientip VARCHAR(30) default '127.0.0.1' not null COMMENT '版本ID',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table TEST_CASEDETAIL
|
create table TEST_CASEDETAIL
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
taskid int(10) not null,
|
taskid int(10) not null,
|
||||||
caseno VARCHAR(20) not null COMMENT '用例编号',
|
caseno VARCHAR(20) not null COMMENT '用例编号',
|
||||||
caseversion VARCHAR(20) not null COMMENT '用例版本',
|
caseversion VARCHAR(20) not null COMMENT '用例版本',
|
||||||
casetime datetime not null COMMENT '执行时间',
|
casetime datetime not null COMMENT '执行时间',
|
||||||
casename VARCHAR(200) not null COMMENT '用例名称',
|
casename VARCHAR(200) not null COMMENT '用例名称',
|
||||||
casestatus VARCHAR(2) default '4' not null COMMENT ' pass:0 fail:1 lock:2 unexcute:4',
|
casestatus VARCHAR(2) default '4' not null COMMENT ' pass:0 fail:1 lock:2 unexcute:4',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table TEST_LOGDETAIL
|
create table TEST_LOGDETAIL
|
||||||
(
|
(
|
||||||
logid int(10) not null AUTO_INCREMENT,
|
logid int(10) not null AUTO_INCREMENT,
|
||||||
logtime datetime not null COMMENT '日志时间',
|
logtime datetime not null COMMENT '日志时间',
|
||||||
detail VARCHAR(5000) not null COMMENT '日志', /*V1.1 扩展日志明细字段到2000*/
|
detail VARCHAR(5000) not null COMMENT '日志', /*V1.1 扩展日志明细字段到2000*/
|
||||||
loggrade VARCHAR(20) COMMENT '日志级别',
|
loggrade VARCHAR(20) COMMENT '日志级别',
|
||||||
caseid int(10) not null COMMENT '用例编号',
|
caseid int(10) not null COMMENT '用例编号',
|
||||||
taskid int(10),
|
taskid int(10),
|
||||||
step VARCHAR(20) COMMENT '用例步骤',
|
step VARCHAR(20) COMMENT '用例步骤',
|
||||||
imgname VARCHAR(30) COMMENT 'UI自动化自动截图地址',
|
imgname VARCHAR(30) COMMENT 'UI自动化自动截图地址',
|
||||||
primary key (logid)
|
primary key (logid)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table TEST_TASKEXCUTE
|
create table TEST_TASKEXCUTE
|
||||||
(
|
(
|
||||||
id int(10) not null AUTO_INCREMENT,
|
id int(10) not null AUTO_INCREMENT,
|
||||||
taskid VARCHAR(150) not null,
|
taskid VARCHAR(150) not null,
|
||||||
casetotal_count int(10) COMMENT '总用例数',
|
casetotal_count int(10) COMMENT '总用例数',
|
||||||
casesucc_count int(10) COMMENT '成功数',
|
casesucc_count int(10) COMMENT '成功数',
|
||||||
casefail_count int(10) COMMENT '失败数',
|
casefail_count int(10) COMMENT '失败数',
|
||||||
caselock_count int(10) COMMENT '锁定数',
|
caselock_count int(10) COMMENT '锁定数',
|
||||||
createtime datetime COMMENT '时间',
|
createtime datetime COMMENT '时间',
|
||||||
jobid int(10) not null,
|
jobid int(10) not null,
|
||||||
finishtime datetime COMMENT '完成时间',
|
finishtime datetime COMMENT '完成时间',
|
||||||
taskstatus VARCHAR(2) default '' COMMENT '状态 0未执行 1执行中 2 成功 4失败 ',
|
taskstatus VARCHAR(2) default '' COMMENT '状态 0未执行 1执行中 2 成功 4失败 ',
|
||||||
casenoexec_count int default 0 COMMENT '未执行用例',
|
casenoexec_count int default 0 COMMENT '未执行用例',
|
||||||
caseisexec VARCHAR(2) COMMENT '任务是否被成功吊起 0 成功吊起 3 吊起失败',
|
caseisexec VARCHAR(2) COMMENT '任务是否被成功吊起 0 成功吊起 3 吊起失败',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table USERINFO
|
create table USERINFO
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
usercode VARCHAR(20) not null,
|
usercode VARCHAR(20) not null,
|
||||||
password VARCHAR(200) not null,
|
password VARCHAR(200) not null,
|
||||||
username VARCHAR(20),
|
username VARCHAR(20),
|
||||||
role VARCHAR(100) COMMENT '角色',
|
role VARCHAR(100) COMMENT '角色',
|
||||||
sectorid int(8) default 0 not null COMMENT '所属部门',
|
sectorid int(8) default 0 not null COMMENT '所属部门',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
create table USER_AUTHORITY
|
create table USER_AUTHORITY
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
module VARCHAR(50) not null COMMENT '模块',
|
module VARCHAR(50) not null COMMENT '模块',
|
||||||
auth_type VARCHAR(50) not null COMMENT '权限类型',
|
auth_type VARCHAR(50) not null COMMENT '权限类型',
|
||||||
alias VARCHAR(50) not null COMMENT '别名',
|
alias VARCHAR(50) not null COMMENT '别名',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
create table USER_ROLE
|
create table USER_ROLE
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
role VARCHAR(50) not null COMMENT '角色',
|
role VARCHAR(50) not null COMMENT '角色',
|
||||||
permission VARCHAR(1000) COMMENT '权限',
|
permission VARCHAR(1000) COMMENT '权限',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
/*插入索引
|
/*插入索引
|
||||||
CREATE INDEX index_caseid ON TEST_LOGDETAIL (caseid);
|
CREATE INDEX index_caseid ON TEST_LOGDETAIL (caseid);
|
||||||
CREATE INDEX index_taskid ON TEST_CASEDETAIL (taskid);*/
|
CREATE INDEX index_taskid ON TEST_CASEDETAIL (taskid);*/
|
||||||
|
|
||||||
/*插入权限默认定义*/
|
/*插入权限默认定义*/
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (1, '质量-版本信息', '增加', 'pv_1');
|
values (1, '质量-版本信息', '增加', 'pv_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (2, '质量-版本信息', '删除', 'pv_2');
|
values (2, '质量-版本信息', '删除', 'pv_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (3, '质量-版本信息', '修改', 'pv_3');
|
values (3, '质量-版本信息', '修改', 'pv_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (4, '质量-版本计划信息', '增加', 'pvp_1');
|
values (4, '质量-版本计划信息', '增加', 'pvp_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (5, '质量-流程检查信息', '增加', 'fc_1');
|
values (5, '质量-流程检查信息', '增加', 'fc_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (6, '质量-流程检查信息', '删除', 'fc_2');
|
values (6, '质量-流程检查信息', '删除', 'fc_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (7, '质量-流程检查信息', '修改', 'fc_3');
|
values (7, '质量-流程检查信息', '修改', 'fc_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (8, '质量-生产故障信息', '增加', 'acc_1');
|
values (8, '质量-生产故障信息', '增加', 'acc_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (9, '质量-生产故障信息', '删除', 'acc_2');
|
values (9, '质量-生产故障信息', '删除', 'acc_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (10, '质量-生产故障信息', '修改', 'acc_3');
|
values (10, '质量-生产故障信息', '修改', 'acc_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (21, '自动化-任务调度', '启动', 'tast_run');
|
values (21, '自动化-任务调度', '启动', 'tast_run');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (22, '自动化-任务调度', '移除', 'tast_remove');
|
values (22, '自动化-任务调度', '移除', 'tast_remove');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (23, '自动化-任务调度', '执行', 'tast_ex');
|
values (23, '自动化-任务调度', '执行', 'tast_ex');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (24, '自动化-任务调度', '增加', 'tast_1');
|
values (24, '自动化-任务调度', '增加', 'tast_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (25, '自动化-任务调度', '删除', 'tast_2');
|
values (25, '自动化-任务调度', '删除', 'tast_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (26, '自动化-任务调度', '修改', 'tast_3');
|
values (26, '自动化-任务调度', '修改', 'tast_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (27, '自动化-任务调度', '上传', 'tast_upload');
|
values (27, '自动化-任务调度', '上传', 'tast_upload');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (11, '质量-流程检查计划', '增加', 'pfc_1');
|
values (11, '质量-流程检查计划', '增加', 'pfc_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (12, '质量-流程检查计划', '删除', 'pfc_2');
|
values (12, '质量-流程检查计划', '删除', 'pfc_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (13, '质量-流程检查计划', '修改', 'pfc_3');
|
values (13, '质量-流程检查计划', '修改', 'pfc_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (14, '质量-流程检查计划', '转计划', 'fc_tocheck');
|
values (14, '质量-流程检查计划', '转计划', 'fc_tocheck');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (15, '质量-评审信息详情', '增加', 'revinfo_1');
|
values (15, '质量-评审信息详情', '增加', 'revinfo_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (16, '质量-评审信息详情', '删除', 'revinfo_2');
|
values (16, '质量-评审信息详情', '删除', 'revinfo_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (17, '质量-评审信息详情', '修改', 'revinfo_3');
|
values (17, '质量-评审信息详情', '修改', 'revinfo_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (18, '质量-评审信息', '删除', 'rev_2');
|
values (18, '质量-评审信息', '删除', 'rev_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (19, '质量-评审信息', '修改', 'rev_3');
|
values (19, '质量-评审信息', '修改', 'rev_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (20, '质量-生产故障信息', '上传', 'acc_upload');
|
values (20, '质量-生产故障信息', '上传', 'acc_upload');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (41, '用户管理', '增加', 'ui_1');
|
values (41, '用户管理', '增加', 'ui_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (42, '用户管理', '删除', 'ui_2');
|
values (42, '用户管理', '删除', 'ui_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (43, '用户管理', '修改', 'ui_3');
|
values (43, '用户管理', '修改', 'ui_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (44, '用户管理', '查看', 'ui_4');
|
values (44, '用户管理', '查看', 'ui_4');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (45, '用户管理-权限角色', '查看修改', 'role_3');
|
values (45, '用户管理-权限角色', '查看修改', 'role_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (28, '自动化-任务列表', '删除', 'tastex_2');
|
values (28, '自动化-任务列表', '删除', 'tastex_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (29, '自动化-用例列表', '执行', 'case_ex');
|
values (29, '自动化-用例列表', '执行', 'case_ex');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (46, '用户管理-权限角色', '增加', 'role_1');
|
values (46, '用户管理-权限角色', '增加', 'role_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (47, '用户管理-权限角色', '删除', 'role_2');
|
values (47, '用户管理-权限角色', '删除', 'role_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (48, '项目管理', '增加', 'pro_1');
|
values (48, '项目管理', '增加', 'pro_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (49, '项目管理', '删除', 'pro_2');
|
values (49, '项目管理', '删除', 'pro_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (50, '项目管理', '修改', 'pro_3');
|
values (50, '项目管理', '修改', 'pro_3');
|
||||||
|
|
||||||
/*插入角色默认定义*/
|
/*插入角色默认定义*/
|
||||||
insert into USER_ROLE (id, role, permission)
|
insert into USER_ROLE (id, role, permission)
|
||||||
values (2, '测试工程师', 'acc_1,acc_2,acc_3,');
|
values (2, '测试工程师', 'acc_1,acc_2,acc_3,');
|
||||||
insert into USER_ROLE (id, role, permission)
|
insert into USER_ROLE (id, role, permission)
|
||||||
values (3, '自动化工程师', 'acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,');
|
values (3, '自动化工程师', 'acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,');
|
||||||
insert into USER_ROLE (id, role, permission)
|
insert into USER_ROLE (id, role, permission)
|
||||||
values (4, '质量工程师', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,');
|
values (4, '质量工程师', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,');
|
||||||
insert into USER_ROLE (id, role, permission)
|
insert into USER_ROLE (id, role, permission)
|
||||||
values (1, '管理员', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,ui_1,ui_2,ui_3,ui_4,role_3,role_1,role_2,');
|
values (1, '管理员', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,ui_1,ui_2,ui_3,ui_4,role_3,role_1,role_2,');
|
||||||
|
|
||||||
/*插入默认部门分级*/
|
/*插入默认部门分级*/
|
||||||
insert into QA_SECONDARYSECTOR (sectorid, departmenthead, departmentname)
|
insert into QA_SECONDARYSECTOR (sectorid, departmenthead, departmentname)
|
||||||
values (99, '系统管理员', '总部');
|
values (99, '系统管理员', '总部');
|
||||||
/*插入默认项目*/
|
/*插入默认项目*/
|
||||||
insert into QA_SECTORPROJECTS (projectid, projectname, projectmanager, sectorid, projecttype)
|
insert into QA_SECTORPROJECTS (projectid, projectname, projectmanager, sectorid, projecttype)
|
||||||
values (99, '全部项目/未知项目', '系统管理员', 99, 0);
|
values (99, '全部项目/未知项目', '系统管理员', 99, 0);
|
||||||
/*插入默认管理员*/
|
/*插入默认管理员*/
|
||||||
insert into USERINFO (id, usercode, password, username, role, sectorid)
|
insert into USERINFO (id, usercode, password, username, role, sectorid)
|
||||||
values (1, 'admin', 'uJ45aIeS9N80kaSFDjvk%2FA%3D%3D', '系统管理员', '1', 99);
|
values (1, 'admin', 'uJ45aIeS9N80kaSFDjvk%2FA%3D%3D', '系统管理员', '1', 99);
|
||||||
/*插入流程检查定义数据*/
|
/*插入流程检查定义数据*/
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (36, 5, '总结阶段', 2, '计划变更', 1, '如与计划不合,是否提交计划变更邮件', null);
|
values (36, 5, '总结阶段', 2, '计划变更', 1, '如与计划不合,是否提交计划变更邮件', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (37, 5, '总结阶段', 3, '代码质量', 1, 'sonar代码检查是否刷新构建', null);
|
values (37, 5, '总结阶段', 3, '代码质量', 1, 'sonar代码检查是否刷新构建', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (38, 5, '总结阶段', 3, '代码质量', 2, 'sonar代码问题数是否符合要求', null);
|
values (38, 5, '总结阶段', 3, '代码质量', 2, 'sonar代码问题数是否符合要求', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (35, 2, '开发阶段', 3, '开发与编码', 6, '是否每一条禅道开发任务都提交转测申请', null);
|
values (35, 2, '开发阶段', 3, '开发与编码', 6, '是否每一条禅道开发任务都提交转测申请', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (34, 4, '验收与上线', 2, '上线部署', 3, 'SVN代码是否提交并标注', null);
|
values (34, 4, '验收与上线', 2, '上线部署', 3, 'SVN代码是否提交并标注', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (1, 1, '需求阶段', 1, '需求编制', 1, '《产品需求说明书》是否组织评审会', null);
|
values (1, 1, '需求阶段', 1, '需求编制', 1, '《产品需求说明书》是否组织评审会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (2, 1, '需求阶段', 1, '需求编制', 2, '《产品需求说明书》评审是否通过', null);
|
values (2, 1, '需求阶段', 1, '需求编制', 2, '《产品需求说明书》评审是否通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (3, 1, '需求阶段', 1, '需求编制', 3, '《产品需求说明书》是否归档到SVN', null);
|
values (3, 1, '需求阶段', 1, '需求编制', 3, '《产品需求说明书》是否归档到SVN', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (4, 1, '需求阶段', 1, '需求编制', 4, '《产品需求说明书》评审记录表是否签字通过', null);
|
values (4, 1, '需求阶段', 1, '需求编制', 4, '《产品需求说明书》评审记录表是否签字通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (5, 2, '开发阶段', 1, '需求分解', 1, '是否有需求分解/任务讨论会', null);
|
values (5, 2, '开发阶段', 1, '需求分解', 1, '是否有需求分解/任务讨论会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (6, 2, '开发阶段', 1, '需求分解', 2, '《项目计划》邮件是否及时发出', null);
|
values (6, 2, '开发阶段', 1, '需求分解', 2, '《项目计划》邮件是否及时发出', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (7, 2, '开发阶段', 1, '需求分解', 3, '《项目计划》邮件内容是否完整', null);
|
values (7, 2, '开发阶段', 1, '需求分解', 3, '《项目计划》邮件内容是否完整', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (10, 2, '开发阶段', 2, '软件设计', 1, '《产品开发概要设计》是否组织评审会', null);
|
values (10, 2, '开发阶段', 2, '软件设计', 1, '《产品开发概要设计》是否组织评审会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (11, 2, '开发阶段', 2, '软件设计', 2, '《产品开发概要设计》评审是否通过', null);
|
values (11, 2, '开发阶段', 2, '软件设计', 2, '《产品开发概要设计》评审是否通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (12, 2, '开发阶段', 2, '软件设计', 3, '《产品开发概要设计》是否归档到SVN', null);
|
values (12, 2, '开发阶段', 2, '软件设计', 3, '《产品开发概要设计》是否归档到SVN', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (13, 2, '开发阶段', 2, '软件设计', 4, '《产品开发概要设计》评审记录表是否签字通过', null);
|
values (13, 2, '开发阶段', 2, '软件设计', 4, '《产品开发概要设计》评审记录表是否签字通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (14, 2, '开发阶段', 3, '开发与编码', 1, '是否进行每日晨会', null);
|
values (14, 2, '开发阶段', 3, '开发与编码', 1, '是否进行每日晨会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (15, 2, '开发阶段', 3, '开发与编码', 2, '是否进行代码走读', null);
|
values (15, 2, '开发阶段', 3, '开发与编码', 2, '是否进行代码走读', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (16, 2, '开发阶段', 3, '开发与编码', 3, '是否每一条禅道开发任务都提交转测申请', null);
|
values (16, 2, '开发阶段', 3, '开发与编码', 3, '是否每一条禅道开发任务都提交转测申请', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (17, 2, '开发阶段', 3, '开发与编码', 4, '转测邮件是否合格', null);
|
values (17, 2, '开发阶段', 3, '开发与编码', 4, '转测邮件是否合格', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (18, 2, '开发阶段', 3, '开发与编码', 5, '转测邮件打回次数为0', null);
|
values (18, 2, '开发阶段', 3, '开发与编码', 5, '转测邮件打回次数为0', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (19, 3, '测试阶段', 1, '软件测试', 1, '是否回复测试计划', null);
|
values (19, 3, '测试阶段', 1, '软件测试', 1, '是否回复测试计划', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (20, 3, '测试阶段', 1, '软件测试', 2, '是否回复测试用例', null);
|
values (20, 3, '测试阶段', 1, '软件测试', 2, '是否回复测试用例', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (21, 3, '测试阶段', 1, '软件测试', 3, '测试用例是否通过评审/确认', null);
|
values (21, 3, '测试阶段', 1, '软件测试', 3, '测试用例是否通过评审/确认', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (22, 3, '测试阶段', 1, '软件测试', 4, '《软件测试报告》是否组织评审会', null);
|
values (22, 3, '测试阶段', 1, '软件测试', 4, '《软件测试报告》是否组织评审会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (23, 3, '测试阶段', 1, '软件测试', 5, '《软件测试报告》是否评审通过', null);
|
values (23, 3, '测试阶段', 1, '软件测试', 5, '《软件测试报告》是否评审通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (24, 3, '测试阶段', 1, '软件测试', 6, '《软件测试报告》/测试结果是否发出邮件', null);
|
values (24, 3, '测试阶段', 1, '软件测试', 6, '《软件测试报告》/测试结果是否发出邮件', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (25, 3, '测试阶段', 1, '软件测试', 7, '《软件测试报告》评审记录表是否签字通过', null);
|
values (25, 3, '测试阶段', 1, '软件测试', 7, '《软件测试报告》评审记录表是否签字通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (26, 4, '验收与上线', 1, '产品验收', 1, '《产品验收报告》是否组织评审会', null);
|
values (26, 4, '验收与上线', 1, '产品验收', 1, '《产品验收报告》是否组织评审会', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (27, 4, '验收与上线', 1, '产品验收', 2, '《产品验收报告》是否评审通过', null);
|
values (27, 4, '验收与上线', 1, '产品验收', 2, '《产品验收报告》是否评审通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (28, 4, '验收与上线', 1, '产品验收', 3, '《产品验收报告》是否归档到SVN', null);
|
values (28, 4, '验收与上线', 1, '产品验收', 3, '《产品验收报告》是否归档到SVN', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (29, 4, '验收与上线', 1, '产品验收', 4, '《产品验收报告》评审记录表是否签字通过', null);
|
values (29, 4, '验收与上线', 1, '产品验收', 4, '《产品验收报告》评审记录表是否签字通过', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (30, 4, '验收与上线', 2, '上线部署', 1, '产品/开发是否提交上线流程(OA)', null);
|
values (30, 4, '验收与上线', 2, '上线部署', 1, '产品/开发是否提交上线流程(OA)', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (31, 4, '验收与上线', 2, '上线部署', 2, '开发是否提交上线相关资料', null);
|
values (31, 4, '验收与上线', 2, '上线部署', 2, '开发是否提交上线相关资料', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (32, 5, '总结阶段', 1, '项目总结', 1, '《项目总结》邮件是否及时发出', null);
|
values (32, 5, '总结阶段', 1, '项目总结', 1, '《项目总结》邮件是否及时发出', null);
|
||||||
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
values (33, 5, '总结阶段', 1, '项目总结', 2, '《项目总结》邮件内容是否完整', null);
|
values (33, 5, '总结阶段', 1, '项目总结', 2, '《项目总结》邮件内容是否完整', null);
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,708 @@
|
||||||
|
create table OPERATION_LOG
|
||||||
|
(
|
||||||
|
id int(9) not null AUTO_INCREMENT,
|
||||||
|
tablename VARCHAR(30) not null COMMENT '被记录日志表名',
|
||||||
|
tableid int(8) not null COMMENT '被记录日志ID',
|
||||||
|
operation_time VARCHAR(30) not null COMMENT '操作时间',
|
||||||
|
operationer VARCHAR(20) not null COMMENT '操作人员',
|
||||||
|
operation_description VARCHAR(200) not null COMMENT '描述',
|
||||||
|
projectid int(8) COMMENT '项目ID',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_ACCIDENT
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
|
accstatus VARCHAR(80) not null COMMENT '事故状态',
|
||||||
|
eventtime VARCHAR(30) COMMENT '事故发生时间',
|
||||||
|
reporter VARCHAR(20) not null COMMENT '报告人',
|
||||||
|
reporttime VARCHAR(30) not null COMMENT '事故报告时间',
|
||||||
|
accdescription VARCHAR(500) not null COMMENT '事故描述',
|
||||||
|
acclevel VARCHAR(60) not null COMMENT '事故等级',
|
||||||
|
causalanalysis VARCHAR(500) COMMENT '原因分析',
|
||||||
|
causaltype VARCHAR(100) COMMENT '原因类型',
|
||||||
|
consequenceanalysis VARCHAR(300) COMMENT '后果分析',
|
||||||
|
correctiveaction VARCHAR(300) COMMENT '纠正措施',
|
||||||
|
resolutiontime VARCHAR(30) COMMENT '解决时间',
|
||||||
|
resolutioner VARCHAR(20) COMMENT '解决处理人',
|
||||||
|
preventiveaction VARCHAR(300) COMMENT '预防措施',
|
||||||
|
preventiver VARCHAR(20) COMMENT '预防措施责任人',
|
||||||
|
preventiveplandate VARCHAR(30) COMMENT '预防措施计划完成时间',
|
||||||
|
preventiveaccdate VARCHAR(30) COMMENT '预防措施实际完成时间',
|
||||||
|
trouble_duration int(8) COMMENT '事故持续时间',
|
||||||
|
impact_time int(8),
|
||||||
|
filename VARCHAR(100) COMMENT '附件路径',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_FLOWCHECK
|
||||||
|
(
|
||||||
|
id int(10) not null AUTO_INCREMENT,
|
||||||
|
checkid int(10) not null COMMENT '检查id',
|
||||||
|
projectid int(10) not null COMMENT '项目id',
|
||||||
|
projectphase VARCHAR(20) not null COMMENT '项目阶段',
|
||||||
|
phasenode VARCHAR(50) not null COMMENT '阶段节点',
|
||||||
|
checkentry VARCHAR(100) not null COMMENT '检查内容',
|
||||||
|
checkresult VARCHAR(20) COMMENT '检查结果',
|
||||||
|
checkdate VARCHAR(20) COMMENT '检查日期',
|
||||||
|
checkdescriptions VARCHAR(400) COMMENT '不符合项描述',
|
||||||
|
stateupdate VARCHAR(20) COMMENT '状态更新',
|
||||||
|
updatedate VARCHAR(20) COMMENT '更新日期',
|
||||||
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
|
versionnum VARCHAR(30) COMMENT '版本号',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_FLOWINFO
|
||||||
|
(
|
||||||
|
id int(10) not null AUTO_INCREMENT,
|
||||||
|
phaseid int(10) not null,
|
||||||
|
phasename VARCHAR(20) not null,
|
||||||
|
phasenodeid int(10) not null,
|
||||||
|
phasenodename VARCHAR(20) not null,
|
||||||
|
checkentryid int(10) not null,
|
||||||
|
checkentry VARCHAR(200) not null,
|
||||||
|
remark VARCHAR(100),
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_PLANFLOWCHECK
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
|
versionnum VARCHAR(30) COMMENT '版本号',
|
||||||
|
checkentryid VARCHAR(20) not null COMMENT '检查ID',
|
||||||
|
plandate VARCHAR(20) not null COMMENT '计划检查日期',
|
||||||
|
status int(4) not null COMMENT '计划状态:1 检查计划 2 已检查',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_PROJECTVERSION
|
||||||
|
(
|
||||||
|
versionid int(10) not null AUTO_INCREMENT,
|
||||||
|
versionnumber VARCHAR(20) COMMENT '版本号',
|
||||||
|
plan_launchdate VARCHAR(20) COMMENT '计划上线日期',
|
||||||
|
actually_launchdate VARCHAR(20) COMMENT '实际上线日期',
|
||||||
|
plan_devstart VARCHAR(20) COMMENT '计划开发开始时间',
|
||||||
|
plan_devend VARCHAR(20) COMMENT '计划开发结束时间',
|
||||||
|
actually_devstart VARCHAR(20) COMMENT '实际开发开始时间',
|
||||||
|
actually_devend VARCHAR(20) COMMENT '实际开发结束时间',
|
||||||
|
plan_teststart VARCHAR(20) COMMENT '计划测试开始时间',
|
||||||
|
plan_testend VARCHAR(20) COMMENT '计划测试结束时间',
|
||||||
|
actually_teststart VARCHAR(20) COMMENT '实际测试开始时间',
|
||||||
|
actually_testend VARCHAR(20) COMMENT '实际测试结束时间',
|
||||||
|
plan_demand int(10) COMMENT '计划上线需求数',
|
||||||
|
actually_demand int(10) COMMENT '实际上线需求数',
|
||||||
|
codeline FLOAT(10) COMMENT '代码变动行数',
|
||||||
|
testcasenum int(10) COMMENT '测试用例数',
|
||||||
|
changetestingreturn int(10) COMMENT '版本转测试打回次数',
|
||||||
|
dev_member VARCHAR(50) COMMENT '开发投入人力',
|
||||||
|
test_member VARCHAR(50) COMMENT '测试投入人力',
|
||||||
|
human_cost VARCHAR(20) COMMENT '耗费人力 人/天',
|
||||||
|
per_dev VARCHAR(20) COMMENT '开发平均生产率 人/天/行',
|
||||||
|
per_test VARCHAR(20) COMMENT '用例编写/用例执行',
|
||||||
|
code_di VARCHAR(20) COMMENT '代码DI值',
|
||||||
|
qualityreview VARCHAR(500) COMMENT '质量回溯',
|
||||||
|
imprint VARCHAR(500) COMMENT '版本说明',
|
||||||
|
remark VARCHAR(500) COMMENT '备注',
|
||||||
|
projectid int(10) COMMENT '项目ID',
|
||||||
|
devtime_deviation VARCHAR(20) COMMENT '开发偏移率',
|
||||||
|
devdelay_days VARCHAR(20) COMMENT '开发延迟时间',
|
||||||
|
testtime_deviation VARCHAR(20) COMMENT '测试偏移率',
|
||||||
|
testdelay_days VARCHAR(20) COMMENT '测试延迟时间',
|
||||||
|
protime_deviation VARCHAR(20),
|
||||||
|
prodelay_days VARCHAR(20),
|
||||||
|
bug_zm int(10),
|
||||||
|
bug_yz int(10),
|
||||||
|
bug_yb int(10),
|
||||||
|
bug_ts int(10),
|
||||||
|
versiontype int(8) default 1 not null COMMENT '版本类型',
|
||||||
|
perdemand FLOAT(8) default 0.00,
|
||||||
|
codestandard_zd int(10) default 0 not null,
|
||||||
|
codestandard_yz int(10) default 0 not null,
|
||||||
|
codestandard_zy int(10) default 0 not null,
|
||||||
|
zt_versionlink VARCHAR(100) COMMENT '禅道链接',
|
||||||
|
human_costdev VARCHAR(20) default '0' COMMENT '开发人力成本',
|
||||||
|
human_costtest VARCHAR(20) default '0' COMMENT '测试人力成本',
|
||||||
|
primary key (versionid)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_REVIEW
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
|
version VARCHAR(20) not null COMMENT '版本号',
|
||||||
|
review_type VARCHAR(20) COMMENT '评审类型',
|
||||||
|
review_date VARCHAR(20) COMMENT '评审日期',
|
||||||
|
bug_num int(8) COMMENT '问题数',
|
||||||
|
repair_num int(8) COMMENT '已修复问题数',
|
||||||
|
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
||||||
|
review_object VARCHAR(100) COMMENT '评审对象',
|
||||||
|
review_result VARCHAR(50) COMMENT '评审结果',
|
||||||
|
result_confirmor VARCHAR(50) COMMENT '结果确认人',
|
||||||
|
remark VARCHAR(500) COMMENT '备注',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_REVIEWINFO
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
review_id int(8) not null COMMENT '评审ID',
|
||||||
|
bug_description VARCHAR(500) COMMENT '问题描述',
|
||||||
|
status VARCHAR(20) COMMENT '状态',
|
||||||
|
duty_officer VARCHAR(100) COMMENT '责任人',
|
||||||
|
confirm_date VARCHAR(20) COMMENT '最后确认日期',
|
||||||
|
corrective VARCHAR(500) COMMENT '纠正措施',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_SECONDARYSECTOR
|
||||||
|
(
|
||||||
|
sectorid int(10) not null AUTO_INCREMENT,
|
||||||
|
departmenthead VARCHAR(20),
|
||||||
|
departmentname VARCHAR(20),
|
||||||
|
primary key (sectorid)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_SECTORPROJECTS
|
||||||
|
(
|
||||||
|
projectid int(10) not null AUTO_INCREMENT,
|
||||||
|
projectname VARCHAR(100) not null,
|
||||||
|
projectmanager VARCHAR(100) not null,
|
||||||
|
sectorid int(10) not null,
|
||||||
|
projecttype int(4) default 0 not null,
|
||||||
|
projectsign VARCHAR(20) default 'sign' not null,
|
||||||
|
primary key (projectid)
|
||||||
|
)default character set utf8;
|
||||||
|
create table QA_ZTTASK
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
versionid int(8) COMMENT '版本ID',
|
||||||
|
versionname VARCHAR(100) COMMENT '版本名称',
|
||||||
|
taskname VARCHAR(300) COMMENT '任务名称',
|
||||||
|
assigneddate VARCHAR(50) COMMENT '完成时间',
|
||||||
|
estimate int(8) COMMENT '预期工时',
|
||||||
|
consumed int(8) COMMENT '实际工时',
|
||||||
|
finishedby VARCHAR(40) COMMENT '完成人账号',
|
||||||
|
finishedname VARCHAR(40) COMMENT '完成人姓名',
|
||||||
|
deadline VARCHAR(40) COMMENT '计划截止日期',
|
||||||
|
delaystatus int(4) COMMENT '延期状态',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
create table TEST_JOBS
|
||||||
|
(
|
||||||
|
id int(10) not null AUTO_INCREMENT,
|
||||||
|
name VARCHAR(100) not null COMMENT '调度名称',
|
||||||
|
startdate VARCHAR(100) COMMENT '开始日期',
|
||||||
|
starttime VARCHAR(100) COMMENT '开始时间',
|
||||||
|
enddate VARCHAR(100) COMMENT '结束日期',
|
||||||
|
endtime VARCHAR(100) COMMENT '结束时间',
|
||||||
|
runtime datetime COMMENT '执行时间',
|
||||||
|
remark VARCHAR(800) COMMENT '备注',
|
||||||
|
planproj VARCHAR(100) COMMENT '项目名(testlink)中',
|
||||||
|
state VARCHAR(4) not null COMMENT '状态',
|
||||||
|
tasktype VARCHAR(4) not null COMMENT '执行类型 O执行一次 D每天执行',
|
||||||
|
starttimestr VARCHAR(100) COMMENT '执行时间表达式',
|
||||||
|
endtimestr VARCHAR(100) COMMENT '结束时间',
|
||||||
|
createtime datetime not null,
|
||||||
|
noenddate VARCHAR(10) COMMENT '是否有结束日期',
|
||||||
|
time int default 0,
|
||||||
|
timetype VARCHAR(4),
|
||||||
|
issendmail VARCHAR(4) default "0" COMMENT '是否发送邮件通知',
|
||||||
|
emailer VARCHAR(250) COMMENT '邮件地址',
|
||||||
|
threadcount int default 1 COMMENT '客户端线程数(接口)',
|
||||||
|
testlinkname VARCHAR(200) COMMENT 'TESTLINK中的计划名称',
|
||||||
|
isbuilding VARCHAR(4) default '0' not null COMMENT '是否自动构建',
|
||||||
|
buildname VARCHAR(100) COMMENT '构建链接',
|
||||||
|
isrestart VARCHAR(4) default '0' not null COMMENT '是否自动重启',
|
||||||
|
restartcomm VARCHAR(200) COMMENT '重启脚本',
|
||||||
|
extype int(4) default 0 not null COMMENT '执行类型',
|
||||||
|
browsertype int(4) COMMENT 'UI自动化浏览器类型',
|
||||||
|
timeout int(8) default 60 not null COMMENT '任务超时中断时间(分钟)',
|
||||||
|
clientip VARCHAR(30) default '127.0.0.1' not null COMMENT '版本ID',
|
||||||
|
clientpath VARCHAR(100) COMMENT '客户端测试驱动桩路径',
|
||||||
|
projecttype int(4) default "0" COMMENT '项目类型 系统内项目 0 testlink 1',
|
||||||
|
projectid int(8) COMMENT '系统内项目ID',
|
||||||
|
planid int(8) COMMENT '系统内项目关联测试计划ID',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
create table TEST_CASEDETAIL
|
||||||
|
(
|
||||||
|
id int(10) not null AUTO_INCREMENT,
|
||||||
|
taskid int(10) not null,
|
||||||
|
caseno VARCHAR(20) not null COMMENT '用例编号',
|
||||||
|
caseversion VARCHAR(20) not null COMMENT '用例版本',
|
||||||
|
casetime datetime not null COMMENT '执行时间',
|
||||||
|
casename VARCHAR(200) not null COMMENT '用例名称',
|
||||||
|
casestatus VARCHAR(2) default '4' not null COMMENT ' pass:0 fail:1 lock:2 unexcute:4',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
create table TEST_LOGDETAIL
|
||||||
|
(
|
||||||
|
logid int(10) not null AUTO_INCREMENT,
|
||||||
|
logtime datetime not null COMMENT '日志时间',
|
||||||
|
detail VARCHAR(5000) not null COMMENT '日志', /*V1.1 扩展日志明细字段到2000*/
|
||||||
|
loggrade VARCHAR(20) COMMENT '日志级别',
|
||||||
|
caseid int(10) not null COMMENT '用例编号',
|
||||||
|
taskid int(10),
|
||||||
|
step VARCHAR(20) COMMENT '用例步骤',
|
||||||
|
imgname VARCHAR(30) COMMENT 'UI自动化自动截图地址',
|
||||||
|
primary key (logid)
|
||||||
|
)default character set utf8;
|
||||||
|
create table TEST_TASKEXCUTE
|
||||||
|
(
|
||||||
|
id int(10) not null AUTO_INCREMENT,
|
||||||
|
taskid VARCHAR(150) not null,
|
||||||
|
casetotal_count int(10) COMMENT '总用例数',
|
||||||
|
casesucc_count int(10) COMMENT '成功数',
|
||||||
|
casefail_count int(10) COMMENT '失败数',
|
||||||
|
caselock_count int(10) COMMENT '锁定数',
|
||||||
|
createtime datetime COMMENT '时间',
|
||||||
|
jobid int(10) not null,
|
||||||
|
finishtime datetime COMMENT '完成时间',
|
||||||
|
taskstatus VARCHAR(2) default '' COMMENT '状态 0未执行 1执行中 2 成功 4失败 ',
|
||||||
|
casenoexec_count int default 0 COMMENT '未执行用例',
|
||||||
|
caseisexec VARCHAR(2) COMMENT '任务是否被成功吊起 0 成功吊起 3 吊起失败',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
create table USERINFO
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
usercode VARCHAR(20) not null,
|
||||||
|
password VARCHAR(200) not null,
|
||||||
|
username VARCHAR(20),
|
||||||
|
role VARCHAR(100) COMMENT '角色',
|
||||||
|
sectorid int(8) default 0 not null COMMENT '所属部门',
|
||||||
|
projectid int(4) default 0 not null COMMENT '默认选择项目',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
create table USER_AUTHORITY
|
||||||
|
(
|
||||||
|
id int(9) not null AUTO_INCREMENT,
|
||||||
|
module VARCHAR(50) not null COMMENT '模块',
|
||||||
|
auth_type VARCHAR(50) not null COMMENT '权限类型',
|
||||||
|
alias VARCHAR(50) not null COMMENT '别名',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
create table USER_ROLE
|
||||||
|
(
|
||||||
|
id int(9) not null AUTO_INCREMENT,
|
||||||
|
role VARCHAR(50) not null COMMENT '角色',
|
||||||
|
permission VARCHAR(1000) COMMENT '权限',
|
||||||
|
opprojectid VARCHAR(200) COMMENT '可操作的项目',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
create table TEST_CLIENT
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
clientip VARCHAR(30) not null COMMENT '客户端IP',
|
||||||
|
name VARCHAR(30) not null COMMENT '客户端名称',
|
||||||
|
projectper VARCHAR(200) COMMENT '使用项目',
|
||||||
|
status int(2) COMMENT '客户端超时 0 正常 1 链接失败 2 状态未知',
|
||||||
|
checkinterval int(6) not null COMMENT '检查客户端状态心跳间隔时间 单位:秒',
|
||||||
|
clientpath VARCHAR(100) COMMENT '客户端测试驱动桩路径 多个;做分隔';
|
||||||
|
remark VARCHAR(100) COMMENT '备注',
|
||||||
|
primary key (id)
|
||||||
|
)default character set utf8;
|
||||||
|
/*用例管理模块*/
|
||||||
|
create table PROJECT_CASE
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
sign VARCHAR(20) not null COMMENT '用例标识',
|
||||||
|
name VARCHAR(200) not null COMMENT '用例名称',
|
||||||
|
projectid int(8) not null COMMENT '关联项目ID',
|
||||||
|
moduleid int(8) not null COMMENT '关联项目模块ID',
|
||||||
|
projectindex int(8) not null COMMENT '项目用例编号',
|
||||||
|
time VARCHAR(30) COMMENT '最后更新时间',
|
||||||
|
operationer VARCHAR(20) COMMENT '最后更新人员',
|
||||||
|
casetype int(2) not null COMMENT '0 接口 1 UI',
|
||||||
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
|
||||||
|
create table PROJECT_CASESTEPS
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
path VARCHAR(100) COMMENT '包路径|定位路径',
|
||||||
|
operation VARCHAR(100) COMMENT '方法名|操作',
|
||||||
|
parameters VARCHAR(500) COMMENT '参数',
|
||||||
|
action VARCHAR(50) COMMENT '步骤动作',
|
||||||
|
caseid int(8) not null COMMENT '用例ID',
|
||||||
|
stepnum int(2) not null COMMENT '步骤编号',
|
||||||
|
expectedresult VARCHAR(2000) COMMENT '预期结果',
|
||||||
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
|
steptype int(2) not null COMMENT '0 接口 1 UI',
|
||||||
|
time VARCHAR(30) COMMENT '最后更新时间',
|
||||||
|
operationer VARCHAR(20) COMMENT '最后更新人员',
|
||||||
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
|
||||||
|
create table PROJECT_PLAN
|
||||||
|
(
|
||||||
|
id int(9) not null AUTO_INCREMENT,
|
||||||
|
name VARCHAR(50) not null COMMENT '测试计划名称',
|
||||||
|
casecount int(8) COMMENT '计划中用例总数',
|
||||||
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
|
time VARCHAR(30) COMMENT '最后更新时间',
|
||||||
|
operationer VARCHAR(20) COMMENT '最后更新人员',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
|
||||||
|
create table PROJECT_PLANCASE
|
||||||
|
(
|
||||||
|
id int(9) not null AUTO_INCREMENT,
|
||||||
|
caseid int(8) not null COMMENT '用例ID',
|
||||||
|
planid int(8) not null COMMENT '项目计划ID',
|
||||||
|
priority int(8) not null COMMENT '用例优先级',
|
||||||
|
primary key (ID),
|
||||||
|
index (caseid),
|
||||||
|
index (planid)
|
||||||
|
)default character set utf8;
|
||||||
|
|
||||||
|
create table PROJECT_MODULE
|
||||||
|
(
|
||||||
|
id int(9) not null AUTO_INCREMENT,
|
||||||
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
|
modulename VARCHAR(50) COMMENT '模块名字',
|
||||||
|
pid int(4) COMMENT '层级关系',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
|
||||||
|
create table PROJECT_PROTOCOLTEMPLATE
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
|
name VARCHAR(50) not null COMMENT '模板名称',
|
||||||
|
protocoltype VARCHAR(20) not null COMMENT '协议类型',
|
||||||
|
contentencoding VARCHAR(20) not null COMMENT '编码格式',
|
||||||
|
time VARCHAR(30) COMMENT '最后更新时间',
|
||||||
|
operationer VARCHAR(20) COMMENT '最后更新人员',
|
||||||
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
|
||||||
|
create table PROJECT_TEMPLATEPARAMS
|
||||||
|
(
|
||||||
|
id int(9) not null AUTO_INCREMENT,
|
||||||
|
templateid int(8) not null COMMENT '模块ID',
|
||||||
|
paramname VARCHAR(50) not null COMMENT '参数名',
|
||||||
|
param VARCHAR(2000) COMMENT '参数默认值',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
|
||||||
|
create table PROJECT_CASESTEPSPARAMS
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
steptype int(2) not null COMMENT '步骤类型',
|
||||||
|
parentid int(8) not null COMMENT '父节点ID',
|
||||||
|
fieldname VARCHAR(50) COMMENT '所属字段名',
|
||||||
|
paramvalue VARCHAR(200) COMMENT '参数值',
|
||||||
|
description VARCHAR(50) COMMENT '描述',
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
|
||||||
|
create table TEMP_CASESTEPDEBUG
|
||||||
|
(
|
||||||
|
id int(8) not null AUTO_INCREMENT,
|
||||||
|
sign VARCHAR(20) not null COMMENT '用例标识',
|
||||||
|
executor VARCHAR(20) not null COMMENT '执行人',
|
||||||
|
loglevel VARCHAR(10) not null COMMENT '日志级别',
|
||||||
|
detail VARCHAR(5000) not null COMMENT '日志', /*V1.1 扩展日志明细字段到2000*/
|
||||||
|
primary key (ID)
|
||||||
|
)default character set utf8;
|
||||||
|
/*插入索引
|
||||||
|
CREATE INDEX index_caseid ON TEST_LOGDETAIL (caseid);
|
||||||
|
CREATE INDEX index_taskid ON TEST_CASEDETAIL (taskid);*/
|
||||||
|
|
||||||
|
/*插入权限默认定义*/
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (1, '质量-版本信息', '增加', 'pv_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (2, '质量-版本信息', '删除', 'pv_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (3, '质量-版本信息', '修改', 'pv_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (4, '质量-版本计划信息', '增加', 'pvp_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (5, '质量-流程检查信息', '增加', 'fc_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (6, '质量-流程检查信息', '删除', 'fc_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (7, '质量-流程检查信息', '修改', 'fc_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (8, '质量-生产故障信息', '增加', 'acc_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (9, '质量-生产故障信息', '删除', 'acc_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (10, '质量-生产故障信息', '修改', 'acc_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (21, '自动化-任务调度', '启动', 'tast_run');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (22, '自动化-任务调度', '移除', 'tast_remove');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (23, '自动化-任务调度', '执行', 'tast_ex');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (24, '自动化-任务调度', '增加', 'tast_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (25, '自动化-任务调度', '删除', 'tast_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (26, '自动化-任务调度', '修改', 'tast_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (27, '自动化-任务调度', '上传', 'tast_upload');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (11, '质量-流程检查计划', '增加', 'pfc_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (12, '质量-流程检查计划', '删除', 'pfc_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (13, '质量-流程检查计划', '修改', 'pfc_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (14, '质量-流程检查计划', '转计划', 'fc_tocheck');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (15, '质量-评审信息详情', '增加', 'revinfo_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (16, '质量-评审信息详情', '删除', 'revinfo_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (17, '质量-评审信息详情', '修改', 'revinfo_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (18, '质量-评审信息', '删除', 'rev_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (19, '质量-评审信息', '修改', 'rev_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (20, '质量-生产故障信息', '上传', 'acc_upload');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (41, '用户管理', '增加', 'ui_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (42, '用户管理', '删除', 'ui_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (43, '用户管理', '修改', 'ui_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (44, '用户管理', '查看', 'ui_4');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (45, '用户管理-权限角色', '查看修改', 'role_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (28, '自动化-任务列表', '删除', 'tastex_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (29, '自动化-用例列表', '执行', 'case_ex');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (46, '用户管理-权限角色', '增加', 'role_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (47, '用户管理-权限角色', '删除', 'role_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (48, '项目管理', '增加', 'pro_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (49, '项目管理', '删除', 'pro_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (50, '项目管理', '修改', 'pro_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (51, '用例管理', '增加', 'case_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (52, '用例管理', '删除', 'case_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (53, '用例管理', '修改', 'case_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (54, '步骤管理', '增删改查', 'case_step');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (55, '测试计划管理', '增加', 'proplan_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (56, '测试计划管理', '删除', 'proplan_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (57, '测试计划管理', '修改', 'proplan_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (58, '部门管理', '增加', 'dpmt_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (59, '部门管理', '删除', 'dpmt_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (60, '部门管理', '修改', 'dpmt_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (61, '协议模板', '增加', 'ptct_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (62, '协议模板', '删除', 'ptct_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (63, '协议模板', '修改', 'ptct_3');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (64, '客户端管理', '增加', 'client_1');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (65, '客户端管理', '删除', 'client_2');
|
||||||
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
|
values (66, '客户端管理', '修改', 'client_3');
|
||||||
|
|
||||||
|
/*插入步骤界面定义各个字段的默认值*/
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (1, 2, 0, 'operation','HttpURLPost','使用HttpURLConnection发送post请求');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (2, 2, 0, 'operation','URLPost','使用URLConnection发送post');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (3, 2, 0, 'operation','GetAndSaveFile','发送get请求保存下载文件到客户端');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (4, 2, 0, 'operation','HttpURLGet','使用HttpURLConnection发送get请求');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (5, 2, 0, 'operation','URLGet','使用URLConnection发送get请求');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (6, 2, 0, 'operation','HttpClientPost','使用HttpClient发送post请求');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (7, 2, 0, 'operation','HttpClientGet','使用HttpClient发送get请求');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (8, 3, 0, 'operation','SocketPost','使用socket发送post请求');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (9, 3, 0, 'operation','SocketGet','使用socket发送get请求');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (10, 1, 0, 'operation','click','点击对象');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (11, 1, 0, 'operation','sendkeys','输入');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (12, 1, 0, 'operation','clear','清除输入框');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (13, 1, 0, 'operation','gotoframe','跳转框架(iframe)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (14, 1, 0, 'operation','isenabled','判断对象是否可用');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (15, 1, 0, 'operation','isdisplayed','判断对象是否可见');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (16, 1, 0, 'operation','exjsob','针对对象执行JS脚本');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (17, 1, 0, 'operation','gettext','获取对象文本属性');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (18, 1, 0, 'operation','gettagname','获取对象标签类型');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (19, 1, 0, 'operation','getcaptcha','获取对象中的验证码(识别率较低)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (20, 1, 0, 'operation','selectbyvisibletext','通过下拉框的文本进行选择');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (21, 1, 0, 'operation','selectbyvalue','通过下拉框的VALUE属性进行选择');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (22, 1, 0, 'operation','selectbyindex','通过下拉框的index属性进行选择(从0开始)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (23, 1, 0, 'operation','isselect','判断是否已经被选择,同用于单选\复选框');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (24, 1, 0, 'operation','open','打开URL');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (25, 1, 0, 'operation','exjs','执行js脚本');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (26, 1, 0, 'operation','gotodefaultcontent','跳转回到默认iframe');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (27, 1, 0, 'operation','gettitle','获取窗口标题');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (28, 1, 0, 'operation','getwindowhandle','获取窗口句柄');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (29, 1, 0, 'operation','gotowindow','跳转窗口句柄');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (30, 1, 0, 'operation','wait','等待时间(S)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (31, 1, 0, 'operation','alertaccept','弹出框点击OK');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (32, 1, 0, 'operation','alertdismiss','弹出框点击取消');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (33, 1, 0, 'operation','alertgettext','获取弹出框TEXT');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (34, 1, 0, 'operation','mouselkclick','模拟鼠标左键单击(可带页面对象)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (35, 1, 0, 'operation','mouserkclick','模拟鼠标右键单击(可带页面对象)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (36, 1, 0, 'operation','mousedclick','模拟鼠标双击(可带页面对象)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (37, 1, 0, 'operation','mouseclickhold','模拟鼠标左键单击后不释放(可带页面对象)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (38, 1, 0, 'operation','mousedrag','模拟鼠标拖拽(可带页面对象)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (39, 1, 0, 'operation','mouseto','模拟鼠标移动到指定坐标(可带页面对象)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (40, 1, 0, 'operation','mouserelease','模拟鼠标释放(可带页面对象)');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (41, 1, 0, 'operation','mousekey(tab)','模拟键盘Tab键');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (42, 1, 0, 'operation','mousekey(space)','模拟键盘Space键');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (43, 1, 0, 'operation','mousekey(ctrl)','模拟键盘Ctrl键');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (44, 1, 0, 'operation','mousekey(shift)','模拟键盘Shift键');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (45, 1, 0, 'operation','mousekey(enter)','模拟键盘Enter键');
|
||||||
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
|
values (46, 1, 0, 'operation','runcase','调用指定接口用例');
|
||||||
|
|
||||||
|
/*插入角色默认定义*/
|
||||||
|
insert into USER_ROLE (id, role, permission)
|
||||||
|
values (2, '测试工程师', 'acc_1,acc_2,acc_3,');
|
||||||
|
insert into USER_ROLE (id, role, permission)
|
||||||
|
values (3, '自动化工程师', 'acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,');
|
||||||
|
insert into USER_ROLE (id, role, permission)
|
||||||
|
values (4, '质量工程师', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,');
|
||||||
|
insert into USER_ROLE (id, role, permission)
|
||||||
|
values (1, '管理员', 'pv_1,pv_2,pv_3,pvp_1,fc_1,fc_2,fc_3,acc_1,acc_2,acc_3,tast_run,tast_remove,tast_ex,tast_1,tast_3,tast_2,tast_upload,tastex_2,case_ex,pfc_1,pfc_2,pfc_3,fc_tocheck,revinfo_1,revinfo_2,revinfo_3,rev_2,rev_3,acc_upload,ui_1,ui_2,ui_3,ui_4,role_3,role_1,role_2,pro_1,pro_2,pro_3,case_1,case_2,case_3,case_step,proplan_1,proplan_2,proplan_3,dpmt_1,dpmt_2,dpmt_3,ptct_1,ptct_2,ptct_3,client_1,client_2,client_3,');
|
||||||
|
|
||||||
|
/*插入默认部门分级*/
|
||||||
|
insert into QA_SECONDARYSECTOR (sectorid, departmenthead, departmentname)
|
||||||
|
values (99, '系统管理员', '总部');
|
||||||
|
/*插入默认项目*/
|
||||||
|
insert into QA_SECTORPROJECTS (projectid, projectname, projectmanager, sectorid, projecttype)
|
||||||
|
values (99, '全部项目/未知项目', '系统管理员', 99, 0);
|
||||||
|
/*插入默认管理员*/
|
||||||
|
insert into USERINFO (id, usercode, password, username, role, sectorid)
|
||||||
|
values (1, 'admin', 'uJ45aIeS9N80kaSFDjvk%2FA%3D%3D', '系统管理员', '1', 99);
|
||||||
|
/*插入流程检查定义数据*/
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (36, 5, '总结阶段', 2, '计划变更', 1, '如与计划不合,是否提交计划变更邮件', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (37, 5, '总结阶段', 3, '代码质量', 1, 'sonar代码检查是否刷新构建', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (38, 5, '总结阶段', 3, '代码质量', 2, 'sonar代码问题数是否符合要求', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (35, 2, '开发阶段', 3, '开发与编码', 6, '是否每一条禅道开发任务都提交转测申请', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (34, 4, '验收与上线', 2, '上线部署', 3, 'SVN代码是否提交并标注', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (1, 1, '需求阶段', 1, '需求编制', 1, '《产品需求说明书》是否组织评审会', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (2, 1, '需求阶段', 1, '需求编制', 2, '《产品需求说明书》评审是否通过', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (3, 1, '需求阶段', 1, '需求编制', 3, '《产品需求说明书》是否归档到SVN', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (4, 1, '需求阶段', 1, '需求编制', 4, '《产品需求说明书》评审记录表是否签字通过', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (5, 2, '开发阶段', 1, '需求分解', 1, '是否有需求分解/任务讨论会', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (6, 2, '开发阶段', 1, '需求分解', 2, '《项目计划》邮件是否及时发出', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (7, 2, '开发阶段', 1, '需求分解', 3, '《项目计划》邮件内容是否完整', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (10, 2, '开发阶段', 2, '软件设计', 1, '《产品开发概要设计》是否组织评审会', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (11, 2, '开发阶段', 2, '软件设计', 2, '《产品开发概要设计》评审是否通过', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (12, 2, '开发阶段', 2, '软件设计', 3, '《产品开发概要设计》是否归档到SVN', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (13, 2, '开发阶段', 2, '软件设计', 4, '《产品开发概要设计》评审记录表是否签字通过', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (14, 2, '开发阶段', 3, '开发与编码', 1, '是否进行每日晨会', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (15, 2, '开发阶段', 3, '开发与编码', 2, '是否进行代码走读', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (16, 2, '开发阶段', 3, '开发与编码', 3, '是否每一条禅道开发任务都提交转测申请', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (17, 2, '开发阶段', 3, '开发与编码', 4, '转测邮件是否合格', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (18, 2, '开发阶段', 3, '开发与编码', 5, '转测邮件打回次数为0', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (19, 3, '测试阶段', 1, '软件测试', 1, '是否回复测试计划', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (20, 3, '测试阶段', 1, '软件测试', 2, '是否回复测试用例', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (21, 3, '测试阶段', 1, '软件测试', 3, '测试用例是否通过评审/确认', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (22, 3, '测试阶段', 1, '软件测试', 4, '《软件测试报告》是否组织评审会', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (23, 3, '测试阶段', 1, '软件测试', 5, '《软件测试报告》是否评审通过', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (24, 3, '测试阶段', 1, '软件测试', 6, '《软件测试报告》/测试结果是否发出邮件', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (25, 3, '测试阶段', 1, '软件测试', 7, '《软件测试报告》评审记录表是否签字通过', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (26, 4, '验收与上线', 1, '产品验收', 1, '《产品验收报告》是否组织评审会', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (27, 4, '验收与上线', 1, '产品验收', 2, '《产品验收报告》是否评审通过', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (28, 4, '验收与上线', 1, '产品验收', 3, '《产品验收报告》是否归档到SVN', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (29, 4, '验收与上线', 1, '产品验收', 4, '《产品验收报告》评审记录表是否签字通过', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (30, 4, '验收与上线', 2, '上线部署', 1, '产品/开发是否提交上线流程(OA)', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (31, 4, '验收与上线', 2, '上线部署', 2, '开发是否提交上线相关资料', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (32, 5, '总结阶段', 1, '项目总结', 1, '《项目总结》邮件是否及时发出', null);
|
||||||
|
insert into QA_FLOWINFO (id, phaseid, phasename, phasenodeid, phasenodename, checkentryid, checkentry, remark)
|
||||||
|
values (33, 5, '总结阶段', 1, '项目总结', 2, '《项目总结》邮件内容是否完整', null);
|
|
@ -1,9 +1,9 @@
|
||||||
/*扩展日志明细字段到5000*/
|
/*扩展日志明细字段到5000*/
|
||||||
alter table test_logdetail modify column detail varchar(5000);
|
alter table test_logdetail modify column detail varchar(5000);
|
||||||
/*添加项目管理的权限控制*/
|
/*添加项目管理的权限控制*/
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (48, '项目管理', '增加', 'pro_1');
|
values (48, '项目管理', '增加', 'pro_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (49, '项目管理', '删除', 'pro_2');
|
values (49, '项目管理', '删除', 'pro_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (50, '项目管理', '修改', 'pro_3');
|
values (50, '项目管理', '修改', 'pro_3');
|
|
@ -1,88 +1,88 @@
|
||||||
create table PROJECT_CASE
|
create table PROJECT_CASE
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
sign VARCHAR(20) not null COMMENT '用例标识',
|
sign VARCHAR(20) not null COMMENT '用例标识',
|
||||||
name VARCHAR(200) not null COMMENT '用例名称',
|
name VARCHAR(200) not null COMMENT '用例名称',
|
||||||
projectid int(8) not null COMMENT '关联项目ID',
|
projectid int(8) not null COMMENT '关联项目ID',
|
||||||
moduleid int(8) not null COMMENT '关联项目模块ID',
|
moduleid int(8) not null COMMENT '关联项目模块ID',
|
||||||
projectindex int(8) not null COMMENT '项目用例编号',
|
projectindex int(8) not null COMMENT '项目用例编号',
|
||||||
time VARCHAR(30) COMMENT '最后更新时间',
|
time VARCHAR(30) COMMENT '最后更新时间',
|
||||||
operationer VARCHAR(20) COMMENT '最后更新人员',
|
operationer VARCHAR(20) COMMENT '最后更新人员',
|
||||||
casetype int(2) not null COMMENT '0 接口 1 UI',
|
casetype int(2) not null COMMENT '0 接口 1 UI',
|
||||||
remark VARCHAR(200) COMMENT '备注',
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
create table PROJECT_CASESTEPS
|
create table PROJECT_CASESTEPS
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
path VARCHAR(100) COMMENT '包路径|定位路径',
|
path VARCHAR(100) COMMENT '包路径|定位路径',
|
||||||
operation VARCHAR(100) COMMENT '方法名|操作',
|
operation VARCHAR(100) COMMENT '方法名|操作',
|
||||||
parameters VARCHAR(500) COMMENT '参数',
|
parameters VARCHAR(500) COMMENT '参数',
|
||||||
action VARCHAR(50) COMMENT '步骤动作',
|
action VARCHAR(50) COMMENT '步骤动作',
|
||||||
caseid int(8) not null COMMENT '用例ID',
|
caseid int(8) not null COMMENT '用例ID',
|
||||||
stepnum int(2) not null COMMENT '步骤编号',
|
stepnum int(2) not null COMMENT '步骤编号',
|
||||||
expectedresult VARCHAR(2000) COMMENT '预期结果',
|
expectedresult VARCHAR(2000) COMMENT '预期结果',
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
steptype int(2) not null COMMENT '0 接口 1 UI',
|
steptype int(2) not null COMMENT '0 接口 1 UI',
|
||||||
time VARCHAR(30) COMMENT '最后更新时间',
|
time VARCHAR(30) COMMENT '最后更新时间',
|
||||||
operationer VARCHAR(20) COMMENT '最后更新人员',
|
operationer VARCHAR(20) COMMENT '最后更新人员',
|
||||||
remark VARCHAR(200) COMMENT '备注',
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
create table PROJECT_PLAN
|
create table PROJECT_PLAN
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
name VARCHAR(50) not null COMMENT '测试计划名称',
|
name VARCHAR(50) not null COMMENT '测试计划名称',
|
||||||
casecount int(8) COMMENT '计划中用例总数',
|
casecount int(8) COMMENT '计划中用例总数',
|
||||||
remark VARCHAR(200) COMMENT '备注',
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
time VARCHAR(30) COMMENT '最后更新时间',
|
time VARCHAR(30) COMMENT '最后更新时间',
|
||||||
operationer VARCHAR(20) COMMENT '最后更新人员',
|
operationer VARCHAR(20) COMMENT '最后更新人员',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
create table PROJECT_PLANCASE
|
create table PROJECT_PLANCASE
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
caseid int(8) not null COMMENT '用例ID',
|
caseid int(8) not null COMMENT '用例ID',
|
||||||
planid int(8) not null COMMENT '项目计划ID',
|
planid int(8) not null COMMENT '项目计划ID',
|
||||||
priority int(8) not null COMMENT '用例优先级',
|
priority int(8) not null COMMENT '用例优先级',
|
||||||
primary key (ID),
|
primary key (ID),
|
||||||
index (caseid),
|
index (caseid),
|
||||||
index (planid)
|
index (planid)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
create table PROJECT_MODULE
|
create table PROJECT_MODULE
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
modulename VARCHAR(50) COMMENT '模块名字',
|
modulename VARCHAR(50) COMMENT '模块名字',
|
||||||
pid int(4) COMMENT '层级关系',
|
pid int(4) COMMENT '层级关系',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
/*用户增加默认选择字段*/
|
/*用户增加默认选择字段*/
|
||||||
alter table userinfo add projectid int(4) default '0';
|
alter table userinfo add projectid int(4) default '0';
|
||||||
/*项目管理表增加项目标识字段*/
|
/*项目管理表增加项目标识字段*/
|
||||||
alter table QA_SECTORPROJECTS add projectsign VARCHAR(20) default 'sign' not null;
|
alter table QA_SECTORPROJECTS add projectsign VARCHAR(20) default 'sign' not null;
|
||||||
/*调度任务配置增加三个支持内部项目字段*/
|
/*调度任务配置增加三个支持内部项目字段*/
|
||||||
alter table TEST_JOBS add projecttype int(8) default '0' COMMENT '项目类型 0 testlink 1 系统内项目';
|
alter table TEST_JOBS add projecttype int(8) default '0' COMMENT '项目类型 0 testlink 1 系统内项目';
|
||||||
alter table TEST_JOBS add projectid int(8) COMMENT '系统内项目ID';
|
alter table TEST_JOBS add projectid int(8) COMMENT '系统内项目ID';
|
||||||
alter table TEST_JOBS add planid int(8) COMMENT '系统内项目关联测试计划ID';
|
alter table TEST_JOBS add planid int(8) COMMENT '系统内项目关联测试计划ID';
|
||||||
/*增加权限标识*/
|
/*增加权限标识*/
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (51, '用例管理', '增加', 'case_1');
|
values (51, '用例管理', '增加', 'case_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (52, '用例管理', '删除', 'case_2');
|
values (52, '用例管理', '删除', 'case_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (53, '用例管理', '修改', 'case_3');
|
values (53, '用例管理', '修改', 'case_3');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (54, '步骤管理', '增删改查', 'case_step');
|
values (54, '步骤管理', '增删改查', 'case_step');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (55, '测试计划管理', '增加', 'proplan_1');
|
values (55, '测试计划管理', '增加', 'proplan_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (56, '测试计划管理', '删除', 'proplan_2');
|
values (56, '测试计划管理', '删除', 'proplan_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (57, '测试计划管理', '修改', 'proplan_3');
|
values (57, '测试计划管理', '修改', 'proplan_3');
|
|
@ -1,7 +1,7 @@
|
||||||
/*插入部门管理权限*/
|
/*插入部门管理权限*/
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (58, '部门管理', '增加', 'dpmt_1');
|
values (58, '部门管理', '增加', 'dpmt_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (59, '部门管理', '删除', 'dpmt_2');
|
values (59, '部门管理', '删除', 'dpmt_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (60, '部门管理', '修改', 'dpmt_3');
|
values (60, '部门管理', '修改', 'dpmt_3');
|
|
@ -1,146 +1,146 @@
|
||||||
/*增加支持协议模板表*/
|
/*增加支持协议模板表*/
|
||||||
create table PROJECT_PROTOCOLTEMPLATE
|
create table PROJECT_PROTOCOLTEMPLATE
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
projectid int(8) not null COMMENT '项目ID',
|
projectid int(8) not null COMMENT '项目ID',
|
||||||
name VARCHAR(50) not null COMMENT '模板名称',
|
name VARCHAR(50) not null COMMENT '模板名称',
|
||||||
protocoltype VARCHAR(20) not null COMMENT '协议类型',
|
protocoltype VARCHAR(20) not null COMMENT '协议类型',
|
||||||
contentencoding VARCHAR(20) not null COMMENT '编码格式',
|
contentencoding VARCHAR(20) not null COMMENT '编码格式',
|
||||||
connecttimeout int(8) not null COMMENT '超时时间',
|
connecttimeout int(8) not null COMMENT '超时时间',
|
||||||
time VARCHAR(30) COMMENT '最后更新时间',
|
time VARCHAR(30) COMMENT '最后更新时间',
|
||||||
operationer VARCHAR(20) COMMENT '最后更新人员',
|
operationer VARCHAR(20) COMMENT '最后更新人员',
|
||||||
remark VARCHAR(200) COMMENT '备注',
|
remark VARCHAR(200) COMMENT '备注',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
create table PROJECT_TEMPLATEPARAMS
|
create table PROJECT_TEMPLATEPARAMS
|
||||||
(
|
(
|
||||||
id int(9) not null AUTO_INCREMENT,
|
id int(9) not null AUTO_INCREMENT,
|
||||||
templateid int(8) not null COMMENT '模块ID',
|
templateid int(8) not null COMMENT '模块ID',
|
||||||
paramname VARCHAR(50) not null COMMENT '参数名',
|
paramname VARCHAR(50) not null COMMENT '参数名',
|
||||||
param VARCHAR(2000) COMMENT '参数默认值',
|
param VARCHAR(2000) COMMENT '参数默认值',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
create table PROJECT_CASESTEPSPARAMS
|
create table PROJECT_CASESTEPSPARAMS
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
steptype int(2) not null COMMENT '步骤类型',
|
steptype int(2) not null COMMENT '步骤类型',
|
||||||
parentid int(8) not null COMMENT '父节点ID',
|
parentid int(8) not null COMMENT '父节点ID',
|
||||||
fieldname VARCHAR(50) COMMENT '所属字段名',
|
fieldname VARCHAR(50) COMMENT '所属字段名',
|
||||||
paramvalue VARCHAR(200) COMMENT '参数值',
|
paramvalue VARCHAR(200) COMMENT '参数值',
|
||||||
description VARCHAR(50) COMMENT '描述',
|
description VARCHAR(50) COMMENT '描述',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
create table TEMP_CASESTEPDEBUG
|
create table TEMP_CASESTEPDEBUG
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
sign VARCHAR(20) not null COMMENT '用例标识',
|
sign VARCHAR(20) not null COMMENT '用例标识',
|
||||||
executor VARCHAR(20) not null COMMENT '执行人',
|
executor VARCHAR(20) not null COMMENT '执行人',
|
||||||
loglevel VARCHAR(10) not null COMMENT '日志级别',
|
loglevel VARCHAR(10) not null COMMENT '日志级别',
|
||||||
detail VARCHAR(5000) not null COMMENT '日志',
|
detail VARCHAR(5000) not null COMMENT '日志',
|
||||||
primary key (ID)
|
primary key (ID)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
|
|
||||||
/*插入部门管理权限*/
|
/*插入部门管理权限*/
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (61, '协议模板', '增加', 'ptct_1');
|
values (61, '协议模板', '增加', 'ptct_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (62, '协议模板', '删除', 'ptct_2');
|
values (62, '协议模板', '删除', 'ptct_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (63, '协议模板', '修改', 'ptct_3');
|
values (63, '协议模板', '修改', 'ptct_3');
|
||||||
|
|
||||||
/*插入步骤界面定义各个字段的默认值*/
|
/*插入步骤界面定义各个字段的默认值*/
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (1, 2, 0, 'operation','HttpURLPost','使用HttpURLConnection发送post请求');
|
values (1, 2, 0, 'operation','HttpURLPost','使用HttpURLConnection发送post请求');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (2, 2, 0, 'operation','URLPost','使用URLConnection发送post');
|
values (2, 2, 0, 'operation','URLPost','使用URLConnection发送post');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (3, 2, 0, 'operation','GetAndSaveFile','发送get请求保存下载文件到客户端');
|
values (3, 2, 0, 'operation','GetAndSaveFile','发送get请求保存下载文件到客户端');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (4, 2, 0, 'operation','HttpURLGet','使用HttpURLConnection发送get请求');
|
values (4, 2, 0, 'operation','HttpURLGet','使用HttpURLConnection发送get请求');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (5, 2, 0, 'operation','URLGet','使用URLConnection发送get请求');
|
values (5, 2, 0, 'operation','URLGet','使用URLConnection发送get请求');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (6, 2, 0, 'operation','HttpClientPost','使用HttpClient发送post请求');
|
values (6, 2, 0, 'operation','HttpClientPost','使用HttpClient发送post请求');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (7, 2, 0, 'operation','HttpClientGet','使用HttpClient发送get请求');
|
values (7, 2, 0, 'operation','HttpClientGet','使用HttpClient发送get请求');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (8, 3, 0, 'operation','SocketPost','使用socket发送post请求');
|
values (8, 3, 0, 'operation','SocketPost','使用socket发送post请求');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (9, 3, 0, 'operation','SocketGet','使用socket发送get请求');
|
values (9, 3, 0, 'operation','SocketGet','使用socket发送get请求');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (10, 1, 0, 'operation','click','点击对象');
|
values (10, 1, 0, 'operation','click','点击对象');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (11, 1, 0, 'operation','sendkeys','输入');
|
values (11, 1, 0, 'operation','sendkeys','输入');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (12, 1, 0, 'operation','clear','清除输入框');
|
values (12, 1, 0, 'operation','clear','清除输入框');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (13, 1, 0, 'operation','gotoframe','跳转框架(iframe)');
|
values (13, 1, 0, 'operation','gotoframe','跳转框架(iframe)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (14, 1, 0, 'operation','isenabled','判断对象是否可用');
|
values (14, 1, 0, 'operation','isenabled','判断对象是否可用');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (15, 1, 0, 'operation','isdisplayed','判断对象是否可见');
|
values (15, 1, 0, 'operation','isdisplayed','判断对象是否可见');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (16, 1, 0, 'operation','exjsob','针对对象执行JS脚本');
|
values (16, 1, 0, 'operation','exjsob','针对对象执行JS脚本');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (17, 1, 0, 'operation','gettext','获取对象文本属性');
|
values (17, 1, 0, 'operation','gettext','获取对象文本属性');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (18, 1, 0, 'operation','gettagname','获取对象标签类型');
|
values (18, 1, 0, 'operation','gettagname','获取对象标签类型');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (19, 1, 0, 'operation','getcaptcha','获取对象中的验证码(识别率较低)');
|
values (19, 1, 0, 'operation','getcaptcha','获取对象中的验证码(识别率较低)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (20, 1, 0, 'operation','selectbyvisibletext','通过下拉框的文本进行选择');
|
values (20, 1, 0, 'operation','selectbyvisibletext','通过下拉框的文本进行选择');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (21, 1, 0, 'operation','selectbyvalue','通过下拉框的VALUE属性进行选择');
|
values (21, 1, 0, 'operation','selectbyvalue','通过下拉框的VALUE属性进行选择');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (22, 1, 0, 'operation','selectbyindex','通过下拉框的index属性进行选择(从0开始)');
|
values (22, 1, 0, 'operation','selectbyindex','通过下拉框的index属性进行选择(从0开始)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (23, 1, 0, 'operation','isselect','判断是否已经被选择,同用于单选\复选框');
|
values (23, 1, 0, 'operation','isselect','判断是否已经被选择,同用于单选\复选框');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (24, 1, 0, 'operation','open','打开URL');
|
values (24, 1, 0, 'operation','open','打开URL');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (25, 1, 0, 'operation','exjs','执行js脚本');
|
values (25, 1, 0, 'operation','exjs','执行js脚本');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (26, 1, 0, 'operation','gotodefaultcontent','跳转回到默认iframe');
|
values (26, 1, 0, 'operation','gotodefaultcontent','跳转回到默认iframe');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (27, 1, 0, 'operation','gettitle','获取窗口标题');
|
values (27, 1, 0, 'operation','gettitle','获取窗口标题');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (28, 1, 0, 'operation','getwindowhandle','获取窗口句柄');
|
values (28, 1, 0, 'operation','getwindowhandle','获取窗口句柄');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (29, 1, 0, 'operation','gotowindow','跳转窗口句柄');
|
values (29, 1, 0, 'operation','gotowindow','跳转窗口句柄');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (30, 1, 0, 'operation','wait','等待时间(S)');
|
values (30, 1, 0, 'operation','wait','等待时间(S)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (31, 1, 0, 'operation','alertaccept','弹出框点击OK');
|
values (31, 1, 0, 'operation','alertaccept','弹出框点击OK');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (32, 1, 0, 'operation','alertdismiss','弹出框点击取消');
|
values (32, 1, 0, 'operation','alertdismiss','弹出框点击取消');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (33, 1, 0, 'operation','alertgettext','获取弹出框TEXT');
|
values (33, 1, 0, 'operation','alertgettext','获取弹出框TEXT');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (34, 1, 0, 'operation','mouselkclick','模拟鼠标左键单击(可带页面对象)');
|
values (34, 1, 0, 'operation','mouselkclick','模拟鼠标左键单击(可带页面对象)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (35, 1, 0, 'operation','mouserkclick','模拟鼠标右键单击(可带页面对象)');
|
values (35, 1, 0, 'operation','mouserkclick','模拟鼠标右键单击(可带页面对象)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (36, 1, 0, 'operation','mousedclick','模拟鼠标双击(可带页面对象)');
|
values (36, 1, 0, 'operation','mousedclick','模拟鼠标双击(可带页面对象)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (37, 1, 0, 'operation','mouseclickhold','模拟鼠标左键单击后不释放(可带页面对象)');
|
values (37, 1, 0, 'operation','mouseclickhold','模拟鼠标左键单击后不释放(可带页面对象)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (38, 1, 0, 'operation','mousedrag','模拟鼠标拖拽(可带页面对象)');
|
values (38, 1, 0, 'operation','mousedrag','模拟鼠标拖拽(可带页面对象)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (39, 1, 0, 'operation','mouseto','模拟鼠标移动到指定坐标(可带页面对象)');
|
values (39, 1, 0, 'operation','mouseto','模拟鼠标移动到指定坐标(可带页面对象)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (40, 1, 0, 'operation','mouserelease','模拟鼠标释放(可带页面对象)');
|
values (40, 1, 0, 'operation','mouserelease','模拟鼠标释放(可带页面对象)');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (41, 1, 0, 'operation','mousekey(tab)','模拟键盘Tab键');
|
values (41, 1, 0, 'operation','mousekey(tab)','模拟键盘Tab键');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (42, 1, 0, 'operation','mousekey(space)','模拟键盘Space键');
|
values (42, 1, 0, 'operation','mousekey(space)','模拟键盘Space键');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (43, 1, 0, 'operation','mousekey(ctrl)','模拟键盘Ctrl键');
|
values (43, 1, 0, 'operation','mousekey(ctrl)','模拟键盘Ctrl键');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (44, 1, 0, 'operation','mousekey(shift)','模拟键盘Shift键');
|
values (44, 1, 0, 'operation','mousekey(shift)','模拟键盘Shift键');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (45, 1, 0, 'operation','mousekey(enter)','模拟键盘Enter键');
|
values (45, 1, 0, 'operation','mousekey(enter)','模拟键盘Enter键');
|
||||||
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
insert into PROJECT_CASESTEPSPARAMS (id, steptype, parentid, fieldname,paramvalue,description)
|
||||||
values (46, 1, 0, 'operation','runcase','调用指定接口用例');
|
values (46, 1, 0, 'operation','runcase','调用指定接口用例');
|
|
@ -1,21 +1,21 @@
|
||||||
/*创建客户端IP管理表*/
|
/*创建客户端IP管理表*/
|
||||||
create table TEST_CLIENT
|
create table TEST_CLIENT
|
||||||
(
|
(
|
||||||
id int(8) not null AUTO_INCREMENT,
|
id int(8) not null AUTO_INCREMENT,
|
||||||
clientip VARCHAR(30) not null COMMENT '客户端IP',
|
clientip VARCHAR(30) not null COMMENT '客户端IP',
|
||||||
name VARCHAR(30) not null COMMENT '客户端名称',
|
name VARCHAR(30) not null COMMENT '客户端名称',
|
||||||
projectper VARCHAR(200) COMMENT '使用项目',
|
projectper VARCHAR(200) COMMENT '使用项目',
|
||||||
status int(2) COMMENT '客户端超时 0 正常 1 链接失败 2 状态未知',
|
status int(2) COMMENT '客户端超时 0 正常 1 链接失败 2 状态未知',
|
||||||
checkinterval int(6) not null COMMENT '检查客户端状态心跳间隔时间 单位:秒',
|
checkinterval int(6) not null COMMENT '检查客户端状态心跳间隔时间 单位:秒',
|
||||||
remark VARCHAR(100) COMMENT '备注',
|
remark VARCHAR(100) COMMENT '备注',
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)default character set utf8;
|
)default character set utf8;
|
||||||
/*角色权限表增加操作项目权限字段*/
|
/*角色权限表增加操作项目权限字段*/
|
||||||
alter table USER_ROLE add opprojectid VARCHAR(200);
|
alter table USER_ROLE add opprojectid VARCHAR(200);
|
||||||
/*增加客户端操作相关权限*/
|
/*增加客户端操作相关权限*/
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (64, '客户端管理', '增加', 'client_1');
|
values (64, '客户端管理', '增加', 'client_1');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (65, '客户端管理', '删除', 'client_2');
|
values (65, '客户端管理', '删除', 'client_2');
|
||||||
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
insert into USER_AUTHORITY (id, module, auth_type, alias)
|
||||||
values (66, '客户端管理', '修改', 'client_3');
|
values (66, '客户端管理', '修改', 'client_3');
|
|
@ -0,0 +1,4 @@
|
||||||
|
/*调度表增加客户端load驱动桩路径字段*/
|
||||||
|
alter table TEST_JOBS add clientpath VARCHAR(100) COMMENT '客户端测试驱动桩路径';
|
||||||
|
/*调度表增加客户端load驱动桩路径字段*/
|
||||||
|
alter table TEST_CLIENT add clientpath VARCHAR(100) COMMENT '客户端测试驱动桩路径 多个;做分隔';
|
728
pom.xml
728
pom.xml
|
@ -1,364 +1,364 @@
|
||||||
<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>
|
<groupId>commons-attributes</groupId>
|
||||||
<artifactId>commons-attributes-api</artifactId>
|
<artifactId>commons-attributes-api</artifactId>
|
||||||
<version>2.2</version>
|
<version>2.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-attributes</groupId>
|
<groupId>commons-attributes</groupId>
|
||||||
<artifactId>commons-attributes-compiler</artifactId>
|
<artifactId>commons-attributes-compiler</artifactId>
|
||||||
<version>2.2</version>
|
<version>2.2</version>
|
||||||
</dependency> -->
|
</dependency> -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
<version>1.9.3</version>
|
<version>1.9.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
<artifactId>commons-codec</artifactId>
|
<artifactId>commons-codec</artifactId>
|
||||||
<version>1.10</version>
|
<version>1.10</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-collections</groupId>
|
<groupId>commons-collections</groupId>
|
||||||
<artifactId>commons-collections</artifactId>
|
<artifactId>commons-collections</artifactId>
|
||||||
<version>3.2.2</version>
|
<version>3.2.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-dbcp</groupId>
|
<groupId>commons-dbcp</groupId>
|
||||||
<artifactId>commons-dbcp</artifactId>
|
<artifactId>commons-dbcp</artifactId>
|
||||||
<version>1.4</version>
|
<version>1.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-digester</groupId>
|
<groupId>commons-digester</groupId>
|
||||||
<artifactId>commons-digester</artifactId>
|
<artifactId>commons-digester</artifactId>
|
||||||
<version>2.1</version>
|
<version>2.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-discovery</groupId>
|
<groupId>commons-discovery</groupId>
|
||||||
<artifactId>commons-discovery</artifactId>
|
<artifactId>commons-discovery</artifactId>
|
||||||
<version>0.5</version>
|
<version>0.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-fileupload</groupId>
|
<groupId>commons-fileupload</groupId>
|
||||||
<artifactId>commons-fileupload</artifactId>
|
<artifactId>commons-fileupload</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-httpclient</groupId>
|
<groupId>commons-httpclient</groupId>
|
||||||
<artifactId>commons-httpclient</artifactId>
|
<artifactId>commons-httpclient</artifactId>
|
||||||
<version>3.1</version>
|
<version>3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>2.5</version>
|
<version>2.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-lang</groupId>
|
<groupId>commons-lang</groupId>
|
||||||
<artifactId>commons-lang</artifactId>
|
<artifactId>commons-lang</artifactId>
|
||||||
<version>2.6</version>
|
<version>2.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>commons-logging</groupId>
|
||||||
<artifactId>commons-logging</artifactId>
|
<artifactId>commons-logging</artifactId>
|
||||||
<version>1.2</version>
|
<version>1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-pool</groupId>
|
<groupId>commons-pool</groupId>
|
||||||
<artifactId>commons-pool</artifactId>
|
<artifactId>commons-pool</artifactId>
|
||||||
<version>1.6</version>
|
<version>1.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dom4j</groupId>
|
<groupId>dom4j</groupId>
|
||||||
<artifactId>dom4j</artifactId>
|
<artifactId>dom4j</artifactId>
|
||||||
<version>1.6.1</version>
|
<version>1.6.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-validator</groupId>
|
<groupId>commons-validator</groupId>
|
||||||
<artifactId>commons-validator</artifactId>
|
<artifactId>commons-validator</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate</groupId>
|
||||||
<artifactId>ejb3-persistence</artifactId>
|
<artifactId>ejb3-persistence</artifactId>
|
||||||
<version>3.3.2.Beta1</version>
|
<version>3.3.2.Beta1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.sf.ezmorph</groupId>
|
<groupId>net.sf.ezmorph</groupId>
|
||||||
<artifactId>ezmorph</artifactId>
|
<artifactId>ezmorph</artifactId>
|
||||||
<version>1.0.6</version>
|
<version>1.0.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-hibernate3</artifactId>
|
<artifactId>spring-hibernate3</artifactId>
|
||||||
<version>2.0.8</version>
|
<version>2.0.8</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate</groupId>
|
||||||
<artifactId>hibernate-annotations</artifactId>
|
<artifactId>hibernate-annotations</artifactId>
|
||||||
<version>3.5.6-Final</version>
|
<version>3.5.6-Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate.javax.persistence</groupId>
|
<groupId>org.hibernate.javax.persistence</groupId>
|
||||||
<artifactId>hibernate-jpa-2.0-api</artifactId>
|
<artifactId>hibernate-jpa-2.0-api</artifactId>
|
||||||
<version>1.0.1.Final</version>
|
<version>1.0.1.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate</groupId>
|
||||||
<artifactId>hibernate-validator-annotation-processor</artifactId>
|
<artifactId>hibernate-validator-annotation-processor</artifactId>
|
||||||
<version>5.3.4.Final</version>
|
<version>5.3.4.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.javassist</groupId>
|
<groupId>org.javassist</groupId>
|
||||||
<artifactId>javassist</artifactId>
|
<artifactId>javassist</artifactId>
|
||||||
<version>3.21.0-GA</version>
|
<version>3.21.0-GA</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet.jsp</groupId>
|
<groupId>javax.servlet.jsp</groupId>
|
||||||
<artifactId>javax.servlet.jsp-api</artifactId>
|
<artifactId>javax.servlet.jsp-api</artifactId>
|
||||||
<version>2.3.1</version>
|
<version>2.3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.sf.json-lib</groupId>
|
<groupId>net.sf.json-lib</groupId>
|
||||||
<artifactId>json-lib</artifactId>
|
<artifactId>json-lib</artifactId>
|
||||||
<version>2.4</version>
|
<version>2.4</version>
|
||||||
<classifier>jdk15</classifier>
|
<classifier>jdk15</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jstl</groupId>
|
<groupId>jstl</groupId>
|
||||||
<artifactId>jstl</artifactId>
|
<artifactId>jstl</artifactId>
|
||||||
<version>1.2</version>
|
<version>1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.transaction</groupId>
|
<groupId>javax.transaction</groupId>
|
||||||
<artifactId>jta</artifactId>
|
<artifactId>jta</artifactId>
|
||||||
<version>1.1</version>
|
<version>1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>log4j</groupId>
|
<groupId>log4j</groupId>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>log4j</artifactId>
|
||||||
<version>1.2.17</version>
|
<version>1.2.17</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>6.0.5</version>
|
<version>6.0.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
<artifactId>quartz</artifactId>
|
<artifactId>quartz</artifactId>
|
||||||
<version>1.8.6</version>
|
<version>1.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>opensymphony</groupId>
|
<groupId>opensymphony</groupId>
|
||||||
<artifactId>quartz-all</artifactId>
|
<artifactId>quartz-all</artifactId>
|
||||||
<version>1.6.2</version>
|
<version>1.6.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
<artifactId>quartz-commonj</artifactId>
|
<artifactId>quartz-commonj</artifactId>
|
||||||
<version>1.8.6</version>
|
<version>1.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
<artifactId>quartz-oracle</artifactId>
|
<artifactId>quartz-oracle</artifactId>
|
||||||
<version>1.8.6</version>
|
<version>1.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.w3c.css</groupId>
|
<groupId>org.w3c.css</groupId>
|
||||||
<artifactId>sac</artifactId>
|
<artifactId>sac</artifactId>
|
||||||
<version>1.3</version>
|
<version>1.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>1.7.22</version>
|
<version>1.7.22</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
<version>1.7.22</version>
|
<version>1.7.22</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-aop</artifactId>
|
<artifactId>spring-aop</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-aspects</artifactId>
|
<artifactId>spring-aspects</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-beans</artifactId>
|
<artifactId>spring-beans</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-context</artifactId>
|
<artifactId>spring-context</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-context-support</artifactId>
|
<artifactId>spring-context-support</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-core</artifactId>
|
<artifactId>spring-core</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-expression</artifactId>
|
<artifactId>spring-expression</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-instrument</artifactId>
|
<artifactId>spring-instrument</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-instrument-tomcat</artifactId>
|
<artifactId>spring-instrument-tomcat</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-jdbc</artifactId>
|
<artifactId>spring-jdbc</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-jms</artifactId>
|
<artifactId>spring-jms</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-orm</artifactId>
|
<artifactId>spring-orm</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-oxm</artifactId>
|
<artifactId>spring-oxm</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-struts</artifactId>
|
<artifactId>spring-struts</artifactId>
|
||||||
<version>3.2.18.RELEASE</version>
|
<version>3.2.18.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-test</artifactId>
|
<artifactId>spring-test</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-tx</artifactId>
|
<artifactId>spring-tx</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-web</artifactId>
|
<artifactId>spring-web</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-webmvc</artifactId>
|
<artifactId>spring-webmvc</artifactId>
|
||||||
<version>4.3.6.RELEASE</version>
|
<version>4.3.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>taglibs</groupId>
|
<groupId>taglibs</groupId>
|
||||||
<artifactId>standard</artifactId>
|
<artifactId>standard</artifactId>
|
||||||
<version>1.1.2</version>
|
<version>1.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.validation</groupId>
|
<groupId>javax.validation</groupId>
|
||||||
<artifactId>validation-api</artifactId>
|
<artifactId>validation-api</artifactId>
|
||||||
<version>1.1.0.Final</version>
|
<version>1.1.0.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,82 +1,82 @@
|
||||||
package luckyweb.seagull.comm;
|
package luckyweb.seagull.comm;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.ServletContextEvent;
|
import javax.servlet.ServletContextEvent;
|
||||||
import javax.servlet.ServletContextListener;
|
import javax.servlet.ServletContextListener;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.quartz.Scheduler;
|
import org.quartz.Scheduler;
|
||||||
import org.quartz.SchedulerException;
|
import org.quartz.SchedulerException;
|
||||||
import org.quartz.SchedulerFactory;
|
import org.quartz.SchedulerFactory;
|
||||||
import org.springframework.web.context.ContextLoaderListener;
|
import org.springframework.web.context.ContextLoaderListener;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.dao.TestJobsDaoImpl;
|
import luckyweb.seagull.spring.dao.TestJobsDaoImpl;
|
||||||
import luckyweb.seagull.spring.entity.SectorProjects;
|
import luckyweb.seagull.spring.entity.SectorProjects;
|
||||||
import luckyweb.seagull.spring.entity.TestClient;
|
import luckyweb.seagull.spring.entity.TestClient;
|
||||||
import luckyweb.seagull.spring.entity.TestJobs;
|
import luckyweb.seagull.spring.entity.TestJobs;
|
||||||
import luckyweb.seagull.util.HibernateSessionFactoryUtil;
|
import luckyweb.seagull.util.HibernateSessionFactoryUtil;
|
||||||
|
|
||||||
public class QueueListener extends ContextLoaderListener implements
|
public class QueueListener extends ContextLoaderListener implements
|
||||||
ServletContextListener {
|
ServletContextListener {
|
||||||
|
|
||||||
private static final Logger log = Logger.getLogger(QueueListener.class);
|
private static final Logger log = Logger.getLogger(QueueListener.class);
|
||||||
public static List<TestJobs> list = new ArrayList<TestJobs>();
|
public static List<TestJobs> list = new ArrayList<TestJobs>();
|
||||||
public static List<SectorProjects> projlist = new ArrayList<SectorProjects>();
|
public static List<SectorProjects> projlist = new ArrayList<SectorProjects>();
|
||||||
public static List<SectorProjects> qa_projlist = new ArrayList<SectorProjects>();
|
public static List<SectorProjects> qa_projlist = new ArrayList<SectorProjects>();
|
||||||
public static List<TestClient> listen_Clientlist = new ArrayList<TestClient>();
|
public static List<TestClient> listen_Clientlist = new ArrayList<TestClient>();
|
||||||
public static Session session = HibernateSessionFactoryUtil.getCurrentSession();
|
public static Session session = HibernateSessionFactoryUtil.getCurrentSession();
|
||||||
|
|
||||||
public static SchedulerFactory gSchedulerFactory = null;
|
public static SchedulerFactory gSchedulerFactory = null;
|
||||||
public static Scheduler sched = null;
|
public static Scheduler sched = null;
|
||||||
public static String JOB_GROUP_NAME = "EXTJWEB_JOBGROUP_NAME";
|
public static String JOB_GROUP_NAME = "EXTJWEB_JOBGROUP_NAME";
|
||||||
public static String TRIGGER_GROUP_NAME = "EXTJWEB_TRIGGERGROUP_NAME";
|
public static String TRIGGER_GROUP_NAME = "EXTJWEB_TRIGGERGROUP_NAME";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void contextInitialized(ServletContextEvent arg0) {
|
public void contextInitialized(ServletContextEvent arg0) {
|
||||||
// Session session=HibernateSessionFactoryUtil.getCurrentSession();
|
// Session session=HibernateSessionFactoryUtil.getCurrentSession();
|
||||||
|
|
||||||
// 加载定时任务,tomcat启动时则启动
|
// 加载定时任务,tomcat启动时则启动
|
||||||
try {
|
try {
|
||||||
TestJobsDaoImpl.init(session);
|
TestJobsDaoImpl.init(session);
|
||||||
log.info("服务器启动时则启动,加载定时任务");
|
log.info("服务器启动时则启动,加载定时任务");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(" 服务启动异常 :" + e);
|
log.error(" 服务启动异常 :" + e);
|
||||||
try {
|
try {
|
||||||
HibernateSessionFactoryUtil.closeSession();
|
HibernateSessionFactoryUtil.closeSession();
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
log.error(" 关闭sessionFactory 异常 :" + e);
|
log.error(" 关闭sessionFactory 异常 :" + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void contextDestroyed(ServletContextEvent arg0) {
|
public void contextDestroyed(ServletContextEvent arg0) {
|
||||||
// 服务关闭时,定时任务关闭
|
// 服务关闭时,定时任务关闭
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (QueueListener.sched.isStarted()) {
|
if (QueueListener.sched.isStarted()) {
|
||||||
QueueListener.sched.shutdown();
|
QueueListener.sched.shutdown();
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
}
|
}
|
||||||
} catch (SchedulerException | InterruptedException e2) {
|
} catch (SchedulerException | InterruptedException e2) {
|
||||||
e2.printStackTrace();
|
e2.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TestJobsDaoImpl.stop(session);
|
TestJobsDaoImpl.stop(session);
|
||||||
log.info(" 服务关闭时,定时任务关闭");
|
log.info(" 服务关闭时,定时任务关闭");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(" 服务关闭异常 :" + e);
|
log.error(" 服务关闭异常 :" + e);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,242 +1,242 @@
|
||||||
package luckyweb.seagull.quartz;
|
package luckyweb.seagull.quartz;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.rmi.Naming;
|
import java.rmi.Naming;
|
||||||
import java.rmi.RemoteException;
|
import java.rmi.RemoteException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.Transaction;
|
import org.hibernate.Transaction;
|
||||||
import org.quartz.Job;
|
import org.quartz.Job;
|
||||||
import org.quartz.JobExecutionContext;
|
import org.quartz.JobExecutionContext;
|
||||||
import org.quartz.JobExecutionException;
|
import org.quartz.JobExecutionException;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.spring.entity.TestClient;
|
import luckyweb.seagull.spring.entity.TestClient;
|
||||||
import luckyweb.seagull.spring.entity.TestJobs;
|
import luckyweb.seagull.spring.entity.TestJobs;
|
||||||
import luckyweb.seagull.spring.entity.TestTaskexcute;
|
import luckyweb.seagull.spring.entity.TestTaskexcute;
|
||||||
import luckyweb.seagull.spring.service.TestJobsService;
|
import luckyweb.seagull.spring.service.TestJobsService;
|
||||||
import luckyweb.seagull.spring.service.TestTastExcuteService;
|
import luckyweb.seagull.spring.service.TestTastExcuteService;
|
||||||
import luckyweb.seagull.util.DateUtil;
|
import luckyweb.seagull.util.DateUtil;
|
||||||
import luckyweb.seagull.util.HibernateSessionFactoryUtil;
|
import luckyweb.seagull.util.HibernateSessionFactoryUtil;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
import rmi.model.RunBatchCaseEntity;
|
import rmi.model.RunBatchCaseEntity;
|
||||||
import rmi.model.RunCaseEntity;
|
import rmi.model.RunCaseEntity;
|
||||||
import rmi.model.RunTaskEntity;
|
import rmi.model.RunTaskEntity;
|
||||||
import rmi.service.RunService;
|
import rmi.service.RunService;
|
||||||
|
|
||||||
public class QuartzJob implements Job {
|
public class QuartzJob implements Job {
|
||||||
private static final Logger log = Logger.getLogger(QuartzJob.class);
|
private static final Logger log = Logger.getLogger(QuartzJob.class);
|
||||||
@Resource(name = "tastExcuteService")
|
@Resource(name = "tastExcuteService")
|
||||||
private TestTastExcuteService tastExcuteService;
|
private TestTastExcuteService tastExcuteService;
|
||||||
|
|
||||||
@Resource(name = "testJobsService")
|
@Resource(name = "testJobsService")
|
||||||
private TestJobsService testJobsService;
|
private TestJobsService testJobsService;
|
||||||
|
|
||||||
public static Session session = HibernateSessionFactoryUtil.getCurrentSession();
|
public static Session session = HibernateSessionFactoryUtil.getCurrentSession();
|
||||||
@Override
|
@Override
|
||||||
public void execute(JobExecutionContext context)
|
public void execute(JobExecutionContext context)
|
||||||
throws JobExecutionException {
|
throws JobExecutionException {
|
||||||
try {
|
try {
|
||||||
String name = context.getJobDetail().getName();
|
String name = context.getJobDetail().getName();
|
||||||
|
|
||||||
if(name.indexOf("*JOB")>-1){
|
if(name.indexOf("*JOB")>-1){
|
||||||
TestJobs job = new TestJobs();
|
TestJobs job = new TestJobs();
|
||||||
String id=name.substring(0,name.indexOf("*JOB"));
|
String id=name.substring(0,name.indexOf("*JOB"));
|
||||||
System.out.println("执行命令中。。。");
|
System.out.println("执行命令中。。。");
|
||||||
for (int i = 0; i < QueueListener.list.size(); i++) {
|
for (int i = 0; i < QueueListener.list.size(); i++) {
|
||||||
job = QueueListener.list.get(i);
|
job = QueueListener.list.get(i);
|
||||||
if (id.equals("" + job.getId())) {
|
if (id.equals("" + job.getId())) {
|
||||||
break;
|
break;
|
||||||
}else{
|
}else{
|
||||||
job=null;
|
job=null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(null!=job){
|
if(null!=job){
|
||||||
toRunTask(job.getPlanproj(), job.getId(),job.getTaskName(),job.getClientip(),job.getClientpath());
|
toRunTask(job.getPlanproj(), job.getId(),job.getTaskName(),job.getClientip(),job.getClientpath());
|
||||||
System.out.println("调用程序结束。。。");
|
System.out.println("调用程序结束。。。");
|
||||||
}else{
|
}else{
|
||||||
System.out.println("没有定时任务需要启动。。。");
|
System.out.println("没有定时任务需要启动。。。");
|
||||||
}
|
}
|
||||||
}else if(name.indexOf("*CLIENT")>-1){
|
}else if(name.indexOf("*CLIENT")>-1){
|
||||||
TestClient tc = new TestClient();
|
TestClient tc = new TestClient();
|
||||||
String id=name.substring(0,name.indexOf("*CLIENT"));
|
String id=name.substring(0,name.indexOf("*CLIENT"));
|
||||||
for (int i = 0; i < QueueListener.listen_Clientlist.size(); i++) {
|
for (int i = 0; i < QueueListener.listen_Clientlist.size(); i++) {
|
||||||
tc = QueueListener.listen_Clientlist.get(i);
|
tc = QueueListener.listen_Clientlist.get(i);
|
||||||
if (id.equals("" + tc.getId())) {
|
if (id.equals("" + tc.getId())) {
|
||||||
if(null!=tc){
|
if(null!=tc){
|
||||||
String clientip=tc.getClientip();
|
String clientip=tc.getClientip();
|
||||||
try{
|
try{
|
||||||
//调用远程对象,注意RMI路径与接口必须与服务器配置一致
|
//调用远程对象,注意RMI路径与接口必须与服务器配置一致
|
||||||
RunService service=(RunService)Naming.lookup("rmi://"+clientip+":6633/RunService");
|
RunService service=(RunService)Naming.lookup("rmi://"+clientip+":6633/RunService");
|
||||||
String result=service.getClientStatus();
|
String result=service.getClientStatus();
|
||||||
if("success".equals(result)){
|
if("success".equals(result)){
|
||||||
if(tc.getStatus()!=0){
|
if(tc.getStatus()!=0){
|
||||||
tc.setStatus(0);
|
tc.setStatus(0);
|
||||||
QueueListener.listen_Clientlist.set(i, tc);
|
QueueListener.listen_Clientlist.set(i, tc);
|
||||||
Query query = session.createQuery("update TestClient t set t.status =0 where id="+tc.getId());
|
Query query = session.createQuery("update TestClient t set t.status =0 where id="+tc.getId());
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(tc.getStatus()!=1){
|
if(tc.getStatus()!=1){
|
||||||
tc.setStatus(1);
|
tc.setStatus(1);
|
||||||
QueueListener.listen_Clientlist.set(i, tc);
|
QueueListener.listen_Clientlist.set(i, tc);
|
||||||
Query query = session.createQuery("update TestClient t set t.status =1 where id="+tc.getId());
|
Query query = session.createQuery("update TestClient t set t.status =1 where id="+tc.getId());
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (RemoteException e) {
|
}catch (RemoteException e) {
|
||||||
if(tc.getStatus()!=1){
|
if(tc.getStatus()!=1){
|
||||||
tc.setStatus(1);
|
tc.setStatus(1);
|
||||||
QueueListener.listen_Clientlist.set(i, tc);
|
QueueListener.listen_Clientlist.set(i, tc);
|
||||||
Query query = session.createQuery("update TestClient t set t.status =1 where id="+tc.getId());
|
Query query = session.createQuery("update TestClient t set t.status =1 where id="+tc.getId());
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toRunTask(String projname,int jobId,String jobname,String clientip,String loadpath){
|
public String toRunTask(String projname,int jobId,String jobname,String clientip,String loadpath){
|
||||||
Session s = null;
|
Session s = null;
|
||||||
Transaction tx = null;
|
Transaction tx = null;
|
||||||
//System.out.println(tastId);
|
//System.out.println(tastId);
|
||||||
String tastName = "";
|
String tastName = "";
|
||||||
String time = new SimpleDateFormat("yyyyMMddHHmmss").format(new java.util.Date().getTime());
|
String time = new SimpleDateFormat("yyyyMMddHHmmss").format(new java.util.Date().getTime());
|
||||||
tastName ="【"+jobname+ "】_"+time;
|
tastName ="【"+jobname+ "】_"+time;
|
||||||
|
|
||||||
TestTaskexcute task=add(tastName, jobId, s, tx);
|
TestTaskexcute task=add(tastName, jobId, s, tx);
|
||||||
projname = projname.replaceAll(" ","\" \""); //防止计划名称或是项目名称带了空格符号,在run.exec中会执行出错
|
projname = projname.replaceAll(" ","\" \""); //防止计划名称或是项目名称带了空格符号,在run.exec中会执行出错
|
||||||
String result="启动失败!";
|
String result="启动失败!";
|
||||||
try{
|
try{
|
||||||
//调用远程对象,注意RMI路径与接口必须与服务器配置一致
|
//调用远程对象,注意RMI路径与接口必须与服务器配置一致
|
||||||
RunService service=(RunService)Naming.lookup("rmi://"+clientip+":6633/RunService");
|
RunService service=(RunService)Naming.lookup("rmi://"+clientip+":6633/RunService");
|
||||||
|
|
||||||
RunTaskEntity tasken = new RunTaskEntity();
|
RunTaskEntity tasken = new RunTaskEntity();
|
||||||
tasken.setProjectname(projname);
|
tasken.setProjectname(projname);
|
||||||
tasken.setTaskid(String.valueOf(task.getId()));
|
tasken.setTaskid(String.valueOf(task.getId()));
|
||||||
if(StrLib.isEmpty(loadpath)){
|
if(StrLib.isEmpty(loadpath)){
|
||||||
loadpath="/TestDriven";
|
loadpath="/TestDriven";
|
||||||
}
|
}
|
||||||
result=service.runtask(tasken,loadpath);
|
result=service.runtask(tasken,loadpath);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
return result;
|
return result;
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
execFail(s, tx,task.getId(),jobId,tastName);
|
execFail(s, tx,task.getId(),jobId,tastName);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String toRunCase(String projname,int tastId,String caseName,String casVersion,String clientip,String loadpath) {
|
public String toRunCase(String projname,int tastId,String caseName,String casVersion,String clientip,String loadpath) {
|
||||||
String result="启动失败!";
|
String result="启动失败!";
|
||||||
try{
|
try{
|
||||||
//调用远程对象,注意RMI路径与接口必须与服务器配置一致
|
//调用远程对象,注意RMI路径与接口必须与服务器配置一致
|
||||||
RunService service=(RunService)Naming.lookup("rmi://"+clientip+":6633/RunService");
|
RunService service=(RunService)Naming.lookup("rmi://"+clientip+":6633/RunService");
|
||||||
RunCaseEntity onecase = new RunCaseEntity();
|
RunCaseEntity onecase = new RunCaseEntity();
|
||||||
onecase.setProjectname(projname);
|
onecase.setProjectname(projname);
|
||||||
onecase.setTaskid(String.valueOf(tastId));
|
onecase.setTaskid(String.valueOf(tastId));
|
||||||
onecase.setTestCaseExternalId(caseName);
|
onecase.setTestCaseExternalId(caseName);
|
||||||
onecase.setVersion(casVersion);
|
onecase.setVersion(casVersion);
|
||||||
if(StrLib.isEmpty(loadpath)){
|
if(StrLib.isEmpty(loadpath)){
|
||||||
loadpath="/TestDriven";
|
loadpath="/TestDriven";
|
||||||
}
|
}
|
||||||
result=service.runcase(onecase,loadpath);
|
result=service.runcase(onecase,loadpath);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
return result;
|
return result;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String toRunCaseBatch(String projname,int taskid,String caseInfo,String clientip,String loadpath) {
|
public String toRunCaseBatch(String projname,int taskid,String caseInfo,String clientip,String loadpath) {
|
||||||
String result="启动失败!";
|
String result="启动失败!";
|
||||||
try{
|
try{
|
||||||
//调用远程对象,注意RMI路径与接口必须与服务器配置一致
|
//调用远程对象,注意RMI路径与接口必须与服务器配置一致
|
||||||
RunService service=(RunService)Naming.lookup("rmi://"+clientip+":6633/RunService");
|
RunService service=(RunService)Naming.lookup("rmi://"+clientip+":6633/RunService");
|
||||||
RunBatchCaseEntity batchcase = new RunBatchCaseEntity();
|
RunBatchCaseEntity batchcase = new RunBatchCaseEntity();
|
||||||
batchcase.setProjectname(projname);
|
batchcase.setProjectname(projname);
|
||||||
batchcase.setTaskid(String.valueOf(taskid));
|
batchcase.setTaskid(String.valueOf(taskid));
|
||||||
batchcase.setBatchcase(caseInfo);
|
batchcase.setBatchcase(caseInfo);
|
||||||
if(StrLib.isEmpty(loadpath)){
|
if(StrLib.isEmpty(loadpath)){
|
||||||
loadpath="/TestDriven";
|
loadpath="/TestDriven";
|
||||||
}
|
}
|
||||||
result=service.runbatchcase(batchcase,loadpath);
|
result=service.runbatchcase(batchcase,loadpath);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
return result;
|
return result;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加入 testJobs表
|
* 加入 testJobs表
|
||||||
* @param tastId
|
* @param tastId
|
||||||
* @param name
|
* @param name
|
||||||
* @param jobId
|
* @param jobId
|
||||||
* @param s
|
* @param s
|
||||||
* @param tx
|
* @param tx
|
||||||
*/
|
*/
|
||||||
private TestTaskexcute add(String tastName,int jobId,Session s,Transaction tx){
|
private TestTaskexcute add(String tastName,int jobId,Session s,Transaction tx){
|
||||||
TestTaskexcute tast = new TestTaskexcute();
|
TestTaskexcute tast = new TestTaskexcute();
|
||||||
try {
|
try {
|
||||||
tast.getTestJob().setId(jobId);
|
tast.getTestJob().setId(jobId);
|
||||||
tast.setTaskId(tastName);
|
tast.setTaskId(tastName);
|
||||||
tast.setCaseIsExec("0");
|
tast.setCaseIsExec("0");
|
||||||
tast.setTaskStatus("0");
|
tast.setTaskStatus("0");
|
||||||
tast.setCreateTime(DateUtil.now());
|
tast.setCreateTime(DateUtil.now());
|
||||||
s = HibernateSessionFactoryUtil.openSession();
|
s = HibernateSessionFactoryUtil.openSession();
|
||||||
tx = s.beginTransaction();
|
tx = s.beginTransaction();
|
||||||
s.save(tast);
|
s.save(tast);
|
||||||
System.out.println("tastId:"+tast.getId());
|
System.out.println("tastId:"+tast.getId());
|
||||||
tx.commit();
|
tx.commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
tx.rollback();
|
tx.rollback();
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
s.close();
|
s.close();
|
||||||
|
|
||||||
}
|
}
|
||||||
return tast;
|
return tast;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void execFail(Session s,Transaction tx,int id,int jobId,String tastId){
|
private void execFail(Session s,Transaction tx,int id,int jobId,String tastId){
|
||||||
//执行失败时,写入任务表记录为执行失败
|
//执行失败时,写入任务表记录为执行失败
|
||||||
TestTaskexcute tast = new TestTaskexcute();
|
TestTaskexcute tast = new TestTaskexcute();
|
||||||
s = HibernateSessionFactoryUtil.openSession();
|
s = HibernateSessionFactoryUtil.openSession();
|
||||||
tx = s.beginTransaction();
|
tx = s.beginTransaction();
|
||||||
tast=(TestTaskexcute) s.load(TestTaskexcute.class, id);
|
tast=(TestTaskexcute) s.load(TestTaskexcute.class, id);
|
||||||
tast.setTaskStatus("3");
|
tast.setTaskStatus("3");
|
||||||
tast.setJobid(jobId);
|
tast.setJobid(jobId);
|
||||||
tast.setTaskId(tastId);
|
tast.setTaskId(tastId);
|
||||||
tast.setCaseIsExec("1");
|
tast.setCaseIsExec("1");
|
||||||
tast.setTaskStatus("3");
|
tast.setTaskStatus("3");
|
||||||
s.update(tast);
|
s.update(tast);
|
||||||
tx.commit();
|
tx.commit();
|
||||||
s.close();
|
s.close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,226 +1,226 @@
|
||||||
package luckyweb.seagull.quartz;
|
package luckyweb.seagull.quartz;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.quartz.CronTrigger;
|
import org.quartz.CronTrigger;
|
||||||
import org.quartz.JobDetail;
|
import org.quartz.JobDetail;
|
||||||
import org.quartz.Scheduler;
|
import org.quartz.Scheduler;
|
||||||
import org.quartz.SchedulerException;
|
import org.quartz.SchedulerException;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
|
|
||||||
|
|
||||||
public class QuartzManager {
|
public class QuartzManager {
|
||||||
|
|
||||||
//private static SchedulerFactory gSchedulerFactory = new StdSchedulerFactory();
|
//private static SchedulerFactory gSchedulerFactory = new StdSchedulerFactory();
|
||||||
//private static String JOB_GROUP_NAME = "EXTJWEB_JOBGROUP_NAME";
|
//private static String JOB_GROUP_NAME = "EXTJWEB_JOBGROUP_NAME";
|
||||||
//private static String TRIGGER_GROUP_NAME = "EXTJWEB_TRIGGERGROUP_NAME";
|
//private static String TRIGGER_GROUP_NAME = "EXTJWEB_TRIGGERGROUP_NAME";
|
||||||
|
|
||||||
private static final Logger log = Logger.getLogger(QuartzManager.class);
|
private static final Logger log = Logger.getLogger(QuartzManager.class);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 添加一个定时任务,使用默认的任务组名,触发器名,触发器组名
|
* @Description: 添加一个定时任务,使用默认的任务组名,触发器名,触发器组名
|
||||||
*
|
*
|
||||||
* @param jobName
|
* @param jobName
|
||||||
* 任务名
|
* 任务名
|
||||||
* @param cls
|
* @param cls
|
||||||
* 任务
|
* 任务
|
||||||
* @param time
|
* @param time
|
||||||
* 时间设置,参考quartz说明文档
|
* 时间设置,参考quartz说明文档
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static void addJob(String jobName, Class cls, String time) {
|
public static void addJob(String jobName, Class cls, String time) {
|
||||||
try {
|
try {
|
||||||
JobDetail jobDetail = new JobDetail(jobName, QueueListener.JOB_GROUP_NAME, cls);// 任务名,任务组,任务执行类
|
JobDetail jobDetail = new JobDetail(jobName, QueueListener.JOB_GROUP_NAME, cls);// 任务名,任务组,任务执行类
|
||||||
//System.out.println("jobDetail 's Name :"+jobDetail.getName());
|
//System.out.println("jobDetail 's Name :"+jobDetail.getName());
|
||||||
// 触发器
|
// 触发器
|
||||||
CronTrigger trigger = new CronTrigger(jobDetail.getName(), QueueListener.TRIGGER_GROUP_NAME);// 触发器名,触发器组
|
CronTrigger trigger = new CronTrigger(jobDetail.getName(), QueueListener.TRIGGER_GROUP_NAME);// 触发器名,触发器组
|
||||||
trigger.setCronExpression(time);// 触发器时间设定
|
trigger.setCronExpression(time);// 触发器时间设定
|
||||||
QueueListener.sched.scheduleJob(jobDetail, trigger);
|
QueueListener.sched.scheduleJob(jobDetail, trigger);
|
||||||
// 启动
|
// 启动
|
||||||
if (!QueueListener.sched.isShutdown()) {
|
if (!QueueListener.sched.isShutdown()) {
|
||||||
System.out.println("启动。。"+jobName +" ,时间:"+time);
|
System.out.println("启动。。"+jobName +" ,时间:"+time);
|
||||||
QueueListener.sched.start();
|
QueueListener.sched.start();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 添加一个定时任务
|
* @Description: 添加一个定时任务
|
||||||
*
|
*
|
||||||
* @param jobName
|
* @param jobName
|
||||||
* 任务名
|
* 任务名
|
||||||
* @param jobGroupName
|
* @param jobGroupName
|
||||||
* 任务组名
|
* 任务组名
|
||||||
* @param triggerName
|
* @param triggerName
|
||||||
* 触发器名
|
* 触发器名
|
||||||
* @param triggerGroupName
|
* @param triggerGroupName
|
||||||
* 触发器组名
|
* 触发器组名
|
||||||
* @param jobClass
|
* @param jobClass
|
||||||
* 任务
|
* 任务
|
||||||
* @param time
|
* @param time
|
||||||
* 时间设置,参考quartz说明文档
|
* 时间设置,参考quartz说明文档
|
||||||
* @throws SchedulerException
|
* @throws SchedulerException
|
||||||
*
|
*
|
||||||
* @Title: QuartzManager.java
|
* @Title: QuartzManager.java
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static void addJob(String jobName, String jobGroupName,
|
public static void addJob(String jobName, String jobGroupName,
|
||||||
String triggerName, String triggerGroupName, Class jobClass,
|
String triggerName, String triggerGroupName, Class jobClass,
|
||||||
String time) throws SchedulerException {
|
String time) throws SchedulerException {
|
||||||
// QueueListener.sched=QueueListener.gSchedulerFactory.getScheduler();
|
// QueueListener.sched=QueueListener.gSchedulerFactory.getScheduler();
|
||||||
try {
|
try {
|
||||||
JobDetail jobDetail = new JobDetail(jobName, jobGroupName, jobClass);// 任务名,任务组,任务执行类
|
JobDetail jobDetail = new JobDetail(jobName, jobGroupName, jobClass);// 任务名,任务组,任务执行类
|
||||||
// 触发器
|
// 触发器
|
||||||
CronTrigger trigger = new CronTrigger(triggerName, triggerGroupName);// 触发器名,触发器组
|
CronTrigger trigger = new CronTrigger(triggerName, triggerGroupName);// 触发器名,触发器组
|
||||||
trigger.setCronExpression(time);// 触发器时间设定
|
trigger.setCronExpression(time);// 触发器时间设定
|
||||||
QueueListener.sched.scheduleJob(jobDetail, trigger);
|
QueueListener.sched.scheduleJob(jobDetail, trigger);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 修改一个任务的触发时间(使用默认的任务组名,触发器名,触发器组名)
|
* @Description: 修改一个任务的触发时间(使用默认的任务组名,触发器名,触发器组名)
|
||||||
*
|
*
|
||||||
* @param jobName
|
* @param jobName
|
||||||
* @param time
|
* @param time
|
||||||
*
|
*
|
||||||
* @Title: QuartzManager.java
|
* @Title: QuartzManager.java
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static String modifyJobTime(String jobName, String time) {
|
public static String modifyJobTime(String jobName, String time) {
|
||||||
try {
|
try {
|
||||||
Scheduler sched=QueueListener.gSchedulerFactory.getScheduler();
|
Scheduler sched=QueueListener.gSchedulerFactory.getScheduler();
|
||||||
|
|
||||||
CronTrigger trigger = (CronTrigger) sched.getTrigger(jobName,QueueListener.TRIGGER_GROUP_NAME);
|
CronTrigger trigger = (CronTrigger) sched.getTrigger(jobName,QueueListener.TRIGGER_GROUP_NAME);
|
||||||
if (trigger == null) {
|
if (trigger == null) {
|
||||||
return "任务已经执行过或者不在队列中,请暂定运行后,重启再修改时间.";
|
return "任务已经执行过或者不在队列中,请暂定运行后,重启再修改时间.";
|
||||||
}
|
}
|
||||||
String oldTime = trigger.getCronExpression();
|
String oldTime = trigger.getCronExpression();
|
||||||
if (!oldTime.equalsIgnoreCase(time)) {
|
if (!oldTime.equalsIgnoreCase(time)) {
|
||||||
JobDetail jobDetail = sched.getJobDetail(jobName, QueueListener.JOB_GROUP_NAME);
|
JobDetail jobDetail = sched.getJobDetail(jobName, QueueListener.JOB_GROUP_NAME);
|
||||||
Class objJobClass = jobDetail.getJobClass();
|
Class objJobClass = jobDetail.getJobClass();
|
||||||
removeJob(jobName);
|
removeJob(jobName);
|
||||||
addJob(jobName, objJobClass, time);
|
addJob(jobName, objJobClass, time);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 修改一个任务的触发时间
|
* @Description: 修改一个任务的触发时间
|
||||||
*
|
*
|
||||||
* @param triggerName
|
* @param triggerName
|
||||||
* @param triggerGroupName
|
* @param triggerGroupName
|
||||||
* @param time
|
* @param time
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static void modifyJobTime(String triggerName,
|
public static void modifyJobTime(String triggerName,
|
||||||
String triggerGroupName, String time) {
|
String triggerGroupName, String time) {
|
||||||
try {
|
try {
|
||||||
QueueListener.sched = QueueListener.gSchedulerFactory.getScheduler();
|
QueueListener.sched = QueueListener.gSchedulerFactory.getScheduler();
|
||||||
CronTrigger trigger = (CronTrigger) QueueListener.sched.getTrigger(triggerName,
|
CronTrigger trigger = (CronTrigger) QueueListener.sched.getTrigger(triggerName,
|
||||||
triggerGroupName);
|
triggerGroupName);
|
||||||
if (trigger == null) {
|
if (trigger == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String oldTime = trigger.getCronExpression();
|
String oldTime = trigger.getCronExpression();
|
||||||
if (!oldTime.equalsIgnoreCase(time)) {
|
if (!oldTime.equalsIgnoreCase(time)) {
|
||||||
CronTrigger ct = (CronTrigger) trigger;
|
CronTrigger ct = (CronTrigger) trigger;
|
||||||
// 修改时间
|
// 修改时间
|
||||||
ct.setCronExpression(time);
|
ct.setCronExpression(time);
|
||||||
// 重启触发器
|
// 重启触发器
|
||||||
QueueListener.sched.resumeTrigger(triggerName, triggerGroupName);
|
QueueListener.sched.resumeTrigger(triggerName, triggerGroupName);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 移除一个任务(使用默认的任务组名,触发器名,触发器组名)
|
* @Description: 移除一个任务(使用默认的任务组名,触发器名,触发器组名)
|
||||||
*
|
*
|
||||||
* @param jobName
|
* @param jobName
|
||||||
*
|
*
|
||||||
* @Title: QuartzManager.java
|
* @Title: QuartzManager.java
|
||||||
*/
|
*/
|
||||||
public static void removeJob(String jobName) {
|
public static void removeJob(String jobName) {
|
||||||
try {
|
try {
|
||||||
QueueListener.sched = QueueListener.gSchedulerFactory.getScheduler();
|
QueueListener.sched = QueueListener.gSchedulerFactory.getScheduler();
|
||||||
QueueListener.sched.pauseTrigger(jobName, QueueListener.TRIGGER_GROUP_NAME);// 停止触发器
|
QueueListener.sched.pauseTrigger(jobName, QueueListener.TRIGGER_GROUP_NAME);// 停止触发器
|
||||||
QueueListener.sched.unscheduleJob(jobName, QueueListener.TRIGGER_GROUP_NAME);// 移除触发器
|
QueueListener.sched.unscheduleJob(jobName, QueueListener.TRIGGER_GROUP_NAME);// 移除触发器
|
||||||
QueueListener.sched.deleteJob(jobName, QueueListener.TRIGGER_GROUP_NAME);// 删除任务
|
QueueListener.sched.deleteJob(jobName, QueueListener.TRIGGER_GROUP_NAME);// 删除任务
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 移除一个任务
|
* @Description: 移除一个任务
|
||||||
*
|
*
|
||||||
* @param jobName
|
* @param jobName
|
||||||
* @param jobGroupName
|
* @param jobGroupName
|
||||||
* @param triggerName
|
* @param triggerName
|
||||||
* @param triggerGroupName
|
* @param triggerGroupName
|
||||||
*
|
*
|
||||||
* @Title: QuartzManager.java
|
* @Title: QuartzManager.java
|
||||||
*/
|
*/
|
||||||
public static void removeJob(String jobName, String jobGroupName,
|
public static void removeJob(String jobName, String jobGroupName,
|
||||||
String triggerName, String triggerGroupName) {
|
String triggerName, String triggerGroupName) {
|
||||||
try {
|
try {
|
||||||
Scheduler sched = QueueListener.gSchedulerFactory.getScheduler();
|
Scheduler sched = QueueListener.gSchedulerFactory.getScheduler();
|
||||||
sched.pauseTrigger(triggerName, triggerGroupName);// 停止触发器
|
sched.pauseTrigger(triggerName, triggerGroupName);// 停止触发器
|
||||||
sched.unscheduleJob(triggerName, triggerGroupName);// 移除触发器
|
sched.unscheduleJob(triggerName, triggerGroupName);// 移除触发器
|
||||||
sched.deleteJob(jobName, jobGroupName);// 删除任务
|
sched.deleteJob(jobName, jobGroupName);// 删除任务
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description:启动所有定时任务
|
* @Description:启动所有定时任务
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @Title: QuartzManager.java
|
* @Title: QuartzManager.java
|
||||||
*/
|
*/
|
||||||
public static void startJobs() {
|
public static void startJobs() {
|
||||||
try {
|
try {
|
||||||
Scheduler sched = QueueListener.gSchedulerFactory.getScheduler();
|
Scheduler sched = QueueListener.gSchedulerFactory.getScheduler();
|
||||||
sched.start();
|
sched.start();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description:关闭所有定时任务
|
* @Description:关闭所有定时任务
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @Title: QuartzManager.java
|
* @Title: QuartzManager.java
|
||||||
* @Copyright: Copyright (c) 2014
|
* @Copyright: Copyright (c) 2014
|
||||||
*
|
*
|
||||||
* @author Comsys-LZP
|
* @author Comsys-LZP
|
||||||
* @date 2014-6-26 下午03:50:26
|
* @date 2014-6-26 下午03:50:26
|
||||||
* @version V2.0
|
* @version V2.0
|
||||||
*/
|
*/
|
||||||
public static void shutdownJobs() {
|
public static void shutdownJobs() {
|
||||||
try {
|
try {
|
||||||
Scheduler sched = QueueListener.gSchedulerFactory.getScheduler();
|
Scheduler sched = QueueListener.gSchedulerFactory.getScheduler();
|
||||||
if (!sched.isShutdown()) {
|
if (!sched.isShutdown()) {
|
||||||
sched.shutdown();
|
sched.shutdown();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,44 +1,44 @@
|
||||||
package luckyweb.seagull.quartz;
|
package luckyweb.seagull.quartz;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TestClient;
|
import luckyweb.seagull.spring.entity.TestClient;
|
||||||
import luckyweb.seagull.spring.entity.TestJobs;
|
import luckyweb.seagull.spring.entity.TestJobs;
|
||||||
|
|
||||||
public class QuratzJobDataMgr
|
public class QuratzJobDataMgr
|
||||||
{
|
{
|
||||||
private static final Logger logger = Logger.getLogger(QuratzJobDataMgr.class);
|
private static final Logger logger = Logger.getLogger(QuratzJobDataMgr.class);
|
||||||
|
|
||||||
public void addJobRunTime(TestJobs tj, int id) throws Exception
|
public void addJobRunTime(TestJobs tj, int id) throws Exception
|
||||||
{
|
{
|
||||||
// 比较任务的开始时间和当前时间。如果是返回1,说明任务的开始时间是还没有过,如果返回2 说明任务的开时间应过去
|
// 比较任务的开始时间和当前时间。如果是返回1,说明任务的开始时间是还没有过,如果返回2 说明任务的开时间应过去
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String startTime = tj.getStartTimestr();
|
String startTime = tj.getStartTimestr();
|
||||||
// String startTime=setStartTime(tj);
|
// String startTime=setStartTime(tj);
|
||||||
QuartzManager.addJob(id + "*JOB", QuartzJob.class, startTime);
|
QuartzManager.addJob(id + "*JOB", QuartzJob.class, startTime);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
logger.error(e);
|
logger.error(e);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addTestClient(TestClient tc, int id) throws Exception
|
public void addTestClient(TestClient tc, int id) throws Exception
|
||||||
{
|
{
|
||||||
// 比较任务的开始时间和当前时间。如果是返回1,说明任务的开始时间是还没有过,如果返回2 说明任务的开时间应过去
|
// 比较任务的开始时间和当前时间。如果是返回1,说明任务的开始时间是还没有过,如果返回2 说明任务的开时间应过去
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int checkTime = tc.getCheckinterval();
|
int checkTime = tc.getCheckinterval();
|
||||||
String startTime="0/"+checkTime+" * * * * ?";
|
String startTime="0/"+checkTime+" * * * * ?";
|
||||||
QuartzManager.addJob(id + "*CLIENT", QuartzJob.class, startTime);
|
QuartzManager.addJob(id + "*CLIENT", QuartzJob.class, startTime);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
logger.error(e);
|
logger.error(e);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +1,48 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Accident;
|
import luckyweb.seagull.spring.entity.Accident;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface AccidentDao {
|
public interface AccidentDao {
|
||||||
public int add(Accident accident) throws Exception;
|
public int add(Accident accident) throws Exception;
|
||||||
|
|
||||||
public void modify(Accident accident) throws Exception;
|
public void modify(Accident accident) throws Exception;
|
||||||
|
|
||||||
public void modifyState(Accident accident) throws Exception;
|
public void modifyState(Accident accident) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(Accident accident) throws Exception;
|
public void modifyInfo(Accident accident) throws Exception;
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<Accident> list(Accident accident) throws Exception;
|
public List<Accident> list(Accident accident) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<Accident> list(String hql) throws Exception;
|
public List<Accident> list(String hql) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List listavgpro(String sql) throws Exception;
|
public List listavgpro(String sql) throws Exception;
|
||||||
|
|
||||||
public Accident load(int id) throws Exception;
|
public Accident load(int id) throws Exception;
|
||||||
|
|
||||||
public List<Accident> load(String name, String cmdType, String planPath)
|
public List<Accident> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public Accident get(int id) throws Exception;
|
public Accident get(int id) throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(Accident accident,String hql);
|
public int findRows(Accident accident,String hql);
|
||||||
|
|
||||||
public List<Accident> findJobsList();
|
public List<Accident> findJobsList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,204 +1,204 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Accident;
|
import luckyweb.seagull.spring.entity.Accident;
|
||||||
|
|
||||||
@Repository("accidentDao")
|
@Repository("accidentDao")
|
||||||
public class AccidentDaoImpl extends HibernateDaoSupport implements AccidentDao{
|
public class AccidentDaoImpl extends HibernateDaoSupport implements AccidentDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
try{
|
try{
|
||||||
Accident accident = this.load(id);
|
Accident accident = this.load(id);
|
||||||
this.getHibernateTemplate().delete(accident);
|
this.getHibernateTemplate().delete(accident);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(Accident accident, Query query) {
|
private void whereParameter(Accident accident, Query query) {
|
||||||
|
|
||||||
if (accident.getProjectid()!=0) {
|
if (accident.getProjectid()!=0) {
|
||||||
query.setParameter("projectid", accident.getProjectid());
|
query.setParameter("projectid", accident.getProjectid());
|
||||||
}
|
}
|
||||||
if (accident.getAccstatus()!=null&&!accident.getAccstatus().equals("")&&!accident.getAccstatus().equals("00")) {
|
if (accident.getAccstatus()!=null&&!accident.getAccstatus().equals("")&&!accident.getAccstatus().equals("00")) {
|
||||||
query.setParameter("accstatus", accident.getAccstatus());
|
query.setParameter("accstatus", accident.getAccstatus());
|
||||||
}
|
}
|
||||||
if (accident.getAccstarttime()!=null&&!"".equals(accident.getAccstarttime())) {
|
if (accident.getAccstarttime()!=null&&!"".equals(accident.getAccstarttime())) {
|
||||||
query.setParameter("accstarttime", accident.getAccstarttime());
|
query.setParameter("accstarttime", accident.getAccstarttime());
|
||||||
}
|
}
|
||||||
if (accident.getAccendtime()!=null&&!"".equals(accident.getAccendtime())) {
|
if (accident.getAccendtime()!=null&&!"".equals(accident.getAccendtime())) {
|
||||||
query.setParameter("accendtime", accident.getAccendtime());
|
query.setParameter("accendtime", accident.getAccendtime());
|
||||||
}
|
}
|
||||||
if (null!=accident.getAccdescription()&&!"".equals(accident.getAccdescription())) {
|
if (null!=accident.getAccdescription()&&!"".equals(accident.getAccdescription())) {
|
||||||
query.setParameter("accdescription", "%"+accident.getAccdescription()+"%");
|
query.setParameter("accdescription", "%"+accident.getAccdescription()+"%");
|
||||||
}
|
}
|
||||||
if (null!=accident.getCausaltype()&&!"".equals(accident.getCausaltype())) {
|
if (null!=accident.getCausaltype()&&!"".equals(accident.getCausaltype())) {
|
||||||
query.setParameter("causaltype", "%"+accident.getCausaltype()+"%");
|
query.setParameter("causaltype", "%"+accident.getCausaltype()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((Accident)value, query);
|
whereParameter((Accident)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(Accident accident, String hql) {
|
public int findRows(Accident accident, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(accident, query);
|
whereParameter(accident, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(Accident accident) throws Exception {
|
public int add(Accident accident) throws Exception {
|
||||||
this.getHibernateTemplate().save(accident);
|
this.getHibernateTemplate().save(accident);
|
||||||
return accident.getId();
|
return accident.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(Accident accident) throws Exception {
|
public void modify(Accident accident) throws Exception {
|
||||||
this.getHibernateTemplate().update(accident);
|
this.getHibernateTemplate().update(accident);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(Accident accident) throws Exception {
|
public void modifyState(Accident accident) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyInfo(Accident accident) throws Exception {
|
public void modifyInfo(Accident accident) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Accident> list(Accident accident)
|
public List<Accident> list(Accident accident)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<Accident> list(String hql) throws Exception {
|
public List<Accident> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Accident load(int id) throws Exception {
|
public Accident load(int id) throws Exception {
|
||||||
|
|
||||||
return (Accident) this.getHibernateTemplate().get(Accident.class, id);
|
return (Accident) this.getHibernateTemplate().get(Accident.class, id);
|
||||||
//return (Accident) this.getSession().load(Accident.class, id);
|
//return (Accident) this.getSession().load(Accident.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Accident> load(String name, String cmdType,
|
public List<Accident> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Accident get(int id) throws Exception {
|
public Accident get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Accident> findJobsList() {
|
public List<Accident> findJobsList() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List listavgpro(String sql) throws Exception {
|
public List listavgpro(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List count=null;
|
List count=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
count = session.createSQLQuery(sql).list();
|
count = session.createSQLQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,53 +1,53 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.FlowCheck;
|
import luckyweb.seagull.spring.entity.FlowCheck;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface FlowCheckDao {
|
public interface FlowCheckDao {
|
||||||
public int add(FlowCheck flowcheck) throws Exception;
|
public int add(FlowCheck flowcheck) throws Exception;
|
||||||
|
|
||||||
public void modify(FlowCheck flowcheck) throws Exception;
|
public void modify(FlowCheck flowcheck) throws Exception;
|
||||||
|
|
||||||
public void modifyState(FlowCheck flowcheck) throws Exception;
|
public void modifyState(FlowCheck flowcheck) throws Exception;
|
||||||
|
|
||||||
public void modifyVersion(String sql) throws Exception;
|
public void modifyVersion(String sql) throws Exception;
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<FlowCheck> list(FlowCheck flowcheck) throws Exception;
|
public List<FlowCheck> list(FlowCheck flowcheck) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<FlowCheck> list(String hql) throws Exception;
|
public List<FlowCheck> list(String hql) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List listcheckinfo(String sql) throws Exception;
|
public List listcheckinfo(String sql) throws Exception;
|
||||||
|
|
||||||
public FlowCheck load(int id) throws Exception;
|
public FlowCheck load(int id) throws Exception;
|
||||||
|
|
||||||
public List<FlowCheck> load(String name, String cmdType, String planPath)
|
public List<FlowCheck> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public String get(String sql) throws Exception;
|
public String get(String sql) throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(FlowCheck flowcheck,String hql);
|
public int findRows(FlowCheck flowcheck,String hql);
|
||||||
|
|
||||||
public List findByPageTable(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPageTable(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRowsTable(FlowCheck flowcheck,String hql);
|
public int findRowsTable(FlowCheck flowcheck,String hql);
|
||||||
|
|
||||||
/*public List findRows(String sql);*/
|
/*public List findRows(String sql);*/
|
||||||
|
|
||||||
public List<FlowCheck> findJobsList();
|
public List<FlowCheck> findJobsList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,264 +1,264 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Accident;
|
import luckyweb.seagull.spring.entity.Accident;
|
||||||
import luckyweb.seagull.spring.entity.FlowCheck;
|
import luckyweb.seagull.spring.entity.FlowCheck;
|
||||||
import luckyweb.seagull.spring.entity.FlowInfo;
|
import luckyweb.seagull.spring.entity.FlowInfo;
|
||||||
|
|
||||||
@Repository("flowcheckDao")
|
@Repository("flowcheckDao")
|
||||||
public class FlowCheckDaoImpl extends HibernateDaoSupport implements FlowCheckDao{
|
public class FlowCheckDaoImpl extends HibernateDaoSupport implements FlowCheckDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
FlowCheck flowcheck = this.load(id);
|
FlowCheck flowcheck = this.load(id);
|
||||||
this.getHibernateTemplate().delete(flowcheck);
|
this.getHibernateTemplate().delete(flowcheck);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(FlowCheck flowcheck, Query query) {
|
private void whereParameter(FlowCheck flowcheck, Query query) {
|
||||||
if (flowcheck.getId()!=0) {
|
if (flowcheck.getId()!=0) {
|
||||||
query.setParameter("id", flowcheck.getId());
|
query.setParameter("id", flowcheck.getId());
|
||||||
}
|
}
|
||||||
if (flowcheck.getProjectid()!=0) {
|
if (flowcheck.getProjectid()!=0) {
|
||||||
query.setParameter("projectid", flowcheck.getProjectid());
|
query.setParameter("projectid", flowcheck.getProjectid());
|
||||||
}
|
}
|
||||||
if (flowcheck.getCheckid()!=0) {
|
if (flowcheck.getCheckid()!=0) {
|
||||||
query.setParameter("checkid", flowcheck.getCheckid());
|
query.setParameter("checkid", flowcheck.getCheckid());
|
||||||
}
|
}
|
||||||
if (flowcheck.getVersionnum()!=null&&!flowcheck.getVersionnum().equals("")) {
|
if (flowcheck.getVersionnum()!=null&&!flowcheck.getVersionnum().equals("")) {
|
||||||
query.setParameter("versionnum", flowcheck.getVersionnum());
|
query.setParameter("versionnum", flowcheck.getVersionnum());
|
||||||
}
|
}
|
||||||
if (flowcheck.getCheckenddate()!=null&&flowcheck.getCheckstartdate()!=null&&
|
if (flowcheck.getCheckenddate()!=null&&flowcheck.getCheckstartdate()!=null&&
|
||||||
!flowcheck.getCheckenddate().equals("")&&!flowcheck.getCheckstartdate().equals("")) {
|
!flowcheck.getCheckenddate().equals("")&&!flowcheck.getCheckstartdate().equals("")) {
|
||||||
query.setParameter("checkstartdate", flowcheck.getCheckstartdate());
|
query.setParameter("checkstartdate", flowcheck.getCheckstartdate());
|
||||||
query.setParameter("checkenddate", flowcheck.getCheckenddate());
|
query.setParameter("checkenddate", flowcheck.getCheckenddate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(FlowInfo flowinfo, Query query) {
|
private void whereParameter(FlowInfo flowinfo, Query query) {
|
||||||
if (flowinfo.getId()!=0&&flowinfo.getId()!=99) {
|
if (flowinfo.getId()!=0&&flowinfo.getId()!=99) {
|
||||||
query.setParameter("projectid", flowinfo.getId());
|
query.setParameter("projectid", flowinfo.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
//Query query= session.createQuery(hql);
|
//Query query= session.createQuery(hql);
|
||||||
Query query= session.createSQLQuery(hql);
|
Query query= session.createSQLQuery(hql);
|
||||||
whereParameter((FlowCheck)value, query);
|
whereParameter((FlowCheck)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPageTable(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPageTable(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((FlowCheck)value, query);
|
whereParameter((FlowCheck)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(FlowCheck flowcheck, String hql) {
|
public int findRows(FlowCheck flowcheck, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
/*Query query=session.createQuery(hql);*/
|
/*Query query=session.createQuery(hql);*/
|
||||||
Query query= session.createSQLQuery(hql);
|
Query query= session.createSQLQuery(hql);
|
||||||
whereParameter(flowcheck, query);
|
whereParameter(flowcheck, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query.list().size());
|
query.list().size());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRowsTable(FlowCheck flowcheck, String hql) {
|
public int findRowsTable(FlowCheck flowcheck, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(flowcheck, query);
|
whereParameter(flowcheck, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query.list().get(0)
|
query.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(FlowCheck flowcheck) throws Exception {
|
public int add(FlowCheck flowcheck) throws Exception {
|
||||||
this.getHibernateTemplate().save(flowcheck);
|
this.getHibernateTemplate().save(flowcheck);
|
||||||
return flowcheck.getCheckid();
|
return flowcheck.getCheckid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(FlowCheck flowcheck) throws Exception {
|
public void modify(FlowCheck flowcheck) throws Exception {
|
||||||
this.getHibernateTemplate().update(flowcheck);
|
this.getHibernateTemplate().update(flowcheck);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(FlowCheck flowcheck) throws Exception {
|
public void modifyState(FlowCheck flowcheck) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyVersion(String sql) throws Exception {
|
public void modifyVersion(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(sql);
|
Query query =session .createQuery(sql);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally
|
}finally
|
||||||
{
|
{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<FlowCheck> list(FlowCheck flowcheck)
|
public List<FlowCheck> list(FlowCheck flowcheck)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<FlowCheck> list(String hql) throws Exception {
|
public List<FlowCheck> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FlowCheck load(int id) throws Exception {
|
public FlowCheck load(int id) throws Exception {
|
||||||
return (FlowCheck) this.getHibernateTemplate().get(FlowCheck.class, id);
|
return (FlowCheck) this.getHibernateTemplate().get(FlowCheck.class, id);
|
||||||
//return (FlowCheck) this.getSession().load(FlowCheck.class, id);
|
//return (FlowCheck) this.getSession().load(FlowCheck.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<FlowCheck> load(String name, String cmdType,
|
public List<FlowCheck> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String get(String sql) throws Exception {
|
public String get(String sql) throws Exception {
|
||||||
String result = "";
|
String result = "";
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Object> count = session.createSQLQuery(sql).list();
|
List<Object> count = session.createSQLQuery(sql).list();
|
||||||
if(count.size()!=0&&count.get(0)!=null){
|
if(count.size()!=0&&count.get(0)!=null){
|
||||||
result = count.get(0).toString();
|
result = count.get(0).toString();
|
||||||
}
|
}
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<FlowCheck> findJobsList() {
|
public List<FlowCheck> findJobsList() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List listcheckinfo(String sql) throws Exception {
|
public List listcheckinfo(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List count=null;
|
List count=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
count = session.createSQLQuery(sql).list();
|
count = session.createSQLQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.FlowInfo;
|
import luckyweb.seagull.spring.entity.FlowInfo;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface FlowInfoDao {
|
public interface FlowInfoDao {
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<FlowInfo> list(FlowInfo flowinfo) throws Exception;
|
public List<FlowInfo> list(FlowInfo flowinfo) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<FlowInfo> list(String hql) throws Exception;
|
public List<FlowInfo> list(String hql) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List listcheckinfo(String sql) throws Exception;
|
public List listcheckinfo(String sql) throws Exception;
|
||||||
|
|
||||||
public FlowInfo load(int id) throws Exception;
|
public FlowInfo load(int id) throws Exception;
|
||||||
|
|
||||||
public FlowInfo get(int id) throws Exception;
|
public FlowInfo get(int id) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,75 +1,75 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Accident;
|
import luckyweb.seagull.spring.entity.Accident;
|
||||||
import luckyweb.seagull.spring.entity.FlowCheck;
|
import luckyweb.seagull.spring.entity.FlowCheck;
|
||||||
import luckyweb.seagull.spring.entity.FlowInfo;
|
import luckyweb.seagull.spring.entity.FlowInfo;
|
||||||
|
|
||||||
@Repository("flowinfoDao")
|
@Repository("flowinfoDao")
|
||||||
public class FlowInfoDaoImpl extends HibernateDaoSupport implements FlowInfoDao{
|
public class FlowInfoDaoImpl extends HibernateDaoSupport implements FlowInfoDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<FlowInfo> list(FlowInfo flowinfo)
|
public List<FlowInfo> list(FlowInfo flowinfo)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<FlowInfo> list(String hql) throws Exception {
|
public List<FlowInfo> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FlowInfo load(int id) throws Exception {
|
public FlowInfo load(int id) throws Exception {
|
||||||
return (FlowInfo) this.getSession().load(FlowInfo.class, id);
|
return (FlowInfo) this.getSession().load(FlowInfo.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FlowInfo get(int id) throws Exception {
|
public FlowInfo get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return (FlowInfo) this.getHibernateTemplate().get(FlowInfo.class, id);
|
return (FlowInfo) this.getHibernateTemplate().get(FlowInfo.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List listcheckinfo(String sql) throws Exception {
|
public List listcheckinfo(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
||||||
List count=null;
|
List count=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
count = session.createSQLQuery(sql).list();
|
count = session.createSQLQuery(sql).list();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.OperationLog;
|
import luckyweb.seagull.spring.entity.OperationLog;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface OperationLogDao {
|
public interface OperationLogDao {
|
||||||
|
|
||||||
public OperationLog load(int id) throws Exception;
|
public OperationLog load(int id) throws Exception;
|
||||||
|
|
||||||
public int add(OperationLog oplog) throws Exception;
|
public int add(OperationLog oplog) throws Exception;
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(OperationLog oplog, String hql);
|
public int findRows(OperationLog oplog, String hql);
|
||||||
public void delete(String hql) throws Exception;
|
public void delete(String hql) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,115 +1,115 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.OperationLog;
|
import luckyweb.seagull.spring.entity.OperationLog;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Repository("operationlogDao")
|
@Repository("operationlogDao")
|
||||||
public class OperationLogDaoImpl extends HibernateDaoSupport implements OperationLogDao{
|
public class OperationLogDaoImpl extends HibernateDaoSupport implements OperationLogDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OperationLog load(int id) throws Exception {
|
public OperationLog load(int id) throws Exception {
|
||||||
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
||||||
return (OperationLog) this.getHibernateTemplate().get(OperationLog.class, id);
|
return (OperationLog) this.getHibernateTemplate().get(OperationLog.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(OperationLog oplog) throws Exception {
|
public int add(OperationLog oplog) throws Exception {
|
||||||
this.getHibernateTemplate().save(oplog);
|
this.getHibernateTemplate().save(oplog);
|
||||||
return oplog.getId();
|
return oplog.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(OperationLog oplog, Query query) {
|
private void whereParameter(OperationLog oplog, Query query) {
|
||||||
if (oplog.getStarttime()!=null&&oplog.getEndtime()!=null
|
if (oplog.getStarttime()!=null&&oplog.getEndtime()!=null
|
||||||
&&!oplog.getStarttime().equals("")&&!oplog.getEndtime().equals("")) {
|
&&!oplog.getStarttime().equals("")&&!oplog.getEndtime().equals("")) {
|
||||||
query.setParameter("starttime", oplog.getStarttime());
|
query.setParameter("starttime", oplog.getStarttime());
|
||||||
query.setParameter("endtime", oplog.getEndtime());
|
query.setParameter("endtime", oplog.getEndtime());
|
||||||
}
|
}
|
||||||
if (oplog.getProjectid()!=0) {
|
if (oplog.getProjectid()!=0) {
|
||||||
query.setParameter("projectid", oplog.getProjectid());
|
query.setParameter("projectid", oplog.getProjectid());
|
||||||
}
|
}
|
||||||
if (oplog.getOperationer()!=null&&!oplog.getOperationer().equals("")) {
|
if (oplog.getOperationer()!=null&&!oplog.getOperationer().equals("")) {
|
||||||
query.setParameter("operationer", "%"+oplog.getOperationer()+"%");
|
query.setParameter("operationer", "%"+oplog.getOperationer()+"%");
|
||||||
}
|
}
|
||||||
if (oplog.getOperation_description()!=null&&!oplog.getOperation_description().equals("")) {
|
if (oplog.getOperation_description()!=null&&!oplog.getOperation_description().equals("")) {
|
||||||
query.setParameter("operation_description", "%"+oplog.getOperation_description()+"%");
|
query.setParameter("operation_description", "%"+oplog.getOperation_description()+"%");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((OperationLog)value, query);
|
whereParameter((OperationLog)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(OperationLog oplog, String hql) {
|
public int findRows(OperationLog oplog, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(oplog, query);
|
whereParameter(oplog, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String hql) throws Exception {
|
public void delete(String hql) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.PlanFlowCheck;
|
import luckyweb.seagull.spring.entity.PlanFlowCheck;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface PlanFlowCheckDao {
|
public interface PlanFlowCheckDao {
|
||||||
public int add(PlanFlowCheck pfc) throws Exception;
|
public int add(PlanFlowCheck pfc) throws Exception;
|
||||||
|
|
||||||
public void modify(PlanFlowCheck pfc) throws Exception;
|
public void modify(PlanFlowCheck pfc) throws Exception;
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
public PlanFlowCheck load(int id) throws Exception;
|
public PlanFlowCheck load(int id) throws Exception;
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(PlanFlowCheck pfc,String hql);
|
public int findRows(PlanFlowCheck pfc,String hql);
|
||||||
|
|
||||||
/*public List findRows(String sql);*/
|
/*public List findRows(String sql);*/
|
||||||
|
|
||||||
public List<PlanFlowCheck> list(String hql) throws Exception;
|
public List<PlanFlowCheck> list(String hql) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,118 +1,118 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.PlanFlowCheck;
|
import luckyweb.seagull.spring.entity.PlanFlowCheck;
|
||||||
|
|
||||||
|
|
||||||
@Repository("planflowcheckDao")
|
@Repository("planflowcheckDao")
|
||||||
public class PlanFlowCheckDaoImpl extends HibernateDaoSupport implements PlanFlowCheckDao{
|
public class PlanFlowCheckDaoImpl extends HibernateDaoSupport implements PlanFlowCheckDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
PlanFlowCheck pfc = this.load(id);
|
PlanFlowCheck pfc = this.load(id);
|
||||||
this.getHibernateTemplate().delete(pfc);
|
this.getHibernateTemplate().delete(pfc);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(PlanFlowCheck pfc, Query query) {
|
private void whereParameter(PlanFlowCheck pfc, Query query) {
|
||||||
if (pfc.getId()!=0) {
|
if (pfc.getId()!=0) {
|
||||||
query.setParameter("id", pfc.getId());
|
query.setParameter("id", pfc.getId());
|
||||||
}
|
}
|
||||||
if (pfc.getStatus()!=0) {
|
if (pfc.getStatus()!=0) {
|
||||||
query.setParameter("status", pfc.getStatus());
|
query.setParameter("status", pfc.getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((PlanFlowCheck)value, query);
|
whereParameter((PlanFlowCheck)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(PlanFlowCheck pfc, String hql) {
|
public int findRows(PlanFlowCheck pfc, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(pfc, query);
|
whereParameter(pfc, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query.list().get(0)
|
query.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(PlanFlowCheck pfc) throws Exception {
|
public int add(PlanFlowCheck pfc) throws Exception {
|
||||||
try{
|
try{
|
||||||
this.getHibernateTemplate().save(pfc);
|
this.getHibernateTemplate().save(pfc);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return pfc.getId();
|
return pfc.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(PlanFlowCheck pfc) throws Exception {
|
public void modify(PlanFlowCheck pfc) throws Exception {
|
||||||
this.getHibernateTemplate().update(pfc);
|
this.getHibernateTemplate().update(pfc);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<PlanFlowCheck> list(String hql) throws Exception {
|
public List<PlanFlowCheck> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlanFlowCheck load(int id) throws Exception {
|
public PlanFlowCheck load(int id) throws Exception {
|
||||||
return (PlanFlowCheck) this.getHibernateTemplate().get(PlanFlowCheck.class, id);
|
return (PlanFlowCheck) this.getHibernateTemplate().get(PlanFlowCheck.class, id);
|
||||||
//return (FlowCheck) this.getSession().load(FlowCheck.class, id);
|
//return (FlowCheck) this.getSession().load(FlowCheck.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,49 +1,49 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
import luckyweb.seagull.spring.entity.ProjectCase;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ProjectCaseDao {
|
public interface ProjectCaseDao {
|
||||||
public int add(ProjectCase projectcase) throws Exception;
|
public int add(ProjectCase projectcase) throws Exception;
|
||||||
|
|
||||||
public void modify(ProjectCase projectcase) throws Exception;
|
public void modify(ProjectCase projectcase) throws Exception;
|
||||||
|
|
||||||
public void modifyState(ProjectCase projectcase) throws Exception;
|
public void modifyState(ProjectCase projectcase) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(ProjectCase projectcase) throws Exception;
|
public void modifyInfo(ProjectCase projectcase) throws Exception;
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectCase> list(ProjectCase projectcase) throws Exception;
|
public List<ProjectCase> list(ProjectCase projectcase) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectCase> list(String hql) throws Exception;
|
public List<ProjectCase> list(String hql) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectCase> getList(String sql) throws Exception;
|
public List<ProjectCase> getList(String sql) throws Exception;
|
||||||
|
|
||||||
public ProjectCase load(int id) throws Exception;
|
public ProjectCase load(int id) throws Exception;
|
||||||
|
|
||||||
public List<ProjectCase> load(String name, String cmdType, String planPath)
|
public List<ProjectCase> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public ProjectCase get(int id) throws Exception;
|
public ProjectCase get(int id) throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ProjectCase projectcase,String hql);
|
public int findRows(ProjectCase projectcase,String hql);
|
||||||
|
|
||||||
public List<ProjectCase> findJobsList();
|
public List<ProjectCase> findJobsList();
|
||||||
public String getCaseMaxIndex(String sql) throws Exception ;
|
public String getCaseMaxIndex(String sql) throws Exception ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,220 +1,220 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
import luckyweb.seagull.spring.entity.ProjectCase;
|
||||||
|
|
||||||
@Repository("projectCaseDao")
|
@Repository("projectCaseDao")
|
||||||
public class ProjectCaseDaoImpl extends HibernateDaoSupport implements ProjectCaseDao{
|
public class ProjectCaseDaoImpl extends HibernateDaoSupport implements ProjectCaseDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
try{
|
try{
|
||||||
ProjectCase projectcase = this.load(id);
|
ProjectCase projectcase = this.load(id);
|
||||||
this.getHibernateTemplate().delete(projectcase);
|
this.getHibernateTemplate().delete(projectcase);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ProjectCase projectcase, Query query) {
|
private void whereParameter(ProjectCase projectcase, Query query) {
|
||||||
if (projectcase.getProjectid()!=0&&projectcase.getProjectid()!=99) {
|
if (projectcase.getProjectid()!=0&&projectcase.getProjectid()!=99) {
|
||||||
query.setParameter("projectid", projectcase.getProjectid());
|
query.setParameter("projectid", projectcase.getProjectid());
|
||||||
}
|
}
|
||||||
if (projectcase.getModuleid()!=0&&projectcase.getModuleidarr().length>0) {
|
if (projectcase.getModuleid()!=0&&projectcase.getModuleidarr().length>0) {
|
||||||
Collection<Integer> collection = new ArrayList<Integer>(Arrays.asList(projectcase.getModuleidarr()));
|
Collection<Integer> collection = new ArrayList<Integer>(Arrays.asList(projectcase.getModuleidarr()));
|
||||||
query.setParameterList("moduleid", collection);
|
query.setParameterList("moduleid", collection);
|
||||||
}
|
}
|
||||||
if (null!=projectcase.getSign()&&!"".equals(projectcase.getSign())) {
|
if (null!=projectcase.getSign()&&!"".equals(projectcase.getSign())) {
|
||||||
query.setParameter("sign", "%"+projectcase.getSign()+"%");
|
query.setParameter("sign", "%"+projectcase.getSign()+"%");
|
||||||
}
|
}
|
||||||
if (null!=projectcase.getName()&&!"".equals(projectcase.getName())) {
|
if (null!=projectcase.getName()&&!"".equals(projectcase.getName())) {
|
||||||
query.setParameter("name", "%"+projectcase.getName()+"%");
|
query.setParameter("name", "%"+projectcase.getName()+"%");
|
||||||
}
|
}
|
||||||
if (null!=projectcase.getOperationer()&&!"".equals(projectcase.getOperationer())) {
|
if (null!=projectcase.getOperationer()&&!"".equals(projectcase.getOperationer())) {
|
||||||
query.setParameter("operationer", "%"+projectcase.getOperationer()+"%");
|
query.setParameter("operationer", "%"+projectcase.getOperationer()+"%");
|
||||||
}
|
}
|
||||||
if (null!=projectcase.getRemark()&&!"".equals(projectcase.getRemark())) {
|
if (null!=projectcase.getRemark()&&!"".equals(projectcase.getRemark())) {
|
||||||
query.setParameter("remark", "%"+projectcase.getRemark()+"%");
|
query.setParameter("remark", "%"+projectcase.getRemark()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ProjectCase)value, query);
|
whereParameter((ProjectCase)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ProjectCase projectcase, String hql) {
|
public int findRows(ProjectCase projectcase, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(projectcase, query);
|
whereParameter(projectcase, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ProjectCase projectcase) throws Exception {
|
public int add(ProjectCase projectcase) throws Exception {
|
||||||
this.getHibernateTemplate().save(projectcase);
|
this.getHibernateTemplate().save(projectcase);
|
||||||
return projectcase.getId();
|
return projectcase.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(ProjectCase projectcase) throws Exception {
|
public void modify(ProjectCase projectcase) throws Exception {
|
||||||
this.getHibernateTemplate().update(projectcase);
|
this.getHibernateTemplate().update(projectcase);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(ProjectCase projectcase) throws Exception {
|
public void modifyState(ProjectCase projectcase) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyInfo(ProjectCase projectcase) throws Exception {
|
public void modifyInfo(ProjectCase projectcase) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCase> list(ProjectCase projectcase)
|
public List<ProjectCase> list(ProjectCase projectcase)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCase> list(String hql) throws Exception {
|
public List<ProjectCase> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectCase load(int id) throws Exception {
|
public ProjectCase load(int id) throws Exception {
|
||||||
return (ProjectCase) this.getHibernateTemplate().get(ProjectCase.class, id);
|
return (ProjectCase) this.getHibernateTemplate().get(ProjectCase.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCase> load(String name, String cmdType,
|
public List<ProjectCase> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectCase get(int id) throws Exception {
|
public ProjectCase get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCase> findJobsList() {
|
public List<ProjectCase> findJobsList() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCase> getList(String hql) throws Exception {
|
public List<ProjectCase> getList(String hql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List<ProjectCase> list=null;
|
List<ProjectCase> list=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
list = session.createQuery(hql).list();
|
list = session.createQuery(hql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public String getCaseMaxIndex(String sql) throws Exception {
|
public String getCaseMaxIndex(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List list=null;
|
List list=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
list = session.createSQLQuery(sql).list();
|
list = session.createSQLQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list.get(0).toString();
|
return list.get(0).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +1,48 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ProjectCasestepsDao {
|
public interface ProjectCasestepsDao {
|
||||||
public int add(ProjectCasesteps casesteps) throws Exception;
|
public int add(ProjectCasesteps casesteps) throws Exception;
|
||||||
|
|
||||||
public void modify(ProjectCasesteps casesteps) throws Exception;
|
public void modify(ProjectCasesteps casesteps) throws Exception;
|
||||||
|
|
||||||
public void modifyState(ProjectCasesteps casesteps) throws Exception;
|
public void modifyState(ProjectCasesteps casesteps) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(ProjectCasesteps casesteps) throws Exception;
|
public void modifyInfo(ProjectCasesteps casesteps) throws Exception;
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
public void delete(String hql, int id) throws Exception;
|
public void delete(String hql, int id) throws Exception;
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectCasesteps> list(ProjectCasesteps casesteps) throws Exception;
|
public List<ProjectCasesteps> list(ProjectCasesteps casesteps) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectCasesteps> list(String hql) throws Exception;
|
public List<ProjectCasesteps> list(String hql) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectCasesteps> steps(String sql) throws Exception;
|
public List<ProjectCasesteps> steps(String sql) throws Exception;
|
||||||
|
|
||||||
public ProjectCasesteps load(int id) throws Exception;
|
public ProjectCasesteps load(int id) throws Exception;
|
||||||
|
|
||||||
public List<ProjectCasesteps> load(String name, String cmdType, String planPath)
|
public List<ProjectCasesteps> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public ProjectCasesteps get(int id) throws Exception;
|
public ProjectCasesteps get(int id) throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ProjectCasesteps casesteps,String hql);
|
public int findRows(ProjectCasesteps casesteps,String hql);
|
||||||
|
|
||||||
public List<ProjectCasesteps> findJobsList();
|
public List<ProjectCasesteps> findJobsList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,197 +1,197 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
||||||
import luckyweb.seagull.spring.entity.TestLogdetail;
|
import luckyweb.seagull.spring.entity.TestLogdetail;
|
||||||
|
|
||||||
@Repository("projectCasestepsDao")
|
@Repository("projectCasestepsDao")
|
||||||
public class ProjectCasestepsDaoImpl extends HibernateDaoSupport implements ProjectCasestepsDao{
|
public class ProjectCasestepsDaoImpl extends HibernateDaoSupport implements ProjectCasestepsDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
try{
|
try{
|
||||||
ProjectCasesteps casesteps = this.load(id);
|
ProjectCasesteps casesteps = this.load(id);
|
||||||
this.getHibernateTemplate().delete(casesteps);
|
this.getHibernateTemplate().delete(casesteps);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String hql, int id) throws Exception {
|
public void delete(String hql, int id) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.setInteger("caseId", id);
|
query.setInteger("caseId", id);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ProjectCasesteps casesteps, Query query) {
|
private void whereParameter(ProjectCasesteps casesteps, Query query) {
|
||||||
if (casesteps.getProjectid()!=0) {
|
if (casesteps.getProjectid()!=0) {
|
||||||
query.setParameter("projectid", casesteps.getProjectid());
|
query.setParameter("projectid", casesteps.getProjectid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ProjectCasesteps)value, query);
|
whereParameter((ProjectCasesteps)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ProjectCasesteps casesteps, String hql) {
|
public int findRows(ProjectCasesteps casesteps, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(casesteps, query);
|
whereParameter(casesteps, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ProjectCasesteps casesteps) throws Exception {
|
public int add(ProjectCasesteps casesteps) throws Exception {
|
||||||
this.getHibernateTemplate().save(casesteps);
|
this.getHibernateTemplate().save(casesteps);
|
||||||
return casesteps.getId();
|
return casesteps.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(ProjectCasesteps casesteps) throws Exception {
|
public void modify(ProjectCasesteps casesteps) throws Exception {
|
||||||
this.getHibernateTemplate().update(casesteps);
|
this.getHibernateTemplate().update(casesteps);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(ProjectCasesteps casesteps) throws Exception {
|
public void modifyState(ProjectCasesteps casesteps) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyInfo(ProjectCasesteps casesteps) throws Exception {
|
public void modifyInfo(ProjectCasesteps casesteps) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCasesteps> list(ProjectCasesteps casesteps)
|
public List<ProjectCasesteps> list(ProjectCasesteps casesteps)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCasesteps> list(String hql) throws Exception {
|
public List<ProjectCasesteps> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectCasesteps load(int id) throws Exception {
|
public ProjectCasesteps load(int id) throws Exception {
|
||||||
return (ProjectCasesteps) this.getHibernateTemplate().get(ProjectCasesteps.class, id);
|
return (ProjectCasesteps) this.getHibernateTemplate().get(ProjectCasesteps.class, id);
|
||||||
//return (ProjectCasesteps) this.getSession().load(ProjectCasesteps.class, id);
|
//return (ProjectCasesteps) this.getSession().load(ProjectCasesteps.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCasesteps> load(String name, String cmdType,
|
public List<ProjectCasesteps> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectCasesteps get(int id) throws Exception {
|
public ProjectCasesteps get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCasesteps> findJobsList() {
|
public List<ProjectCasesteps> findJobsList() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectCasesteps> steps(String sql) throws Exception {
|
public List<ProjectCasesteps> steps(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List<ProjectCasesteps> list=null;
|
List<ProjectCasesteps> list=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
list = session.createQuery(sql).list();
|
list = session.createQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectModule;
|
import luckyweb.seagull.spring.entity.ProjectModule;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ProjectModuleDao {
|
public interface ProjectModuleDao {
|
||||||
public int add(ProjectModule projectmodule) throws Exception;
|
public int add(ProjectModule projectmodule) throws Exception;
|
||||||
|
|
||||||
public void modify(ProjectModule projectmodule) throws Exception;
|
public void modify(ProjectModule projectmodule) throws Exception;
|
||||||
|
|
||||||
public void modifyState(ProjectModule projectmodule) throws Exception;
|
public void modifyState(ProjectModule projectmodule) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(ProjectModule projectmodule) throws Exception;
|
public void modifyInfo(ProjectModule projectmodule) throws Exception;
|
||||||
|
|
||||||
public void delete(ProjectModule projectmodule) throws Exception;
|
public void delete(ProjectModule projectmodule) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectModule> list(ProjectModule projectmodule) throws Exception;
|
public List<ProjectModule> list(ProjectModule projectmodule) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectModule> list(String hql) throws Exception;
|
public List<ProjectModule> list(String hql) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectModule> getList(String sql) throws Exception;
|
public List<ProjectModule> getList(String sql) throws Exception;
|
||||||
|
|
||||||
public ProjectModule load(int id) throws Exception;
|
public ProjectModule load(int id) throws Exception;
|
||||||
|
|
||||||
public List<ProjectModule> load(String name, String cmdType, String planPath)
|
public List<ProjectModule> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public ProjectModule get(int id) throws Exception;
|
public ProjectModule get(int id) throws Exception;
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ProjectModule projectmodule,String hql);
|
public int findRows(ProjectModule projectmodule,String hql);
|
||||||
|
|
||||||
public List<ProjectModule> findJobsList();
|
public List<ProjectModule> findJobsList();
|
||||||
public String getModuleIdByName(String sql) throws Exception ;
|
public String getModuleIdByName(String sql) throws Exception ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,200 +1,200 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectModule;
|
import luckyweb.seagull.spring.entity.ProjectModule;
|
||||||
|
|
||||||
@Repository("projectModuleDao")
|
@Repository("projectModuleDao")
|
||||||
public class ProjectModuleDaoImpl extends HibernateDaoSupport implements ProjectModuleDao{
|
public class ProjectModuleDaoImpl extends HibernateDaoSupport implements ProjectModuleDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(ProjectModule projectmodule) throws Exception {
|
public void delete(ProjectModule projectmodule) throws Exception {
|
||||||
try{
|
try{
|
||||||
this.getHibernateTemplate().delete(projectmodule);
|
this.getHibernateTemplate().delete(projectmodule);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ProjectModule projectmodule, Query query) {
|
private void whereParameter(ProjectModule projectmodule, Query query) {
|
||||||
if (projectmodule.getProjectid()!=0&&projectmodule.getProjectid()!=99) {
|
if (projectmodule.getProjectid()!=0&&projectmodule.getProjectid()!=99) {
|
||||||
query.setParameter("projectid", projectmodule.getProjectid());
|
query.setParameter("projectid", projectmodule.getProjectid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ProjectModule)value, query);
|
whereParameter((ProjectModule)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ProjectModule projectmodule, String hql) {
|
public int findRows(ProjectModule projectmodule, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(projectmodule, query);
|
whereParameter(projectmodule, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ProjectModule projectmodule) throws Exception {
|
public int add(ProjectModule projectmodule) throws Exception {
|
||||||
this.getHibernateTemplate().save(projectmodule);
|
this.getHibernateTemplate().save(projectmodule);
|
||||||
return projectmodule.getId();
|
return projectmodule.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(ProjectModule projectmodule) throws Exception {
|
public void modify(ProjectModule projectmodule) throws Exception {
|
||||||
this.getHibernateTemplate().update(projectmodule);
|
this.getHibernateTemplate().update(projectmodule);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(ProjectModule projectmodule) throws Exception {
|
public void modifyState(ProjectModule projectmodule) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyInfo(ProjectModule projectmodule) throws Exception {
|
public void modifyInfo(ProjectModule projectmodule) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectModule> list(ProjectModule projectmodule)
|
public List<ProjectModule> list(ProjectModule projectmodule)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectModule> list(String hql) throws Exception {
|
public List<ProjectModule> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectModule load(int id) throws Exception {
|
public ProjectModule load(int id) throws Exception {
|
||||||
return (ProjectModule) this.getHibernateTemplate().get(ProjectModule.class, id);
|
return (ProjectModule) this.getHibernateTemplate().get(ProjectModule.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectModule> load(String name, String cmdType,
|
public List<ProjectModule> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectModule get(int id) throws Exception {
|
public ProjectModule get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectModule> findJobsList() {
|
public List<ProjectModule> findJobsList() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectModule> getList(String hql) throws Exception {
|
public List<ProjectModule> getList(String hql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List<ProjectModule> list=null;
|
List<ProjectModule> list=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
list = session.createQuery(hql).list();
|
list = session.createQuery(hql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public String getModuleIdByName(String sql) throws Exception {
|
public String getModuleIdByName(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List list=null;
|
List list=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
list = session.createSQLQuery(sql).list();
|
list = session.createSQLQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list.get(0).toString();
|
return list.get(0).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,49 +1,49 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectPlanCase;
|
import luckyweb.seagull.spring.entity.ProjectPlanCase;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ProjectPlanCaseDao {
|
public interface ProjectPlanCaseDao {
|
||||||
public int add(ProjectPlanCase projectplancase) throws Exception;
|
public int add(ProjectPlanCase projectplancase) throws Exception;
|
||||||
|
|
||||||
public void modify(ProjectPlanCase projectplancase) throws Exception;
|
public void modify(ProjectPlanCase projectplancase) throws Exception;
|
||||||
|
|
||||||
public void modifyState(ProjectPlanCase projectplancase) throws Exception;
|
public void modifyState(ProjectPlanCase projectplancase) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(ProjectPlanCase projectplancase) throws Exception;
|
public void modifyInfo(ProjectPlanCase projectplancase) throws Exception;
|
||||||
|
|
||||||
public void delete(ProjectPlanCase projectplancase) throws Exception;
|
public void delete(ProjectPlanCase projectplancase) throws Exception;
|
||||||
public void delete(String hql, int id) throws Exception;
|
public void delete(String hql, int id) throws Exception;
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectPlanCase> list(ProjectPlanCase projectplancase) throws Exception;
|
public List<ProjectPlanCase> list(ProjectPlanCase projectplancase) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectPlanCase> list(String hql) throws Exception;
|
public List<ProjectPlanCase> list(String hql) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List getList(String sql) throws Exception;
|
public List getList(String sql) throws Exception;
|
||||||
|
|
||||||
public ProjectPlanCase load(int id) throws Exception;
|
public ProjectPlanCase load(int id) throws Exception;
|
||||||
|
|
||||||
public List<ProjectPlanCase> load(String name, String cmdType, String planPath)
|
public List<ProjectPlanCase> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public ProjectPlanCase get(int id) throws Exception;
|
public ProjectPlanCase get(int id) throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ProjectPlanCase projectplancase,String hql);
|
public int findRows(ProjectPlanCase projectplancase,String hql);
|
||||||
|
|
||||||
public List<ProjectPlanCase> findJobsList();
|
public List<ProjectPlanCase> findJobsList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,205 +1,205 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
||||||
import luckyweb.seagull.spring.entity.ProjectPlanCase;
|
import luckyweb.seagull.spring.entity.ProjectPlanCase;
|
||||||
|
|
||||||
|
|
||||||
@Repository("projectPlanCaseDao")
|
@Repository("projectPlanCaseDao")
|
||||||
public class ProjectPlanCaseDaoImpl extends HibernateDaoSupport implements ProjectPlanCaseDao{
|
public class ProjectPlanCaseDaoImpl extends HibernateDaoSupport implements ProjectPlanCaseDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(ProjectPlanCase projectplancase) throws Exception {
|
public void delete(ProjectPlanCase projectplancase) throws Exception {
|
||||||
try{
|
try{
|
||||||
this.getHibernateTemplate().delete(projectplancase);
|
this.getHibernateTemplate().delete(projectplancase);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String hql, int id) throws Exception {
|
public void delete(String hql, int id) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.setInteger("planId", id);
|
query.setInteger("planId", id);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ProjectPlanCase projectplancase, Query query) {
|
private void whereParameter(ProjectPlanCase projectplancase, Query query) {
|
||||||
if (projectplancase.getCaseid()!=0) {
|
if (projectplancase.getCaseid()!=0) {
|
||||||
query.setParameter("caseid", projectplancase.getCaseid());
|
query.setParameter("caseid", projectplancase.getCaseid());
|
||||||
}
|
}
|
||||||
if (projectplancase.getPlanid()!=0) {
|
if (projectplancase.getPlanid()!=0) {
|
||||||
query.setParameter("planid", projectplancase.getPlanid());
|
query.setParameter("planid", projectplancase.getPlanid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ProjectPlanCase)value, query);
|
whereParameter((ProjectPlanCase)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ProjectPlanCase projectplancase, String hql) {
|
public int findRows(ProjectPlanCase projectplancase, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(projectplancase, query);
|
whereParameter(projectplancase, query);
|
||||||
if(0==query.list().size()){
|
if(0==query.list().size()){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ProjectPlanCase projectplancase) throws Exception {
|
public int add(ProjectPlanCase projectplancase) throws Exception {
|
||||||
this.getHibernateTemplate().save(projectplancase);
|
this.getHibernateTemplate().save(projectplancase);
|
||||||
return projectplancase.getId();
|
return projectplancase.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(ProjectPlanCase projectplancase) throws Exception {
|
public void modify(ProjectPlanCase projectplancase) throws Exception {
|
||||||
this.getHibernateTemplate().update(projectplancase);
|
this.getHibernateTemplate().update(projectplancase);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(ProjectPlanCase projectplancase) throws Exception {
|
public void modifyState(ProjectPlanCase projectplancase) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyInfo(ProjectPlanCase projectplancase) throws Exception {
|
public void modifyInfo(ProjectPlanCase projectplancase) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlanCase> list(ProjectPlanCase projectplancase)
|
public List<ProjectPlanCase> list(ProjectPlanCase projectplancase)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlanCase> list(String hql) throws Exception {
|
public List<ProjectPlanCase> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectPlanCase load(int id) throws Exception {
|
public ProjectPlanCase load(int id) throws Exception {
|
||||||
|
|
||||||
return (ProjectPlanCase) this.getHibernateTemplate().get(ProjectPlanCase.class, id);
|
return (ProjectPlanCase) this.getHibernateTemplate().get(ProjectPlanCase.class, id);
|
||||||
//return (ProjectCase) this.getSession().load(ProjectCase.class, id);
|
//return (ProjectCase) this.getSession().load(ProjectCase.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlanCase> load(String name, String cmdType,
|
public List<ProjectPlanCase> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectPlanCase get(int id) throws Exception {
|
public ProjectPlanCase get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlanCase> findJobsList() {
|
public List<ProjectPlanCase> findJobsList() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlanCase> getList(String sql) throws Exception {
|
public List<ProjectPlanCase> getList(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List<ProjectPlanCase> count=null;
|
List<ProjectPlanCase> count=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
count = session.createQuery(sql).list();
|
count = session.createQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,49 +1,49 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectPlan;
|
import luckyweb.seagull.spring.entity.ProjectPlan;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ProjectPlanDao {
|
public interface ProjectPlanDao {
|
||||||
public int add(ProjectPlan projectplan) throws Exception;
|
public int add(ProjectPlan projectplan) throws Exception;
|
||||||
|
|
||||||
public void modify(ProjectPlan projectplan) throws Exception;
|
public void modify(ProjectPlan projectplan) throws Exception;
|
||||||
|
|
||||||
public void modifyState(ProjectPlan projectplan) throws Exception;
|
public void modifyState(ProjectPlan projectplan) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(ProjectPlan projectplan) throws Exception;
|
public void modifyInfo(ProjectPlan projectplan) throws Exception;
|
||||||
|
|
||||||
public void delete(ProjectPlan projectplan) throws Exception;
|
public void delete(ProjectPlan projectplan) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectPlan> list(ProjectPlan projectplan) throws Exception;
|
public List<ProjectPlan> list(ProjectPlan projectplan) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectPlan> list(String hql) throws Exception;
|
public List<ProjectPlan> list(String hql) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List getList(String sql) throws Exception;
|
public List getList(String sql) throws Exception;
|
||||||
|
|
||||||
public ProjectPlan load(int id) throws Exception;
|
public ProjectPlan load(int id) throws Exception;
|
||||||
|
|
||||||
public List<ProjectPlan> load(String name, String cmdType, String planPath)
|
public List<ProjectPlan> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public ProjectPlan get(int id) throws Exception;
|
public ProjectPlan get(int id) throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ProjectPlan projectplan,String hql);
|
public int findRows(ProjectPlan projectplan,String hql);
|
||||||
|
|
||||||
public List<ProjectPlan> findJobsList();
|
public List<ProjectPlan> findJobsList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,196 +1,196 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectPlan;
|
import luckyweb.seagull.spring.entity.ProjectPlan;
|
||||||
|
|
||||||
@Repository("projectPlanDao")
|
@Repository("projectPlanDao")
|
||||||
public class ProjectPlanDaoImpl extends HibernateDaoSupport implements ProjectPlanDao{
|
public class ProjectPlanDaoImpl extends HibernateDaoSupport implements ProjectPlanDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(ProjectPlan projectplan) throws Exception {
|
public void delete(ProjectPlan projectplan) throws Exception {
|
||||||
try{
|
try{
|
||||||
this.getHibernateTemplate().delete(projectplan);
|
this.getHibernateTemplate().delete(projectplan);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ProjectPlan projectplan, Query query) {
|
private void whereParameter(ProjectPlan projectplan, Query query) {
|
||||||
if (projectplan.getProjectid()!=0&&projectplan.getProjectid()!=99) {
|
if (projectplan.getProjectid()!=0&&projectplan.getProjectid()!=99) {
|
||||||
query.setParameter("projectid", projectplan.getProjectid());
|
query.setParameter("projectid", projectplan.getProjectid());
|
||||||
}
|
}
|
||||||
if (null!=projectplan.getName()&&!"".equals(projectplan.getName())) {
|
if (null!=projectplan.getName()&&!"".equals(projectplan.getName())) {
|
||||||
query.setParameter("name", "%"+projectplan.getName()+"%");
|
query.setParameter("name", "%"+projectplan.getName()+"%");
|
||||||
}
|
}
|
||||||
if (null!=projectplan.getOperationer()&&!"".equals(projectplan.getOperationer())) {
|
if (null!=projectplan.getOperationer()&&!"".equals(projectplan.getOperationer())) {
|
||||||
query.setParameter("operationer", "%"+projectplan.getOperationer()+"%");
|
query.setParameter("operationer", "%"+projectplan.getOperationer()+"%");
|
||||||
}
|
}
|
||||||
if (null!=projectplan.getRemark()&&!"".equals(projectplan.getRemark())) {
|
if (null!=projectplan.getRemark()&&!"".equals(projectplan.getRemark())) {
|
||||||
query.setParameter("remark", "%"+projectplan.getRemark()+"%");
|
query.setParameter("remark", "%"+projectplan.getRemark()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ProjectPlan)value, query);
|
whereParameter((ProjectPlan)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ProjectPlan projectplan, String hql) {
|
public int findRows(ProjectPlan projectplan, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(projectplan, query);
|
whereParameter(projectplan, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ProjectPlan projectplan) throws Exception {
|
public int add(ProjectPlan projectplan) throws Exception {
|
||||||
this.getHibernateTemplate().save(projectplan);
|
this.getHibernateTemplate().save(projectplan);
|
||||||
return projectplan.getId();
|
return projectplan.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(ProjectPlan projectplan) throws Exception {
|
public void modify(ProjectPlan projectplan) throws Exception {
|
||||||
this.getHibernateTemplate().update(projectplan);
|
this.getHibernateTemplate().update(projectplan);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(ProjectPlan projectplan) throws Exception {
|
public void modifyState(ProjectPlan projectplan) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyInfo(ProjectPlan projectplan) throws Exception {
|
public void modifyInfo(ProjectPlan projectplan) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlan> list(ProjectPlan projectplan)
|
public List<ProjectPlan> list(ProjectPlan projectplan)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlan> list(String hql) throws Exception {
|
public List<ProjectPlan> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectPlan load(int id) throws Exception {
|
public ProjectPlan load(int id) throws Exception {
|
||||||
|
|
||||||
return (ProjectPlan) this.getHibernateTemplate().get(ProjectPlan.class, id);
|
return (ProjectPlan) this.getHibernateTemplate().get(ProjectPlan.class, id);
|
||||||
//return (ProjectCase) this.getSession().load(ProjectCase.class, id);
|
//return (ProjectCase) this.getSession().load(ProjectCase.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlan> load(String name, String cmdType,
|
public List<ProjectPlan> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectPlan get(int id) throws Exception {
|
public ProjectPlan get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlan> findJobsList() {
|
public List<ProjectPlan> findJobsList() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectPlan> getList(String sql) throws Exception {
|
public List<ProjectPlan> getList(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List<ProjectPlan> count=null;
|
List<ProjectPlan> count=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
count = session.createQuery(sql).list();
|
count = session.createQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectProtocolTemplate;
|
import luckyweb.seagull.spring.entity.ProjectProtocolTemplate;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ProjectProtocolTemplateDao {
|
public interface ProjectProtocolTemplateDao {
|
||||||
|
|
||||||
public ProjectProtocolTemplate load(int id) throws Exception;
|
public ProjectProtocolTemplate load(int id) throws Exception;
|
||||||
|
|
||||||
public int add(ProjectProtocolTemplate ppt) throws Exception;
|
public int add(ProjectProtocolTemplate ppt) throws Exception;
|
||||||
public void modify(ProjectProtocolTemplate ppt) throws Exception;
|
public void modify(ProjectProtocolTemplate ppt) throws Exception;
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ProjectProtocolTemplate ppt, String hql);
|
public int findRows(ProjectProtocolTemplate ppt, String hql);
|
||||||
public void delete(String hql) throws Exception;
|
public void delete(String hql) throws Exception;
|
||||||
public void deleteforob(ProjectProtocolTemplate ppt) throws Exception;
|
public void deleteforob(ProjectProtocolTemplate ppt) throws Exception;
|
||||||
public List findstepsparamList(String hql);
|
public List findstepsparamList(String hql);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,147 +1,147 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectPlan;
|
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.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Repository("projectprotocoltemplateDao")
|
@Repository("projectprotocoltemplateDao")
|
||||||
public class ProjectProtocolTemplateImpl extends HibernateDaoSupport implements ProjectProtocolTemplateDao{
|
public class ProjectProtocolTemplateImpl extends HibernateDaoSupport implements ProjectProtocolTemplateDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectProtocolTemplate load(int id) throws Exception {
|
public ProjectProtocolTemplate load(int id) throws Exception {
|
||||||
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
||||||
return (ProjectProtocolTemplate) this.getHibernateTemplate().get(ProjectProtocolTemplate.class, id);
|
return (ProjectProtocolTemplate) this.getHibernateTemplate().get(ProjectProtocolTemplate.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ProjectProtocolTemplate ppt) throws Exception {
|
public int add(ProjectProtocolTemplate ppt) throws Exception {
|
||||||
this.getHibernateTemplate().save(ppt);
|
this.getHibernateTemplate().save(ppt);
|
||||||
return ppt.getId();
|
return ppt.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(ProjectProtocolTemplate ppt) throws Exception {
|
public void modify(ProjectProtocolTemplate ppt) throws Exception {
|
||||||
this.getHibernateTemplate().update(ppt);
|
this.getHibernateTemplate().update(ppt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteforob(ProjectProtocolTemplate ppt) throws Exception {
|
public void deleteforob(ProjectProtocolTemplate ppt) throws Exception {
|
||||||
try{
|
try{
|
||||||
this.getHibernateTemplate().delete(ppt);
|
this.getHibernateTemplate().delete(ppt);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ProjectProtocolTemplate ppt, Query query) {
|
private void whereParameter(ProjectProtocolTemplate ppt, Query query) {
|
||||||
if (ppt.getProjectid()!=0&&ppt.getProjectid()!=99) {
|
if (ppt.getProjectid()!=0&&ppt.getProjectid()!=99) {
|
||||||
query.setParameter("projectid", ppt.getProjectid());
|
query.setParameter("projectid", ppt.getProjectid());
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(ppt.getProtocoltype())) {
|
if (!StrLib.isEmpty(ppt.getProtocoltype())) {
|
||||||
query.setParameter("protocoltype", ppt.getProtocoltype());
|
query.setParameter("protocoltype", ppt.getProtocoltype());
|
||||||
}
|
}
|
||||||
if (ppt.getOperationer()!=null&&!ppt.getOperationer().equals("")) {
|
if (ppt.getOperationer()!=null&&!ppt.getOperationer().equals("")) {
|
||||||
query.setParameter("operationer", "%"+ppt.getOperationer()+"%");
|
query.setParameter("operationer", "%"+ppt.getOperationer()+"%");
|
||||||
}
|
}
|
||||||
if (ppt.getName()!=null&&!ppt.getName().equals("")) {
|
if (ppt.getName()!=null&&!ppt.getName().equals("")) {
|
||||||
query.setParameter("name", "%"+ppt.getName()+"%");
|
query.setParameter("name", "%"+ppt.getName()+"%");
|
||||||
}
|
}
|
||||||
if (ppt.getRemark()!=null&&!ppt.getRemark().equals("")) {
|
if (ppt.getRemark()!=null&&!ppt.getRemark().equals("")) {
|
||||||
query.setParameter("remark", "%"+ppt.getRemark()+"%");
|
query.setParameter("remark", "%"+ppt.getRemark()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ProjectProtocolTemplate)value, query);
|
whereParameter((ProjectProtocolTemplate)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ProjectProtocolTemplate ppt, String hql) {
|
public int findRows(ProjectProtocolTemplate ppt, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(ppt, query);
|
whereParameter(ppt, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String hql) throws Exception {
|
public void delete(String hql) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findstepsparamList(String hql) {
|
public List findstepsparamList(String hql) {
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
List count=null;
|
List count=null;
|
||||||
try {
|
try {
|
||||||
count = session.createSQLQuery(hql).list();
|
count = session.createSQLQuery(hql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectTemplateParams;
|
import luckyweb.seagull.spring.entity.ProjectTemplateParams;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ProjectTemplateParamsDao {
|
public interface ProjectTemplateParamsDao {
|
||||||
|
|
||||||
public ProjectTemplateParams load(int id) throws Exception;
|
public ProjectTemplateParams load(int id) throws Exception;
|
||||||
|
|
||||||
public int add(ProjectTemplateParams ptp) throws Exception;
|
public int add(ProjectTemplateParams ptp) throws Exception;
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ProjectTemplateParams ptp, String hql);
|
public int findRows(ProjectTemplateParams ptp, String hql);
|
||||||
public void delete(String hql) throws Exception;
|
public void delete(String hql) throws Exception;
|
||||||
public void deleteforob(ProjectTemplateParams ptp) throws Exception;
|
public void deleteforob(ProjectTemplateParams ptp) throws Exception;
|
||||||
public void modify(ProjectTemplateParams ptp) throws Exception;
|
public void modify(ProjectTemplateParams ptp) throws Exception;
|
||||||
public List<ProjectTemplateParams> getParamsList(String sql) throws Exception;
|
public List<ProjectTemplateParams> getParamsList(String sql) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,139 +1,139 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectCase;
|
import luckyweb.seagull.spring.entity.ProjectCase;
|
||||||
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
import luckyweb.seagull.spring.entity.ProjectCasesteps;
|
||||||
import luckyweb.seagull.spring.entity.ProjectPlanCase;
|
import luckyweb.seagull.spring.entity.ProjectPlanCase;
|
||||||
import luckyweb.seagull.spring.entity.ProjectProtocolTemplate;
|
import luckyweb.seagull.spring.entity.ProjectProtocolTemplate;
|
||||||
import luckyweb.seagull.spring.entity.ProjectTemplateParams;
|
import luckyweb.seagull.spring.entity.ProjectTemplateParams;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Repository("projecttemplateparamsDao")
|
@Repository("projecttemplateparamsDao")
|
||||||
public class ProjectTemplateParamsImpl extends HibernateDaoSupport implements ProjectTemplateParamsDao{
|
public class ProjectTemplateParamsImpl extends HibernateDaoSupport implements ProjectTemplateParamsDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectTemplateParams load(int id) throws Exception {
|
public ProjectTemplateParams load(int id) throws Exception {
|
||||||
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
||||||
return (ProjectTemplateParams) this.getHibernateTemplate().get(ProjectTemplateParams.class, id);
|
return (ProjectTemplateParams) this.getHibernateTemplate().get(ProjectTemplateParams.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ProjectTemplateParams ptp) throws Exception {
|
public int add(ProjectTemplateParams ptp) throws Exception {
|
||||||
this.getHibernateTemplate().save(ptp);
|
this.getHibernateTemplate().save(ptp);
|
||||||
return ptp.getId();
|
return ptp.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteforob(ProjectTemplateParams ptp) throws Exception {
|
public void deleteforob(ProjectTemplateParams ptp) throws Exception {
|
||||||
try{
|
try{
|
||||||
this.getHibernateTemplate().delete(ptp);
|
this.getHibernateTemplate().delete(ptp);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(ProjectTemplateParams ptp) throws Exception {
|
public void modify(ProjectTemplateParams ptp) throws Exception {
|
||||||
this.getHibernateTemplate().update(ptp);
|
this.getHibernateTemplate().update(ptp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ProjectTemplateParams ptp, Query query) {
|
private void whereParameter(ProjectTemplateParams ptp, Query query) {
|
||||||
if (ptp.getTemplateid()!=0) {
|
if (ptp.getTemplateid()!=0) {
|
||||||
query.setParameter("templateid", ptp.getTemplateid());
|
query.setParameter("templateid", ptp.getTemplateid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ProjectTemplateParams)value, query);
|
whereParameter((ProjectTemplateParams)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ProjectTemplateParams ptp, String hql) {
|
public int findRows(ProjectTemplateParams ptp, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(ptp, query);
|
whereParameter(ptp, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String hql) throws Exception {
|
public void delete(String hql) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectTemplateParams> getParamsList(String sql) throws Exception {
|
public List<ProjectTemplateParams> getParamsList(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List<ProjectTemplateParams> list=null;
|
List<ProjectTemplateParams> list=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
list = session.createQuery(sql).list();
|
list = session.createQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectVersion;
|
import luckyweb.seagull.spring.entity.ProjectVersion;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ProjectVersionDao {
|
public interface ProjectVersionDao {
|
||||||
public int add(ProjectVersion projectversion) throws Exception;
|
public int add(ProjectVersion projectversion) throws Exception;
|
||||||
|
|
||||||
public void modify(ProjectVersion projectversion) throws Exception;
|
public void modify(ProjectVersion projectversion) throws Exception;
|
||||||
|
|
||||||
public void modifyState(ProjectVersion projectversion) throws Exception;
|
public void modifyState(ProjectVersion projectversion) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(ProjectVersion projectversion) throws Exception;
|
public void modifyInfo(ProjectVersion projectversion) throws Exception;
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectVersion> list(ProjectVersion projectversion) throws Exception;
|
public List<ProjectVersion> list(ProjectVersion projectversion) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ProjectVersion> list(String hql) throws Exception;
|
public List<ProjectVersion> list(String hql) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List listavgpro(String sql) throws Exception;
|
public List listavgpro(String sql) throws Exception;
|
||||||
|
|
||||||
public ProjectVersion load(int id) throws Exception;
|
public ProjectVersion load(int id) throws Exception;
|
||||||
|
|
||||||
public List<ProjectVersion> load(String name, String cmdType, String planPath)
|
public List<ProjectVersion> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public ProjectVersion get(int id) throws Exception;
|
public ProjectVersion get(int id) throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPagereport(final String hql, final int offset, final int pageSize);
|
public List findByPagereport(final String hql, final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ProjectVersion projectversion,String hql);
|
public int findRows(ProjectVersion projectversion,String hql);
|
||||||
|
|
||||||
public int findRowsreport(String hql);
|
public int findRowsreport(String hql);
|
||||||
|
|
||||||
public List<ProjectVersion> findJobsList();
|
public List<ProjectVersion> findJobsList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,239 +1,239 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectVersion;
|
import luckyweb.seagull.spring.entity.ProjectVersion;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
|
|
||||||
@Repository("projectversionDao")
|
@Repository("projectversionDao")
|
||||||
public class ProjectVersionDaoImpl extends HibernateDaoSupport implements ProjectVersionDao{
|
public class ProjectVersionDaoImpl extends HibernateDaoSupport implements ProjectVersionDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int versionid) throws Exception {
|
public void delete(int versionid) throws Exception {
|
||||||
try{
|
try{
|
||||||
ProjectVersion projectversion = this.load(versionid);
|
ProjectVersion projectversion = this.load(versionid);
|
||||||
this.getHibernateTemplate().delete(projectversion);
|
this.getHibernateTemplate().delete(projectversion);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ProjectVersion projectversion, Query query) {
|
private void whereParameter(ProjectVersion projectversion, Query query) {
|
||||||
|
|
||||||
if (projectversion.getProjectid()!=0&&projectversion.getProjectid()!=99) {
|
if (projectversion.getProjectid()!=0&&projectversion.getProjectid()!=99) {
|
||||||
query.setParameter("projectid", projectversion.getProjectid());
|
query.setParameter("projectid", projectversion.getProjectid());
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(projectversion.getStartactually_launchdate())) {
|
if (!StrLib.isEmpty(projectversion.getStartactually_launchdate())) {
|
||||||
query.setParameter("startactually_launchdate", projectversion.getStartactually_launchdate());
|
query.setParameter("startactually_launchdate", projectversion.getStartactually_launchdate());
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(projectversion.getEndactually_launchdate())) {
|
if (!StrLib.isEmpty(projectversion.getEndactually_launchdate())) {
|
||||||
query.setParameter("endactually_launchdate", projectversion.getEndactually_launchdate());
|
query.setParameter("endactually_launchdate", projectversion.getEndactually_launchdate());
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(projectversion.getVersionnumber())) {
|
if (!StrLib.isEmpty(projectversion.getVersionnumber())) {
|
||||||
query.setParameter("versionnumber", "%"+projectversion.getVersionnumber().trim()+"%");
|
query.setParameter("versionnumber", "%"+projectversion.getVersionnumber().trim()+"%");
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(projectversion.getImprint())) {
|
if (!StrLib.isEmpty(projectversion.getImprint())) {
|
||||||
query.setParameter("imprint", "%"+projectversion.getImprint().trim()+"%");
|
query.setParameter("imprint", "%"+projectversion.getImprint().trim()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ProjectVersion)value, query);
|
whereParameter((ProjectVersion)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPagereport(final String hql,final int offset, final int pageSize) {
|
public List findByPagereport(final String hql,final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
//Query query= session.createQuery(hql);
|
//Query query= session.createQuery(hql);
|
||||||
Query query= session.createSQLQuery(hql);
|
Query query= session.createSQLQuery(hql);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ProjectVersion projectversion, String hql) {
|
public int findRows(ProjectVersion projectversion, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(projectversion, query);
|
whereParameter(projectversion, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRowsreport(String hql) {
|
public int findRowsreport(String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
/*Query query=session.createQuery(hql);*/
|
/*Query query=session.createQuery(hql);*/
|
||||||
Query query= session.createSQLQuery(hql);
|
Query query= session.createSQLQuery(hql);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query.list().size());
|
query.list().size());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ProjectVersion projectversion) throws Exception {
|
public int add(ProjectVersion projectversion) throws Exception {
|
||||||
this.getHibernateTemplate().save(projectversion);
|
this.getHibernateTemplate().save(projectversion);
|
||||||
return projectversion.getVersionid();
|
return projectversion.getVersionid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(ProjectVersion projectversion) throws Exception {
|
public void modify(ProjectVersion projectversion) throws Exception {
|
||||||
this.getHibernateTemplate().update(projectversion);
|
this.getHibernateTemplate().update(projectversion);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(ProjectVersion projectversion) throws Exception {
|
public void modifyState(ProjectVersion projectversion) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyInfo(ProjectVersion projectversion) throws Exception {
|
public void modifyInfo(ProjectVersion projectversion) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectVersion> list(ProjectVersion projectversion)
|
public List<ProjectVersion> list(ProjectVersion projectversion)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectVersion> list(String hql) throws Exception {
|
public List<ProjectVersion> list(String hql) throws Exception {
|
||||||
return this.getHibernateTemplate().find(hql);
|
return this.getHibernateTemplate().find(hql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectVersion load(int versionid) throws Exception {
|
public ProjectVersion load(int versionid) throws Exception {
|
||||||
return (ProjectVersion) this.getHibernateTemplate().get(ProjectVersion.class, versionid);
|
return (ProjectVersion) this.getHibernateTemplate().get(ProjectVersion.class, versionid);
|
||||||
//return (ProjectVersion) this.getSession().load(ProjectVersion.class, versionid);
|
//return (ProjectVersion) this.getSession().load(ProjectVersion.class, versionid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectVersion> load(String name, String cmdType,
|
public List<ProjectVersion> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectVersion get(int id) throws Exception {
|
public ProjectVersion get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectVersion> findJobsList() {
|
public List<ProjectVersion> findJobsList() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List listavgpro(String sql) throws Exception {
|
public List listavgpro(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
||||||
List count=null;
|
List count=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
count = session.createSQLQuery(sql).list();
|
count = session.createSQLQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Review;
|
import luckyweb.seagull.spring.entity.Review;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ReviewDao {
|
public interface ReviewDao {
|
||||||
public int add(Review review) throws Exception;
|
public int add(Review review) throws Exception;
|
||||||
|
|
||||||
public void modify(Review review) throws Exception;
|
public void modify(Review review) throws Exception;
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<Review> list(Review review) throws Exception;
|
public List<Review> list(Review review) throws Exception;
|
||||||
|
|
||||||
public Review get(int id) throws Exception;
|
public Review get(int id) throws Exception;
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(Review review,String hql);
|
public int findRows(Review review,String hql);
|
||||||
public void update(String hql) throws Exception;
|
public void update(String hql) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,142 +1,142 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Review;
|
import luckyweb.seagull.spring.entity.Review;
|
||||||
|
|
||||||
@Repository("reviewDao")
|
@Repository("reviewDao")
|
||||||
public class ReviewDaoImpl extends HibernateDaoSupport implements ReviewDao{
|
public class ReviewDaoImpl extends HibernateDaoSupport implements ReviewDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
try{
|
try{
|
||||||
Review review = this.get(id);
|
Review review = this.get(id);
|
||||||
this.getHibernateTemplate().delete(review);
|
this.getHibernateTemplate().delete(review);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(String hql) throws Exception {
|
public void update(String hql) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(Review review, Query query) {
|
private void whereParameter(Review review, Query query) {
|
||||||
if (review.getProjectid()!=0) {
|
if (review.getProjectid()!=0) {
|
||||||
query.setParameter("projectid", review.getProjectid());
|
query.setParameter("projectid", review.getProjectid());
|
||||||
}
|
}
|
||||||
if (review.getReview_startdate()!=null&&!"".equals(review.getReview_startdate())) {
|
if (review.getReview_startdate()!=null&&!"".equals(review.getReview_startdate())) {
|
||||||
query.setParameter("review_startdate", review.getReview_startdate());
|
query.setParameter("review_startdate", review.getReview_startdate());
|
||||||
}
|
}
|
||||||
if (review.getReview_enddate()!=null&&!"".equals(review.getReview_enddate())) {
|
if (review.getReview_enddate()!=null&&!"".equals(review.getReview_enddate())) {
|
||||||
query.setParameter("review_enddate", review.getReview_enddate());
|
query.setParameter("review_enddate", review.getReview_enddate());
|
||||||
}
|
}
|
||||||
if (null!=review.getVersion()&&!"".equals(review.getVersion())) {
|
if (null!=review.getVersion()&&!"".equals(review.getVersion())) {
|
||||||
query.setParameter("version", "%"+review.getVersion()+"%");
|
query.setParameter("version", "%"+review.getVersion()+"%");
|
||||||
}
|
}
|
||||||
if (null!=review.getReview_type()&&!"".equals(review.getReview_type())) {
|
if (null!=review.getReview_type()&&!"".equals(review.getReview_type())) {
|
||||||
query.setParameter("review_type", "%"+review.getReview_type()+"%");
|
query.setParameter("review_type", "%"+review.getReview_type()+"%");
|
||||||
}
|
}
|
||||||
if (null!=review.getReview_result()&&!"".equals(review.getReview_result())) {
|
if (null!=review.getReview_result()&&!"".equals(review.getReview_result())) {
|
||||||
query.setParameter("review_result", "%"+review.getReview_result()+"%");
|
query.setParameter("review_result", "%"+review.getReview_result()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((Review)value, query);
|
whereParameter((Review)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(Review review, String hql) {
|
public int findRows(Review review, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(review, query);
|
whereParameter(review, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(Review review) throws Exception {
|
public int add(Review review) throws Exception {
|
||||||
this.getHibernateTemplate().save(review);
|
this.getHibernateTemplate().save(review);
|
||||||
return review.getId();
|
return review.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(Review review) throws Exception {
|
public void modify(Review review) throws Exception {
|
||||||
this.getHibernateTemplate().update(review);
|
this.getHibernateTemplate().update(review);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Review> list(Review review)
|
public List<Review> list(Review review)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Review get(int id) throws Exception {
|
public Review get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return (Review) this.getHibernateTemplate().get(Review.class, id);
|
return (Review) this.getHibernateTemplate().get(Review.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ReviewInfo;
|
import luckyweb.seagull.spring.entity.ReviewInfo;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ReviewInfoDao {
|
public interface ReviewInfoDao {
|
||||||
public int add(ReviewInfo reviewinfo) throws Exception;
|
public int add(ReviewInfo reviewinfo) throws Exception;
|
||||||
|
|
||||||
public void modify(ReviewInfo reviewinfo) throws Exception;
|
public void modify(ReviewInfo reviewinfo) throws Exception;
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<ReviewInfo> list(ReviewInfo reviewinfo) throws Exception;
|
public List<ReviewInfo> list(ReviewInfo reviewinfo) throws Exception;
|
||||||
|
|
||||||
public ReviewInfo get(int id) throws Exception;
|
public ReviewInfo get(int id) throws Exception;
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ReviewInfo reviewinfo,String hql);
|
public int findRows(ReviewInfo reviewinfo,String hql);
|
||||||
|
|
||||||
public void update(String hql) throws Exception;
|
public void update(String hql) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,129 +1,129 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ReviewInfo;
|
import luckyweb.seagull.spring.entity.ReviewInfo;
|
||||||
|
|
||||||
@Repository("reviewInfoDao")
|
@Repository("reviewInfoDao")
|
||||||
public class ReviewInfoDaoImpl extends HibernateDaoSupport implements ReviewInfoDao{
|
public class ReviewInfoDaoImpl extends HibernateDaoSupport implements ReviewInfoDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
try{
|
try{
|
||||||
ReviewInfo reviewinfo = this.get(id);
|
ReviewInfo reviewinfo = this.get(id);
|
||||||
this.getHibernateTemplate().delete(reviewinfo);
|
this.getHibernateTemplate().delete(reviewinfo);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(String hql) throws Exception {
|
public void update(String hql) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ReviewInfo reviewinfo, Query query) {
|
private void whereParameter(ReviewInfo reviewinfo, Query query) {
|
||||||
|
|
||||||
if (reviewinfo.getReview_id()!=0) {
|
if (reviewinfo.getReview_id()!=0) {
|
||||||
query.setParameter("review_id", reviewinfo.getReview_id());
|
query.setParameter("review_id", reviewinfo.getReview_id());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ReviewInfo)value, query);
|
whereParameter((ReviewInfo)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ReviewInfo reviewinfo, String hql) {
|
public int findRows(ReviewInfo reviewinfo, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(reviewinfo, query);
|
whereParameter(reviewinfo, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ReviewInfo reviewinfo) throws Exception {
|
public int add(ReviewInfo reviewinfo) throws Exception {
|
||||||
this.getHibernateTemplate().save(reviewinfo);
|
this.getHibernateTemplate().save(reviewinfo);
|
||||||
return reviewinfo.getId();
|
return reviewinfo.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(ReviewInfo reviewinfo) throws Exception {
|
public void modify(ReviewInfo reviewinfo) throws Exception {
|
||||||
this.getHibernateTemplate().update(reviewinfo);
|
this.getHibernateTemplate().update(reviewinfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ReviewInfo> list(ReviewInfo reviewinfo)
|
public List<ReviewInfo> list(ReviewInfo reviewinfo)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReviewInfo get(int id) throws Exception {
|
public ReviewInfo get(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return (ReviewInfo) this.getHibernateTemplate().get(ReviewInfo.class, id);
|
return (ReviewInfo) this.getHibernateTemplate().get(ReviewInfo.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.SecondarySector;
|
import luckyweb.seagull.spring.entity.SecondarySector;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface SecondarySectorDao {
|
public interface SecondarySectorDao {
|
||||||
public int add(SecondarySector sector) throws Exception;
|
public int add(SecondarySector sector) throws Exception;
|
||||||
|
|
||||||
public void modify(SecondarySector sector) throws Exception;
|
public void modify(SecondarySector sector) throws Exception;
|
||||||
|
|
||||||
public void modifyState(SecondarySector sector) throws Exception;
|
public void modifyState(SecondarySector sector) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(SecondarySector sector) throws Exception;
|
public void modifyInfo(SecondarySector sector) throws Exception;
|
||||||
|
|
||||||
public void delete(SecondarySector sector) throws Exception;
|
public void delete(SecondarySector sector) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<SecondarySector> list(SecondarySector sector) throws Exception;
|
public List<SecondarySector> list(SecondarySector sector) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<SecondarySector> list() throws Exception;
|
public List<SecondarySector> list() throws Exception;
|
||||||
|
|
||||||
public SecondarySector load(int id) throws Exception;
|
public SecondarySector load(int id) throws Exception;
|
||||||
|
|
||||||
public List<SecondarySector> load(String name, String cmdType, String planPath)
|
public List<SecondarySector> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(SecondarySector sector,String hql);
|
public int findRows(SecondarySector sector,String hql);
|
||||||
|
|
||||||
public List<SecondarySector> findSectorList() throws Exception ;
|
public List<SecondarySector> findSectorList() throws Exception ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,154 +1,154 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.SecondarySector;
|
import luckyweb.seagull.spring.entity.SecondarySector;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
|
|
||||||
@Repository("secondarysectorDao")
|
@Repository("secondarysectorDao")
|
||||||
public class SecondarySectorDaoImpl extends HibernateDaoSupport implements SecondarySectorDao{
|
public class SecondarySectorDaoImpl extends HibernateDaoSupport implements SecondarySectorDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(SecondarySector sector) throws Exception {
|
public int add(SecondarySector sector) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
this.getHibernateTemplate().save(sector);
|
this.getHibernateTemplate().save(sector);
|
||||||
return sector.getSectorid();
|
return sector.getSectorid();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(SecondarySector sector) throws Exception {
|
public void modify(SecondarySector sector) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
this.getHibernateTemplate().update(sector);
|
this.getHibernateTemplate().update(sector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(SecondarySector sector) throws Exception {
|
public void modifyState(SecondarySector sector) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyInfo(SecondarySector sector) throws Exception {
|
public void modifyInfo(SecondarySector sector) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(SecondarySector sector) throws Exception {
|
public void delete(SecondarySector sector) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
this.getHibernateTemplate().delete(sector);
|
this.getHibernateTemplate().delete(sector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SecondarySector> list(SecondarySector sector) throws Exception {
|
public List<SecondarySector> list(SecondarySector sector) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<SecondarySector> list = this.getHibernateTemplate().find(" from SecondarySector");
|
List<SecondarySector> list = this.getHibernateTemplate().find(" from SecondarySector");
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<SecondarySector> list() throws Exception {
|
public List<SecondarySector> list() throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return this.getHibernateTemplate().loadAll(SecondarySector.class);
|
return this.getHibernateTemplate().loadAll(SecondarySector.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SecondarySector load(int id) throws Exception {
|
public SecondarySector load(int id) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return (SecondarySector) this.getHibernateTemplate().get(SecondarySector.class, id);
|
return (SecondarySector) this.getHibernateTemplate().get(SecondarySector.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SecondarySector> load(String name, String cmdType,
|
public List<SecondarySector> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(SecondarySector ss, Query query) {
|
private void whereParameter(SecondarySector ss, Query query) {
|
||||||
|
|
||||||
if (!StrLib.isEmpty(ss.getDepartmenthead())) {
|
if (!StrLib.isEmpty(ss.getDepartmenthead())) {
|
||||||
query.setParameter("departmenthead", "%"+ss.getDepartmenthead().trim()+"%");
|
query.setParameter("departmenthead", "%"+ss.getDepartmenthead().trim()+"%");
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(ss.getDepartmentname())) {
|
if (!StrLib.isEmpty(ss.getDepartmentname())) {
|
||||||
query.setParameter("departmentname","%"+ss.getDepartmentname().trim()+"%");
|
query.setParameter("departmentname","%"+ss.getDepartmentname().trim()+"%");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((SecondarySector)value, query);
|
whereParameter((SecondarySector)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(SecondarySector sector, String hql) {
|
public int findRows(SecondarySector sector, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(sector, query);
|
whereParameter(sector, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List<SecondarySector> findSectorList() throws Exception {
|
public List<SecondarySector> findSectorList() throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List<SecondarySector> list=null;
|
List<SecondarySector> list=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
list = session.createQuery(" from SecondarySector order by sectorid").list();
|
list = session.createQuery(" from SecondarySector order by sectorid").list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.SectorProjects;
|
import luckyweb.seagull.spring.entity.SectorProjects;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface SectorProjectsDao {
|
public interface SectorProjectsDao {
|
||||||
public int add(SectorProjects sectorprojects) throws Exception;
|
public int add(SectorProjects sectorprojects) throws Exception;
|
||||||
|
|
||||||
public void modify(SectorProjects sectorprojects) throws Exception;
|
public void modify(SectorProjects sectorprojects) throws Exception;
|
||||||
|
|
||||||
public void modifyState(SectorProjects sectorprojects) throws Exception;
|
public void modifyState(SectorProjects sectorprojects) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(SectorProjects sectorprojects) throws Exception;
|
public void modifyInfo(SectorProjects sectorprojects) throws Exception;
|
||||||
|
|
||||||
public void delete(SectorProjects sectorprojects) throws Exception;
|
public void delete(SectorProjects sectorprojects) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<SectorProjects> list(SectorProjects sectorprojects) throws Exception;
|
public List<SectorProjects> list(SectorProjects sectorprojects) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<SectorProjects> list() throws Exception;
|
public List<SectorProjects> list() throws Exception;
|
||||||
|
|
||||||
public Object findproject(int projectid) throws Exception;
|
public Object findproject(int projectid) throws Exception;
|
||||||
|
|
||||||
public List<SectorProjects> load(String name, String cmdType, String planPath)
|
public List<SectorProjects> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public int getid(String projectname) throws Exception;
|
public int getid(String projectname) throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(SectorProjects sectorprojects,String hql);
|
public int findRows(SectorProjects sectorprojects,String hql);
|
||||||
public SectorProjects load(int projectid) throws Exception;
|
public SectorProjects load(int projectid) throws Exception;
|
||||||
public int projectrow(String hql);
|
public int projectrow(String hql);
|
||||||
public List<SectorProjects> getAllProject();
|
public List<SectorProjects> getAllProject();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,214 +1,214 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ProjectVersion;
|
import luckyweb.seagull.spring.entity.ProjectVersion;
|
||||||
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.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
|
|
||||||
@Repository("sectorprojectsDao")
|
@Repository("sectorprojectsDao")
|
||||||
public class SectorProjectsDaoImpl extends HibernateDaoSupport implements SectorProjectsDao{
|
public class SectorProjectsDaoImpl extends HibernateDaoSupport implements SectorProjectsDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(SectorProjects sectorprojects) throws Exception {
|
public void delete(SectorProjects sectorprojects) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
this.getHibernateTemplate().delete(sectorprojects);
|
this.getHibernateTemplate().delete(sectorprojects);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(SectorProjects sectorprojects, Query query) {
|
private void whereParameter(SectorProjects sectorprojects, Query query) {
|
||||||
|
|
||||||
if (!StrLib.isEmpty(sectorprojects.getProjectname())) {
|
if (!StrLib.isEmpty(sectorprojects.getProjectname())) {
|
||||||
query.setParameter("projectname", "%"+sectorprojects.getProjectname().trim()+"%");
|
query.setParameter("projectname", "%"+sectorprojects.getProjectname().trim()+"%");
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(sectorprojects.getProjectmanager())) {
|
if (!StrLib.isEmpty(sectorprojects.getProjectmanager())) {
|
||||||
query.setParameter("projectmanager","%"+sectorprojects.getProjectmanager().trim()+"%");
|
query.setParameter("projectmanager","%"+sectorprojects.getProjectmanager().trim()+"%");
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(sectorprojects.getProjectsign())) {
|
if (!StrLib.isEmpty(sectorprojects.getProjectsign())) {
|
||||||
query.setParameter("projectsign","%"+sectorprojects.getProjectsign().trim()+"%");
|
query.setParameter("projectsign","%"+sectorprojects.getProjectsign().trim()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((SectorProjects)value, query);
|
whereParameter((SectorProjects)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(SectorProjects sectorprojects, String hql) {
|
public int findRows(SectorProjects sectorprojects, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(sectorprojects, query);
|
whereParameter(sectorprojects, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(SectorProjects sectorprojects) throws Exception {
|
public int add(SectorProjects sectorprojects) throws Exception {
|
||||||
this.getHibernateTemplate().save(sectorprojects);
|
this.getHibernateTemplate().save(sectorprojects);
|
||||||
return sectorprojects.getProjectid();
|
return sectorprojects.getProjectid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(SectorProjects sectorprojects) throws Exception {
|
public void modify(SectorProjects sectorprojects) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
this.getHibernateTemplate().update(sectorprojects);
|
this.getHibernateTemplate().update(sectorprojects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(SectorProjects sectorprojects) throws Exception {
|
public void modifyState(SectorProjects sectorprojects) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyInfo(SectorProjects sectorprojects) throws Exception {
|
public void modifyInfo(SectorProjects sectorprojects) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SectorProjects> list(SectorProjects sectorprojects)
|
public List<SectorProjects> list(SectorProjects sectorprojects)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SectorProjects> list() throws Exception {
|
public List<SectorProjects> list() throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object findproject(int projectid) throws Exception {
|
public Object findproject(int projectid) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
List list = session.createSQLQuery("select * from QA_SECTORPROJECTS where projectid="+projectid).list();
|
List list = session.createSQLQuery("select * from QA_SECTORPROJECTS where projectid="+projectid).list();
|
||||||
session.close();
|
session.close();
|
||||||
return list.get(0);
|
return list.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getid(String projectname) throws Exception {
|
public int getid(String projectname) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
int projectid = 0;
|
int projectid = 0;
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Object> list = session.createSQLQuery("select projectid from QA_SECTORPROJECTS where projectname like '%"+projectname+"%'").list();
|
List<Object> list = session.createSQLQuery("select projectid from QA_SECTORPROJECTS where projectname like '%"+projectname+"%'").list();
|
||||||
if(list.size()!=0&&list.get(0)!=null){
|
if(list.size()!=0&&list.get(0)!=null){
|
||||||
projectid = Integer.valueOf(list.get(0).toString());
|
projectid = Integer.valueOf(list.get(0).toString());
|
||||||
}else{
|
}else{
|
||||||
projectid = 99;
|
projectid = 99;
|
||||||
}
|
}
|
||||||
session.close();
|
session.close();
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SectorProjects> load(String name, String cmdType,
|
public List<SectorProjects> load(String name, String cmdType,
|
||||||
String planPath) throws Exception {
|
String planPath) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SectorProjects load(int projectid) throws Exception {
|
public SectorProjects load(int projectid) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return (SectorProjects) this.getHibernateTemplate().get(SectorProjects.class, projectid);
|
return (SectorProjects) this.getHibernateTemplate().get(SectorProjects.class, projectid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int projectrow(String hql) {
|
public int projectrow(String hql) {
|
||||||
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
int count=0;
|
int count=0;
|
||||||
try {
|
try {
|
||||||
count = session.createSQLQuery(hql).list().size();
|
count = session.createSQLQuery(hql).list().size();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
// return this.getHibernateTemplate().find("select id,name,planproj from TestJobs order by id asc ");
|
// return this.getHibernateTemplate().find("select id,name,planproj from TestJobs order by id asc ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SectorProjects> getAllProject() {
|
public List<SectorProjects> getAllProject() {
|
||||||
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
List<SectorProjects> list = new ArrayList<>();
|
List<SectorProjects> list = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
list = session.createQuery("from SectorProjects order by projectid asc").list();
|
list = session.createQuery("from SectorProjects order by projectid asc").list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
// return this.getHibernateTemplate().find("select id,name,planproj from TestJobs order by id asc ");
|
// return this.getHibernateTemplate().find("select id,name,planproj from TestJobs order by id asc ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TempCasestepDebug;
|
import luckyweb.seagull.spring.entity.TempCasestepDebug;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface TempCasestepDebugDao {
|
public interface TempCasestepDebugDao {
|
||||||
|
|
||||||
public TempCasestepDebug load(int id) throws Exception;
|
public TempCasestepDebug load(int id) throws Exception;
|
||||||
|
|
||||||
public int add(TempCasestepDebug tcd) throws Exception;
|
public int add(TempCasestepDebug tcd) throws Exception;
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(TempCasestepDebug tcd, String hql);
|
public int findRows(TempCasestepDebug tcd, String hql);
|
||||||
public void delete(String hql) throws Exception;
|
public void delete(String hql) throws Exception;
|
||||||
public void deleteforob(TempCasestepDebug tcd) throws Exception;
|
public void deleteforob(TempCasestepDebug tcd) throws Exception;
|
||||||
public void modify(TempCasestepDebug tcd) throws Exception;
|
public void modify(TempCasestepDebug tcd) throws Exception;
|
||||||
public List<TempCasestepDebug> getParamsList(String sql) throws Exception;
|
public List<TempCasestepDebug> getParamsList(String sql) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,139 +1,139 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TempCasestepDebug;
|
import luckyweb.seagull.spring.entity.TempCasestepDebug;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Repository("tempcasestepdebugDao")
|
@Repository("tempcasestepdebugDao")
|
||||||
public class TempCasestepDebugImpl extends HibernateDaoSupport implements TempCasestepDebugDao{
|
public class TempCasestepDebugImpl extends HibernateDaoSupport implements TempCasestepDebugDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TempCasestepDebug load(int id) throws Exception {
|
public TempCasestepDebug load(int id) throws Exception {
|
||||||
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
||||||
return (TempCasestepDebug) this.getHibernateTemplate().get(TempCasestepDebug.class, id);
|
return (TempCasestepDebug) this.getHibernateTemplate().get(TempCasestepDebug.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(TempCasestepDebug tcd) throws Exception {
|
public int add(TempCasestepDebug tcd) throws Exception {
|
||||||
this.getHibernateTemplate().save(tcd);
|
this.getHibernateTemplate().save(tcd);
|
||||||
return tcd.getId();
|
return tcd.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteforob(TempCasestepDebug tcd) throws Exception {
|
public void deleteforob(TempCasestepDebug tcd) throws Exception {
|
||||||
try{
|
try{
|
||||||
this.getHibernateTemplate().delete(tcd);
|
this.getHibernateTemplate().delete(tcd);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(TempCasestepDebug tcd) throws Exception {
|
public void modify(TempCasestepDebug tcd) throws Exception {
|
||||||
this.getHibernateTemplate().update(tcd);
|
this.getHibernateTemplate().update(tcd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(TempCasestepDebug tcd, Query query) {
|
private void whereParameter(TempCasestepDebug tcd, Query query) {
|
||||||
if (!StrLib.isEmpty(tcd.getSign())) {
|
if (!StrLib.isEmpty(tcd.getSign())) {
|
||||||
query.setParameter("sign", tcd.getSign());
|
query.setParameter("sign", tcd.getSign());
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(tcd.getExecutor())) {
|
if (!StrLib.isEmpty(tcd.getExecutor())) {
|
||||||
query.setParameter("executor", tcd.getExecutor());
|
query.setParameter("executor", tcd.getExecutor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((TempCasestepDebug)value, query);
|
whereParameter((TempCasestepDebug)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(TempCasestepDebug tcd, String hql) {
|
public int findRows(TempCasestepDebug tcd, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(tcd, query);
|
whereParameter(tcd, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String hql) throws Exception {
|
public void delete(String hql) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List<TempCasestepDebug> getParamsList(String sql) throws Exception {
|
public List<TempCasestepDebug> getParamsList(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
List<TempCasestepDebug> list=null;
|
List<TempCasestepDebug> list=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
list = session.createQuery(sql).list();
|
list = session.createQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TestCasedetail;
|
import luckyweb.seagull.spring.entity.TestCasedetail;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface TestCasedetailDao {
|
public interface TestCasedetailDao {
|
||||||
@Transactional(propagation=Propagation.REQUIRED)
|
@Transactional(propagation=Propagation.REQUIRED)
|
||||||
public void add(TestCasedetail caseDetail);
|
public void add(TestCasedetail caseDetail);
|
||||||
|
|
||||||
@Transactional(propagation=Propagation.NOT_SUPPORTED)
|
@Transactional(propagation=Propagation.NOT_SUPPORTED)
|
||||||
public List<TestCasedetail> list(TestCasedetail caseDetail);
|
public List<TestCasedetail> list(TestCasedetail caseDetail);
|
||||||
|
|
||||||
public TestCasedetail load(int id);
|
public TestCasedetail load(int id);
|
||||||
|
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(String hql,TestCasedetail tast);
|
public int findRows(String hql,TestCasedetail tast);
|
||||||
@Transactional(propagation=Propagation.REQUIRED)
|
@Transactional(propagation=Propagation.REQUIRED)
|
||||||
public void delete(String hql,int id) throws Exception;
|
public void delete(String hql,int id) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,145 +1,145 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TestCasedetail;
|
import luckyweb.seagull.spring.entity.TestCasedetail;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
|
|
||||||
@Repository("casedetailDao")
|
@Repository("casedetailDao")
|
||||||
public class TestCasedetailDaoImpl extends HibernateDaoSupport implements TestCasedetailDao {
|
public class TestCasedetailDaoImpl extends HibernateDaoSupport implements TestCasedetailDao {
|
||||||
private static final Logger logger = Logger.getLogger(TestCasedetailDaoImpl.class);
|
private static final Logger logger = Logger.getLogger(TestCasedetailDaoImpl.class);
|
||||||
|
|
||||||
|
|
||||||
@Resource(name="sessionFactory")
|
@Resource(name="sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory){
|
public void setSuperSessionFactory(SessionFactory sessionFactory){
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void add(TestCasedetail caseDetail) {
|
public void add(TestCasedetail caseDetail) {
|
||||||
this.getHibernateTemplate().save(caseDetail);
|
this.getHibernateTemplate().save(caseDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TestCasedetail> list(TestCasedetail caseDetail) {
|
public List<TestCasedetail> list(TestCasedetail caseDetail) {
|
||||||
List<TestCasedetail> list=this.getSession().createQuery(" from TestCasedetail where taskid=?")
|
List<TestCasedetail> list=this.getSession().createQuery(" from TestCasedetail where taskid=?")
|
||||||
.setInteger(0, caseDetail.getTestTaskexcute().getId())
|
.setInteger(0, caseDetail.getTestTaskexcute().getId())
|
||||||
.list();
|
.list();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestCasedetail load(int id) {
|
public TestCasedetail load(int id) {
|
||||||
return (TestCasedetail) this.getHibernateTemplate().get(TestCasedetail.class, id);
|
return (TestCasedetail) this.getHibernateTemplate().get(TestCasedetail.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用hql语句进行分页查询
|
* 使用hql语句进行分页查询
|
||||||
*
|
*
|
||||||
* @param hql
|
* @param hql
|
||||||
* 需要查询的hql语句
|
* 需要查询的hql语句
|
||||||
* @param value
|
* @param value
|
||||||
* 如果hql 有一个参数需要传入,value就是传入Hql语句的参数
|
* 如果hql 有一个参数需要传入,value就是传入Hql语句的参数
|
||||||
*
|
*
|
||||||
* @param offset
|
* @param offset
|
||||||
* 第一条记录索引
|
* 第一条记录索引
|
||||||
*
|
*
|
||||||
* @param pageSize
|
* @param pageSize
|
||||||
* 每页需要显示的记录条数
|
* 每页需要显示的记录条数
|
||||||
* @return 当前页的所有记录
|
* @return 当前页的所有记录
|
||||||
*/
|
*/
|
||||||
public List findByPage(final String hql, final Object value,
|
public List findByPage(final String hql, final Object value,
|
||||||
final int offset, final int pageSize) {
|
final int offset, final int pageSize) {
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
|
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
List result=null;
|
List result=null;
|
||||||
try{
|
try{
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter((TestCasedetail)value, query);
|
whereParameter((TestCasedetail)value, query);
|
||||||
result = query
|
result = query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}return result;
|
}return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(TestCasedetail caseDetail, Query query) {
|
private void whereParameter(TestCasedetail caseDetail, Query query) {
|
||||||
if (!StrLib.isEmpty(caseDetail.getStartDate())&&!StrLib.isEmpty(caseDetail.getEndDate())) {
|
if (!StrLib.isEmpty(caseDetail.getStartDate())&&!StrLib.isEmpty(caseDetail.getEndDate())) {
|
||||||
query.setParameter("startDate", caseDetail.getStartDate().trim());
|
query.setParameter("startDate", caseDetail.getStartDate().trim());
|
||||||
query.setParameter("endDate", caseDetail.getEndDate().trim());
|
query.setParameter("endDate", caseDetail.getEndDate().trim());
|
||||||
}if (caseDetail.getTaskId()!=0) {
|
}if (caseDetail.getTaskId()!=0) {
|
||||||
query.setParameter("taskId", caseDetail.getTaskId());
|
query.setParameter("taskId", caseDetail.getTaskId());
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(caseDetail.getCasestatus())) {
|
if (!StrLib.isEmpty(caseDetail.getCasestatus())) {
|
||||||
query.setParameter("casestatus", caseDetail.getCasestatus().trim());
|
query.setParameter("casestatus", caseDetail.getCasestatus().trim());
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(caseDetail.getCaseno())) {
|
if (!StrLib.isEmpty(caseDetail.getCaseno())) {
|
||||||
query.setParameter("caseno", "%"+caseDetail.getCaseno().trim()+"%");
|
query.setParameter("caseno", "%"+caseDetail.getCaseno().trim()+"%");
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(caseDetail.getCasename())) {
|
if (!StrLib.isEmpty(caseDetail.getCasename())) {
|
||||||
query.setParameter("casename", "%"+caseDetail.getCasename().trim()+"%");
|
query.setParameter("casename", "%"+caseDetail.getCasename().trim()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findRows(String hql, TestCasedetail caseDetail) {
|
public int findRows(String hql, TestCasedetail caseDetail) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(caseDetail, query);
|
whereParameter(caseDetail, query);
|
||||||
s= Integer.valueOf(query.list().get(0).toString());
|
s= Integer.valueOf(query.list().get(0).toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally
|
}finally
|
||||||
{
|
{
|
||||||
session.close();
|
session.close();
|
||||||
|
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String hql, int id) throws Exception {
|
public void delete(String hql, int id) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.setInteger("taskId", id);
|
query.setInteger("taskId", id);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TestClient;
|
import luckyweb.seagull.spring.entity.TestClient;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface TestClientDao {
|
public interface TestClientDao {
|
||||||
|
|
||||||
public TestClient load(int id) throws Exception;
|
public TestClient load(int id) throws Exception;
|
||||||
public int add(TestClient tc) throws Exception;
|
public int add(TestClient tc) throws Exception;
|
||||||
public void modify(TestClient tc) throws Exception;
|
public void modify(TestClient tc) throws Exception;
|
||||||
public void delete(TestClient tc) throws Exception;
|
public void delete(TestClient tc) throws Exception;
|
||||||
|
|
||||||
public int get(String sql) throws Exception;
|
public int get(String sql) throws Exception;
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(TestClient tc,String hql);
|
public int findRows(TestClient tc,String hql);
|
||||||
public int sqlfindRows(String hql);
|
public int sqlfindRows(String hql);
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public List listsql(String sql) throws Exception;
|
public List listsql(String sql) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,156 +1,156 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Review;
|
import luckyweb.seagull.spring.entity.Review;
|
||||||
import luckyweb.seagull.spring.entity.SectorProjects;
|
import luckyweb.seagull.spring.entity.SectorProjects;
|
||||||
import luckyweb.seagull.spring.entity.TestClient;
|
import luckyweb.seagull.spring.entity.TestClient;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Repository("testclientDao")
|
@Repository("testclientDao")
|
||||||
public class TestClientDaoImpl extends HibernateDaoSupport implements TestClientDao{
|
public class TestClientDaoImpl extends HibernateDaoSupport implements TestClientDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestClient load(int id) throws Exception {
|
public TestClient load(int id) throws Exception {
|
||||||
//return (TestClient)this.getSession().get(TestClient.class, id);
|
//return (TestClient)this.getSession().get(TestClient.class, id);
|
||||||
return (TestClient) this.getHibernateTemplate().get(TestClient.class, id);
|
return (TestClient) this.getHibernateTemplate().get(TestClient.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(TestClient tc) throws Exception {
|
public int add(TestClient tc) throws Exception {
|
||||||
this.getHibernateTemplate().save(tc);
|
this.getHibernateTemplate().save(tc);
|
||||||
return tc.getId();
|
return tc.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(TestClient tc) throws Exception {
|
public void modify(TestClient tc) throws Exception {
|
||||||
this.getHibernateTemplate().update(tc);
|
this.getHibernateTemplate().update(tc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(TestClient tc) throws Exception {
|
public void delete(TestClient tc) throws Exception {
|
||||||
try{
|
try{
|
||||||
this.getHibernateTemplate().delete(tc);
|
this.getHibernateTemplate().delete(tc);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int get(String sql) throws Exception {
|
public int get(String sql) throws Exception {
|
||||||
int id = 0;
|
int id = 0;
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Object> count = session.createSQLQuery(sql).list();
|
List<Object> count = session.createSQLQuery(sql).list();
|
||||||
if(count.size()!=0){
|
if(count.size()!=0){
|
||||||
if(count.get(0)!=null){
|
if(count.get(0)!=null){
|
||||||
id = Integer.valueOf(count.get(0).toString());
|
id = Integer.valueOf(count.get(0).toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
session.close();
|
session.close();
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(TestClient tc, Query query) {
|
private void whereParameter(TestClient tc, Query query) {
|
||||||
if (null!=tc.getClientip()&&!"".equals(tc.getClientip())) {
|
if (null!=tc.getClientip()&&!"".equals(tc.getClientip())) {
|
||||||
query.setParameter("clientip", "%"+tc.getClientip()+"%");
|
query.setParameter("clientip", "%"+tc.getClientip()+"%");
|
||||||
}
|
}
|
||||||
if (null!=tc.getName()&&!"".equals(tc.getName())) {
|
if (null!=tc.getName()&&!"".equals(tc.getName())) {
|
||||||
query.setParameter("name", "%"+tc.getName()+"%");
|
query.setParameter("name", "%"+tc.getName()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((TestClient)value, query);
|
whereParameter((TestClient)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(TestClient tc, String hql) {
|
public int findRows(TestClient tc, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(tc, query);
|
whereParameter(tc, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int sqlfindRows(String hql) {
|
public int sqlfindRows(String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
/*Query query=session.createQuery(hql);*/
|
/*Query query=session.createQuery(hql);*/
|
||||||
Query query= session.createSQLQuery(hql);
|
Query query= session.createSQLQuery(hql);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query.list().size());
|
query.list().size());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<TestClient> listsql(String sql) throws Exception {
|
public List<TestClient> listsql(String sql) throws Exception {
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
List<TestClient> list = new ArrayList<>();
|
List<TestClient> list = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
list = session.createQuery(sql).list();
|
list = session.createQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TestJobs;
|
import luckyweb.seagull.spring.entity.TestJobs;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface TestJobsDao {
|
public interface TestJobsDao {
|
||||||
public int add(TestJobs tjob) throws Exception;
|
public int add(TestJobs tjob) throws Exception;
|
||||||
|
|
||||||
public void modify(TestJobs tjob) throws Exception;
|
public void modify(TestJobs tjob) throws Exception;
|
||||||
|
|
||||||
public void modifyState(TestJobs tjob) throws Exception;
|
public void modifyState(TestJobs tjob) throws Exception;
|
||||||
|
|
||||||
public void modifyInfo(TestJobs tjob) throws Exception;
|
public void modifyInfo(TestJobs tjob) throws Exception;
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<TestJobs> list(TestJobs tjob) throws Exception;
|
public List<TestJobs> list(TestJobs tjob) throws Exception;
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public List<TestJobs> list() throws Exception;
|
public List<TestJobs> list() throws Exception;
|
||||||
|
|
||||||
public TestJobs load(int id) throws Exception;
|
public TestJobs load(int id) throws Exception;
|
||||||
|
|
||||||
public List<TestJobs> load(String name, String cmdType, String planPath)
|
public List<TestJobs> load(String name, String cmdType, String planPath)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public TestJobs get(int id) throws Exception;
|
public TestJobs get(int id) throws Exception;
|
||||||
|
|
||||||
// public List findByPage(final String hql, final int offset,final int pageSize);
|
// public List findByPage(final String hql, final int offset,final int pageSize);
|
||||||
//
|
//
|
||||||
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
// public List findByPage(final String hql, final Object[] values,final int offset, final int pageSize);
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(TestJobs jobs,String hql);
|
public int findRows(TestJobs jobs,String hql);
|
||||||
|
|
||||||
public List findJobsList(String hql);
|
public List findJobsList(String hql);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,352 +1,352 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.quartz.impl.StdSchedulerFactory;
|
import org.quartz.impl.StdSchedulerFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.comm.QueueListener;
|
import luckyweb.seagull.comm.QueueListener;
|
||||||
import luckyweb.seagull.quartz.QuratzJobDataMgr;
|
import luckyweb.seagull.quartz.QuratzJobDataMgr;
|
||||||
import luckyweb.seagull.spring.entity.TestClient;
|
import luckyweb.seagull.spring.entity.TestClient;
|
||||||
import luckyweb.seagull.spring.entity.TestJobs;
|
import luckyweb.seagull.spring.entity.TestJobs;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
|
|
||||||
@Repository("testJobsDao")
|
@Repository("testJobsDao")
|
||||||
public class TestJobsDaoImpl extends HibernateDaoSupport implements TestJobsDao {
|
public class TestJobsDaoImpl extends HibernateDaoSupport implements TestJobsDao {
|
||||||
private static final Logger log = Logger.getLogger(TestJobsDaoImpl.class);
|
private static final Logger log = Logger.getLogger(TestJobsDaoImpl.class);
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isRun = false;
|
public static boolean isRun = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动 定时任务 ,修改状态为启动 state=1
|
* 启动 定时任务 ,修改状态为启动 state=1
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static void init(Session session) throws Exception {
|
public static void init(Session session) throws Exception {
|
||||||
QueueListener.gSchedulerFactory = new StdSchedulerFactory();
|
QueueListener.gSchedulerFactory = new StdSchedulerFactory();
|
||||||
QueueListener.sched = QueueListener.gSchedulerFactory.getScheduler();
|
QueueListener.sched = QueueListener.gSchedulerFactory.getScheduler();
|
||||||
|
|
||||||
if (isRun == false) {
|
if (isRun == false) {
|
||||||
try {
|
try {
|
||||||
Query queryproj = session.createQuery("from SectorProjects where projecttype=1 order by projectid asc");
|
Query queryproj = session.createQuery("from SectorProjects where projecttype=1 order by projectid asc");
|
||||||
QueueListener.projlist = queryproj.list();//获取所有项目
|
QueueListener.projlist = queryproj.list();//获取所有项目
|
||||||
|
|
||||||
Query query = session.createQuery("from TestJobs where (tasktype ='D') or (tasktype ='O' and runtime>sysdate()) ");
|
Query query = session.createQuery("from TestJobs where (tasktype ='D') or (tasktype ='O' and runtime>sysdate()) ");
|
||||||
QueueListener.list = query.list();
|
QueueListener.list = query.list();
|
||||||
|
|
||||||
QueueListener.qa_projlist = session.createQuery("from SectorProjects where projecttype=0 order by projectid asc").list();
|
QueueListener.qa_projlist = session.createQuery("from SectorProjects where projecttype=0 order by projectid asc").list();
|
||||||
|
|
||||||
QueueListener.listen_Clientlist=session.createQuery("from TestClient order by id asc").list();
|
QueueListener.listen_Clientlist=session.createQuery("from TestClient order by id asc").list();
|
||||||
//将测试调度任务加入到定时任务中
|
//将测试调度任务加入到定时任务中
|
||||||
QuratzJobDataMgr mgr = new QuratzJobDataMgr();
|
QuratzJobDataMgr mgr = new QuratzJobDataMgr();
|
||||||
for (TestJobs tb : QueueListener.list) {
|
for (TestJobs tb : QueueListener.list) {
|
||||||
try{
|
try{
|
||||||
mgr.addJobRunTime(tb, tb.getId());
|
mgr.addJobRunTime(tb, tb.getId());
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
log.error("启动 测试调度定时任务失败:" + e.getMessage());
|
log.error("启动 测试调度定时任务失败:" + e.getMessage());
|
||||||
System.out.println("任务ID号"+tb.getId()+"启动失败,请检查测试调度任务配置情况,尤其是Cron表达式是否正确!!!!");
|
System.out.println("任务ID号"+tb.getId()+"启动失败,请检查测试调度任务配置情况,尤其是Cron表达式是否正确!!!!");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//将客户端心跳加入到定时任务中
|
//将客户端心跳加入到定时任务中
|
||||||
for (TestClient tc : QueueListener.listen_Clientlist) {
|
for (TestClient tc : QueueListener.listen_Clientlist) {
|
||||||
try{
|
try{
|
||||||
mgr.addTestClient(tc, tc.getId());
|
mgr.addTestClient(tc, tc.getId());
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
log.error("启动 客户端心跳检测监听失败:" + e.getMessage());
|
log.error("启动 客户端心跳检测监听失败:" + e.getMessage());
|
||||||
System.out.println("任务ID号"+tc.getId()+"启动失败,请检查客户端心跳检测任务配置情况,尤其是Cron表达式是否正确!!!!");
|
System.out.println("任务ID号"+tc.getId()+"启动失败,请检查客户端心跳检测任务配置情况,尤其是Cron表达式是否正确!!!!");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (QueueListener.list.size() != 0) {
|
if (QueueListener.list.size() != 0) {
|
||||||
//设置任务的状态为启动
|
//设置任务的状态为启动
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
TestJobs tjob = new TestJobs();
|
TestJobs tjob = new TestJobs();
|
||||||
tjob.setState("1");
|
tjob.setState("1");
|
||||||
Query query2 = session.createQuery("update TestJobs t set t.state = '1' where (tasktype ='D') or (tasktype ='O' and runtime>sysdate() ) ");
|
Query query2 = session.createQuery("update TestJobs t set t.state = '1' where (tasktype ='D') or (tasktype ='O' and runtime>sysdate() ) ");
|
||||||
query2.executeUpdate();
|
query2.executeUpdate();
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
}
|
}
|
||||||
isRun = true;
|
isRun = true;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("启动 定时任务失败:" + e.getMessage());
|
log.error("启动 定时任务失败:" + e.getMessage());
|
||||||
System.out.println("启动 定时任务失败:" + e.getMessage());
|
System.out.println("启动 定时任务失败:" + e.getMessage());
|
||||||
throw new Exception("启动 定时任务失败:" + e);
|
throw new Exception("启动 定时任务失败:" + e);
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭 定时任务,修改状态为未启动 state=0
|
* 关闭 定时任务,修改状态为未启动 state=0
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static void stop(Session session) throws Exception {
|
public static void stop(Session session) throws Exception {
|
||||||
// QuratzJobDataMgr query = QuratzJobDataMgr.getInstance();
|
// QuratzJobDataMgr query = QuratzJobDataMgr.getInstance();
|
||||||
try {
|
try {
|
||||||
// Session session=sessionFactory.openSession();
|
// Session session=sessionFactory.openSession();
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query = session.createQuery("update TestJobs t set t.state = '0' where (tasktype ='D') or (tasktype ='O' and to_date(runtime,'yyyy-MM-dd HH24:mi:ss')>sysdate ) ");
|
Query query = session.createQuery("update TestJobs t set t.state = '0' where (tasktype ='D') or (tasktype ='O' and to_date(runtime,'yyyy-MM-dd HH24:mi:ss')>sysdate ) ");
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new Exception("关闭 定时任务失败:" + e);
|
throw new Exception("关闭 定时任务失败:" + e);
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(TestJobs tjob) throws Exception{
|
public int add(TestJobs tjob) throws Exception{
|
||||||
this.getHibernateTemplate().save(tjob);
|
this.getHibernateTemplate().save(tjob);
|
||||||
return tjob.getId();
|
return tjob.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(TestJobs tjob) throws Exception{
|
public void modify(TestJobs tjob) throws Exception{
|
||||||
this.getHibernateTemplate().update(tjob);
|
this.getHibernateTemplate().update(tjob);
|
||||||
//Query query = this.getSession().createQuery("update TestJobs t set t.projPath =?,t.startDate=?,t.startTime=?,t.endDate=?,t.end where id =? ");
|
//Query query = this.getSession().createQuery("update TestJobs t set t.projPath =?,t.startDate=?,t.startTime=?,t.endDate=?,t.end where id =? ");
|
||||||
//query.executeUpdate();
|
//query.executeUpdate();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyState(TestJobs tjob) throws Exception{
|
public void modifyState(TestJobs tjob) throws Exception{
|
||||||
this.getHibernateTemplate().update(tjob);
|
this.getHibernateTemplate().update(tjob);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception{
|
public void delete(int id) throws Exception{
|
||||||
try{
|
try{
|
||||||
TestJobs tjob = this.load(id);
|
TestJobs tjob = this.load(id);
|
||||||
this.getHibernateTemplate().delete(tjob);
|
this.getHibernateTemplate().delete(tjob);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// public List<TestJobs> list(TestJobs tjob) {
|
// public List<TestJobs> list(TestJobs tjob) {
|
||||||
// Session session = this.getSession();
|
// Session session = this.getSession();
|
||||||
// String hql = "from TestJobs ";
|
// String hql = "from TestJobs ";
|
||||||
// hql += where(tjob);
|
// hql += where(tjob);
|
||||||
// Query query = session.createQuery(hql);
|
// Query query = session.createQuery(hql);
|
||||||
// whereParameter(tjob, query);
|
// whereParameter(tjob, query);
|
||||||
// List<TestJobs> list = query.list();
|
// List<TestJobs> list = query.list();
|
||||||
// return list;
|
// return list;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TestJobs> list(TestJobs tjob) {
|
public List<TestJobs> list(TestJobs tjob) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<TestJobs> list = this.getHibernateTemplate().find(" from TestJobs");
|
List<TestJobs> list = this.getHibernateTemplate().find(" from TestJobs");
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TestJobs> list() {
|
public List<TestJobs> list() {
|
||||||
return this.getHibernateTemplate().loadAll(TestJobs.class);
|
return this.getHibernateTemplate().loadAll(TestJobs.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestJobs load(int id) {
|
public TestJobs load(int id) {
|
||||||
return (TestJobs) this.getHibernateTemplate().get(TestJobs.class, id);
|
return (TestJobs) this.getHibernateTemplate().get(TestJobs.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*public List<TestJobs> listFenye(TestJobs tjob, int curpage, int pagesize) {
|
/*public List<TestJobs> listFenye(TestJobs tjob, int curpage, int pagesize) {
|
||||||
Session session = this.getSession();
|
Session session = this.getSession();
|
||||||
String hql = "from TestJobs ";
|
String hql = "from TestJobs ";
|
||||||
hql += where(tjob);
|
hql += where(tjob);
|
||||||
// Query query=session.createQuery(hql);
|
// Query query=session.createQuery(hql);
|
||||||
List<TestJobs> list = findOnePage(session, hql, tjob, curpage, pagesize);
|
List<TestJobs> list = findOnePage(session, hql, tjob, curpage, pagesize);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TestJobs> findOnePage(Session session, String strHQL,
|
public List<TestJobs> findOnePage(Session session, String strHQL,
|
||||||
TestJobs tjob, int offset, int pagesize) {
|
TestJobs tjob, int offset, int pagesize) {
|
||||||
List<TestJobs> lst = null;
|
List<TestJobs> lst = null;
|
||||||
try {
|
try {
|
||||||
Query query = session.createQuery(strHQL);
|
Query query = session.createQuery(strHQL);
|
||||||
whereParameter(tjob, query);
|
whereParameter(tjob, query);
|
||||||
if (offset != 0 && pagesize != 0) {
|
if (offset != 0 && pagesize != 0) {
|
||||||
query.setFirstResult((offset - 1) * pagesize);
|
query.setFirstResult((offset - 1) * pagesize);
|
||||||
query.setMaxResults(pagesize);
|
query.setMaxResults(pagesize);
|
||||||
}
|
}
|
||||||
lst = query.list();
|
lst = query.list();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
return lst;
|
return lst;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
private void whereParameter(TestJobs jb, Query query) {
|
private void whereParameter(TestJobs jb, Query query) {
|
||||||
if (!StrLib.isEmpty(jb.getTaskName())) {
|
if (!StrLib.isEmpty(jb.getTaskName())) {
|
||||||
query.setParameter("name", "%"+jb.getTaskName().trim()+"%");
|
query.setParameter("name", "%"+jb.getTaskName().trim()+"%");
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(jb.getPlanproj())) {
|
if (!StrLib.isEmpty(jb.getPlanproj())) {
|
||||||
query.setParameter("planproj", "%"+jb.getPlanproj().trim()+"%");
|
query.setParameter("planproj", "%"+jb.getPlanproj().trim()+"%");
|
||||||
}
|
}
|
||||||
if (jb.getProjectid()!=0&&jb.getProjectid()!=99) {
|
if (jb.getProjectid()!=0&&jb.getProjectid()!=99) {
|
||||||
query.setParameter("projectid", jb.getProjectid());
|
query.setParameter("projectid", jb.getProjectid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestJobs get(int id) {
|
public TestJobs get(int id) {
|
||||||
return (TestJobs) this.getHibernateTemplate().get(TestJobs.class, id);
|
return (TestJobs) this.getHibernateTemplate().get(TestJobs.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TestJobs> load(String name, String cmdType, String planPath) {
|
public List<TestJobs> load(String name, String cmdType, String planPath) {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
List<TestJobs> list=null;
|
List<TestJobs> list=null;
|
||||||
try{
|
try{
|
||||||
String hql = " from TestJobs where planName=? and cmdType=? and planPath=?";
|
String hql = " from TestJobs where planName=? and cmdType=? and planPath=?";
|
||||||
list= (List<TestJobs>)session
|
list= (List<TestJobs>)session
|
||||||
.createQuery(hql).setString(0, name).setString(1, cmdType)
|
.createQuery(hql).setString(0, name).setString(1, cmdType)
|
||||||
.setString(2, planPath).list();
|
.setString(2, planPath).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
/**
|
/**
|
||||||
* 修改信息
|
* 修改信息
|
||||||
*/
|
*/
|
||||||
public void modifyInfo(TestJobs tjob) {
|
public void modifyInfo(TestJobs tjob) {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
session .createQuery(
|
session .createQuery(
|
||||||
"update TestJobs set startDate=? ,startTime=?, endDate=?, endTime=?,startTimestr=?,runTime=? where id=? ")
|
"update TestJobs set startDate=? ,startTime=?, endDate=?, endTime=?,startTimestr=?,runTime=? where id=? ")
|
||||||
.executeUpdate();
|
.executeUpdate();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用hql语句进行分页查询
|
* 使用hql语句进行分页查询
|
||||||
*
|
*
|
||||||
* @param hql
|
* @param hql
|
||||||
* 需要查询的hql语句
|
* 需要查询的hql语句
|
||||||
* @param value
|
* @param value
|
||||||
* 如果hql 有一个参数需要传入,value就是传入Hql语句的参数
|
* 如果hql 有一个参数需要传入,value就是传入Hql语句的参数
|
||||||
*
|
*
|
||||||
* @param offset
|
* @param offset
|
||||||
* 第一条记录索引
|
* 第一条记录索引
|
||||||
*
|
*
|
||||||
* @param pageSize
|
* @param pageSize
|
||||||
* 每页需要显示的记录条数
|
* 每页需要显示的记录条数
|
||||||
* @return 当前页的所有记录
|
* @return 当前页的所有记录
|
||||||
*/
|
*/
|
||||||
public List findByPage(final String hql, final Object value,
|
public List findByPage(final String hql, final Object value,
|
||||||
final int offset, final int pageSize) {
|
final int offset, final int pageSize) {
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((TestJobs)value, query);
|
whereParameter((TestJobs)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public int findRows(TestJobs jobs,String hql) {
|
public int findRows(TestJobs jobs,String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(jobs, query);
|
whereParameter(jobs, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TestJobs> getListForPage(final String hql, final int offset,
|
public List<TestJobs> getListForPage(final String hql, final int offset,
|
||||||
final int lengh) {
|
final int lengh) {
|
||||||
log.debug("finding ListForPage");
|
log.debug("finding ListForPage");
|
||||||
try {
|
try {
|
||||||
List list = getHibernateTemplate().executeFind(
|
List list = getHibernateTemplate().executeFind(
|
||||||
new HibernateCallback() {
|
new HibernateCallback() {
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException, SQLException {
|
throws HibernateException, SQLException {
|
||||||
List list2 = session.createQuery(hql)
|
List list2 = session.createQuery(hql)
|
||||||
.setFirstResult(offset)
|
.setFirstResult(offset)
|
||||||
.setMaxResults(lengh).list();
|
.setMaxResults(lengh).list();
|
||||||
session.close();
|
session.close();
|
||||||
return list2;
|
return list2;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
} catch (RuntimeException re) {
|
} catch (RuntimeException re) {
|
||||||
log.error("find ListForPage failed", re);
|
log.error("find ListForPage failed", re);
|
||||||
throw re;
|
throw re;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findJobsList(String hql) {
|
public List findJobsList(String hql) {
|
||||||
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
// List<TestTastexcute> list=new ArrayList<TestTastexcute>();
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
List count=null;
|
List count=null;
|
||||||
try {
|
try {
|
||||||
count = session.createSQLQuery(hql).list();
|
count = session.createSQLQuery(hql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
// return this.getHibernateTemplate().find("select id,name,planproj from TestJobs order by id asc ");
|
// return this.getHibernateTemplate().find("select id,name,planproj from TestJobs order by id asc ");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,25 +1,25 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TestLogdetail;
|
import luckyweb.seagull.spring.entity.TestLogdetail;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface TestLogdetailDao {
|
public interface TestLogdetailDao {
|
||||||
public void add(TestLogdetail logDetail);
|
public void add(TestLogdetail logDetail);
|
||||||
|
|
||||||
@Transactional(propagation=Propagation.NOT_SUPPORTED)
|
@Transactional(propagation=Propagation.NOT_SUPPORTED)
|
||||||
public List<TestLogdetail> list(TestLogdetail logDetail);
|
public List<TestLogdetail> list(TestLogdetail logDetail);
|
||||||
|
|
||||||
public TestLogdetail load(int id);
|
public TestLogdetail load(int id);
|
||||||
|
|
||||||
public void delete(String hql,int id) throws Exception;
|
public void delete(String hql,int id) throws Exception;
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(String hql,TestLogdetail logs);
|
public int findRows(String hql,TestLogdetail logs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,116 +1,116 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TestLogdetail;
|
import luckyweb.seagull.spring.entity.TestLogdetail;
|
||||||
|
|
||||||
@Repository("logdetailDao")
|
@Repository("logdetailDao")
|
||||||
public class TestLogdetailDaoImpl extends HibernateDaoSupport implements
|
public class TestLogdetailDaoImpl extends HibernateDaoSupport implements
|
||||||
TestLogdetailDao {
|
TestLogdetailDao {
|
||||||
private static final Logger logger = Logger
|
private static final Logger logger = Logger
|
||||||
.getLogger(TestLogdetailDaoImpl.class);
|
.getLogger(TestLogdetailDaoImpl.class);
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void add(TestLogdetail caseDetail) {
|
public void add(TestLogdetail caseDetail) {
|
||||||
this.getHibernateTemplate().save(caseDetail);
|
this.getHibernateTemplate().save(caseDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TestLogdetail> list(TestLogdetail log) {
|
public List<TestLogdetail> list(TestLogdetail log) {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
List<TestLogdetail> list = session.createQuery(" from TestLogdetail where caseid=? order by id asc")
|
List<TestLogdetail> list = session.createQuery(" from TestLogdetail where caseid=? order by id asc")
|
||||||
.setInteger(0, log.getCaseid()).list();
|
.setInteger(0, log.getCaseid()).list();
|
||||||
session.close();
|
session.close();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestLogdetail load(int id) {
|
public TestLogdetail load(int id) {
|
||||||
return (TestLogdetail) this.getHibernateTemplate().get(TestLogdetail.class, id);
|
return (TestLogdetail) this.getHibernateTemplate().get(TestLogdetail.class, id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String hql, int id) throws Exception {
|
public void delete(String hql, int id) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql).setInteger("taskId", id);
|
Query query =session .createQuery(hql).setInteger("taskId", id);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 使用hql语句进行分页查询
|
* 使用hql语句进行分页查询
|
||||||
*
|
*
|
||||||
* @param hql 需要查询的hql语句
|
* @param hql 需要查询的hql语句
|
||||||
*
|
*
|
||||||
* @param offset 第一条记录索引
|
* @param offset 第一条记录索引
|
||||||
*
|
*
|
||||||
* @param pageSize 每页需要显示的记录条数
|
* @param pageSize 每页需要显示的记录条数
|
||||||
*
|
*
|
||||||
* @return 当前页的所有记录
|
* @return 当前页的所有记录
|
||||||
*/
|
*/
|
||||||
public List findByPage(final String hql, final Object value,
|
public List findByPage(final String hql, final Object value,
|
||||||
final int offset, final int pageSize) {
|
final int offset, final int pageSize) {
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((TestLogdetail)value, query);
|
whereParameter((TestLogdetail)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findRows(String hql, TestLogdetail log) {
|
public int findRows(String hql, TestLogdetail log) {
|
||||||
int s = 0;
|
int s = 0;
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query = session.createQuery(hql);
|
Query query = session.createQuery(hql);
|
||||||
whereParameter(log, query);
|
whereParameter(log, query);
|
||||||
s = Integer.valueOf(query.list().get(0).toString());
|
s = Integer.valueOf(query.list().get(0).toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(TestLogdetail log, Query query) {
|
private void whereParameter(TestLogdetail log, Query query) {
|
||||||
if (log.getTaskid()!=0) {
|
if (log.getTaskid()!=0) {
|
||||||
query.setParameter("taskid", log.getTaskid());
|
query.setParameter("taskid", log.getTaskid());
|
||||||
}
|
}
|
||||||
if (log.getCaseid()!=0) {
|
if (log.getCaseid()!=0) {
|
||||||
query.setParameter("caseid", log.getCaseid());
|
query.setParameter("caseid", log.getCaseid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.TestTaskexcute;
|
import luckyweb.seagull.spring.entity.TestTaskexcute;
|
||||||
|
|
||||||
|
|
||||||
public interface TestTastExcuteDao {
|
public interface TestTastExcuteDao {
|
||||||
public void add(TestTaskexcute tjob);
|
public void add(TestTaskexcute tjob);
|
||||||
|
|
||||||
@Transactional(propagation=Propagation.NOT_SUPPORTED)
|
@Transactional(propagation=Propagation.NOT_SUPPORTED)
|
||||||
public List<TestTaskexcute> list(TestTaskexcute tjob);
|
public List<TestTaskexcute> list(TestTaskexcute tjob);
|
||||||
|
|
||||||
public TestTaskexcute load(int id);
|
public TestTaskexcute load(int id);
|
||||||
|
|
||||||
public TestTaskexcute get(int id);
|
public TestTaskexcute get(int id);
|
||||||
|
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(String hql,TestTaskexcute tast);
|
public int findRows(String hql,TestTaskexcute tast);
|
||||||
|
|
||||||
public List findTastList(String sql);
|
public List findTastList(String sql);
|
||||||
|
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
public List listtastinfo(String sql) throws Exception;
|
public List listtastinfo(String sql) throws Exception;
|
||||||
|
|
||||||
public void delete_forjobid(String hql, int jobid) throws Exception;
|
public void delete_forjobid(String hql, int jobid) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,231 +1,231 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Accident;
|
import luckyweb.seagull.spring.entity.Accident;
|
||||||
import luckyweb.seagull.spring.entity.TestTaskexcute;
|
import luckyweb.seagull.spring.entity.TestTaskexcute;
|
||||||
import luckyweb.seagull.util.StrLib;
|
import luckyweb.seagull.util.StrLib;
|
||||||
|
|
||||||
@Repository("tastExcuteDao")
|
@Repository("tastExcuteDao")
|
||||||
public class TestTastExcuteDaoImpl extends HibernateDaoSupport implements
|
public class TestTastExcuteDaoImpl extends HibernateDaoSupport implements
|
||||||
TestTastExcuteDao {
|
TestTastExcuteDao {
|
||||||
private static final Logger log = Logger
|
private static final Logger log = Logger
|
||||||
.getLogger(TestTastExcuteDaoImpl.class);
|
.getLogger(TestTastExcuteDaoImpl.class);
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void add(TestTaskexcute tast) {
|
public void add(TestTaskexcute tast) {
|
||||||
this.getHibernateTemplate().save(tast);
|
this.getHibernateTemplate().save(tast);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TestTaskexcute> list(TestTaskexcute tast) {
|
public List<TestTaskexcute> list(TestTaskexcute tast) {
|
||||||
List<TestTaskexcute> list = null;
|
List<TestTaskexcute> list = null;
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
try {
|
try {
|
||||||
list = session
|
list = session
|
||||||
.createQuery(
|
.createQuery(
|
||||||
"from TestTastexcute where jobid=? order by asc ")
|
"from TestTastexcute where jobid=? order by asc ")
|
||||||
.setInteger(0, tast.getTestJob().getId()).list();
|
.setInteger(0, tast.getTestJob().getId()).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestTaskexcute load(int id) {
|
public TestTaskexcute load(int id) {
|
||||||
/* return (TestTastexcute) this.getSession()
|
/* return (TestTastexcute) this.getSession()
|
||||||
.load(TestTastexcute.class, id);*/
|
.load(TestTastexcute.class, id);*/
|
||||||
return (TestTaskexcute) this.getHibernateTemplate().get(TestTaskexcute.class, id);
|
return (TestTaskexcute) this.getHibernateTemplate().get(TestTaskexcute.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestTaskexcute get(int id) {
|
public TestTaskexcute get(int id) {
|
||||||
// return (TestTastexcute) this.getSession().get(TestTastexcute.class, id);
|
// return (TestTastexcute) this.getSession().get(TestTastexcute.class, id);
|
||||||
return (TestTaskexcute) this.getHibernateTemplate().get(TestTaskexcute.class, id);
|
return (TestTaskexcute) this.getHibernateTemplate().get(TestTaskexcute.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 使用hql语句进行分页查询
|
* 使用hql语句进行分页查询
|
||||||
*
|
*
|
||||||
* @param hql 需要查询的hql语句
|
* @param hql 需要查询的hql语句
|
||||||
*
|
*
|
||||||
* @param offset 第一条记录索引
|
* @param offset 第一条记录索引
|
||||||
*
|
*
|
||||||
* @param pageSize 每页需要显示的记录条数
|
* @param pageSize 每页需要显示的记录条数
|
||||||
*
|
*
|
||||||
* @return 当前页的所有记录
|
* @return 当前页的所有记录
|
||||||
*/
|
*/
|
||||||
public List findByPage(final TestTaskexcute tast, final String hql,
|
public List findByPage(final TestTaskexcute tast, final String hql,
|
||||||
final int offset, final int pageSize) {
|
final int offset, final int pageSize) {
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
|
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
List result = null;
|
List result = null;
|
||||||
try {
|
try {
|
||||||
result = session.createQuery(hql)
|
result = session.createQuery(hql)
|
||||||
.setInteger(0, tast.getTestJob().getId())
|
.setInteger(0, tast.getTestJob().getId())
|
||||||
.setFirstResult(offset).setMaxResults(pageSize)
|
.setFirstResult(offset).setMaxResults(pageSize)
|
||||||
.list();
|
.list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用hql语句进行分页查询
|
* 使用hql语句进行分页查询
|
||||||
*
|
*
|
||||||
* @param hql
|
* @param hql
|
||||||
* 需要查询的hql语句
|
* 需要查询的hql语句
|
||||||
* @param value
|
* @param value
|
||||||
* 如果hql 有一个参数需要传入,value就是传入Hql语句的参数
|
* 如果hql 有一个参数需要传入,value就是传入Hql语句的参数
|
||||||
*
|
*
|
||||||
* @param offset
|
* @param offset
|
||||||
* 第一条记录索引
|
* 第一条记录索引
|
||||||
*
|
*
|
||||||
* @param pageSize
|
* @param pageSize
|
||||||
* 每页需要显示的记录条数
|
* 每页需要显示的记录条数
|
||||||
* @return 当前页的所有记录
|
* @return 当前页的所有记录
|
||||||
*/
|
*/
|
||||||
public List findByPage(final String hql, final Object value,
|
public List findByPage(final String hql, final Object value,
|
||||||
final int offset, final int pageSize) {
|
final int offset, final int pageSize) {
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
|
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
List result = null;
|
List result = null;
|
||||||
try {
|
try {
|
||||||
Query query = session.createQuery(hql);
|
Query query = session.createQuery(hql);
|
||||||
whereParameter((TestTaskexcute) value, query);
|
whereParameter((TestTaskexcute) value, query);
|
||||||
result = query.setFirstResult(offset)
|
result = query.setFirstResult(offset)
|
||||||
.setMaxResults(pageSize).list();
|
.setMaxResults(pageSize).list();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findRows(String hql, TestTaskexcute tast) {
|
public int findRows(String hql, TestTaskexcute tast) {
|
||||||
int s = 0;
|
int s = 0;
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query = session.createQuery(hql);
|
Query query = session.createQuery(hql);
|
||||||
whereParameter(tast, query);
|
whereParameter(tast, query);
|
||||||
s = Integer.valueOf(query.list().get(0).toString());
|
s = Integer.valueOf(query.list().get(0).toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
@Override
|
@Override
|
||||||
public List findTastList(String sql) {
|
public List findTastList(String sql) {
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
List tastlist = session.createSQLQuery(sql).list();
|
List tastlist = session.createSQLQuery(sql).list();
|
||||||
session.close();
|
session.close();
|
||||||
return tastlist;
|
return tastlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(TestTaskexcute tast, Query query) {
|
private void whereParameter(TestTaskexcute tast, Query query) {
|
||||||
if (!StrLib.isEmpty(tast.getStartDate())) {
|
if (!StrLib.isEmpty(tast.getStartDate())) {
|
||||||
query.setParameter(0, tast.getStartDate());
|
query.setParameter(0, tast.getStartDate());
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(tast.getStartDate())) {
|
if (!StrLib.isEmpty(tast.getStartDate())) {
|
||||||
query.setParameter(1, tast.getEndDate());
|
query.setParameter(1, tast.getEndDate());
|
||||||
}
|
}
|
||||||
if (tast.getJobid() != 0) {
|
if (tast.getJobid() != 0) {
|
||||||
query.setParameter("jobId", tast.getJobid());
|
query.setParameter("jobId", tast.getJobid());
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(tast.getTaskId())) {
|
if (!StrLib.isEmpty(tast.getTaskId())) {
|
||||||
query.setParameter("taskId", "%" + tast.getTaskId().trim() + "%");
|
query.setParameter("taskId", "%" + tast.getTaskId().trim() + "%");
|
||||||
}
|
}
|
||||||
if (!StrLib.isEmpty(tast.getTaskStatus()) ) {
|
if (!StrLib.isEmpty(tast.getTaskStatus()) ) {
|
||||||
query.setParameter("taskStatus", tast.getTaskStatus());
|
query.setParameter("taskStatus", tast.getTaskStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
TestTaskexcute tast = this.get(id);
|
TestTaskexcute tast = this.get(id);
|
||||||
this.getHibernateTemplate().delete(tast);
|
this.getHibernateTemplate().delete(tast);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List listtastinfo(String sql) throws Exception {
|
public List listtastinfo(String sql) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
List count = session.createSQLQuery(sql).list();
|
List count = session.createSQLQuery(sql).list();
|
||||||
session.close();
|
session.close();
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete_forjobid(String hql, int jobid) throws Exception {
|
public void delete_forjobid(String hql, int jobid) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session .createQuery(hql);
|
Query query =session .createQuery(hql);
|
||||||
query.setInteger("jobId", jobid);
|
query.setInteger("jobId", jobid);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
|
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* public List<TestTastexcute> getListForPage(final String hql, final int
|
* public List<TestTastexcute> getListForPage(final String hql, final int
|
||||||
* offset, final int lengh) { log.debug("finding ListForPage"); try { List
|
* offset, final int lengh) { log.debug("finding ListForPage"); try { List
|
||||||
* list = getHibernateTemplate().executeFind( new HibernateCallback() {
|
* list = getHibernateTemplate().executeFind( new HibernateCallback() {
|
||||||
* public Object doInHibernate(Session session) throws HibernateException,
|
* public Object doInHibernate(Session session) throws HibernateException,
|
||||||
* SQLException { List list2 = session.createQuery(hql) .setInteger(0, val)
|
* SQLException { List list2 = session.createQuery(hql) .setInteger(0, val)
|
||||||
* .setFirstResult(offset) .setMaxResults(lengh).list(); return list2; } });
|
* .setFirstResult(offset) .setMaxResults(lengh).list(); return list2; } });
|
||||||
* return list; } catch (RuntimeException re) {
|
* return list; } catch (RuntimeException re) {
|
||||||
* log.error("find ListForPage failed", re); throw re; } }
|
* log.error("find ListForPage failed", re); throw re; } }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.UserAuthority;
|
import luckyweb.seagull.spring.entity.UserAuthority;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface UserAuthorityDao {
|
public interface UserAuthorityDao {
|
||||||
|
|
||||||
public UserAuthority load(int id) throws Exception;
|
public UserAuthority load(int id) throws Exception;
|
||||||
public List<UserAuthority> listall() throws Exception;
|
public List<UserAuthority> listall() throws Exception;
|
||||||
public List<Object[]> get(String sql) throws Exception;
|
public List<Object[]> get(String sql) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +1,48 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.UserAuthority;
|
import luckyweb.seagull.spring.entity.UserAuthority;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Repository("userauthorityDao")
|
@Repository("userauthorityDao")
|
||||||
public class UserAuthorityDaoImpl extends HibernateDaoSupport implements UserAuthorityDao{
|
public class UserAuthorityDaoImpl extends HibernateDaoSupport implements UserAuthorityDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserAuthority load(int id) throws Exception {
|
public UserAuthority load(int id) throws Exception {
|
||||||
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
||||||
return (UserAuthority) this.getHibernateTemplate().get(UserAuthority.class, id);
|
return (UserAuthority) this.getHibernateTemplate().get(UserAuthority.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<UserAuthority> listall() throws Exception {
|
public List<UserAuthority> listall() throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return this.getHibernateTemplate().loadAll(UserAuthority.class);
|
return this.getHibernateTemplate().loadAll(UserAuthority.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Object[]> get(String sql) throws Exception {
|
public List<Object[]> get(String sql) throws Exception {
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Object[]> ob = session.createSQLQuery(sql).list();
|
List<Object[]> ob = session.createSQLQuery(sql).list();
|
||||||
session.close();
|
session.close();
|
||||||
return ob;
|
return ob;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.UserInfo;
|
import luckyweb.seagull.spring.entity.UserInfo;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface UserInfoDao {
|
public interface UserInfoDao {
|
||||||
|
|
||||||
public UserInfo load(int id) throws Exception;
|
public UserInfo load(int id) throws Exception;
|
||||||
public int add(UserInfo userinfo) throws Exception;
|
public int add(UserInfo userinfo) throws Exception;
|
||||||
public void modify(UserInfo userinfo) throws Exception;
|
public void modify(UserInfo userinfo) throws Exception;
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
public int get(String sql) throws Exception;
|
public int get(String sql) throws Exception;
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value,final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(UserInfo userinfo,String hql);
|
public int findRows(UserInfo userinfo,String hql);
|
||||||
public int sqlfindRows(String hql);
|
public int sqlfindRows(String hql);
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public List listsql(String sql) throws Exception;
|
public List listsql(String sql) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,155 +1,155 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Review;
|
import luckyweb.seagull.spring.entity.Review;
|
||||||
import luckyweb.seagull.spring.entity.UserInfo;
|
import luckyweb.seagull.spring.entity.UserInfo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Repository("userinfoDao")
|
@Repository("userinfoDao")
|
||||||
public class UserInfoDaoImpl extends HibernateDaoSupport implements UserInfoDao{
|
public class UserInfoDaoImpl extends HibernateDaoSupport implements UserInfoDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserInfo load(int id) throws Exception {
|
public UserInfo load(int id) throws Exception {
|
||||||
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
||||||
return (UserInfo) this.getHibernateTemplate().get(UserInfo.class, id);
|
return (UserInfo) this.getHibernateTemplate().get(UserInfo.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(UserInfo userinfo) throws Exception {
|
public int add(UserInfo userinfo) throws Exception {
|
||||||
this.getHibernateTemplate().save(userinfo);
|
this.getHibernateTemplate().save(userinfo);
|
||||||
return userinfo.getId();
|
return userinfo.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(UserInfo userinfo) throws Exception {
|
public void modify(UserInfo userinfo) throws Exception {
|
||||||
this.getHibernateTemplate().update(userinfo);
|
this.getHibernateTemplate().update(userinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
try{
|
try{
|
||||||
UserInfo userinfo = this.load(id);
|
UserInfo userinfo = this.load(id);
|
||||||
this.getHibernateTemplate().delete(userinfo);
|
this.getHibernateTemplate().delete(userinfo);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int get(String sql) throws Exception {
|
public int get(String sql) throws Exception {
|
||||||
int id = 0;
|
int id = 0;
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Object> count = session.createSQLQuery(sql).list();
|
List<Object> count = session.createSQLQuery(sql).list();
|
||||||
if(count.size()!=0){
|
if(count.size()!=0){
|
||||||
if(count.get(0)!=null){
|
if(count.get(0)!=null){
|
||||||
id = Integer.valueOf(count.get(0).toString());
|
id = Integer.valueOf(count.get(0).toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
session.close();
|
session.close();
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(UserInfo userinfo, Query query) {
|
private void whereParameter(UserInfo userinfo, Query query) {
|
||||||
if (null!=userinfo.getUsercode()&&!"".equals(userinfo.getUsercode())) {
|
if (null!=userinfo.getUsercode()&&!"".equals(userinfo.getUsercode())) {
|
||||||
query.setParameter("usercode", "%"+userinfo.getUsercode()+"%");
|
query.setParameter("usercode", "%"+userinfo.getUsercode()+"%");
|
||||||
}
|
}
|
||||||
if (null!=userinfo.getUsername()&&!"".equals(userinfo.getUsername())) {
|
if (null!=userinfo.getUsername()&&!"".equals(userinfo.getUsername())) {
|
||||||
query.setParameter("username", "%"+userinfo.getUsername()+"%");
|
query.setParameter("username", "%"+userinfo.getUsername()+"%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((UserInfo)value, query);
|
whereParameter((UserInfo)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(UserInfo userinfo, String hql) {
|
public int findRows(UserInfo userinfo, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(userinfo, query);
|
whereParameter(userinfo, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int sqlfindRows(String hql) {
|
public int sqlfindRows(String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
/*Query query=session.createQuery(hql);*/
|
/*Query query=session.createQuery(hql);*/
|
||||||
Query query= session.createSQLQuery(hql);
|
Query query= session.createSQLQuery(hql);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query.list().size());
|
query.list().size());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public List listsql(String sql) throws Exception {
|
public List listsql(String sql) throws Exception {
|
||||||
List count=null;
|
List count=null;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
count = session.createSQLQuery(sql).list();
|
count = session.createSQLQuery(sql).list();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.UserRole;
|
import luckyweb.seagull.spring.entity.UserRole;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface UserRoleDao {
|
public interface UserRoleDao {
|
||||||
|
|
||||||
public UserRole load(int id) throws Exception;
|
public UserRole load(int id) throws Exception;
|
||||||
public List<UserRole> listall() throws Exception;
|
public List<UserRole> listall() throws Exception;
|
||||||
public List<Object[]> get(String sql) throws Exception;
|
public List<Object[]> get(String sql) throws Exception;
|
||||||
public int add(UserRole userrole) throws Exception;
|
public int add(UserRole userrole) throws Exception;
|
||||||
public void modify(UserRole userrole) throws Exception;
|
public void modify(UserRole userrole) throws Exception;
|
||||||
public void delete(int id) throws Exception;
|
public void delete(int id) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,69 +1,69 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.UserInfo;
|
import luckyweb.seagull.spring.entity.UserInfo;
|
||||||
import luckyweb.seagull.spring.entity.UserRole;
|
import luckyweb.seagull.spring.entity.UserRole;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Repository("userroleDao")
|
@Repository("userroleDao")
|
||||||
public class UserRoleDaoImpl extends HibernateDaoSupport implements UserRoleDao{
|
public class UserRoleDaoImpl extends HibernateDaoSupport implements UserRoleDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserRole load(int id) throws Exception {
|
public UserRole load(int id) throws Exception {
|
||||||
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
//return (UserInfo)this.getSession().get(UserInfo.class, id);
|
||||||
return (UserRole) this.getHibernateTemplate().get(UserRole.class, id);
|
return (UserRole) this.getHibernateTemplate().get(UserRole.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<UserRole> listall() throws Exception {
|
public List<UserRole> listall() throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return this.getHibernateTemplate().loadAll(UserRole.class);
|
return this.getHibernateTemplate().loadAll(UserRole.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Object[]> get(String sql) throws Exception {
|
public List<Object[]> get(String sql) throws Exception {
|
||||||
Session session = this.getSession(true);
|
Session session = this.getSession(true);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Object[]> ob = session.createSQLQuery(sql).list();
|
List<Object[]> ob = session.createSQLQuery(sql).list();
|
||||||
session.close();
|
session.close();
|
||||||
return ob;
|
return ob;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(UserRole userrole) throws Exception {
|
public int add(UserRole userrole) throws Exception {
|
||||||
this.getHibernateTemplate().save(userrole);
|
this.getHibernateTemplate().save(userrole);
|
||||||
return userrole.getId();
|
return userrole.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modify(UserRole userrole) throws Exception {
|
public void modify(UserRole userrole) throws Exception {
|
||||||
this.getHibernateTemplate().update(userrole);
|
this.getHibernateTemplate().update(userrole);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int id) throws Exception {
|
public void delete(int id) throws Exception {
|
||||||
try{
|
try{
|
||||||
UserRole userrole = this.load(id);
|
UserRole userrole = this.load(id);
|
||||||
this.getHibernateTemplate().delete(userrole);
|
this.getHibernateTemplate().delete(userrole);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.ZtTask;
|
import luckyweb.seagull.spring.entity.ZtTask;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public interface ZtTaskDao {
|
public interface ZtTaskDao {
|
||||||
|
|
||||||
public ZtTask load(int id) throws Exception;
|
public ZtTask load(int id) throws Exception;
|
||||||
|
|
||||||
public int add(ZtTask zt) throws Exception;
|
public int add(ZtTask zt) throws Exception;
|
||||||
|
|
||||||
public void delete(String hql) throws Exception;
|
public void delete(String hql) throws Exception;
|
||||||
|
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize);
|
||||||
|
|
||||||
public int findRows(ZtTask zt, String hql);
|
public int findRows(ZtTask zt, String hql);
|
||||||
|
|
||||||
public int findRowsreport(String hql);
|
public int findRowsreport(String hql);
|
||||||
|
|
||||||
public List findByPagereport(final String hql,final int offset, final int pageSize);
|
public List findByPagereport(final String hql,final int offset, final int pageSize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,154 +1,154 @@
|
||||||
package luckyweb.seagull.spring.dao;
|
package luckyweb.seagull.spring.dao;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import luckyweb.seagull.spring.entity.Accident;
|
import luckyweb.seagull.spring.entity.Accident;
|
||||||
import luckyweb.seagull.spring.entity.ProjectVersion;
|
import luckyweb.seagull.spring.entity.ProjectVersion;
|
||||||
import luckyweb.seagull.spring.entity.TestJobs;
|
import luckyweb.seagull.spring.entity.TestJobs;
|
||||||
import luckyweb.seagull.spring.entity.ZtTask;
|
import luckyweb.seagull.spring.entity.ZtTask;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Repository("zttaskDao")
|
@Repository("zttaskDao")
|
||||||
public class ZtTaskDaoImpl extends HibernateDaoSupport implements ZtTaskDao{
|
public class ZtTaskDaoImpl extends HibernateDaoSupport implements ZtTaskDao{
|
||||||
|
|
||||||
@Resource(name = "sessionFactory")
|
@Resource(name = "sessionFactory")
|
||||||
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
public void setSuperSessionFactory(SessionFactory sessionFactory) {
|
||||||
super.setSessionFactory(sessionFactory);
|
super.setSessionFactory(sessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ZtTask load(int id) throws Exception {
|
public ZtTask load(int id) throws Exception {
|
||||||
return (ZtTask) this.getHibernateTemplate().get(ZtTask.class, id);
|
return (ZtTask) this.getHibernateTemplate().get(ZtTask.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(ZtTask zt) throws Exception {
|
public int add(ZtTask zt) throws Exception {
|
||||||
this.getHibernateTemplate().save(zt);
|
this.getHibernateTemplate().save(zt);
|
||||||
return zt.getId();
|
return zt.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String sql) throws Exception {
|
public void delete(String sql) throws Exception {
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query query =session.createSQLQuery(sql);
|
Query query =session.createSQLQuery(sql);
|
||||||
query.executeUpdate();
|
query.executeUpdate();
|
||||||
session.getTransaction().commit();
|
session.getTransaction().commit();
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void whereParameter(ZtTask zt, Query query) {
|
private void whereParameter(ZtTask zt, Query query) {
|
||||||
if (zt.getVersionid()!=0) {
|
if (zt.getVersionid()!=0) {
|
||||||
query.setParameter("versionid", zt.getVersionid());
|
query.setParameter("versionid", zt.getVersionid());
|
||||||
}
|
}
|
||||||
if (zt.getDelaystatus()!=0&&!"".equals(zt.getDelaystatus())) {
|
if (zt.getDelaystatus()!=0&&!"".equals(zt.getDelaystatus())) {
|
||||||
query.setParameter("delaystatus", zt.getDelaystatus());
|
query.setParameter("delaystatus", zt.getDelaystatus());
|
||||||
}
|
}
|
||||||
if (zt.getVersionname()!=null&&!"".equals(zt.getVersionname())) {
|
if (zt.getVersionname()!=null&&!"".equals(zt.getVersionname())) {
|
||||||
query.setParameter("versionname", "%"+zt.getVersionname()+"%");
|
query.setParameter("versionname", "%"+zt.getVersionname()+"%");
|
||||||
}
|
}
|
||||||
if (zt.getFinishedname()!=null&&!"".equals(zt.getFinishedname())) {
|
if (zt.getFinishedname()!=null&&!"".equals(zt.getFinishedname())) {
|
||||||
query.setParameter("finishedname", "%"+zt.getFinishedname()+"%");
|
query.setParameter("finishedname", "%"+zt.getFinishedname()+"%");
|
||||||
}
|
}
|
||||||
if (zt.getAssstartDate()!=null&&!"".equals(zt.getAssstartDate())) {
|
if (zt.getAssstartDate()!=null&&!"".equals(zt.getAssstartDate())) {
|
||||||
query.setParameter("assstartDate", zt.getAssstartDate()+" 00:00:00.0");
|
query.setParameter("assstartDate", zt.getAssstartDate()+" 00:00:00.0");
|
||||||
}
|
}
|
||||||
if (zt.getAssendDate()!=null&&!"".equals(zt.getAssendDate())) {
|
if (zt.getAssendDate()!=null&&!"".equals(zt.getAssendDate())) {
|
||||||
query.setParameter("assendDate", zt.getAssendDate()+" 24:59:59.59");
|
query.setParameter("assendDate", zt.getAssendDate()+" 24:59:59.59");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
public List findByPage(final String hql, final Object value, final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
Query query= session.createQuery(hql);
|
Query query= session.createQuery(hql);
|
||||||
whereParameter((ZtTask)value, query);
|
whereParameter((ZtTask)value, query);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRows(ZtTask zt, String hql) {
|
public int findRows(ZtTask zt, String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
Query query=session.createQuery(hql);
|
Query query=session.createQuery(hql);
|
||||||
whereParameter(zt, query);
|
whereParameter(zt, query);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query
|
query
|
||||||
.list().get(0)
|
.list().get(0)
|
||||||
.toString());
|
.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int findRowsreport(String hql) {
|
public int findRowsreport(String hql) {
|
||||||
int s=0;
|
int s=0;
|
||||||
Session session=this.getSession(true);
|
Session session=this.getSession(true);
|
||||||
try {
|
try {
|
||||||
/*Query query=session.createQuery(hql);*/
|
/*Query query=session.createQuery(hql);*/
|
||||||
Query query= session.createSQLQuery(hql);
|
Query query= session.createSQLQuery(hql);
|
||||||
s= Integer.valueOf(
|
s= Integer.valueOf(
|
||||||
query.list().size());
|
query.list().size());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List findByPagereport(final String hql,final int offset, final int pageSize) {
|
public List findByPagereport(final String hql,final int offset, final int pageSize) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
// 通过一个HibernateCallback 对象来执行查询
|
// 通过一个HibernateCallback 对象来执行查询
|
||||||
//System.out.println(hql);
|
//System.out.println(hql);
|
||||||
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
|
||||||
// 实现hibernateCallback接口必须实现的方法
|
// 实现hibernateCallback接口必须实现的方法
|
||||||
|
|
||||||
public Object doInHibernate(Session session)
|
public Object doInHibernate(Session session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
// 执行hibernate 分页查询
|
// 执行hibernate 分页查询
|
||||||
//Query query= session.createQuery(hql);
|
//Query query= session.createQuery(hql);
|
||||||
Query query= session.createSQLQuery(hql);
|
Query query= session.createSQLQuery(hql);
|
||||||
List result =query
|
List result =query
|
||||||
.setFirstResult(offset).setMaxResults(pageSize).list();
|
.setFirstResult(offset).setMaxResults(pageSize).list();
|
||||||
session.close();
|
session.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,198 +1,198 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="accident")
|
@Entity(name="accident")
|
||||||
public class Accident implements java.io.Serializable{
|
public class Accident implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private int projectid;
|
private int projectid;
|
||||||
private String accstatus;
|
private String accstatus;
|
||||||
private String eventtime;
|
private String eventtime;
|
||||||
private String reporter;
|
private String reporter;
|
||||||
private String reporttime;
|
private String reporttime;
|
||||||
private String accdescription;
|
private String accdescription;
|
||||||
private String acclevel;
|
private String acclevel;
|
||||||
private String causalanalysis;
|
private String causalanalysis;
|
||||||
private String causaltype;
|
private String causaltype;
|
||||||
private String consequenceanalysis;
|
private String consequenceanalysis;
|
||||||
private SectorProjects sectorProjects;
|
private SectorProjects sectorProjects;
|
||||||
private String correctiveaction;
|
private String correctiveaction;
|
||||||
private String resolutiontime;
|
private String resolutiontime;
|
||||||
private String resolutioner;
|
private String resolutioner;
|
||||||
private String preventiveaction;
|
private String preventiveaction;
|
||||||
private String preventiver;
|
private String preventiver;
|
||||||
private String preventiveplandate;
|
private String preventiveplandate;
|
||||||
private String preventiveaccdate;
|
private String preventiveaccdate;
|
||||||
private String accstarttime;
|
private String accstarttime;
|
||||||
private String accendtime;
|
private String accendtime;
|
||||||
private Long trouble_duration;
|
private Long trouble_duration;
|
||||||
private Long impact_time;
|
private Long impact_time;
|
||||||
private String strtrouble_duration;
|
private String strtrouble_duration;
|
||||||
private String strimpact_time;
|
private String strimpact_time;
|
||||||
private String filename;
|
private String filename;
|
||||||
|
|
||||||
public String getFilename() {
|
public String getFilename() {
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
public void setFilename(String filename) {
|
public void setFilename(String filename) {
|
||||||
this.filename = filename;
|
this.filename = filename;
|
||||||
}
|
}
|
||||||
public String getStrtrouble_duration() {
|
public String getStrtrouble_duration() {
|
||||||
return strtrouble_duration;
|
return strtrouble_duration;
|
||||||
}
|
}
|
||||||
public void setStrtrouble_duration(String strtrouble_duration) {
|
public void setStrtrouble_duration(String strtrouble_duration) {
|
||||||
this.strtrouble_duration = strtrouble_duration;
|
this.strtrouble_duration = strtrouble_duration;
|
||||||
}
|
}
|
||||||
public String getStrimpact_time() {
|
public String getStrimpact_time() {
|
||||||
return strimpact_time;
|
return strimpact_time;
|
||||||
}
|
}
|
||||||
public void setStrimpact_time(String strimpact_time) {
|
public void setStrimpact_time(String strimpact_time) {
|
||||||
this.strimpact_time = strimpact_time;
|
this.strimpact_time = strimpact_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getTrouble_duration() {
|
public Long getTrouble_duration() {
|
||||||
return trouble_duration;
|
return trouble_duration;
|
||||||
}
|
}
|
||||||
public void setTrouble_duration(Long trouble_duration) {
|
public void setTrouble_duration(Long trouble_duration) {
|
||||||
this.trouble_duration = trouble_duration;
|
this.trouble_duration = trouble_duration;
|
||||||
}
|
}
|
||||||
public Long getImpact_time() {
|
public Long getImpact_time() {
|
||||||
return impact_time;
|
return impact_time;
|
||||||
}
|
}
|
||||||
public void setImpact_time(Long impact_time) {
|
public void setImpact_time(Long impact_time) {
|
||||||
this.impact_time = impact_time;
|
this.impact_time = impact_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAccstarttime() {
|
public String getAccstarttime() {
|
||||||
return accstarttime;
|
return accstarttime;
|
||||||
}
|
}
|
||||||
public void setAccstarttime(String accstarttime) {
|
public void setAccstarttime(String accstarttime) {
|
||||||
this.accstarttime = accstarttime;
|
this.accstarttime = accstarttime;
|
||||||
}
|
}
|
||||||
public String getAccendtime() {
|
public String getAccendtime() {
|
||||||
return accendtime;
|
return accendtime;
|
||||||
}
|
}
|
||||||
public void setAccendtime(String accendtime) {
|
public void setAccendtime(String accendtime) {
|
||||||
this.accendtime = accendtime;
|
this.accendtime = accendtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public int getProjectid() {
|
public int getProjectid() {
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
public void setProjectid(int projectid) {
|
public void setProjectid(int projectid) {
|
||||||
this.projectid = projectid;
|
this.projectid = projectid;
|
||||||
}
|
}
|
||||||
public String getAccstatus() {
|
public String getAccstatus() {
|
||||||
return accstatus;
|
return accstatus;
|
||||||
}
|
}
|
||||||
public void setAccstatus(String accstatus) {
|
public void setAccstatus(String accstatus) {
|
||||||
this.accstatus = accstatus;
|
this.accstatus = accstatus;
|
||||||
}
|
}
|
||||||
public String getEventtime() {
|
public String getEventtime() {
|
||||||
return eventtime;
|
return eventtime;
|
||||||
}
|
}
|
||||||
public void setEventtime(String eventtime) {
|
public void setEventtime(String eventtime) {
|
||||||
this.eventtime = eventtime;
|
this.eventtime = eventtime;
|
||||||
}
|
}
|
||||||
public String getReporter() {
|
public String getReporter() {
|
||||||
return reporter;
|
return reporter;
|
||||||
}
|
}
|
||||||
public void setReporter(String reporter) {
|
public void setReporter(String reporter) {
|
||||||
this.reporter = reporter;
|
this.reporter = reporter;
|
||||||
}
|
}
|
||||||
public String getReporttime() {
|
public String getReporttime() {
|
||||||
return reporttime;
|
return reporttime;
|
||||||
}
|
}
|
||||||
public void setReporttime(String reporttime) {
|
public void setReporttime(String reporttime) {
|
||||||
this.reporttime = reporttime;
|
this.reporttime = reporttime;
|
||||||
}
|
}
|
||||||
public String getAccdescription() {
|
public String getAccdescription() {
|
||||||
return accdescription;
|
return accdescription;
|
||||||
}
|
}
|
||||||
public void setAccdescription(String accdescription) {
|
public void setAccdescription(String accdescription) {
|
||||||
this.accdescription = accdescription;
|
this.accdescription = accdescription;
|
||||||
}
|
}
|
||||||
public String getAcclevel() {
|
public String getAcclevel() {
|
||||||
return acclevel;
|
return acclevel;
|
||||||
}
|
}
|
||||||
public void setAcclevel(String acclevel) {
|
public void setAcclevel(String acclevel) {
|
||||||
this.acclevel = acclevel;
|
this.acclevel = acclevel;
|
||||||
}
|
}
|
||||||
public String getCausalanalysis() {
|
public String getCausalanalysis() {
|
||||||
return causalanalysis;
|
return causalanalysis;
|
||||||
}
|
}
|
||||||
public void setCausalanalysis(String causalanalysis) {
|
public void setCausalanalysis(String causalanalysis) {
|
||||||
this.causalanalysis = causalanalysis;
|
this.causalanalysis = causalanalysis;
|
||||||
}
|
}
|
||||||
public String getCausaltype() {
|
public String getCausaltype() {
|
||||||
return causaltype;
|
return causaltype;
|
||||||
}
|
}
|
||||||
public void setCausaltype(String causaltype) {
|
public void setCausaltype(String causaltype) {
|
||||||
this.causaltype = causaltype;
|
this.causaltype = causaltype;
|
||||||
}
|
}
|
||||||
public String getConsequenceanalysis() {
|
public String getConsequenceanalysis() {
|
||||||
return consequenceanalysis;
|
return consequenceanalysis;
|
||||||
}
|
}
|
||||||
public void setConsequenceanalysis(String consequenceanalysis) {
|
public void setConsequenceanalysis(String consequenceanalysis) {
|
||||||
this.consequenceanalysis = consequenceanalysis;
|
this.consequenceanalysis = consequenceanalysis;
|
||||||
}
|
}
|
||||||
public SectorProjects getSectorProjects() {
|
public SectorProjects getSectorProjects() {
|
||||||
return sectorProjects;
|
return sectorProjects;
|
||||||
}
|
}
|
||||||
public void setSectorProjects(SectorProjects sectorProjects) {
|
public void setSectorProjects(SectorProjects sectorProjects) {
|
||||||
this.sectorProjects = sectorProjects;
|
this.sectorProjects = sectorProjects;
|
||||||
}
|
}
|
||||||
public String getCorrectiveaction() {
|
public String getCorrectiveaction() {
|
||||||
return correctiveaction;
|
return correctiveaction;
|
||||||
}
|
}
|
||||||
public void setCorrectiveaction(String correctiveaction) {
|
public void setCorrectiveaction(String correctiveaction) {
|
||||||
this.correctiveaction = correctiveaction;
|
this.correctiveaction = correctiveaction;
|
||||||
}
|
}
|
||||||
public String getResolutiontime() {
|
public String getResolutiontime() {
|
||||||
return resolutiontime;
|
return resolutiontime;
|
||||||
}
|
}
|
||||||
public void setResolutiontime(String resolutiontime) {
|
public void setResolutiontime(String resolutiontime) {
|
||||||
this.resolutiontime = resolutiontime;
|
this.resolutiontime = resolutiontime;
|
||||||
}
|
}
|
||||||
public String getResolutioner() {
|
public String getResolutioner() {
|
||||||
return resolutioner;
|
return resolutioner;
|
||||||
}
|
}
|
||||||
public void setResolutioner(String resolutioner) {
|
public void setResolutioner(String resolutioner) {
|
||||||
this.resolutioner = resolutioner;
|
this.resolutioner = resolutioner;
|
||||||
}
|
}
|
||||||
public String getPreventiveaction() {
|
public String getPreventiveaction() {
|
||||||
return preventiveaction;
|
return preventiveaction;
|
||||||
}
|
}
|
||||||
public void setPreventiveaction(String preventiveaction) {
|
public void setPreventiveaction(String preventiveaction) {
|
||||||
this.preventiveaction = preventiveaction;
|
this.preventiveaction = preventiveaction;
|
||||||
}
|
}
|
||||||
public String getPreventiver() {
|
public String getPreventiver() {
|
||||||
return preventiver;
|
return preventiver;
|
||||||
}
|
}
|
||||||
public void setPreventiver(String preventiver) {
|
public void setPreventiver(String preventiver) {
|
||||||
this.preventiver = preventiver;
|
this.preventiver = preventiver;
|
||||||
}
|
}
|
||||||
public String getPreventiveplandate() {
|
public String getPreventiveplandate() {
|
||||||
return preventiveplandate;
|
return preventiveplandate;
|
||||||
}
|
}
|
||||||
public void setPreventiveplandate(String preventiveplandate) {
|
public void setPreventiveplandate(String preventiveplandate) {
|
||||||
this.preventiveplandate = preventiveplandate;
|
this.preventiveplandate = preventiveplandate;
|
||||||
}
|
}
|
||||||
public String getPreventiveaccdate() {
|
public String getPreventiveaccdate() {
|
||||||
return preventiveaccdate;
|
return preventiveaccdate;
|
||||||
}
|
}
|
||||||
public void setPreventiveaccdate(String preventiveaccdate) {
|
public void setPreventiveaccdate(String preventiveaccdate) {
|
||||||
this.preventiveaccdate = preventiveaccdate;
|
this.preventiveaccdate = preventiveaccdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="barchart3")
|
@Entity(name="barchart3")
|
||||||
public class Barchart3 implements java.io.Serializable{
|
public class Barchart3 implements java.io.Serializable{
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private String type;
|
private String type;
|
||||||
private Map markPoint;
|
private Map markPoint;
|
||||||
private Map markLine;
|
private Map markLine;
|
||||||
private String name;
|
private String name;
|
||||||
private double[] data;
|
private double[] data;
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
public double[] getData() {
|
public double[] getData() {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
public void setData(double[] data) {
|
public void setData(double[] data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
public void setType(String type) {
|
public void setType(String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
public Map getMarkPoint() {
|
public Map getMarkPoint() {
|
||||||
return markPoint;
|
return markPoint;
|
||||||
}
|
}
|
||||||
public void setMarkPoint(Map markPoint) {
|
public void setMarkPoint(Map markPoint) {
|
||||||
this.markPoint = markPoint;
|
this.markPoint = markPoint;
|
||||||
}
|
}
|
||||||
public Map getMarkLine() {
|
public Map getMarkLine() {
|
||||||
return markLine;
|
return markLine;
|
||||||
}
|
}
|
||||||
public void setMarkLine(Map markLine) {
|
public void setMarkLine(Map markLine) {
|
||||||
this.markLine = markLine;
|
this.markLine = markLine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,47 +1,47 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="barchart3")
|
@Entity(name="barchart3")
|
||||||
public class Barchart4 implements java.io.Serializable{
|
public class Barchart4 implements java.io.Serializable{
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private String type;
|
private String type;
|
||||||
private String stack;
|
private String stack;
|
||||||
private Map itemStyle;
|
private Map itemStyle;
|
||||||
private String name;
|
private String name;
|
||||||
private double[] data;
|
private double[] data;
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
public void setType(String type) {
|
public void setType(String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
public String getStack() {
|
public String getStack() {
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
public void setStack(String stack) {
|
public void setStack(String stack) {
|
||||||
this.stack = stack;
|
this.stack = stack;
|
||||||
}
|
}
|
||||||
public Map getItemStyle() {
|
public Map getItemStyle() {
|
||||||
return itemStyle;
|
return itemStyle;
|
||||||
}
|
}
|
||||||
public void setItemStyle(Map itemStyle) {
|
public void setItemStyle(Map itemStyle) {
|
||||||
this.itemStyle = itemStyle;
|
this.itemStyle = itemStyle;
|
||||||
}
|
}
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
public double[] getData() {
|
public double[] getData() {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
public void setData(double[] data) {
|
public void setData(double[] data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,126 +1,126 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="flowCheck")
|
@Entity(name="flowCheck")
|
||||||
public class FlowCheck implements java.io.Serializable{
|
public class FlowCheck implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private int checkid;
|
private int checkid;
|
||||||
private int projectid;
|
private int projectid;
|
||||||
private String projectphase;
|
private String projectphase;
|
||||||
private String phasenode;
|
private String phasenode;
|
||||||
private String checkentry;
|
private String checkentry;
|
||||||
private String checkresult;
|
private String checkresult;
|
||||||
private String checkdate;
|
private String checkdate;
|
||||||
private String checkdescriptions;
|
private String checkdescriptions;
|
||||||
private String stateupdate;
|
private String stateupdate;
|
||||||
private String updatedate;
|
private String updatedate;
|
||||||
private String remark;
|
private String remark;
|
||||||
private SectorProjects sectorProjects;
|
private SectorProjects sectorProjects;
|
||||||
private String checkstartdate;
|
private String checkstartdate;
|
||||||
private String checkenddate;
|
private String checkenddate;
|
||||||
private String versionnum;
|
private String versionnum;
|
||||||
|
|
||||||
public String getVersionnum() {
|
public String getVersionnum() {
|
||||||
return versionnum;
|
return versionnum;
|
||||||
}
|
}
|
||||||
public void setVersionnum(String versionnum) {
|
public void setVersionnum(String versionnum) {
|
||||||
this.versionnum = versionnum;
|
this.versionnum = versionnum;
|
||||||
}
|
}
|
||||||
public String getCheckstartdate() {
|
public String getCheckstartdate() {
|
||||||
return checkstartdate;
|
return checkstartdate;
|
||||||
}
|
}
|
||||||
public void setCheckstartdate(String checkstartdate) {
|
public void setCheckstartdate(String checkstartdate) {
|
||||||
this.checkstartdate = checkstartdate;
|
this.checkstartdate = checkstartdate;
|
||||||
}
|
}
|
||||||
public String getCheckenddate() {
|
public String getCheckenddate() {
|
||||||
return checkenddate;
|
return checkenddate;
|
||||||
}
|
}
|
||||||
public void setCheckenddate(String checkenddate) {
|
public void setCheckenddate(String checkenddate) {
|
||||||
this.checkenddate = checkenddate;
|
this.checkenddate = checkenddate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public int getCheckid() {
|
public int getCheckid() {
|
||||||
return checkid;
|
return checkid;
|
||||||
}
|
}
|
||||||
public void setCheckid(int checkid) {
|
public void setCheckid(int checkid) {
|
||||||
this.checkid = checkid;
|
this.checkid = checkid;
|
||||||
}
|
}
|
||||||
public int getProjectid() {
|
public int getProjectid() {
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
public void setProjectid(int projectid) {
|
public void setProjectid(int projectid) {
|
||||||
this.projectid = projectid;
|
this.projectid = projectid;
|
||||||
}
|
}
|
||||||
public String getProjectphase() {
|
public String getProjectphase() {
|
||||||
return projectphase;
|
return projectphase;
|
||||||
}
|
}
|
||||||
public void setProjectphase(String projectphase) {
|
public void setProjectphase(String projectphase) {
|
||||||
this.projectphase = projectphase;
|
this.projectphase = projectphase;
|
||||||
}
|
}
|
||||||
public String getPhasenode() {
|
public String getPhasenode() {
|
||||||
return phasenode;
|
return phasenode;
|
||||||
}
|
}
|
||||||
public void setPhasenode(String phasenode) {
|
public void setPhasenode(String phasenode) {
|
||||||
this.phasenode = phasenode;
|
this.phasenode = phasenode;
|
||||||
}
|
}
|
||||||
public String getCheckentry() {
|
public String getCheckentry() {
|
||||||
return checkentry;
|
return checkentry;
|
||||||
}
|
}
|
||||||
public void setCheckentry(String checkentry) {
|
public void setCheckentry(String checkentry) {
|
||||||
this.checkentry = checkentry;
|
this.checkentry = checkentry;
|
||||||
}
|
}
|
||||||
public String getCheckresult() {
|
public String getCheckresult() {
|
||||||
return checkresult;
|
return checkresult;
|
||||||
}
|
}
|
||||||
public void setCheckresult(String checkresult) {
|
public void setCheckresult(String checkresult) {
|
||||||
this.checkresult = checkresult;
|
this.checkresult = checkresult;
|
||||||
}
|
}
|
||||||
public String getCheckdate() {
|
public String getCheckdate() {
|
||||||
return checkdate;
|
return checkdate;
|
||||||
}
|
}
|
||||||
public void setCheckdate(String checkdate) {
|
public void setCheckdate(String checkdate) {
|
||||||
this.checkdate = checkdate;
|
this.checkdate = checkdate;
|
||||||
}
|
}
|
||||||
public String getCheckdescriptions() {
|
public String getCheckdescriptions() {
|
||||||
return checkdescriptions;
|
return checkdescriptions;
|
||||||
}
|
}
|
||||||
public void setCheckdescriptions(String checkdescriptions) {
|
public void setCheckdescriptions(String checkdescriptions) {
|
||||||
this.checkdescriptions = checkdescriptions;
|
this.checkdescriptions = checkdescriptions;
|
||||||
}
|
}
|
||||||
public String getStateupdate() {
|
public String getStateupdate() {
|
||||||
return stateupdate;
|
return stateupdate;
|
||||||
}
|
}
|
||||||
public void setStateupdate(String stateupdate) {
|
public void setStateupdate(String stateupdate) {
|
||||||
this.stateupdate = stateupdate;
|
this.stateupdate = stateupdate;
|
||||||
}
|
}
|
||||||
public String getUpdatedate() {
|
public String getUpdatedate() {
|
||||||
return updatedate;
|
return updatedate;
|
||||||
}
|
}
|
||||||
public void setUpdatedate(String updatedate) {
|
public void setUpdatedate(String updatedate) {
|
||||||
this.updatedate = updatedate;
|
this.updatedate = updatedate;
|
||||||
}
|
}
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
return remark;
|
return remark;
|
||||||
}
|
}
|
||||||
public void setRemark(String remark) {
|
public void setRemark(String remark) {
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
public SectorProjects getSectorProjects() {
|
public SectorProjects getSectorProjects() {
|
||||||
return sectorProjects;
|
return sectorProjects;
|
||||||
}
|
}
|
||||||
public void setSectorProjects(SectorProjects sectorProjects) {
|
public void setSectorProjects(SectorProjects sectorProjects) {
|
||||||
this.sectorProjects = sectorProjects;
|
this.sectorProjects = sectorProjects;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,70 +1,70 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="flowInfo")
|
@Entity(name="flowInfo")
|
||||||
public class FlowInfo implements java.io.Serializable{
|
public class FlowInfo implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private int phaseid;
|
private int phaseid;
|
||||||
private String phasename;
|
private String phasename;
|
||||||
private int phasenodeid;
|
private int phasenodeid;
|
||||||
private String phasenodename;
|
private String phasenodename;
|
||||||
private int checkentryid;
|
private int checkentryid;
|
||||||
private String checkentry;
|
private String checkentry;
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public int getPhaseid() {
|
public int getPhaseid() {
|
||||||
return phaseid;
|
return phaseid;
|
||||||
}
|
}
|
||||||
public void setPhaseid(int phaseid) {
|
public void setPhaseid(int phaseid) {
|
||||||
this.phaseid = phaseid;
|
this.phaseid = phaseid;
|
||||||
}
|
}
|
||||||
public String getPhasename() {
|
public String getPhasename() {
|
||||||
return phasename;
|
return phasename;
|
||||||
}
|
}
|
||||||
public void setPhasename(String phasename) {
|
public void setPhasename(String phasename) {
|
||||||
this.phasename = phasename;
|
this.phasename = phasename;
|
||||||
}
|
}
|
||||||
public int getPhasenodeid() {
|
public int getPhasenodeid() {
|
||||||
return phasenodeid;
|
return phasenodeid;
|
||||||
}
|
}
|
||||||
public void setPhasenodeid(int phasenodeid) {
|
public void setPhasenodeid(int phasenodeid) {
|
||||||
this.phasenodeid = phasenodeid;
|
this.phasenodeid = phasenodeid;
|
||||||
}
|
}
|
||||||
public String getPhasenodename() {
|
public String getPhasenodename() {
|
||||||
return phasenodename;
|
return phasenodename;
|
||||||
}
|
}
|
||||||
public void setPhasenodename(String phasenodename) {
|
public void setPhasenodename(String phasenodename) {
|
||||||
this.phasenodename = phasenodename;
|
this.phasenodename = phasenodename;
|
||||||
}
|
}
|
||||||
public int getCheckentryid() {
|
public int getCheckentryid() {
|
||||||
return checkentryid;
|
return checkentryid;
|
||||||
}
|
}
|
||||||
public void setCheckentryid(int checkentryid) {
|
public void setCheckentryid(int checkentryid) {
|
||||||
this.checkentryid = checkentryid;
|
this.checkentryid = checkentryid;
|
||||||
}
|
}
|
||||||
public String getCheckentry() {
|
public String getCheckentry() {
|
||||||
return checkentry;
|
return checkentry;
|
||||||
}
|
}
|
||||||
public void setCheckentry(String checkentry) {
|
public void setCheckentry(String checkentry) {
|
||||||
this.checkentry = checkentry;
|
this.checkentry = checkentry;
|
||||||
}
|
}
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
return remark;
|
return remark;
|
||||||
}
|
}
|
||||||
public void setRemark(String remark) {
|
public void setRemark(String remark) {
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,85 +1,85 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="operationLog")
|
@Entity(name="operationLog")
|
||||||
public class OperationLog implements java.io.Serializable{
|
public class OperationLog implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id = 0;
|
private int id = 0;
|
||||||
private String tablename;
|
private String tablename;
|
||||||
private int tableid;
|
private int tableid;
|
||||||
private int projectid;
|
private int projectid;
|
||||||
private String operation_time;
|
private String operation_time;
|
||||||
private String operationer;
|
private String operationer;
|
||||||
private String operation_description;
|
private String operation_description;
|
||||||
private String starttime;
|
private String starttime;
|
||||||
private String endtime;
|
private String endtime;
|
||||||
private SectorProjects sectorProjects;
|
private SectorProjects sectorProjects;
|
||||||
|
|
||||||
public SectorProjects getSectorProjects() {
|
public SectorProjects getSectorProjects() {
|
||||||
return sectorProjects;
|
return sectorProjects;
|
||||||
}
|
}
|
||||||
public void setSectorProjects(SectorProjects sectorProjects) {
|
public void setSectorProjects(SectorProjects sectorProjects) {
|
||||||
this.sectorProjects = sectorProjects;
|
this.sectorProjects = sectorProjects;
|
||||||
}
|
}
|
||||||
public String getStarttime() {
|
public String getStarttime() {
|
||||||
return starttime;
|
return starttime;
|
||||||
}
|
}
|
||||||
public void setStarttime(String starttime) {
|
public void setStarttime(String starttime) {
|
||||||
this.starttime = starttime;
|
this.starttime = starttime;
|
||||||
}
|
}
|
||||||
public String getEndtime() {
|
public String getEndtime() {
|
||||||
return endtime;
|
return endtime;
|
||||||
}
|
}
|
||||||
public void setEndtime(String endtime) {
|
public void setEndtime(String endtime) {
|
||||||
this.endtime = endtime;
|
this.endtime = endtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getProjectid() {
|
public int getProjectid() {
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
public void setProjectid(int projectid) {
|
public void setProjectid(int projectid) {
|
||||||
this.projectid = projectid;
|
this.projectid = projectid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public String getTablename() {
|
public String getTablename() {
|
||||||
return tablename;
|
return tablename;
|
||||||
}
|
}
|
||||||
public void setTablename(String tablename) {
|
public void setTablename(String tablename) {
|
||||||
this.tablename = tablename;
|
this.tablename = tablename;
|
||||||
}
|
}
|
||||||
public int getTableid() {
|
public int getTableid() {
|
||||||
return tableid;
|
return tableid;
|
||||||
}
|
}
|
||||||
public void setTableid(int tableid) {
|
public void setTableid(int tableid) {
|
||||||
this.tableid = tableid;
|
this.tableid = tableid;
|
||||||
}
|
}
|
||||||
public String getOperation_time() {
|
public String getOperation_time() {
|
||||||
return operation_time;
|
return operation_time;
|
||||||
}
|
}
|
||||||
public void setOperation_time(String operation_time) {
|
public void setOperation_time(String operation_time) {
|
||||||
this.operation_time = operation_time;
|
this.operation_time = operation_time;
|
||||||
}
|
}
|
||||||
public String getOperationer() {
|
public String getOperationer() {
|
||||||
return operationer;
|
return operationer;
|
||||||
}
|
}
|
||||||
public void setOperationer(String operationer) {
|
public void setOperationer(String operationer) {
|
||||||
this.operationer = operationer;
|
this.operationer = operationer;
|
||||||
}
|
}
|
||||||
public String getOperation_description() {
|
public String getOperation_description() {
|
||||||
return operation_description;
|
return operation_description;
|
||||||
}
|
}
|
||||||
public void setOperation_description(String operation_description) {
|
public void setOperation_description(String operation_description) {
|
||||||
this.operation_description = operation_description;
|
this.operation_description = operation_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="pielasagna")
|
@Entity(name="pielasagna")
|
||||||
public class PieLasagna implements java.io.Serializable{
|
public class PieLasagna implements java.io.Serializable{
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private String name;
|
private String name;
|
||||||
private double value;
|
private double value;
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
public double getValue() {
|
public double getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
public void setValue(double value) {
|
public void setValue(double value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="barchart3")
|
@Entity(name="barchart3")
|
||||||
public class Piechart5 implements java.io.Serializable{
|
public class Piechart5 implements java.io.Serializable{
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private String type;
|
private String type;
|
||||||
private String center[];
|
private String center[];
|
||||||
private String radius;
|
private String radius;
|
||||||
private String x;
|
private String x;
|
||||||
private String itemStyle;
|
private String itemStyle;
|
||||||
private Map markPoint;
|
private Map markPoint;
|
||||||
private Map markLine;
|
private Map markLine;
|
||||||
private String name;
|
private String name;
|
||||||
private double[] data;
|
private double[] data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,77 +1,77 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="planflowCheck")
|
@Entity(name="planflowCheck")
|
||||||
public class PlanFlowCheck implements java.io.Serializable{
|
public class PlanFlowCheck implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private int projectid;
|
private int projectid;
|
||||||
private String versionnum;
|
private String versionnum;
|
||||||
private String checkentryid;
|
private String checkentryid;
|
||||||
private String plandate;
|
private String plandate;
|
||||||
private int status;
|
private int status;
|
||||||
private String checkphase;
|
private String checkphase;
|
||||||
private String checknode;
|
private String checknode;
|
||||||
|
|
||||||
public String getCheckphase() {
|
public String getCheckphase() {
|
||||||
return checkphase;
|
return checkphase;
|
||||||
}
|
}
|
||||||
public void setCheckphase(String checkphase) {
|
public void setCheckphase(String checkphase) {
|
||||||
this.checkphase = checkphase;
|
this.checkphase = checkphase;
|
||||||
}
|
}
|
||||||
public String getChecknode() {
|
public String getChecknode() {
|
||||||
return checknode;
|
return checknode;
|
||||||
}
|
}
|
||||||
public void setChecknode(String checknode) {
|
public void setChecknode(String checknode) {
|
||||||
this.checknode = checknode;
|
this.checknode = checknode;
|
||||||
}
|
}
|
||||||
private SectorProjects sectorProjects;
|
private SectorProjects sectorProjects;
|
||||||
|
|
||||||
public SectorProjects getSectorProjects() {
|
public SectorProjects getSectorProjects() {
|
||||||
return sectorProjects;
|
return sectorProjects;
|
||||||
}
|
}
|
||||||
public void setSectorProjects(SectorProjects sectorProjects) {
|
public void setSectorProjects(SectorProjects sectorProjects) {
|
||||||
this.sectorProjects = sectorProjects;
|
this.sectorProjects = sectorProjects;
|
||||||
}
|
}
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public int getProjectid() {
|
public int getProjectid() {
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
public void setProjectid(int projectid) {
|
public void setProjectid(int projectid) {
|
||||||
this.projectid = projectid;
|
this.projectid = projectid;
|
||||||
}
|
}
|
||||||
public String getVersionnum() {
|
public String getVersionnum() {
|
||||||
return versionnum;
|
return versionnum;
|
||||||
}
|
}
|
||||||
public void setVersionnum(String versionnum) {
|
public void setVersionnum(String versionnum) {
|
||||||
this.versionnum = versionnum;
|
this.versionnum = versionnum;
|
||||||
}
|
}
|
||||||
public String getCheckentryid() {
|
public String getCheckentryid() {
|
||||||
return checkentryid;
|
return checkentryid;
|
||||||
}
|
}
|
||||||
public void setCheckentryid(String checkentryid) {
|
public void setCheckentryid(String checkentryid) {
|
||||||
this.checkentryid = checkentryid;
|
this.checkentryid = checkentryid;
|
||||||
}
|
}
|
||||||
public String getPlandate() {
|
public String getPlandate() {
|
||||||
return plandate;
|
return plandate;
|
||||||
}
|
}
|
||||||
public void setPlandate(String plandate) {
|
public void setPlandate(String plandate) {
|
||||||
this.plandate = plandate;
|
this.plandate = plandate;
|
||||||
}
|
}
|
||||||
public int getStatus() {
|
public int getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
public void setStatus(int status) {
|
public void setStatus(int status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,120 +1,120 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="projectCase")
|
@Entity(name="projectCase")
|
||||||
public class ProjectCase implements java.io.Serializable{
|
public class ProjectCase implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private String sign;
|
private String sign;
|
||||||
private String name;
|
private String name;
|
||||||
private int projectid;
|
private int projectid;
|
||||||
private int moduleid;
|
private int moduleid;
|
||||||
private Integer[] moduleidarr;
|
private Integer[] moduleidarr;
|
||||||
private String modulename;
|
private String modulename;
|
||||||
private int projectindex;
|
private int projectindex;
|
||||||
private String projectname;
|
private String projectname;
|
||||||
private String remark;
|
private String remark;
|
||||||
private int casetype;
|
private int casetype;
|
||||||
private String time;
|
private String time;
|
||||||
private String operationer;
|
private String operationer;
|
||||||
private int priority;
|
private int priority;
|
||||||
private int checktype;
|
private int checktype;
|
||||||
|
|
||||||
|
|
||||||
public Integer[] getModuleidarr() {
|
public Integer[] getModuleidarr() {
|
||||||
return moduleidarr;
|
return moduleidarr;
|
||||||
}
|
}
|
||||||
public void setModuleidarr(Integer[] moduleidarr) {
|
public void setModuleidarr(Integer[] moduleidarr) {
|
||||||
this.moduleidarr = moduleidarr;
|
this.moduleidarr = moduleidarr;
|
||||||
}
|
}
|
||||||
public String getModulename() {
|
public String getModulename() {
|
||||||
return modulename;
|
return modulename;
|
||||||
}
|
}
|
||||||
public void setModulename(String modulename) {
|
public void setModulename(String modulename) {
|
||||||
this.modulename = modulename;
|
this.modulename = modulename;
|
||||||
}
|
}
|
||||||
public int getModuleid() {
|
public int getModuleid() {
|
||||||
return moduleid;
|
return moduleid;
|
||||||
}
|
}
|
||||||
public void setModuleid(int moduleid) {
|
public void setModuleid(int moduleid) {
|
||||||
this.moduleid = moduleid;
|
this.moduleid = moduleid;
|
||||||
}
|
}
|
||||||
public int getProjectindex() {
|
public int getProjectindex() {
|
||||||
return projectindex;
|
return projectindex;
|
||||||
}
|
}
|
||||||
public void setProjectindex(int projectindex) {
|
public void setProjectindex(int projectindex) {
|
||||||
this.projectindex = projectindex;
|
this.projectindex = projectindex;
|
||||||
}
|
}
|
||||||
public int getChecktype() {
|
public int getChecktype() {
|
||||||
return checktype;
|
return checktype;
|
||||||
}
|
}
|
||||||
public void setChecktype(int checktype) {
|
public void setChecktype(int checktype) {
|
||||||
this.checktype = checktype;
|
this.checktype = checktype;
|
||||||
}
|
}
|
||||||
public int getPriority() {
|
public int getPriority() {
|
||||||
return priority;
|
return priority;
|
||||||
}
|
}
|
||||||
public void setPriority(int priority) {
|
public void setPriority(int priority) {
|
||||||
this.priority = priority;
|
this.priority = priority;
|
||||||
}
|
}
|
||||||
public String getProjectname() {
|
public String getProjectname() {
|
||||||
return projectname;
|
return projectname;
|
||||||
}
|
}
|
||||||
public void setProjectname(String projectname) {
|
public void setProjectname(String projectname) {
|
||||||
this.projectname = projectname;
|
this.projectname = projectname;
|
||||||
}
|
}
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public String getSign() {
|
public String getSign() {
|
||||||
return sign;
|
return sign;
|
||||||
}
|
}
|
||||||
public void setSign(String sign) {
|
public void setSign(String sign) {
|
||||||
this.sign = sign;
|
this.sign = sign;
|
||||||
}
|
}
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
public int getProjectid() {
|
public int getProjectid() {
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
public void setProjectid(int projectid) {
|
public void setProjectid(int projectid) {
|
||||||
this.projectid = projectid;
|
this.projectid = projectid;
|
||||||
}
|
}
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
return remark;
|
return remark;
|
||||||
}
|
}
|
||||||
public void setRemark(String remark) {
|
public void setRemark(String remark) {
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
public int getCasetype() {
|
public int getCasetype() {
|
||||||
return casetype;
|
return casetype;
|
||||||
}
|
}
|
||||||
public void setCasetype(int casetype) {
|
public void setCasetype(int casetype) {
|
||||||
this.casetype = casetype;
|
this.casetype = casetype;
|
||||||
}
|
}
|
||||||
public String getTime() {
|
public String getTime() {
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
public void setTime(String time) {
|
public void setTime(String time) {
|
||||||
this.time = time;
|
this.time = time;
|
||||||
}
|
}
|
||||||
public String getOperationer() {
|
public String getOperationer() {
|
||||||
return operationer;
|
return operationer;
|
||||||
}
|
}
|
||||||
public void setOperationer(String operationer) {
|
public void setOperationer(String operationer) {
|
||||||
this.operationer = operationer;
|
this.operationer = operationer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,104 +1,104 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="projectCasesteps")
|
@Entity(name="projectCasesteps")
|
||||||
public class ProjectCasesteps implements java.io.Serializable{
|
public class ProjectCasesteps implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private String path;
|
private String path;
|
||||||
private String operation;
|
private String operation;
|
||||||
private String parameters;
|
private String parameters;
|
||||||
private String action;
|
private String action;
|
||||||
private int caseid;
|
private int caseid;
|
||||||
private int stepnum;
|
private int stepnum;
|
||||||
private String expectedresult;
|
private String expectedresult;
|
||||||
private int projectid;
|
private int projectid;
|
||||||
private int steptype;
|
private int steptype;
|
||||||
private String time;
|
private String time;
|
||||||
private String operationer;
|
private String operationer;
|
||||||
private String remark;
|
private String remark;
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPath() {
|
public String getPath() {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
public void setPath(String path) {
|
public void setPath(String path) {
|
||||||
this.path = path;
|
this.path = path;
|
||||||
}
|
}
|
||||||
public String getOperation() {
|
public String getOperation() {
|
||||||
return operation;
|
return operation;
|
||||||
}
|
}
|
||||||
public void setOperation(String operation) {
|
public void setOperation(String operation) {
|
||||||
this.operation = operation;
|
this.operation = operation;
|
||||||
}
|
}
|
||||||
public String getParameters() {
|
public String getParameters() {
|
||||||
return parameters;
|
return parameters;
|
||||||
}
|
}
|
||||||
public void setParameters(String parameters) {
|
public void setParameters(String parameters) {
|
||||||
this.parameters = parameters;
|
this.parameters = parameters;
|
||||||
}
|
}
|
||||||
public String getAction() {
|
public String getAction() {
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
public void setAction(String action) {
|
public void setAction(String action) {
|
||||||
this.action = action;
|
this.action = action;
|
||||||
}
|
}
|
||||||
public int getCaseid() {
|
public int getCaseid() {
|
||||||
return caseid;
|
return caseid;
|
||||||
}
|
}
|
||||||
public void setCaseid(int caseid) {
|
public void setCaseid(int caseid) {
|
||||||
this.caseid = caseid;
|
this.caseid = caseid;
|
||||||
}
|
}
|
||||||
public int getStepnum() {
|
public int getStepnum() {
|
||||||
return stepnum;
|
return stepnum;
|
||||||
}
|
}
|
||||||
public void setStepnum(int stepnum) {
|
public void setStepnum(int stepnum) {
|
||||||
this.stepnum = stepnum;
|
this.stepnum = stepnum;
|
||||||
}
|
}
|
||||||
public String getExpectedresult() {
|
public String getExpectedresult() {
|
||||||
return expectedresult;
|
return expectedresult;
|
||||||
}
|
}
|
||||||
public void setExpectedresult(String expectedresult) {
|
public void setExpectedresult(String expectedresult) {
|
||||||
this.expectedresult = expectedresult;
|
this.expectedresult = expectedresult;
|
||||||
}
|
}
|
||||||
public int getProjectid() {
|
public int getProjectid() {
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
public void setProjectid(int projectid) {
|
public void setProjectid(int projectid) {
|
||||||
this.projectid = projectid;
|
this.projectid = projectid;
|
||||||
}
|
}
|
||||||
public int getSteptype() {
|
public int getSteptype() {
|
||||||
return steptype;
|
return steptype;
|
||||||
}
|
}
|
||||||
public void setSteptype(int steptype) {
|
public void setSteptype(int steptype) {
|
||||||
this.steptype = steptype;
|
this.steptype = steptype;
|
||||||
}
|
}
|
||||||
public String getTime() {
|
public String getTime() {
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
public void setTime(String time) {
|
public void setTime(String time) {
|
||||||
this.time = time;
|
this.time = time;
|
||||||
}
|
}
|
||||||
public String getOperationer() {
|
public String getOperationer() {
|
||||||
return operationer;
|
return operationer;
|
||||||
}
|
}
|
||||||
public void setOperationer(String operationer) {
|
public void setOperationer(String operationer) {
|
||||||
this.operationer = operationer;
|
this.operationer = operationer;
|
||||||
}
|
}
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
return remark;
|
return remark;
|
||||||
}
|
}
|
||||||
public void setRemark(String remark) {
|
public void setRemark(String remark) {
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +1,48 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="projectModule")
|
@Entity(name="projectModule")
|
||||||
public class ProjectModule implements java.io.Serializable{
|
public class ProjectModule implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private int projectid;
|
private int projectid;
|
||||||
private int mprojectid;
|
private int mprojectid;
|
||||||
private String modulename;
|
private String modulename;
|
||||||
private int pid;
|
private int pid;
|
||||||
|
|
||||||
public int getMprojectid() {
|
public int getMprojectid() {
|
||||||
return mprojectid;
|
return mprojectid;
|
||||||
}
|
}
|
||||||
public void setMprojectid(int mprojectid) {
|
public void setMprojectid(int mprojectid) {
|
||||||
this.mprojectid = mprojectid;
|
this.mprojectid = mprojectid;
|
||||||
}
|
}
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public int getProjectid() {
|
public int getProjectid() {
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
public void setProjectid(int projectid) {
|
public void setProjectid(int projectid) {
|
||||||
this.projectid = projectid;
|
this.projectid = projectid;
|
||||||
}
|
}
|
||||||
public String getModulename() {
|
public String getModulename() {
|
||||||
return modulename;
|
return modulename;
|
||||||
}
|
}
|
||||||
public void setModulename(String modulename) {
|
public void setModulename(String modulename) {
|
||||||
this.modulename = modulename;
|
this.modulename = modulename;
|
||||||
}
|
}
|
||||||
public int getPid() {
|
public int getPid() {
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
public void setPid(int pid) {
|
public void setPid(int pid) {
|
||||||
this.pid = pid;
|
this.pid = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="projectModuleJson")
|
@Entity(name="projectModuleJson")
|
||||||
public class ProjectModuleJson implements java.io.Serializable{
|
public class ProjectModuleJson implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private String name;
|
private String name;
|
||||||
private boolean isParent;
|
private boolean isParent;
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
public boolean isParent() {
|
public boolean isParent() {
|
||||||
return isParent;
|
return isParent;
|
||||||
}
|
}
|
||||||
public void setisParent(boolean isParent) {
|
public void setisParent(boolean isParent) {
|
||||||
this.isParent = isParent;
|
this.isParent = isParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,69 +1,69 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="projectPlan")
|
@Entity(name="projectPlan")
|
||||||
public class ProjectPlan implements java.io.Serializable{
|
public class ProjectPlan implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private int projectid;
|
private int projectid;
|
||||||
private String name;
|
private String name;
|
||||||
private int casecount;
|
private int casecount;
|
||||||
private String remark;
|
private String remark;
|
||||||
private String time;
|
private String time;
|
||||||
private String operationer;
|
private String operationer;
|
||||||
private String projectname;
|
private String projectname;
|
||||||
|
|
||||||
public String getProjectname() {
|
public String getProjectname() {
|
||||||
return projectname;
|
return projectname;
|
||||||
}
|
}
|
||||||
public void setProjectname(String projectname) {
|
public void setProjectname(String projectname) {
|
||||||
this.projectname = projectname;
|
this.projectname = projectname;
|
||||||
}
|
}
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public int getProjectid() {
|
public int getProjectid() {
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
public void setProjectid(int projectid) {
|
public void setProjectid(int projectid) {
|
||||||
this.projectid = projectid;
|
this.projectid = projectid;
|
||||||
}
|
}
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
public int getCasecount() {
|
public int getCasecount() {
|
||||||
return casecount;
|
return casecount;
|
||||||
}
|
}
|
||||||
public void setCasecount(int casecount) {
|
public void setCasecount(int casecount) {
|
||||||
this.casecount = casecount;
|
this.casecount = casecount;
|
||||||
}
|
}
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
return remark;
|
return remark;
|
||||||
}
|
}
|
||||||
public void setRemark(String remark) {
|
public void setRemark(String remark) {
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
public String getTime() {
|
public String getTime() {
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
public void setTime(String time) {
|
public void setTime(String time) {
|
||||||
this.time = time;
|
this.time = time;
|
||||||
}
|
}
|
||||||
public String getOperationer() {
|
public String getOperationer() {
|
||||||
return operationer;
|
return operationer;
|
||||||
}
|
}
|
||||||
public void setOperationer(String operationer) {
|
public void setOperationer(String operationer) {
|
||||||
this.operationer = operationer;
|
this.operationer = operationer;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="projectPlanCase")
|
@Entity(name="projectPlanCase")
|
||||||
public class ProjectPlanCase implements java.io.Serializable{
|
public class ProjectPlanCase implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private int caseid;
|
private int caseid;
|
||||||
private int planid;
|
private int planid;
|
||||||
private int priority;
|
private int priority;
|
||||||
|
|
||||||
public int getPriority() {
|
public int getPriority() {
|
||||||
return priority;
|
return priority;
|
||||||
}
|
}
|
||||||
public void setPriority(int priority) {
|
public void setPriority(int priority) {
|
||||||
this.priority = priority;
|
this.priority = priority;
|
||||||
}
|
}
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public int getCaseid() {
|
public int getCaseid() {
|
||||||
return caseid;
|
return caseid;
|
||||||
}
|
}
|
||||||
public void setCaseid(int caseid) {
|
public void setCaseid(int caseid) {
|
||||||
this.caseid = caseid;
|
this.caseid = caseid;
|
||||||
}
|
}
|
||||||
public int getPlanid() {
|
public int getPlanid() {
|
||||||
return planid;
|
return planid;
|
||||||
}
|
}
|
||||||
public void setPlanid(int planid) {
|
public void setPlanid(int planid) {
|
||||||
this.planid = planid;
|
this.planid = planid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,85 +1,85 @@
|
||||||
package luckyweb.seagull.spring.entity;
|
package luckyweb.seagull.spring.entity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity(name="projectProtocolTemplate")
|
@Entity(name="projectProtocolTemplate")
|
||||||
public class ProjectProtocolTemplate implements java.io.Serializable{
|
public class ProjectProtocolTemplate implements java.io.Serializable{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private int id;
|
private int id;
|
||||||
private int projectid;
|
private int projectid;
|
||||||
private String name;
|
private String name;
|
||||||
private String protocoltype;
|
private String protocoltype;
|
||||||
private String contentencoding;
|
private String contentencoding;
|
||||||
private int connecttimeout;
|
private int connecttimeout;
|
||||||
private String time;
|
private String time;
|
||||||
private String operationer;
|
private String operationer;
|
||||||
private String remark;
|
private String remark;
|
||||||
private String projectname;
|
private String projectname;
|
||||||
|
|
||||||
|
|
||||||
public String getProjectname() {
|
public String getProjectname() {
|
||||||
return projectname;
|
return projectname;
|
||||||
}
|
}
|
||||||
public void setProjectname(String projectname) {
|
public void setProjectname(String projectname) {
|
||||||
this.projectname = projectname;
|
this.projectname = projectname;
|
||||||
}
|
}
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
return remark;
|
return remark;
|
||||||
}
|
}
|
||||||
public void setRemark(String remark) {
|
public void setRemark(String remark) {
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public int getProjectid() {
|
public int getProjectid() {
|
||||||
return projectid;
|
return projectid;
|
||||||
}
|
}
|
||||||
public void setProjectid(int projectid) {
|
public void setProjectid(int projectid) {
|
||||||
this.projectid = projectid;
|
this.projectid = projectid;
|
||||||
}
|
}
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
public String getProtocoltype() {
|
public String getProtocoltype() {
|
||||||
return protocoltype;
|
return protocoltype;
|
||||||
}
|
}
|
||||||
public void setProtocoltype(String protocoltype) {
|
public void setProtocoltype(String protocoltype) {
|
||||||
this.protocoltype = protocoltype;
|
this.protocoltype = protocoltype;
|
||||||
}
|
}
|
||||||
public String getContentencoding() {
|
public String getContentencoding() {
|
||||||
return contentencoding;
|
return contentencoding;
|
||||||
}
|
}
|
||||||
public void setContentencoding(String contentencoding) {
|
public void setContentencoding(String contentencoding) {
|
||||||
this.contentencoding = contentencoding;
|
this.contentencoding = contentencoding;
|
||||||
}
|
}
|
||||||
public int getConnecttimeout() {
|
public int getConnecttimeout() {
|
||||||
return connecttimeout;
|
return connecttimeout;
|
||||||
}
|
}
|
||||||
public void setConnecttimeout(int connecttimeout) {
|
public void setConnecttimeout(int connecttimeout) {
|
||||||
this.connecttimeout = connecttimeout;
|
this.connecttimeout = connecttimeout;
|
||||||
}
|
}
|
||||||
public String getTime() {
|
public String getTime() {
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
public void setTime(String time) {
|
public void setTime(String time) {
|
||||||
this.time = time;
|
this.time = time;
|
||||||
}
|
}
|
||||||
public String getOperationer() {
|
public String getOperationer() {
|
||||||
return operationer;
|
return operationer;
|
||||||
}
|
}
|
||||||
public void setOperationer(String operationer) {
|
public void setOperationer(String operationer) {
|
||||||
this.operationer = operationer;
|
this.operationer = operationer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue