Преглед изворни кода

git-svn-id: https://192.168.57.71/svn/qt@17 12fe181a-e57f-b044-8676-16dc139aa63e

xt_yuanxd пре 9 година
родитељ
комит
230727fdf0
100 измењених фајлова са 5654 додато и 0 уклоњено
  1. 3 0
      jdc/frame/trunk/.gitignore
  2. 22 0
      jdc/frame/trunk/README.md
  3. 5 0
      jdc/frame/trunk/cmd.txt
  4. 27 0
      jdc/frame/trunk/modules/core/.classpath
  5. 4 0
      jdc/frame/trunk/modules/core/.gitignore
  6. 36 0
      jdc/frame/trunk/modules/core/.project
  7. 3 0
      jdc/frame/trunk/modules/core/.settings/org.eclipse.core.resources.prefs
  8. 8 0
      jdc/frame/trunk/modules/core/.settings/org.eclipse.jdt.core.prefs
  9. 4 0
      jdc/frame/trunk/modules/core/.settings/org.eclipse.m2e.core.prefs
  10. 5 0
      jdc/frame/trunk/modules/core/.settings/org.eclipse.wst.common.component
  11. 5 0
      jdc/frame/trunk/modules/core/.settings/org.eclipse.wst.common.project.facet.core.xml
  12. 2 0
      jdc/frame/trunk/modules/core/.settings/org.eclipse.wst.validation.prefs
  13. 45 0
      jdc/frame/trunk/modules/core/pom.xml
  14. 60 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/BizLog.java
  15. 10 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/Logical.java
  16. 17 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresAuthentication.java
  17. 17 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresGuest.java
  18. 31 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresPermissions.java
  19. 31 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresRoles.java
  20. 16 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresUser.java
  21. 60 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/ctl/BaseCtl.java
  22. 109 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/ctl/WebJsonResult.java
  23. 11 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/dao/BaseDao.java
  24. 18 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/entity/Entity.java
  25. 39 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/service/BaseService.java
  26. 217 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/vo/NodeVo.java
  27. 135 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/code/entity/Code.java
  28. 103 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/code/service/CodeService.java
  29. 154 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/data/entity/DataPerm.java
  30. 87 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/data/service/DataPermService.java
  31. 47 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/exception/BizException.java
  32. 40 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/http/HttpConsts.java
  33. 72 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/http/HttpResult.java
  34. 24 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/http/HttpResultCodes.java
  35. 209 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/job/entity/JobInfo.java
  36. 98 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/job/service/JobInfoService.java
  37. 51 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/log/BizLogRecorderService.java
  38. 107 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/menu/entity/Function.java
  39. 158 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/menu/entity/Menu.java
  40. 254 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/menu/service/MenuService.java
  41. 105 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/org/entity/Org.java
  42. 80 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/org/service/OrgService.java
  43. 94 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/role/entity/Role.java
  44. 116 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/role/service/RoleService.java
  45. 133 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/CoreMgr.java
  46. 8 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/SessionMgr.java
  47. 14 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/WorkFlowMgr.java
  48. 14 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/aware/CoreMgrAware.java
  49. 11 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/aware/WorkflowMgrAware.java
  50. 160 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/user/entity/User.java
  51. 97 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/user/service/UserService.java
  52. 548 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/utils/Assert.java
  53. 24 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/utils/CoreConstants.java
  54. 58 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/utils/SystemParam.java
  55. 50 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/utils/WorkflowConsts.java
  56. 170 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/Execution.java
  57. 72 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/NextTask.java
  58. 192 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/ProcessDefinitionInfo.java
  59. 63 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/ProcessInst.java
  60. 220 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/SubmitInfo.java
  61. 97 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/TaskNode.java
  62. 200 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/WFStartInfo.java
  63. 66 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/WfResult.java
  64. 343 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/WorkFlowEngineClient.java
  65. 375 0
      jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/WorkItem.java
  66. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/BizLog$LogType.class
  67. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/BizLog.class
  68. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/Logical.class
  69. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresAuthentication.class
  70. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresGuest.class
  71. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresPermissions.class
  72. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresRoles.class
  73. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresUser.class
  74. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/ctl/BaseCtl.class
  75. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/ctl/WebJsonResult.class
  76. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/dao/BaseDao.class
  77. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/entity/Entity.class
  78. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/service/BaseService.class
  79. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/vo/NodeVo.class
  80. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/code/entity/Code.class
  81. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/code/service/CodeService.class
  82. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/data/entity/DataPerm.class
  83. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/data/service/DataPermService.class
  84. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/exception/BizException.class
  85. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/http/HttpConsts.class
  86. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/http/HttpResult.class
  87. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/http/HttpResultCodes.class
  88. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/job/entity/JobInfo.class
  89. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/job/service/JobInfoService.class
  90. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/log/BizLogRecorderService$HandlerType.class
  91. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/log/BizLogRecorderService.class
  92. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/menu/entity/Function.class
  93. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/menu/entity/Menu.class
  94. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/menu/service/MenuService.class
  95. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/org/entity/Org.class
  96. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/org/service/OrgService.class
  97. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/role/entity/Role.class
  98. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/role/service/RoleService.class
  99. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/support/CoreMgr.class
  100. BIN
      jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/support/SessionMgr.class

+ 3 - 0
jdc/frame/trunk/.gitignore

@@ -0,0 +1,3 @@
+/.settings/
+/.project
+/target/

+ 22 - 0
jdc/frame/trunk/README.md

@@ -0,0 +1,22 @@
+# 简介
+本项目是xtframe的升级第二版,对模块接口进行了优化,使用更方便
+## 常用命令
+1、maven
+  导出依赖包:
+  mvn dependency:copy-dependencies 
+  mvn dependency:sources 下载依赖包的源代码。
+  导出javaDoc:
+  mvn javadoc:javadoc
+  
+## Changelog
+
+### 0.1.1 (2015-02-13)
+activiti流程版本由5.14升级到5.16
+### 0.1.0 初始版
+提供了框架基本的组织、人员、角色、授权、流程等功能
+
+## 框架扩展参考文档
+
+### 流程扩展参考
+####1、基于Activiti的开源工作流引擎扩展框架——OpenWebFlow
+https://github.com/bluejoe2008/openwebflow/wiki

+ 5 - 0
jdc/frame/trunk/cmd.txt

@@ -0,0 +1,5 @@
+一、maven常用命名:
+  导出依赖包:
+  mvn dependency:copy-dependencies -DdownloadSources=true
+  导出javaDoc:
+  mvn javadoc:javadoc

+ 27 - 0
jdc/frame/trunk/modules/core/.classpath

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

+ 4 - 0
jdc/frame/trunk/modules/core/.gitignore

@@ -0,0 +1,4 @@
+/target/
+/.settings/
+/.classpath
+/.project

+ 36 - 0
jdc/frame/trunk/modules/core/.project

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+	</natures>
+</projectDescription>

+ 3 - 0
jdc/frame/trunk/modules/core/.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding/<project>=UTF-8

+ 8 - 0
jdc/frame/trunk/modules/core/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.7

+ 4 - 0
jdc/frame/trunk/modules/core/.settings/org.eclipse.m2e.core.prefs

@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

+ 5 - 0
jdc/frame/trunk/modules/core/.settings/org.eclipse.wst.common.component

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+    <wb-module deploy-name="core">
+        <wb-resource deploy-path="/" source-path="/src/main/java"/>
+    </wb-module>
+</project-modules>

+ 5 - 0
jdc/frame/trunk/modules/core/.settings/org.eclipse.wst.common.project.facet.core.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.7"/>
+  <installed facet="jst.utility" version="1.0"/>
+</faceted-project>

+ 2 - 0
jdc/frame/trunk/modules/core/.settings/org.eclipse.wst.validation.prefs

@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1

+ 45 - 0
jdc/frame/trunk/modules/core/pom.xml

@@ -0,0 +1,45 @@
+<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/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.xtframe.jdc</groupId>
+		<artifactId>project</artifactId>
+		<version>1.0.11-SNAPSHOT</version>
+		<relativePath>../../</relativePath>
+	</parent>
+	<artifactId>core</artifactId>
+	<name>新通开发框架核心</name>
+	<properties>
+		<spring.version>4.1.2.RELEASE</spring.version>
+		<jdk.version>1.7</jdk.version>
+		<jetty.version>7.6.8.v20121106</jetty.version>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<hibernate.version>4.3.7.Final</hibernate.version>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>com.xtframe.jdc</groupId>
+			<artifactId>util</artifactId>
+		</dependency>
+	</dependencies>
+	<description>提供框架核心定义</description>
+	<build>
+		<plugins>
+			<!-- 要将源码放上去,需要加入这个插件 -->
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<configuration>
+					<attach>true</attach>
+				</configuration>
+				<executions>
+					<execution>
+						<phase>compile</phase>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+</project>

+ 60 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/BizLog.java

@@ -0,0 +1,60 @@
+package com.xtframe.core.anon;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 业务日志记录注解<br>
+ * 注解在需要进行业务日志控制的类或者方法上
+ * 
+ * @author 袁晓冬
+ * 
+ */
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface BizLog {
+    /** 定义日志类型 */
+    public enum LogType {
+        /** 登录 */
+        LOGIN("登录"),
+        /** 登出 */
+        LOGOUT("登出"),
+        /** 新增 */
+        ADD("新增"),
+        /** 编辑 */
+        EDIT("编辑"),
+        /** 删除 */
+        DELETE("删除"),
+        /** 查询 */
+        QUERY("查询"),
+        /** 上传 */
+        UPLOAD("上传"),
+        /** 下载 */
+        DOWNLOAD("下载"),
+        /** 打印 */
+        PRINT("打印"),
+        /** 统计 */
+        STATISTICS("统计"),
+        /** 其他 */
+        OTHER("其他");
+        private String value;
+
+        public String getValue() {
+            return value;
+        }
+
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        private LogType(String value) {
+            this.value = value;
+        }
+    };
+
+    LogType value() default LogType.ADD;
+}

+ 10 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/Logical.java

@@ -0,0 +1,10 @@
+package com.xtframe.core.anon.auth;
+
+/**
+ * 权限中用到的逻辑运算
+ * @author 袁晓冬
+ *
+ */
+public enum Logical {
+    AND, OR
+}

+ 17 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresAuthentication.java

@@ -0,0 +1,17 @@
+package com.xtframe.core.anon.auth;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 认证用户才可访问
+ * 
+ * @author 袁晓冬
+ *
+ */
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RequiresAuthentication {
+}

+ 17 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresGuest.java

@@ -0,0 +1,17 @@
+package com.xtframe.core.anon.auth;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 游客才可访问
+ * 
+ * @author 袁晓冬
+ *
+ */
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RequiresGuest {
+}

+ 31 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresPermissions.java

@@ -0,0 +1,31 @@
+package com.xtframe.core.anon.auth;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 需要拥有指定权限才可访问
+ * 
+ * @author 袁晓冬
+ */
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RequiresPermissions {
+
+    /**
+     * 一个活多个可访问权限
+     * 
+     * @return
+     */
+    String[] value();
+
+    /**
+     * 权限之前的逻辑关系,“与”{@link Logical#AND} 或者“或”{@link Logical#OR}
+     * 
+     * @return
+     */
+    Logical logical() default Logical.AND;
+
+}

+ 31 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresRoles.java

@@ -0,0 +1,31 @@
+package com.xtframe.core.anon.auth;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 需要拥有指定的角色进行访问
+ * 
+ * @author 袁晓冬
+ *
+ */
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RequiresRoles {
+
+    /**
+     * 一个或多个角色编码
+     * 
+     * @return
+     */
+    String[] value();
+
+    /**
+     * 逻辑关系,“与”{@link Logical#AND} 或者“或”{@link Logical#OR}
+     * 
+     * @return
+     */
+    Logical logical() default Logical.AND;
+}

+ 16 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/anon/auth/RequiresUser.java

@@ -0,0 +1,16 @@
+package com.xtframe.core.anon.auth;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 需要登录后访问
+ * @author 袁晓冬
+ *
+ */
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RequiresUser {
+}

+ 60 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/ctl/BaseCtl.java

@@ -0,0 +1,60 @@
+package com.xtframe.core.base.ctl;
+
+import com.xtframe.core.http.HttpResult;
+
+/**
+ * 控制器层基类
+ * 
+ * @author 袁晓冬
+ *
+ */
+public abstract class BaseCtl {
+
+    /** 新增记录ID标识 */
+    public static final String BLANK_UUID = "00";
+
+    /**
+     * 返回执行成功对象
+     * 
+     * @return
+     */
+    protected WebJsonResult success() {
+        WebJsonResult jsonResult = new WebJsonResult();
+        jsonResult.setSuccess(true);
+        return jsonResult;
+    }
+
+    /**
+     * 返回执行失败对象
+     * 
+     * @param msg
+     *            失败信息
+     * @return
+     */
+    protected WebJsonResult error(String msg) {
+        WebJsonResult jsonResult = new WebJsonResult();
+        jsonResult.setSuccess(false);
+        jsonResult.setMessage(msg);
+        return jsonResult;
+    }
+
+    protected HttpResult httpSuccess() {
+        HttpResult jsonResult = new HttpResult();
+        jsonResult.setSuccess(true);
+        return jsonResult;
+    }
+
+    /**
+     * 返回执行失败对象,并附带失败信息
+     * 
+     * @param msg
+     * @return
+     */
+    protected HttpResult httpError(String msg) {
+        HttpResult jsonResult = new HttpResult();
+        jsonResult.setSuccess(false);
+        jsonResult.setMessage(msg);
+        return jsonResult;
+    }
+
+}

+ 109 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/ctl/WebJsonResult.java

@@ -0,0 +1,109 @@
+package com.xtframe.core.base.ctl;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 后台向前台传递的结果集<br>
+ * <p>
+ * 包含结果和消息两部分
+ * <p>
+ * 此对象仅用于controller层,其他层不要使用
+ * 
+ * @author 袁晓冬
+ * 
+ */
+public class WebJsonResult implements Serializable {
+
+	/** serialVersionUID */
+	private static final long serialVersionUID = -4396170415938706672L;
+
+	// 操作是否成功
+	private boolean success = true;
+	// 异常信息
+	private String message;
+
+	// 如果有多个结果,使用此属性
+	private Map<String, Object> attrs = new HashMap<String, Object>();
+
+	/**
+	 * 根据属性名称查询属性值
+	 * 
+	 * @param name
+	 *            属性名称
+	 * @return Object 属性值
+	 */
+	public Object getAttr(String name) {
+		return attrs.get(name);
+	}
+
+	/**
+	 * 获取返回结果属性
+	 * 
+	 * @return Map<String, Object>
+	 */
+	public Map<String, Object> getAttrs() {
+		return attrs;
+	}
+
+	/**
+	 * 获取执行结果返回消息
+	 * 
+	 * @return String
+	 */
+	public String getMessage() {
+		return message;
+	}
+
+	/**
+	 * 执行是否成功
+	 * 
+	 * @return
+	 */
+	public boolean isSuccess() {
+		return success;
+	}
+
+	/**
+	 * 设置返回结果属性
+	 * 
+	 * @param name
+	 *            属性名称
+	 * @param value
+	 *            属性值
+	 */
+	public void setAttr(String name, Object value) {
+		attrs.put(name, value);
+	}
+
+	/**
+	 * 设置返回结果属性,覆盖原有所有属性
+	 * 
+	 * @param attrs
+	 *            Map<String, Object>
+	 */
+	public void setAttrs(Map<String, Object> attrs) {
+		this.attrs = attrs;
+	}
+
+	/**
+	 * 设置执行结果返回消息
+	 * 
+	 * @param message
+	 *            String
+	 */
+	public void setMessage(String message) {
+		this.message = message;
+	}
+
+	/**
+	 * 设置执行是否成功
+	 * 
+	 * @param success
+	 *            boolean 执行结果
+	 */
+	public void setSuccess(boolean success) {
+		this.success = success;
+	}
+}

+ 11 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/dao/BaseDao.java

@@ -0,0 +1,11 @@
+package com.xtframe.core.base.dao;
+
+/**
+ * 数据库层基类
+ * 
+ * @author 袁晓冬
+ *
+ */
+public abstract class BaseDao {
+
+}

+ 18 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/entity/Entity.java

@@ -0,0 +1,18 @@
+package com.xtframe.core.base.entity;
+
+import java.io.Serializable;
+
+/**
+ * Entity基类
+ * 
+ * @author 袁晓冬
+ *
+ * @param <ID>
+ */
+
+public abstract class Entity<ID extends Serializable> implements Serializable {
+
+	/** serialVersionUID */
+	private static final long serialVersionUID = -6673000649753054544L;
+
+}

+ 39 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/service/BaseService.java

@@ -0,0 +1,39 @@
+package com.xtframe.core.base.service;
+
+import java.util.Map;
+
+/**
+ * 服务层基类
+ * 
+ * @author 袁晓冬
+ *
+ */
+public abstract class BaseService {
+
+	/** 可用Beans集合 */
+	protected Map<Object, Object> beans;
+
+	/**
+	 * 获取service可用Bean集合
+	 * 
+	 * @return Map<Object, Object>
+	 */
+	public Map<Object, Object> getBeans() {
+		return beans;
+	}
+
+	/**
+	 * 设置service可用Bean集合,一般由框架自动设置
+	 * 
+	 * @param beans
+	 */
+	public void setBeans(Map<Object, Object> beans) {
+		this.beans = beans;
+	}
+
+	/**
+	 * 初始化,一般用于服务中引用Bean的初始化
+	 */
+	public void init() {
+	};
+}

+ 217 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/base/vo/NodeVo.java

@@ -0,0 +1,217 @@
+package com.xtframe.core.base.vo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 树图节点对象
+ * 
+ * @author 袁晓冬
+ *
+ */
+public class NodeVo implements Cloneable {
+	/** 节点ID */
+	protected String id;
+	/** 上级节点 */
+	protected String parent;
+	/** 节点名称 */
+	protected String text;
+	/** 是否选中 */
+	protected boolean checked;
+	/** 节点图标样式 */
+	protected String iconCls;
+	/** 状态:打开/关闭 */
+	protected String state;
+	/** 节点属性信息 */
+	protected Map<String, String> attributes;
+	/** 下级节点 */
+	protected List<NodeVo> children;
+
+	public NodeVo() {
+
+	}
+
+	/**
+	 * 树图节点对象
+	 * 
+	 * @param id
+	 *            节点ID
+	 * @param text
+	 *            节点名称
+	 * @param checked
+	 *            是否选中
+	 * @param iconCls
+	 *            节点图标样式
+	 * @param state
+	 *            状态:打开/关闭
+	 * @param attributes
+	 *            节点属性信息
+	 */
+	public NodeVo(String id, String text, boolean checked, String iconCls, String state, Map<String, String> attributes) {
+		super();
+		this.id = id;
+		this.text = text;
+		this.checked = checked;
+		this.iconCls = iconCls;
+		this.state = state;
+		this.attributes = attributes;
+	}
+
+	@Override
+	public NodeVo clone() throws CloneNotSupportedException {
+		return (NodeVo) super.clone();
+	}
+
+	/**
+	 * 获取节点属性
+	 * 
+	 * @return Map<String, String>
+	 */
+	public Map<String, String> getAttributes() {
+		return attributes;
+	}
+
+	/**
+	 * 获取下级节点列表
+	 * 
+	 * @return List<NodeVo>
+	 */
+	public List<NodeVo> getChildren() {
+		return children;
+	}
+
+	/**
+	 * 获取节点图标样式
+	 * 
+	 * @return String
+	 */
+	public String getIconCls() {
+		return iconCls;
+	}
+
+	/**
+	 * 获取节点ID
+	 * 
+	 * @return String
+	 */
+	public String getId() {
+		return id;
+	}
+
+	/**
+	 * 获取上级ID
+	 * 
+	 * @return String
+	 */
+	public String getParent() {
+		return parent;
+	}
+
+	/**
+	 * 获取节点状态
+	 * 
+	 * @return String
+	 */
+	public String getState() {
+		return state;
+	}
+
+	/**
+	 * 获取节点显示文本
+	 * 
+	 * @return String
+	 */
+	public String getText() {
+		return text;
+	}
+
+	/**
+	 * 是否选中
+	 * 
+	 * @return boolean
+	 */
+	public boolean isChecked() {
+		return checked;
+	}
+
+	/**
+	 * 设置节点属性
+	 * 
+	 * @param attributes
+	 *            Map<String, String>
+	 */
+	public void setAttributes(Map<String, String> attributes) {
+		this.attributes = attributes;
+	}
+
+	/**
+	 * 设置节点选中状态
+	 * 
+	 * @param checked
+	 *            boolean
+	 */
+	public void setChecked(boolean checked) {
+		this.checked = checked;
+	}
+
+	/**
+	 * 设置下级节点
+	 * 
+	 * @param children
+	 *            List<NodeVo>
+	 */
+	public void setChildren(List<NodeVo> children) {
+		this.children = children;
+	}
+
+	/**
+	 * 设置节点显示图标样式<br>
+	 * 引用icons.css中的式样
+	 * 
+	 * @param iconCls
+	 *            String
+	 */
+	public void setIconCls(String iconCls) {
+		this.iconCls = iconCls;
+	}
+
+	/**
+	 * 设置节点ID
+	 * 
+	 * @param id
+	 *            String
+	 */
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * 设置上级节点ID
+	 * 
+	 * @param parent
+	 *            String
+	 */
+	public void setParent(String parent) {
+		this.parent = parent;
+	}
+
+	/**
+	 * 设置节点状态
+	 * 
+	 * @param state
+	 *            String
+	 */
+	public void setState(String state) {
+		this.state = state;
+	}
+
+	/**
+	 * 设置节点显示文本
+	 * 
+	 * @param text
+	 *            String
+	 */
+	public void setText(String text) {
+		this.text = text;
+	}
+}

+ 135 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/code/entity/Code.java

@@ -0,0 +1,135 @@
+package com.xtframe.core.code.entity;
+
+/**
+ * 字典表对象
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface Code {
+    /**
+     * 字典编码
+     * 
+     * @return
+     */
+    public String getCode();
+
+    /**
+     * 唯一标识
+     * 
+     * @return
+     */
+    public String getId();
+
+    /**
+     * 是否末级节点
+     * 
+     * @return
+     */
+    public Boolean getLeaf();
+
+    /**
+     * 上级编码
+     * 
+     * @return
+     */
+    public String getPcode();
+
+    /**
+     * 上级唯一标识
+     * 
+     * @return
+     */
+    public String getPid();
+
+    /**
+     * 排序号
+     * 
+     * @return
+     */
+    public int getSortno();
+
+    /**
+     * 显示文本
+     * 
+     * @return
+     */
+    public String getText();
+
+    /**
+     * 是否有效
+     * 
+     * @return
+     */
+    public Boolean getValid();
+
+    /**
+     * 设置编码
+     * 
+     * @param code
+     */
+    public void setCode(String code);
+
+    /**
+     * 设置唯一标识
+     * 
+     * @param id
+     */
+    public void setId(String id);
+
+    /**
+     * 设置是否末级
+     * 
+     * @param leaf
+     */
+    public void setLeaf(Boolean leaf);
+
+    /**
+     * 设置上级编码
+     * 
+     * @param pcode
+     */
+    public void setPcode(String pcode);
+
+    /**
+     * 设置上级唯一标识
+     * 
+     * @param pid
+     */
+    public void setPid(String pid);
+
+    /**
+     * 排序号
+     * 
+     * @param sortno
+     */
+    public void setSortno(int sortno);
+
+    /**
+     * 设置显示文本
+     * 
+     * @param text
+     */
+    public void setText(String text);
+
+    /**
+     * 设置是否有效
+     * 
+     * @param valid
+     */
+    public void setValid(Boolean valid);
+
+    /**
+     * 备注
+     * 
+     * @return
+     */
+    public String getRemark();
+
+    /**
+     * 备注
+     * 
+     * @param remark
+     */
+    public void setRemark(String remark);
+}

+ 103 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/code/service/CodeService.java

@@ -0,0 +1,103 @@
+package com.xtframe.core.code.service;
+
+import java.util.List;
+
+import com.xtframe.core.code.entity.Code;
+
+/**
+ * 字典维护服务
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface CodeService {
+    /**
+     * 根据上级编码查找下级
+     * 
+     * @param pcode
+     * @return
+     */
+    public List<Code> findByPcode(String pcode);
+
+    /**
+     * 根据上级编码ID查找下级
+     * 
+     * @param pid
+     * @return
+     */
+    public List<Code> findByPid(String pid);
+
+    /**
+     * 根据上级编码ID查找下级有效记录
+     * 
+     * @param pid
+     * @return
+     */
+    public List<Code> findValidCodesByPid(String pid);
+
+    /**
+     * 根据主键查找
+     * 
+     * @param id
+     * @return
+     */
+    public Code findOne(String id);
+
+    /**
+     * 根据编码查找
+     * 
+     * @param id
+     * @return
+     */
+    public Code findByCode(String code);
+
+    /**
+     * 根据本级编码和上级编码查找
+     * 
+     * @param code
+     * @param pcode
+     * @return
+     */
+    public Code findByCodeAndPcode(String code, String pcode);
+
+    /**
+     * 字典保存
+     * 
+     * @param code
+     * @return
+     */
+    public Code save(Code code);
+
+    /**
+     * 根据主键删除记录
+     * 
+     * @param ids
+     * @return
+     */
+    public String delete(String... ids);
+
+    /**
+     * 根据上级编码或者ID更改记录有效或无效
+     * 
+     * @param valid
+     * @param parent
+     */
+    public void updateValidByParent(Boolean valid, String parent);
+
+    /**
+     * 根据上级和是否有效物理删除
+     * 
+     * @param parent
+     */
+    public void clearByParent(String parent);
+
+    /**
+     * 根据上级编码和备注查询下级
+     * 
+     * @param pcode
+     * @param remakr
+     * @return
+     */
+    public List<Code> findByPcodeAndRemark(String pcode, String remark);
+
+}

+ 154 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/data/entity/DataPerm.java

@@ -0,0 +1,154 @@
+package com.xtframe.core.data.entity;
+
+/**
+ * 数据权限实体
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface DataPerm {
+
+    /**
+     * 业务主键ID
+     * 
+     * @return
+     */
+    public abstract String getBusskey();
+
+    /**
+     * 数据分类
+     * 
+     * @return
+     */
+    public abstract String getDataType();
+
+    /**
+     * 记录唯一标识
+     * 
+     * @return
+     */
+    public abstract String getId();
+
+    /**
+     * 操作权限
+     * 
+     * @return
+     */
+    public String getOper();
+
+    /**
+     * 所属角色编码
+     * 
+     * @return
+     */
+    public String getRoleCode();
+
+    /**
+     * 字段1
+     * @return
+     */
+    public String getText1();
+
+    /**
+     * 字段2
+     * @return
+     */
+    public String getText2();
+
+    /**
+     * 字段3
+     * @return
+     */
+    public String getText3();
+
+    /**
+     * 字段4
+     * @return
+     */
+    public String getText4();
+
+    /**
+     * 字段5
+     * @return
+     */
+    public String getText5();
+
+    /**
+     * 所属用户ID
+     * 
+     * @return
+     */
+    public String getUserId();
+
+    /**
+     * 业务主键ID
+     * 
+     * @param busskey
+     */
+    public abstract void setBusskey(String busskey);
+
+    /**
+     * 数据分类
+     * 
+     * @param dataType
+     */
+    public abstract void setDataType(String dataType);
+
+    /**
+     * 记录唯一标识
+     * 
+     * @param id
+     */
+    public abstract void setId(String id);
+
+    /**
+     * 操作权限
+     * 
+     * @param oper
+     */
+    public void setOper(String oper);
+
+    /**
+     * 所属角色编码
+     * 
+     * @param roleCode
+     */
+    public void setRoleCode(String roleCode);
+
+    /**
+     * 字段1
+     * @param text1
+     */
+    public void setText1(String text1);
+
+    /**
+     * 字段2
+     * @param text2
+     */
+    public void setText2(String text2);
+
+    /**
+     * 字段3
+     * @param text3
+     */
+    public void setText3(String text3);
+
+    /**
+     * 字段4
+     * @param text4
+     */
+    public void setText4(String text4);
+
+    /**
+     * 字段5
+     * @param text5
+     */
+    public void setText5(String text5);
+
+    /**
+     * 所属用户ID
+     * 
+     * @param userId
+     */
+    public void setUserId(String userId);
+}

+ 87 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/data/service/DataPermService.java

@@ -0,0 +1,87 @@
+package com.xtframe.core.data.service;
+
+import java.util.List;
+
+import com.xtframe.core.data.entity.DataPerm;
+
+/**
+ * 数据权限服务接口
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface DataPermService {
+    /**
+     * 根据业务主键和角色编码查询操作权限,当权限为空时返回空字符串,当权限不存在时返回null
+     * 
+     * @param busskey
+     *            业务主键
+     * @param roleCode
+     *            角色编码
+     * @return oper 权限操作
+     * @see com.xtframe.core.data.entity.DataPerm#getOper()
+     */
+    String checkRolePermission(String busskey, String role);
+
+    /**
+     * 根据业务主键和用户ID查询操作权限,当权限为空时返回空字符串,当权限不存在时返回null
+     * 
+     * @param busskey
+     *            业务主键
+     * @param userid
+     *            用户ID
+     * @return oper 权限操作
+     * @see com.xtframe.core.data.entity.DataPerm#getOper()
+     */
+    String checkUserPermission(String busskey, String user);
+
+    /**
+     * 根据主键删除记录
+     * 
+     * @param ids
+     * @return
+     */
+    public String delete(String... ids);
+
+    /**
+     * 根据业务主键检索
+     * 
+     * @param busskey
+     * @return
+     */
+    public List<DataPerm> findByBusskey(String busskey);
+
+    /**
+     * 根据业务主键和数据类型检索
+     * 
+     * @param busskey
+     * @param dataType
+     * @return
+     */
+    public List<DataPerm> findByBusskeyAndDataType(String busskey, String dataType);
+
+    /**
+     * 根据业务主键和用户ID查询权限
+     * 
+     * @param busskey
+     * @param user
+     * @return
+     */
+    public List<DataPerm> findByBusskeyAndUserId(String busskey, String userId);
+
+    /**
+     * 根据主键查找实体
+     * 
+     * @param id
+     * @return
+     */
+    public DataPerm findOne(String id);
+
+    /**
+     * 保存实体
+     * 
+     * @param u
+     * @return
+     */
+    public DataPerm save(DataPerm dp);
+}

+ 47 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/exception/BizException.java

@@ -0,0 +1,47 @@
+package com.xtframe.core.exception;
+
+/**
+ * business exception's base class
+ * 
+ * 
+ */
+public class BizException extends RuntimeException {
+	private static final long serialVersionUID = 3358078457294620782L;
+
+	/**
+	 * Constructs a new exception with the specified detail message. The cause
+	 * is not initialized, and may subsequently be initialized by a call to
+	 * {@link #initCause}.
+	 * 
+	 * @param message
+	 *            the detail message. The detail message is saved for later
+	 *            retrieval by the {@link #getMessage()} method.
+	 */
+	public BizException(String message) {
+		super(message);
+	}
+
+	/**
+	 * Constructs a new exception with the specified detail message and cause.
+	 * <p>
+	 * Note that the detail message associated with <code>cause</code> is
+	 * <i>not</i> automatically incorporated in this exception's detail message.
+	 * 
+	 * @param message
+	 *            the detail message (which is saved for later retrieval by the
+	 *            {@link #getMessage()} method).
+	 * @param cause
+	 *            the cause (which is saved for later retrieval by the
+	 *            {@link #getCause()} method). (A <tt>null</tt> value is
+	 *            permitted, and indicates that the cause is nonexistent or
+	 *            unknown.)
+	 * @since 1.4
+	 */
+	public BizException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public BizException(Throwable cause) {
+		super(cause);
+	}
+}

+ 40 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/http/HttpConsts.java

@@ -0,0 +1,40 @@
+package com.xtframe.core.http;
+
+
+/**
+ * HTTP通信相关常量
+ * 
+ * @author 袁晓冬
+ * 
+ */
+public class HttpConsts {
+    public static final String      METHOD_GET            = "GET";
+    public static final String      METHOD_POST           = "POST";
+    public static final String      METHOD_HEAD           = "HEAD";
+    public static final String      METHOD_PUT            = "PUT";
+    public static final String      METHOD_DELETE         = "DELETE";
+    public static final String      METHOD_TRACE          = "TRACES";
+    public static final String      METHOD_OPTIONSE       = "OPTIONS";
+    // 字符编码格式 目前支持 gbk 或 utf-8
+    public static String            defaultCharset        = "utf-8";
+    public static String            API_JSESSIONID        = "api_jsessionid";
+    /** ==================== 返回结果共通属性 ==================== */
+    /** Action Key */
+    public static final String      ACTION_KEY            = "action";
+    /** 系统编码 */
+    public static final String      ACTION_SYS_CODE       = "sysCode";
+    /** 是否获取下级有权限的功能 */
+    public static final String      ACTION_CHILDREN       = "getChildren";
+    /** Action返回结果数据 */
+    public static final String      ACTION_RESULT         = "result";
+    /** 登陆成功后存放用户信息 */
+    public static final String      USER_KEY              = "user";
+    /** 执行结果详细信息 */
+    public static final String      RESULT_MSG            = "msg";
+    /** 执行结果成功 */
+    public static final String      ACTION_RESULT_SUCCESS = "success";
+    /** 执行结果失败 */
+    public static final String      ACTION_RESULT_ERROR   = "error";
+    
+    public static final String      MSG_1002              = "1002";
+}

+ 72 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/http/HttpResult.java

@@ -0,0 +1,72 @@
+package com.xtframe.core.http;
+
+import java.util.HashMap;
+
+/**
+ * HTTP通信标准结果传输对象<br>
+ * 非字符串传输暂不支持,请自行设计对象。
+ * 
+ * @author 袁晓冬
+ * 
+ */
+public class HttpResult {
+    /** 操作是否成功 */
+    private boolean success = true;
+    /** 平台结果代码 */
+    private String code = HttpResultCodes.OK;
+    /** 结果信息 */
+    private String message;
+    /** 数据 */
+    private HashMap<String, Object> data = new HashMap<String, Object>();
+
+    public HttpResult() {
+
+    }
+
+    public HttpResult(String code) {
+        this.code = code;
+    }
+
+    /** 添加结果数据 */
+    public void add(String key, Object value) {
+        data.put(key, value);
+    }
+
+    /** 根据key获取结果数据 */
+    public Object get(String key) {
+        return data.get(key);
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public HashMap<String, Object> getData() {
+        return data;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public void setData(HashMap<String, Object> data) {
+        this.data = data;
+    }
+
+    public void setMessage(Object message) {
+        this.message = String.valueOf(message);
+    }
+
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+}

+ 24 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/http/HttpResultCodes.java

@@ -0,0 +1,24 @@
+package com.xtframe.core.http;
+
+/**
+ * IDEV平台HTTP通信返回code编码<br>
+ * 
+ * @author 袁晓冬
+ * 
+ */
+public interface HttpResultCodes {
+    /** 调用成功 */
+    String OK      = "1";
+    /** 调用失败 */
+    String ERROR   = "-1";
+    /** 没有进行身份验证 */
+    String MSG_401 = "401";
+    /** 没有权限 */
+    String MSG_403 = "403";
+    /** 找不到功能 */
+    String MSG_404 = "404";
+    /** 参数不正确错误 */
+    String MSG_800 = "800";
+    /** 已登录 */
+    String MSG_801 = "801";
+}

+ 209 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/job/entity/JobInfo.java

@@ -0,0 +1,209 @@
+package com.xtframe.core.job.entity;
+
+import java.util.Date;
+
+/**
+ * 定时任务对象
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface JobInfo {
+    /** 任务状态:准备执行 */
+    String STATUS_READY = "0";
+    /** 执行中 */
+    String STATUS_RUNNING = "1";
+    /** 结束后重新配置 */
+    String STATUS_RESET = "9";
+    /** 执行结束 */
+    String STATUS_FINISH = "8";
+    /** 执行被拒接 */
+    String STATUS_VETOED = "-1";
+
+    /**
+     * 是否循环
+     * 
+     * @return
+     */
+    public Boolean getCircle();
+
+    /**
+     * 执行接口
+     * 
+     * @return
+     */
+    public String getClazz();
+
+    /**
+     * 任务创建时间
+     * 
+     * @return
+     */
+    public Date getCreateTime();
+
+    /**
+     * 获取调度表达式
+     * 
+     * @return
+     */
+    public String getCronExpression();
+
+    /**
+     * 任务描述
+     * 
+     * @return
+     */
+    public String getDisp();
+
+    /**
+     * 任务结束时间
+     * 
+     * @return
+     */
+    public Date getEndTime();
+
+    /**
+     * 任务主键
+     * 
+     * @return
+     */
+    public String getId();
+
+    /**
+     * 间隔时间(秒)
+     * 
+     * @return
+     */
+    //    public int getInterval();
+
+    /**
+     * 任务分组
+     * 
+     * @return
+     */
+    public String getJobGroup();
+
+    /**
+     * 任务名称
+     * 
+     * @return
+     */
+    public String getJobName();
+
+    /**
+     * 执行参数
+     * 
+     * @return
+     */
+    public String getParam();
+
+    /**
+     * 上次执行结果
+     * 
+     * @return
+     */
+    public String getResult();
+
+    /**
+     * 任务启动时间,正式开始运行任务的时间
+     * 
+     * @return
+     */
+    public Date getStartTime();
+
+    /**
+     * 任务状态
+     * 
+     * @return
+     */
+    public String getStatus();
+
+    /**
+     * 是否循环
+     * 
+     * @param circle
+     */
+    public void setCircle(Boolean circle);
+
+    /**
+     * 执行接口
+     * 
+     * @param clazz
+     */
+    public void setClazz(String clazz);
+
+    /**
+     * 任务创建时间
+     * 
+     * @param createTime
+     */
+    public void setCreateTime(Date createTime);
+
+    /**
+     * 获取调度表达式
+     * 
+     * @param cronExpression
+     */
+    public void setCronExpression(String cronExpression);
+
+    /**
+     * 任务描述
+     * 
+     * @param disp
+     */
+    public void setDisp(String disp);
+
+    /**
+     * 任务结束时间
+     * 
+     * @param endTime
+     */
+    public void setEndTime(Date endTime);
+
+    /**
+     * 任务ID
+     * 
+     * @param id
+     */
+    public void setId(String id);
+
+    /**
+     * 任务执行间隔时间
+     * 
+     * @param interval
+     */
+    //    public void setInterval(int interval);
+
+    /**
+     * 执行参数
+     * 
+     * @param param
+     */
+    public void setParam(String param);
+
+    /**
+     * 上次执行结果
+     * 
+     * @param result
+     */
+    public void setResult(String result);
+
+    /**
+     * 任务启动时间,正式开始运行任务的时间
+     * 
+     * @param startTime
+     */
+    public void setStartTime(Date startTime);
+
+    /**
+     * 任务状态<br>
+     * 0:准备执行<br>
+     * 1:执行中<br>
+     * 8: 执行结束<br>
+     * 9:下次重新加载任务<br>
+     * 
+     * @param status
+     */
+    public void setStatus(String status);
+
+}

+ 98 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/job/service/JobInfoService.java

@@ -0,0 +1,98 @@
+package com.xtframe.core.job.service;
+
+import java.util.List;
+
+import com.xtframe.core.job.entity.JobInfo;
+
+/**
+ * 定时任务服务接口
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface JobInfoService {
+    String PARAM_JOB = "jobInfo";
+
+    /***
+     * 添加定时任务
+     * 
+     * @return 成功返回大于0,失败返回小于0
+     */
+    public int addJob(JobInfo jobInfo);
+
+    /**
+     * 暂停指定任务
+     * 
+     * @param jobInfo
+     * @return 成功返回大于0,失败返回小于0
+     */
+    public int pauseJob(JobInfo jobInfo);
+
+    /**
+     * 删除指定任务
+     * 
+     * @param jobInfo
+     * @return 成功返回大于0,失败返回小于0
+     */
+    public int deleteJob(JobInfo jobInfo);
+
+    /**
+     * 恢复任务执行
+     * 
+     * @param jobInfo
+     * @return
+     */
+    public int resumeJob(JobInfo jobInfo);
+
+    /**
+     * service初始化处理
+     */
+    public void initJobs(Object param);
+
+    /**
+     * 查询所有设定的任务
+     * 
+     * @return
+     */
+    public List<JobInfo> queryAllJob();
+
+    /**
+     * 立即运行任务
+     * 
+     * @param jobInfo
+     * @return 成功返回大于0,失败返回小于0
+     */
+    public int triggerJob(JobInfo jobInfo);
+
+    /**
+     * 更新任务
+     * 
+     * @param jobInfo
+     * @return 成功返回大于0,失败返回小于0
+     */
+    public int updateJob(JobInfo jobInfo);
+
+    /**
+     * 根据任务ID查找任务
+     * 
+     * @param id
+     * @return
+     */
+    public JobInfo findOne(String id);
+
+    /**
+     * 保存任务信息
+     * 
+     * @param code
+     * @return
+     */
+    public JobInfo save(JobInfo code);
+
+    /**
+     * 删除任务信息,需要手动停止正在运行的此项任务
+     * 
+     * @param ids
+     * @return
+     */
+    public String delete(String... ids);
+}

+ 51 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/log/BizLogRecorderService.java

@@ -0,0 +1,51 @@
+package com.xtframe.core.log;
+
+/**
+ * 业务日志记录服务
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface BizLogRecorderService {
+	/** 定义日志类型 */
+	public enum HandlerType {
+		/** 登录 */
+		PreHandle("pre"),
+		/** 登出 */
+		PostHandle("post"),
+		/** 新增 */
+		AfterCompletion("afterCompletion"),
+		/** 异常 */
+		Exception("exception");
+		private String value;
+
+		public String getValue() {
+			return value;
+		}
+
+		public void setValue(String value) {
+			this.value = value;
+		}
+
+		private HandlerType(String value) {
+			this.value = value;
+		}
+	};
+
+	/**
+	 * 记录日志
+	 * 
+	 * @param request
+	 *            一般为HttpServletRequest
+	 * @param response
+	 *            一般为HttpServletResponse,当type类型为异常时可以放入异常对象
+	 * @param handler
+	 *            一般为HandlerMethod
+	 * @param type
+	 *            HandlerType
+	 * @param cost
+	 *            执行花费
+	 */
+	public void log(Object request, Object response, Object handler,
+			HandlerType type, long cost);
+}

+ 107 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/menu/entity/Function.java

@@ -0,0 +1,107 @@
+package com.xtframe.core.menu.entity;
+
+/**
+ * 菜单下功能对象接口
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface Function {
+    /**
+     * 获取编码
+     * 
+     * @return
+     */
+    public String getCode();
+
+    /**
+     * 获取功能图标
+     * 
+     * @return
+     */
+    public String getIcon();
+
+    /**
+     * 获取能唯一标识
+     * 
+     * @return
+     */
+    public String getId();
+
+    /**
+     * 获取所属菜单
+     * 
+     * @return
+     */
+    public Menu getMenu();
+
+    /**
+     * 获取功能名称
+     * 
+     * @return
+     */
+    public String getName();
+
+    /**
+     * 设置功能相对于本级的排序号
+     * 
+     * @return
+     */
+    public int getSortno();
+
+    /**
+     * 是否有效
+     * 
+     * @return
+     */
+    public Boolean getValid();
+
+    /**
+     * 设置编码
+     * 
+     * @param code
+     */
+    public void setCode(String code);
+
+    /**
+     * 设置功能图标
+     * 
+     * @return
+     */
+    public void setIcon(String icon);
+
+    /**
+     * 设置功能唯一标识
+     * 
+     * @return
+     */
+    public void setId(String id);
+
+    /**
+     * 设置所属菜单
+     * 
+     * @param menu
+     */
+    public void setMenu(Menu menu);
+
+    /**
+     * 设置功能名称
+     * 
+     * @return
+     */
+    public void setName(String name);
+
+    /**
+     * 设置功能相对于本级的排序号
+     * 
+     * @param sortno
+     */
+    public void setSortno(int sortno);
+
+    /**
+     * 是否有效
+     * 
+     * @param valid
+     */
+    public void setValid(Boolean valid);
+}

+ 158 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/menu/entity/Menu.java

@@ -0,0 +1,158 @@
+package com.xtframe.core.menu.entity;
+
+/**
+ * 菜单对象接口
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface Menu {
+    /**
+     * 获取菜单编码
+     * 
+     * @return
+     */
+    public String getCode();
+
+    /**
+     * 获取菜单图标
+     * 
+     * @return
+     */
+    public String getIcon();
+
+    /**
+     * 第二种式样
+     * 
+     * @return
+     */
+    public String getIcon2();
+
+    /**
+     * 获取菜单唯一标识
+     * 
+     * @return
+     */
+    public String getId();
+
+    /**
+     * 获取是否叶子节点
+     * 
+     * @return
+     */
+    public Boolean getLeaf();
+
+    /**
+     * 获取菜单名称
+     * 
+     * @return
+     */
+    public String getName();
+
+    /**
+     * 是否外部链接<br>
+     * 外部链接需要提供完整url
+     * 
+     * @return
+     */
+    public Boolean getOutLink();
+
+    /**
+     * 获取上级ID
+     * 
+     * @return
+     */
+    public String getPid();
+
+    /**
+     * 设置菜单相对于本级的排序号
+     * 
+     * @return
+     */
+    public int getSortno();
+
+    /**
+     * 获取菜单路径
+     * 
+     * @return
+     */
+    public String getUrl();
+
+    /**
+     * 是否有效
+     * 
+     * @return
+     */
+    public Boolean getValid();
+
+    /**
+     * 设置菜单编码
+     * 
+     * @param code
+     */
+    public void setCode(String code);
+
+    /**
+     * 设置菜单图标
+     * 
+     * @return
+     */
+    public void setIcon(String icon);
+
+    /**
+     * 第二种式样
+     * 
+     * @param icon2
+     */
+    public void setIcon2(String icon2);
+
+    /**
+     * 设置菜单唯一标识
+     * 
+     * @return
+     */
+    public void setId(String id);
+
+    /**
+     * 设置是否叶子节点
+     * 
+     * @param leaf
+     */
+    public void setLeaf(Boolean leaf);
+
+    /**
+     * 设置菜单名称
+     * 
+     * @return
+     */
+    public void setName(String name);
+
+    /**
+     * 是否外部链接<br>
+     * 外部链接需要提供完整url
+     * 
+     * @param outLink
+     */
+    public void setOutLink(Boolean outLink);
+
+    /**
+     * 设置菜单相对于本级的排序号
+     * 
+     * @param sortno
+     */
+    public void setSortno(int sortno);
+
+    /**
+     * 设置菜单路径
+     * 
+     * @param url
+     */
+    public void setUrl(String url);
+
+    /**
+     * 是否有效
+     * 
+     * @param valid
+     */
+    public void setValid(Boolean valid);
+}

+ 254 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/menu/service/MenuService.java

@@ -0,0 +1,254 @@
+package com.xtframe.core.menu.service;
+
+import java.util.Collection;
+import java.util.List;
+
+import com.xtframe.core.base.vo.NodeVo;
+import com.xtframe.core.menu.entity.Function;
+import com.xtframe.core.menu.entity.Menu;
+
+/**
+ * 菜单服务
+ * 
+ * @author 袁晓冬
+ *
+ * @param <T>
+ */
+public interface MenuService {
+    /**
+     * 根据主键删除菜单
+     * 
+     * @param ids
+     *            主键数组
+     * @return
+     */
+    public String delete(String... ids);
+
+    /**
+     * 删除组织功能关联关系
+     * 
+     * @param orgId
+     * @param functionIds
+     */
+    public void deleteOrgFunctionMap(String orgId, String... functionIds);
+
+    /**
+     * 删除组织菜单关联关系
+     * 
+     * @param orgId
+     * @param menuIds
+     */
+    public void deleteOrgMenuMap(String orgId, String... menuIds);
+
+    /**
+     * 删除角色功能关联关系
+     * 
+     * @param roleId
+     * @param functionIds
+     */
+    public void deleteRoleFunctionMap(String roleId, String... functionIds);
+
+    /**
+     * 删除角色菜单关联关系
+     * 
+     * @param roleId
+     * @param menuIds
+     */
+    public void deleteRoleMenuMap(String roleId, String... menuIds);
+
+    /**
+     * 删除用户菜单关联关系
+     * 
+     * @param userId
+     * @param menuIds
+     */
+    public void deleteUserMenuMap(String userId, String... menuIds);
+
+    /**
+     * 获取首页手风琴菜单<br>
+     * 可以是系统列表,也可以是菜单
+     * 
+     * @return
+     */
+    public List<Menu> findAccordionMenus();
+
+    /**
+     * 获取授权的下级有效菜单
+     * 
+     * @param pid
+     * @return
+     */
+    public List<Menu> findAuthedMenuByPid(String pid);
+
+    /**
+     * 根据主键查找功能
+     * 
+     * @param id
+     * @return
+     */
+    public Function findFunction(String id);
+
+    /**
+     * 根据主键ID检索多个功能
+     * 
+     * @param id
+     * @return
+     */
+    public List<Function> findFunctionByIds(String... id);
+
+    /**
+     * 根据主键查找菜单
+     * 
+     * @param id
+     * @return
+     */
+    public Menu findMenu(String id);
+
+    /**
+     * 根据菜单编码查找菜单
+     * 
+     * @param code
+     * @return
+     */
+    public Menu findMenuByCode(String code);
+
+    /**
+     * 根据主键ID检索多个菜单
+     * 
+     * @param id
+     * @return
+     */
+    public List<Menu> findMenuByIds(String... id);
+
+    /**
+     * 根据组织ID获取授权功能集合
+     * 
+     * @param orgId
+     * @return
+     */
+    public List<Function> findValidFunctionByOrgId(final String orgId);
+
+    /**
+     * 根据角色ID获取授权功能集合
+     * 
+     * @param roleId
+     * @return
+     */
+    public List<Function> findValidFunctionByRoleId(final String roleId);
+
+    /**
+     * 根据用户ID获取授权的功能
+     * 
+     * @param userId
+     * @return
+     */
+    public List<Function> findValidFunctionByUserId(final String userId);
+
+    /**
+     * 根据组织获取授权的菜单
+     */
+    public List<Menu> findValidMenuByOrgId(final String orgId);
+
+    /**
+     * 根据上级菜单ID获取下级有效菜单
+     * 
+     * @param pid
+     * @return
+     */
+    public List<Menu> findValidMenuByPid(final String pid);
+
+    /**
+     * 根据角色ID获取授权的菜单
+     * 
+     * @param roleId
+     * @return
+     */
+    public List<Menu> findValidMenuByRoleId(final String roleId);
+
+    /**
+     * 根据用户ID获取授权的菜单
+     * 
+     * @param userId
+     * @return
+     */
+    public List<Menu> findValidMenuByUserId(final String userId);
+
+    /**
+     * 根据上级菜单ID和授权菜单列表获取下级菜单节点
+     * 
+     * @param pid
+     * @param authedMenus
+     * @param authedFuncs
+     * @param cascade
+     * @return
+     */
+    public List<NodeVo> getCheckedMenusByPid(String pid, Collection<Menu> authedMenus, Collection<Function> authedFuncs,
+            boolean cascade);
+
+    /**
+     * 保存菜单
+     * 
+     * @param u
+     * @return
+     */
+    public Menu save(Menu u);
+
+    /**
+     * 保存菜单功能
+     * 
+     * @param f
+     * @return
+     */
+    public Function saveFunction(Function f);
+
+    /**
+     * 保存组织功能关联关系
+     * 
+     * @param orgId
+     * @param functionIds
+     */
+    public void saveOrgFunctionMap(String orgId, String... functionIds);
+
+    /**
+     * 保存组织菜单关联关系
+     * 
+     * @param orgId
+     *            组织ID
+     * @param menuIds
+     */
+    public void saveOrgMenuMap(String orgId, String... menuIds);
+
+    /**
+     * 保存角色功能关联关系
+     * 
+     * @param roleId
+     * @param functionIds
+     */
+    public void saveRoleFunctionMap(String roleId, String... functionIds);
+
+    /**
+     * 保存角色菜单关联关系
+     * 
+     * @param roleId
+     * @param menuIds
+     */
+    public void saveRoleMenuMap(String roleId, String... menuIds);
+
+    /**
+     * 保存用户功能映射关系
+     * 
+     * @param userid
+     * @param funcIds
+     */
+    public void saveUserFunctionMap(String userid, String... funcIds);
+
+    /**
+     * 保存用户菜单关联关系
+     * 
+     * @param userId
+     *            用户ID
+     * @param menuIds
+     *            菜单ID数组
+     */
+    public void saveUserMenuMap(String userId, String... menuIds);
+}

+ 105 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/org/entity/Org.java

@@ -0,0 +1,105 @@
+package com.xtframe.core.org.entity;
+
+/**
+ * 组织对象接口
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface Org {
+    /**
+     * 获取组织编码(00100F...十六进制式方便进行like查询)
+     * 
+     * @return
+     */
+    public String getCode();
+
+    /**
+     * 获取组织唯一标识
+     * 
+     * @return
+     */
+    public String getId();
+
+    /**
+     * 获取组织名称
+     * 
+     * @return
+     */
+    public String getName();
+
+    /**
+     * 获取上级ID
+     * 
+     * @return
+     */
+    public String getPid();
+
+    /**
+     * 备注
+     * 
+     * @return
+     */
+    public String getRemark();
+
+    /**
+     * 排序号
+     * 
+     * @return
+     */
+    public int getSortno();
+
+    /**
+     * 是否有效
+     * 
+     * @return
+     */
+    public Boolean getValid();
+
+    /**
+     * 设置组织编码(00100F...十六进制式方便进行like查询)
+     */
+    public void setCode(String code);
+
+    /**
+     * 设置组织唯一标识
+     * 
+     * @return
+     */
+    public void setId(String id);
+
+    /**
+     * 设置组织名称
+     * 
+     * @return
+     */
+    public void setName(String name);
+
+    /**
+     * 设置上级组织ID
+     * 
+     * @param id
+     */
+    public void setPid(String id);
+
+    /**
+     * 备注
+     * 
+     * @param remark
+     */
+    public void setRemark(String remark);
+
+    /**
+     * 排序号
+     * 
+     * @param sortno
+     */
+    public void setSortno(int sortno);
+
+    /**
+     * 是否有效
+     * 
+     * @param valid
+     */
+    public void setValid(Boolean valid);
+}

+ 80 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/org/service/OrgService.java

@@ -0,0 +1,80 @@
+package com.xtframe.core.org.service;
+
+import java.util.List;
+
+import com.xtframe.core.org.entity.Org;
+
+/**
+ * 组织服务
+ * 
+ * @author 袁晓冬
+ *
+ * @param <T>
+ */
+public interface OrgService {
+
+	/**
+	 * 根据主键删除记录
+	 * 
+	 * @param ids
+	 * @return
+	 */
+	public String delete(String... ids);
+
+	/**
+	 * 根据组织code进行检索
+	 * 
+	 * @param code
+	 * @return
+	 */
+	public List<Org> findByCode(String code);
+
+	/**
+	 * 根据组织code进行like检索
+	 * 
+	 * @param code
+	 * @return
+	 */
+	public List<Org> findByCodeLike(String code);
+
+	/**
+	 * 根据上级组织ID检索分页下级
+	 * 
+	 * @param pid
+	 * @param pageable
+	 * @return
+	 */
+	public Object findByPid(String pid, Object pageable);
+
+	/**
+	 * 根据主键查找实体
+	 * 
+	 * @param id
+	 * @return
+	 */
+	public Org findOne(String id);
+
+	/**
+	 * 根据上级ID查找下级有效记录
+	 * 
+	 * @param pid
+	 * @return
+	 */
+	public List<Org> findValidOrgsByPid(String pid);
+
+	/**
+	 * 保存实体
+	 * 
+	 * @param u
+	 * @return
+	 */
+	public Org save(Org u);
+
+	/**
+	 * 根据下级code检索上级
+	 * 
+	 * @param orgCode
+	 * @return
+	 */
+	public List<Org> findBySubCode(String orgCode);
+}

+ 94 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/role/entity/Role.java

@@ -0,0 +1,94 @@
+package com.xtframe.core.role.entity;
+
+
+/**
+ * 角色对象接口
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface Role {
+    /**
+     * 角色编码
+     * 
+     * @return
+     */
+    public String getCode();
+
+    /**
+     * 用户唯一标识
+     * 
+     * @return
+     */
+    public String getId();
+
+    /**
+     * 角色名称
+     * 
+     * @return
+     */
+    public String getName();
+
+    /**
+     * 获取所在组织ID
+     * 
+     * @return
+     */
+    public String getOrgid();
+
+    /**
+     * 排序号
+     * 
+     * @return
+     */
+    public int getSortno();
+
+    /**
+     * 用户是否有效
+     * 
+     * @return
+     */
+    public Boolean getValid();
+
+    /**
+     * 设置角色编码
+     * 
+     * @param code
+     */
+    public void setCode(String code);
+
+    /**
+     * 设置唯一标识
+     * 
+     * @param id
+     */
+    public void setId(String id);
+
+    /**
+     * 设置用户名称
+     * 
+     * @param name
+     */
+    public void setName(String name);
+
+    /**
+     * 设置所在组织ID
+     * 
+     * @param orgid
+     */
+    public void setOrgid(String orgid);
+
+    /**
+     * 排序号
+     * 
+     * @param sortno
+     */
+    public void setSortno(int sortno);
+
+    /**
+     * 设置是否有效
+     * 
+     * @param valid
+     */
+    public void setValid(Boolean valid);
+}

+ 116 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/role/service/RoleService.java

@@ -0,0 +1,116 @@
+package com.xtframe.core.role.service;
+
+import java.util.Collection;
+import java.util.List;
+
+import com.xtframe.core.menu.entity.Menu;
+import com.xtframe.core.role.entity.Role;
+
+/**
+ * 角色服务
+ * 
+ * @author 袁晓冬
+ *
+ * @param <T>
+ */
+public interface RoleService {
+    /**
+     * 根据主键删除记录
+     * 
+     * @param ids
+     * @return
+     */
+    public void delete(String... ids);
+
+    /**
+     * 根据角色编码查询角色
+     * 
+     * @param uname
+     * @return
+     */
+    public List<Role> findByCode(String code);
+
+    /**
+     * 根据角色编码和所在组织编码检索角色
+     * 
+     * @param code
+     * @param orgCodes
+     * @return
+     */
+    public List<Role> findByCodeAndOrgCodeIn(String code, Collection<String> orgCodes);
+
+    /**
+     * 根据角色编码和所在组织ID检索角色
+     * 
+     * @param code
+     * @param orgId
+     * @return
+     */
+    public List<Role> findByCodeAndOrgIdIn(String code, Collection<String> orgCodes);
+
+    /**
+     * 根据角色编码查找指定组织的上级组织(不包含本级组织)
+     * 
+     * @param code
+     * @param org
+     * @return
+     */
+    public List<Role> findByCodeAndPOrgCode(String code, String orgCode);
+
+    /**
+     * 根据角色编码查找指定组织的下级组织(不包含本级组织)
+     * 
+     * @param code
+     * @param orgCode
+     * @return
+     */
+    public List<Role> findByCodeAndSubOrgCode(String code, String orgCode);
+
+    /**
+     * 根据角色唯一标识查询
+     * 
+     * @param id
+     * @return
+     */
+    public Role findById(String id);
+
+    /**
+     * 根据组织编码获取角色
+     * 
+     * @param orgCode
+     * @return
+     */
+    public List<Role> findByOrgCode(String orgCode);
+
+    /**
+     * 根据组织ID获取角色
+     * 
+     * @param org
+     * @return
+     */
+    public List<Role> findByOrgid(String org);
+
+    /**
+     * 根据角色ID查找授权的菜单
+     * 
+     * @param rid
+     * @return
+     */
+    public List<Menu> findMenus(String roleId);
+
+    /**
+     * 保存角色
+     * 
+     * @param u
+     * @return
+     */
+    public Role save(Role u);
+
+    /**
+     * 根据用户ID查找角色
+     * 
+     * @param userid
+     * @return
+     */
+    public List<Role> findByUserid(final String userid);
+}

+ 133 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/CoreMgr.java

@@ -0,0 +1,133 @@
+package com.xtframe.core.support;
+
+import java.util.List;
+
+import com.xtframe.core.code.service.CodeService;
+import com.xtframe.core.data.service.DataPermService;
+import com.xtframe.core.job.service.JobInfoService;
+import com.xtframe.core.log.BizLogRecorderService;
+import com.xtframe.core.menu.entity.Menu;
+import com.xtframe.core.menu.service.MenuService;
+import com.xtframe.core.org.entity.Org;
+import com.xtframe.core.org.service.OrgService;
+import com.xtframe.core.role.service.RoleService;
+import com.xtframe.core.user.entity.User;
+import com.xtframe.core.user.service.UserService;
+
+/**
+ * 系统核心功能访问接口
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface CoreMgr {
+
+	/**
+	 * 获取字典服务接口
+	 * 
+	 * @return
+	 */
+	CodeService getCodeService();
+
+	/**
+	 * 数据权限操作接口
+	 * 
+	 * @return
+	 */
+	DataPermService getDataPermService();
+
+	/**
+	 * 获取下级授权的有效菜单,pid为空时返回第一层菜单
+	 * 
+	 * @param pid
+	 * @return
+	 */
+	public List<Menu> findPermittedMenusByPid(String pid);
+
+	/**
+	 * 获取下级有效菜单,不进行授权过滤
+	 * 
+	 * @param pid
+	 * @return
+	 */
+	public List<Menu> findValidMenusByPid(String pid);
+
+	/**
+	 * 获取业务日志记录服务
+	 * 
+	 * @return
+	 */
+	public BizLogRecorderService getBizLogRecorderService();
+
+	/**
+	 * 获取当前登录用户
+	 * 
+	 * @return
+	 */
+	public User getCurrUser();
+
+	/**
+	 * 获取当前登录用户所在组织
+	 * 
+	 * @return
+	 */
+	public Org getCurrUserOrg();
+
+	/**
+	 * 获取session属性
+	 * 
+	 * @param attr
+	 * @return
+	 */
+	public Object getSessionAttr(Object attr);
+
+	/**
+	 * 判断用户是否已经过身份验证
+	 * 
+	 * @return
+	 */
+	boolean isAuthenticated();
+
+	/**
+	 * 定时任务服务接口
+	 * 
+	 * @return
+	 */
+	JobInfoService getJobInfoService();
+
+	/**
+	 * 获取菜单服务接口
+	 * 
+	 * @return
+	 */
+	MenuService getMenuService();
+
+	/**
+	 * 组织服务
+	 * 
+	 * @return
+	 */
+	OrgService getOrgService();
+
+	/**
+	 * 获取角色服务接口
+	 * 
+	 * @return
+	 */
+	RoleService getRoleService();
+
+	/**
+	 * 设置session属性
+	 * 
+	 * @param name
+	 * @param value
+	 */
+	void setSessionAttr(Object name, Object value);
+
+	/**
+	 * 用户服务接口
+	 * 
+	 * @return
+	 */
+	UserService getUserService();
+}

+ 8 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/SessionMgr.java

@@ -0,0 +1,8 @@
+package com.xtframe.core.support;
+
+/**
+ * Session管理接口
+ */
+public interface SessionMgr {
+	Object getAttribute(Object key);
+}

+ 14 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/WorkFlowMgr.java

@@ -0,0 +1,14 @@
+package com.xtframe.core.support;
+
+import com.xtframe.core.wf.WorkFlowEngineClient;
+
+/**
+ * 工作流相关功能接口
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface WorkFlowMgr {
+    /** 获取流程执行客户端接口 */
+    WorkFlowEngineClient workFlowEngineClient();
+}

+ 14 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/aware/CoreMgrAware.java

@@ -0,0 +1,14 @@
+package com.xtframe.core.support.aware;
+
+import com.xtframe.core.support.CoreMgr;
+
+
+/**
+ * 安全服务提供标识
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface CoreMgrAware {
+    public void setCoreMgr(CoreMgr coreMgr);
+}

+ 11 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/support/aware/WorkflowMgrAware.java

@@ -0,0 +1,11 @@
+package com.xtframe.core.support.aware;
+
+/**
+ * 工作流服务提供标识
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface WorkflowMgrAware {
+    public void setWorkflowMgrAware(WorkflowMgrAware orkflowMgrAware);
+}

+ 160 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/user/entity/User.java

@@ -0,0 +1,160 @@
+/** 
+ * 文 件 名 : User.java 
+ * 创 建 人:袁晓冬
+ * 日     期: 2015年6月23日下午5:28:37
+ * 修 改 人: 
+ * 日     期: 
+ * 版 本 号: 
+ * CopyRright (c) 2015 江苏省新通智能交通科技发展有限公司
+ */
+package com.xtframe.core.user.entity;
+
+/**
+ * CopyRright (c) 2015 江苏省新通智能交通科技发展有限公司
+ * 项 目 名: xtCore-oa
+ * 注 释: 用户对象接口 <br/>
+ * 命名空间: com.xtframe.core.user.entity
+ * 创 建 人: 袁晓冬
+ * 日 期: 2015年6月23日下午5:28:37
+ * 修 改 人:袁晓冬
+ * 日 期:2015年7月6日11:18:09
+ * 修改原因:增加微信号字段
+ * 版 本 号:
+ * 
+ * @since JDK 1.6
+ */
+public interface User {
+
+    /**
+     * 用户唯一标识
+     * 
+     * @return
+     */
+    public String getId();
+
+    /**
+     * 用户名称
+     * 
+     * @return
+     */
+    public String getName();
+
+    /**
+     * 获取用户所在组织ID
+     * 
+     * @return
+     */
+    public String getOrg();
+
+    /**
+     * 获取组织名称
+     * 
+     * @return
+     */
+    public String getOrgName();
+
+    /**
+     * 用户密码
+     * 
+     * @return
+     */
+    public String getPassword();
+
+    /**
+     * 排序号
+     * 
+     * @return
+     */
+    public int getSortno();
+
+    /**
+     * 用户登录账号
+     * 
+     * @return
+     */
+    public String getUname();
+
+    /**
+     * 用户是否有效
+     * 
+     * @return
+     */
+    public Boolean getValid();
+
+    /**
+     * 微信ID
+     * 
+     * @return
+     */
+    public String getWeixinid();
+
+    /**
+     * 设置唯一标识
+     * 
+     * @param id
+     */
+    public void setId(String id);
+
+    /**
+     * 设置用户名称
+     * 
+     * @param name
+     */
+    public void setName(String name);
+
+    /**
+     * 更新用户所在组织
+     * 
+     * @param org
+     */
+    public void setOrg(String org);
+
+    /**
+     * 设置组织名称
+     * 
+     * @param orgName
+     */
+    public void setOrgName(String orgName);
+
+    /**
+     * 设置登录密码
+     * 
+     * @param password
+     */
+    public void setPassword(String password);
+
+    /**
+     * 排序号
+     * 
+     * @param sortno
+     */
+    public void setSortno(int sortno);
+
+    /**
+     * 设置登录账号
+     * 
+     * @param uname
+     */
+    public void setUname(String uname);
+
+    /**
+     * 设置是否有效
+     * 
+     * @param valid
+     */
+    public void setValid(Boolean valid);
+
+    /**
+     * 微信ID
+     * 
+     * @param weixinid
+     */
+    public void setWeixinid(String weixinid);
+
+    /**
+     * 微信ID
+     * 
+     * @param chatid
+     */
+    public void setChatid(String chatid);
+}

+ 97 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/user/service/UserService.java

@@ -0,0 +1,97 @@
+package com.xtframe.core.user.service;
+
+import java.util.List;
+
+import com.xtframe.core.user.entity.User;
+
+/**
+ * 用户服务接口
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface UserService {
+    /**
+     * 根据主键删除记录
+     * 
+     * @param ids
+     *            用户ID
+     * @return
+     */
+    public String delete(String... ids);
+
+    /**
+     * 删除用户关联的角色
+     * 
+     * @param uid
+     *            用户ID
+     * @param rids
+     *            待删除的用户角色数组
+     */
+    public void deleteUserRoles(String uid, String[] rids);
+
+    /**
+     * 根据用户唯一标识查询
+     * 
+     * @param id
+     *            用户唯一标识
+     * @return User
+     */
+    public User findById(String id);
+
+    /**
+     * 根据组织ID查找用户
+     * 
+     * @param orgId
+     *            用户所在组织ID
+     * @return
+     */
+    public List<User> findByOrg(String orgId);
+
+    /**
+     * 根据组织ID和角色编码过滤本组织下的用户
+     * 
+     * @param orgId
+     *            组织UUID
+     * @param roleCodes
+     *            角色编码code
+     * @return
+     */
+    public List<User> findByOrgAndRoleCode(String orgId, List<String> roleCodes);
+
+    /**
+     * 根据角色查询用户
+     * 
+     * @param roleId
+     * @return
+     */
+    public List<User> findByRole(String roleId);
+
+    /**
+     * 根据用户名查询用户
+     * 
+     * @param uname
+     *            用户登录名称
+     * @return User
+     */
+    public User findByUname(String uname);
+
+    /**
+     * 保存用户
+     * 
+     * @param u
+     *            User用户对象
+     * @return User 用户对象
+     */
+    public User save(User u);
+
+    /**
+     * 保存用户角色关联关系
+     * 
+     * @param uid
+     *            用户ID
+     * @param rids
+     *            角色ID数组
+     */
+    public void saveUserRoles(String uid, String[] rids);
+}

+ 548 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/utils/Assert.java

@@ -0,0 +1,548 @@
+package com.xtframe.core.utils;
+
+import java.util.Collection;
+import java.util.Map;
+
+import com.xtframe.core.exception.BizException;
+import com.xtframe.util.CollectionUtils;
+import com.xtframe.util.ObjectUtils;
+import com.xtframe.util.StringUtils;
+
+/**
+ * 断言共通类
+ * 
+ * @author 袁晓冬
+ *
+ */
+public abstract class Assert {
+
+	/**
+	 * Assert a boolean expression, throwing {@code BizException} if
+	 * the test result is {@code false}.
+	 * 
+	 * <pre class="code">
+	 * Assert.isTrue(i &gt; 0, &quot;The value must be greater than zero&quot;);
+	 * </pre>
+	 * 
+	 * @param expression
+	 *            a boolean expression
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @throws BizException
+	 *             if expression is {@code false}
+	 */
+	public static void isTrue(boolean expression, String message) {
+		if (!expression) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert a boolean expression, throwing {@code BizException} if
+	 * the test result is {@code false}.
+	 * 
+	 * <pre class="code">
+	 * Assert.isTrue(i &gt; 0);
+	 * </pre>
+	 * 
+	 * @param expression
+	 *            a boolean expression
+	 * @throws BizException
+	 *             if expression is {@code false}
+	 */
+	public static void isTrue(boolean expression) {
+		isTrue(expression, "[Assertion failed] - this expression must be true");
+	}
+
+	/**
+	 * Assert that an object is {@code null} .
+	 * 
+	 * <pre class="code">
+	 * Assert.isNull(value, &quot;The value must be null&quot;);
+	 * </pre>
+	 * 
+	 * @param object
+	 *            the object to check
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @throws BizException
+	 *             if the object is not {@code null}
+	 */
+	public static void isNull(Object object, String message) {
+		if (object != null) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert that an object is {@code null} .
+	 * 
+	 * <pre class="code">
+	 * Assert.isNull(value);
+	 * </pre>
+	 * 
+	 * @param object
+	 *            the object to check
+	 * @throws BizException
+	 *             if the object is not {@code null}
+	 */
+	public static void isNull(Object object) {
+		isNull(object, "[Assertion failed] - the object argument must be null");
+	}
+
+	/**
+	 * Assert that an object is not {@code null} .
+	 * 
+	 * <pre class="code">
+	 * Assert.notNull(clazz, &quot;The class must not be null&quot;);
+	 * </pre>
+	 * 
+	 * @param object
+	 *            the object to check
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @throws BizException
+	 *             if the object is {@code null}
+	 */
+	public static void notNull(Object object, String message) {
+		if (object == null) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert that an object is not {@code null} .
+	 * 
+	 * <pre class="code">
+	 * Assert.notNull(clazz);
+	 * </pre>
+	 * 
+	 * @param object
+	 *            the object to check
+	 * @throws BizException
+	 *             if the object is {@code null}
+	 */
+	public static void notNull(Object object) {
+		notNull(object, "[Assertion failed] - this argument is required; it must not be null");
+	}
+
+	/**
+	 * Assert that the given String is not empty; that is, it must not be
+	 * {@code null} and not the empty String.
+	 * 
+	 * <pre class="code">
+	 * Assert.hasLength(name, &quot;Name must not be empty&quot;);
+	 * </pre>
+	 * 
+	 * @param text
+	 *            the String to check
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @see StringUtils#hasLength
+	 */
+	public static void hasLength(String text, String message) {
+		if (!StringUtils.hasLength(text)) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert that the given String is not empty; that is, it must not be
+	 * {@code null} and not the empty String.
+	 * 
+	 * <pre class="code">
+	 * Assert.hasLength(name);
+	 * </pre>
+	 * 
+	 * @param text
+	 *            the String to check
+	 * @see StringUtils#hasLength
+	 */
+	public static void hasLength(String text) {
+		hasLength(text, "[Assertion failed] - this String argument must have length; it must not be null or empty");
+	}
+
+	/**
+	 * Assert that the given String has valid text content; that is, it must not
+	 * be {@code null} and must contain at least one non-whitespace character.
+	 * 
+	 * <pre class="code">
+	 * Assert.hasText(name, &quot;'name' must not be empty&quot;);
+	 * </pre>
+	 * 
+	 * @param text
+	 *            the String to check
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @see StringUtils#hasText
+	 */
+	public static void hasText(String text, String message) {
+		if (!StringUtils.hasText(text)) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert that the given String has valid text content; that is, it must not
+	 * be {@code null} and must contain at least one non-whitespace character.
+	 * 
+	 * <pre class="code">
+	 * Assert.hasText(name, &quot;'name' must not be empty&quot;);
+	 * </pre>
+	 * 
+	 * @param text
+	 *            the String to check
+	 * @see StringUtils#hasText
+	 */
+	public static void hasText(String text) {
+		hasText(text,
+		        "[Assertion failed] - this String argument must have text; it must not be null, empty,'null', or blank");
+	}
+
+	/**
+	 * 非空字符串判断<br>
+	 * “null”视为空字符串
+	 * 
+	 * @param text
+	 * @param message
+	 */
+	public static void notBlank(String text, String message) {
+		if (!StringUtils.hasText(text) || "null".equalsIgnoreCase(message)) {
+			throw new BizException(message);
+		}
+	}
+
+	public static void notBlank(String text) {
+		notBlank(text,
+		        "[Assertion failed] - this String argument must have text; it must not be null, empty,'null', or blank");
+	}
+
+	/**
+	 * Assert that the given text does not contain the given substring.
+	 * 
+	 * <pre class="code">
+	 * Assert.doesNotContain(name, &quot;rod&quot;, &quot;Name must not contain 'rod'&quot;);
+	 * </pre>
+	 * 
+	 * @param textToSearch
+	 *            the text to search
+	 * @param substring
+	 *            the substring to find within the text
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 */
+	public static void doesNotContain(String textToSearch, String substring, String message) {
+		if (StringUtils.hasLength(textToSearch) && StringUtils.hasLength(substring) && textToSearch.contains(substring)) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert that the given text does not contain the given substring.
+	 * 
+	 * <pre class="code">
+	 * Assert.doesNotContain(name, &quot;rod&quot;);
+	 * </pre>
+	 * 
+	 * @param textToSearch
+	 *            the text to search
+	 * @param substring
+	 *            the substring to find within the text
+	 */
+	public static void doesNotContain(String textToSearch, String substring) {
+		doesNotContain(textToSearch, substring,
+		        "[Assertion failed] - this String argument must not contain the substring [" + substring + "]");
+	}
+
+	/**
+	 * Assert that an array has elements; that is, it must not be {@code null}
+	 * and must have at least one element.
+	 * 
+	 * <pre class="code">
+	 * Assert.notEmpty(array, &quot;The array must have elements&quot;);
+	 * </pre>
+	 * 
+	 * @param array
+	 *            the array to check
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @throws BizException
+	 *             if the object array is {@code null} or has no elements
+	 */
+	public static void notEmpty(Object[] array, String message) {
+		if (ObjectUtils.isEmpty(array)) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert that an array has elements; that is, it must not be {@code null}
+	 * and must have at least one element.
+	 * 
+	 * <pre class="code">
+	 * Assert.notEmpty(array);
+	 * </pre>
+	 * 
+	 * @param array
+	 *            the array to check
+	 * @throws BizException
+	 *             if the object array is {@code null} or has no elements
+	 */
+	public static void notEmpty(Object[] array) {
+		notEmpty(array, "[Assertion failed] - this array must not be empty: it must contain at least 1 element");
+	}
+
+	/**
+	 * Assert that an array has no null elements. Note: Does not complain if the
+	 * array is empty!
+	 * 
+	 * <pre class="code">
+	 * Assert.noNullElements(array, &quot;The array must have non-null elements&quot;);
+	 * </pre>
+	 * 
+	 * @param array
+	 *            the array to check
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @throws BizException
+	 *             if the object array contains a {@code null} element
+	 */
+	public static void noNullElements(Object[] array, String message) {
+		if (array != null) {
+			for (Object element : array) {
+				if (element == null) {
+					throw new BizException(message);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Assert that an array has no null elements. Note: Does not complain if the
+	 * array is empty!
+	 * 
+	 * <pre class="code">
+	 * Assert.noNullElements(array);
+	 * </pre>
+	 * 
+	 * @param array
+	 *            the array to check
+	 * @throws BizException
+	 *             if the object array contains a {@code null} element
+	 */
+	public static void noNullElements(Object[] array) {
+		noNullElements(array, "[Assertion failed] - this array must not contain any null elements");
+	}
+
+	/**
+	 * Assert that a collection has elements; that is, it must not be
+	 * {@code null} and must have at least one element.
+	 * 
+	 * <pre class="code">
+	 * Assert.notEmpty(collection, &quot;Collection must have elements&quot;);
+	 * </pre>
+	 * 
+	 * @param collection
+	 *            the collection to check
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @throws BizException
+	 *             if the collection is {@code null} or has no elements
+	 */
+	public static void notEmpty(Collection<?> collection, String message) {
+		if (CollectionUtils.isEmpty(collection)) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert that a collection has elements; that is, it must not be
+	 * {@code null} and must have at least one element.
+	 * 
+	 * <pre class="code">
+	 * Assert.notEmpty(collection, &quot;Collection must have elements&quot;);
+	 * </pre>
+	 * 
+	 * @param collection
+	 *            the collection to check
+	 * @throws BizException
+	 *             if the collection is {@code null} or has no elements
+	 */
+	public static void notEmpty(Collection<?> collection) {
+		notEmpty(collection,
+		        "[Assertion failed] - this collection must not be empty: it must contain at least 1 element");
+	}
+
+	/**
+	 * Assert that a Map has entries; that is, it must not be {@code null} and
+	 * must have at least one entry.
+	 * 
+	 * <pre class="code">
+	 * Assert.notEmpty(map, &quot;Map must have entries&quot;);
+	 * </pre>
+	 * 
+	 * @param map
+	 *            the map to check
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @throws BizException
+	 *             if the map is {@code null} or has no entries
+	 */
+	public static void notEmpty(Map<?, ?> map, String message) {
+		if (CollectionUtils.isEmpty(map)) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert that a Map has entries; that is, it must not be {@code null} and
+	 * must have at least one entry.
+	 * 
+	 * <pre class="code">
+	 * Assert.notEmpty(map);
+	 * </pre>
+	 * 
+	 * @param map
+	 *            the map to check
+	 * @throws BizException
+	 *             if the map is {@code null} or has no entries
+	 */
+	public static void notEmpty(Map<?, ?> map) {
+		notEmpty(map, "[Assertion failed] - this map must not be empty; it must contain at least one entry");
+	}
+
+	/**
+	 * Assert that the provided object is an instance of the provided class.
+	 * 
+	 * <pre class="code">
+	 * Assert.instanceOf(Foo.class, foo);
+	 * </pre>
+	 * 
+	 * @param clazz
+	 *            the required class
+	 * @param obj
+	 *            the object to check
+	 * @throws BizException
+	 *             if the object is not an instance of clazz
+	 * @see Class#isInstance
+	 */
+	public static void isInstanceOf(Class<?> clazz, Object obj) {
+		isInstanceOf(clazz, obj, "");
+	}
+
+	/**
+	 * Assert that the provided object is an instance of the provided class.
+	 * 
+	 * <pre class="code">
+	 * Assert.instanceOf(Foo.class, foo);
+	 * </pre>
+	 * 
+	 * @param type
+	 *            the type to check against
+	 * @param obj
+	 *            the object to check
+	 * @param message
+	 *            a message which will be prepended to the message produced by
+	 *            the function itself, and which may be used to provide context.
+	 *            It should normally end in a ": " or ". " so that the function
+	 *            generate message looks ok when prepended to it.
+	 * @throws BizException
+	 *             if the object is not an instance of clazz
+	 * @see Class#isInstance
+	 */
+	public static void isInstanceOf(Class<?> type, Object obj, String message) {
+		notNull(type, "Type to check against must not be null");
+		if (!type.isInstance(obj)) {
+			throw new BizException((StringUtils.hasLength(message) ? message + " " : "")
+			        + "Object of class [" + (obj != null ? obj.getClass().getName() : "null")
+			        + "] must be an instance of " + type);
+		}
+	}
+
+	/**
+	 * Assert that {@code superType.isAssignableFrom(subType)} is {@code true}.
+	 * 
+	 * <pre class="code">
+	 * Assert.isAssignable(Number.class, myClass);
+	 * </pre>
+	 * 
+	 * @param superType
+	 *            the super type to check
+	 * @param subType
+	 *            the sub type to check
+	 * @throws BizException
+	 *             if the classes are not assignable
+	 */
+	public static void isAssignable(Class<?> superType, Class<?> subType) {
+		isAssignable(superType, subType, "");
+	}
+
+	/**
+	 * Assert that {@code superType.isAssignableFrom(subType)} is {@code true}.
+	 * 
+	 * <pre class="code">
+	 * Assert.isAssignable(Number.class, myClass);
+	 * </pre>
+	 * 
+	 * @param superType
+	 *            the super type to check against
+	 * @param subType
+	 *            the sub type to check
+	 * @param message
+	 *            a message which will be prepended to the message produced by
+	 *            the function itself, and which may be used to provide context.
+	 *            It should normally end in a ": " or ". " so that the function
+	 *            generate message looks ok when prepended to it.
+	 * @throws BizException
+	 *             if the classes are not assignable
+	 */
+	public static void isAssignable(Class<?> superType, Class<?> subType, String message) {
+		notNull(superType, "Type to check against must not be null");
+		if (subType == null || !superType.isAssignableFrom(subType)) {
+			throw new BizException(message + subType + " is not assignable to " + superType);
+		}
+	}
+
+	/**
+	 * Assert a boolean expression, throwing {@code BizException} if
+	 * the test result is {@code false}. Call isTrue if you wish to throw
+	 * BizException on an assertion failure.
+	 * 
+	 * <pre class="code">
+	 * Assert.state(id == null, &quot;The id property must not already be initialized&quot;);
+	 * </pre>
+	 * 
+	 * @param expression
+	 *            a boolean expression
+	 * @param message
+	 *            the exception message to use if the assertion fails
+	 * @throws BizException
+	 *             if expression is {@code false}
+	 */
+	public static void state(boolean expression, String message) {
+		if (!expression) {
+			throw new BizException(message);
+		}
+	}
+
+	/**
+	 * Assert a boolean expression, throwing {@link BizException} if
+	 * the test result is {@code false}.
+	 * <p>
+	 * Call {@link #isTrue(boolean)} if you wish to throw
+	 * {@link BizException} on an assertion failure.
+	 * 
+	 * <pre class="code">
+	 * Assert.state(id == null);
+	 * </pre>
+	 * 
+	 * @param expression
+	 *            a boolean expression
+	 * @throws BizException
+	 *             if the supplied expression is {@code false}
+	 */
+	public static void state(boolean expression) {
+		state(expression, "[Assertion failed] - this state invariant must be true");
+	}
+
+}

+ 24 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/utils/CoreConstants.java

@@ -0,0 +1,24 @@
+package com.xtframe.core.utils;
+
+/**
+ * 框架核心包常量
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface CoreConstants {
+
+	/** 系统公共代码-通用是否 */
+	String CODE_TY_SF = "TY_SF";
+	/** 系统公共代码-通用是否-是 */
+	String CODE_TY_SF_YES = "Y";
+	/** 系统公共代码-通用是否-否 */
+	String CODE_TY_SF_NO = "N";
+
+	/** session中存储授权信息的key值 */
+	String SESSION_KEY_AUTH = "_AUTH";
+	/** session中存储组织的key值 */
+	String SESSION_KEY_ORG = "_ORG";
+	/** SESSION中存储系统名称 */
+	String SESSION_SYS_NAME = "_SYS_NAME";
+}

+ 58 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/utils/SystemParam.java

@@ -0,0 +1,58 @@
+package com.xtframe.core.utils;
+
+import java.util.Map;
+
+/**
+ * 系统参数对象
+ * 
+ * @author 袁晓冬
+ *
+ */
+public abstract class SystemParam {
+    /**
+     * 根据参数名称获取参数值
+     * 
+     * @param name
+     * @return
+     */
+    public static String get(String name) {
+        if (null == paramMap) { return null; }
+        return paramMap.get(name);
+    }
+
+    /**
+     * 获取系统名称
+     * 
+     * @return
+     */
+    public static String getAppName() {
+        return appName;
+    }
+
+    /**
+     * 获取系统初始化默认密码
+     * 
+     * @return
+     */
+    public static String getDefaultPwd() {
+        return defaultPwd;
+    }
+
+    /**
+     * 是否记录业务日志
+     * 
+     * @return
+     */
+    public static boolean isSaveBizLog() {
+        return "true".equalsIgnoreCase(saveBizLog);
+    }
+
+    private static Map<String, String> paramMap = null;
+
+    private static String appName;
+
+    private static String defaultPwd;
+
+    private static String saveBizLog = "false";
+
+}

+ 50 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/utils/WorkflowConsts.java

@@ -0,0 +1,50 @@
+package com.xtframe.core.utils;
+
+/**
+ * 流程常量
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface WorkflowConsts {
+    /** 流程属性-流程启动类型 */
+    String WF_START_TYPE = "s_startType";
+    /** 流程属性-角色ID */
+    String WF_ROLE_ID = "s_roleId";
+    /** 流程属性-发送人角色ID */
+    String WF_SENDER_ROLE_ID = "s_sender_roleId";
+    /** 流程属性-发送人ID */
+    String WF_SENDER_ID = "s_sender_id";
+    /** 流程属性-发送人名称 */
+    String WF_SENDER_NAME = "s_sender_name";
+    /** 流程属性-发送人所在组织ID */
+    String WF_SENDER_ORG_ID = "s_sender_org_id";
+    /** 流程属性-发送人所在组织名称 */
+    String WF_SENDER_ORG_NAME = "s_sender_org_name";
+    /** 发送时间 */
+    String WF_SEND_TIME = "s_send_time";
+    /** 任务处理页面URL */
+    String WF_TASK_URL = "s_task_url";
+    /** 业务名称 */
+    String WF_BIZ_NAME = "s_biz_name";
+    /** 处理结果 */
+    String WF_HANDLER_RESULT = "s_handle_result";
+    /** 处理意见 */
+    String WF_HANDLER_REMARK = "s_handle_remark";
+    /** 下一步处理人 */
+    String WF_BIZ_HANDLERS = "handlers";
+    /** 下一步跳转步骤 */
+    String WF_BIZ_NEXT_STEP = "next_step";
+    /** 组织操作与角色分隔符 */
+    String WF_GROUP_SEP = "__";
+    /** 组织方向变量:同级、上级、下级 */
+    String WF_GROUP_ORG_DIR = "s_task_org_dir";
+    /** 组织方向:同级 */
+    String WF_GROUP_ORG_DIR_EQ = "eq";
+    /** 组织方向:上级 */
+    String WF_GROUP_ORG_DIR_UP = "gt";
+    /** 组织方向:下级 */
+    String WF_GROUP_ORG_DIR_DW = "dw";
+    /** UEL表达式中当前用户所在组织ID变量 */
+    String WF_UEL_PARAM_CURR_ORG = "currUserOrg";
+}

+ 170 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/Execution.java

@@ -0,0 +1,170 @@
+package com.xtframe.core.wf;
+
+/**
+ * Represent a 'path of execution' in a process instance.
+ * 
+ * @author 袁晓冬
+ *
+ */
+public class Execution {
+
+    /** The unique identifier of the execution. */
+    String id;
+
+    /** Indicates if the execution is suspended. */
+    boolean suspended;
+
+    /** Indicates if the execution is ended. */
+    boolean ended;
+
+    /**
+     * Returns the id of the activity where the execution currently is at.
+     * Returns null if the execution is not a 'leaf' execution (eg concurrent parent).
+     */
+    String activityId;
+    /**
+     * 流程步骤名称
+     */
+    String activityName;
+
+    /**
+     * Id of the root of the execution tree representing the process instance.
+     * It is the same as {@link #getId()} if this execution is the process instance.
+     */
+    String processInstanceId;
+
+    /**
+     * Gets the id of the parent of this execution. If null, the execution represents a process-instance.
+     */
+    String parentId;
+
+    /**
+     * Returns the id of the activity where the execution currently is at.
+     * Returns null if the execution is not a 'leaf' execution (eg concurrent parent).
+     * 
+     * @return
+     */
+    public String getActivityId() {
+        return activityId;
+    }
+
+    /**
+     * 流程步骤名称
+     * 
+     * @return
+     */
+    public String getActivityName() {
+        return activityName;
+    }
+
+    /**
+     * The unique identifier of the execution.
+     * 
+     * @return
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Gets the id of the parent of this execution. If null, the execution represents a process-instance.
+     * 
+     * @return
+     */
+    public String getParentId() {
+        return parentId;
+    }
+
+    /**
+     * Id of the root of the execution tree representing the process instance.
+     * It is the same as {@link #getId()} if this execution is the process instance.
+     * 
+     * @return
+     */
+    public String getProcessInstanceId() {
+        return processInstanceId;
+    }
+
+    /**
+     * Indicates if the execution is ended.
+     * 
+     * @return
+     */
+    public boolean isEnded() {
+        return ended;
+    }
+
+    /**
+     * Indicates if the execution is suspended.
+     * 
+     * @return
+     */
+    public boolean isSuspended() {
+        return suspended;
+    }
+
+    /**
+     * Returns the id of the activity where the execution currently is at.
+     * Returns null if the execution is not a 'leaf' execution (eg concurrent parent).
+     * 
+     * @param activityId
+     */
+    public void setActivityId(String activityId) {
+        this.activityId = activityId;
+    }
+
+    /**
+     * 流程步骤名称
+     * 
+     * @param activityName
+     */
+    public void setActivityName(String activityName) {
+        this.activityName = activityName;
+    }
+
+    /**
+     * Indicates if the execution is ended.
+     * 
+     * @param ended
+     */
+    public void setEnded(boolean ended) {
+        this.ended = ended;
+    }
+
+    /**
+     * The unique identifier of the execution.
+     * 
+     * @param id
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets the id of the parent of this execution. If null, the execution represents a process-instance.
+     * 
+     * @param parentId
+     */
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    /**
+     * Id of the root of the execution tree representing the process instance.
+     * It is the same as {@link #getId()} if this execution is the process instance.
+     * 
+     * @param processInstanceId
+     */
+    public void setProcessInstanceId(String processInstanceId) {
+        this.processInstanceId = processInstanceId;
+    }
+
+    /**
+     * Indicates if the execution is suspended.
+     * 
+     * @param suspended
+     */
+    public void setSuspended(boolean suspended) {
+        this.suspended = suspended;
+    }
+}

+ 72 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/NextTask.java

@@ -0,0 +1,72 @@
+package com.xtframe.core.wf;
+
+import java.util.List;
+
+/**
+ * 下一步信息
+ * 
+ * @author 袁晓冬
+ *
+ */
+public class NextTask {
+	/** 任务名称 */
+	String taskId;
+	/** 任务处理人 */
+	String assignee;
+	/** 任务处理组 */
+	List<String> groups;
+
+	/**
+	 * 任务处理人
+	 * 
+	 * @return
+	 */
+	public String getAssignee() {
+		return assignee;
+	}
+
+	/**
+	 * 任务处理组
+	 * 
+	 * @return
+	 */
+	public List<String> getGroups() {
+		return groups;
+	}
+
+	/**
+	 * 任务名称
+	 * 
+	 * @return
+	 */
+	public String getTaskId() {
+		return taskId;
+	}
+
+	/**
+	 * 任务处理人
+	 * 
+	 * @param assignee
+	 */
+	public void setAssignee(String assignee) {
+		this.assignee = assignee;
+	}
+
+	/**
+	 * 任务处理组
+	 * 
+	 * @param groups
+	 */
+	public void setGroups(List<String> groups) {
+		this.groups = groups;
+	}
+
+	/**
+	 * 任务名称
+	 * 
+	 * @param taskId
+	 */
+	public void setTaskId(String taskId) {
+		this.taskId = taskId;
+	}
+}

+ 192 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/ProcessDefinitionInfo.java

@@ -0,0 +1,192 @@
+package com.xtframe.core.wf;
+
+import java.util.Date;
+
+/**
+ * 流程定义对象
+ * 
+ * @author 袁晓冬
+ *
+ */
+public class ProcessDefinitionInfo {
+    /** 流程定义ID */
+    private String processDefinitionId;
+    /** 流程发布ID */
+    private String deploymentId;
+    /** 名称 */
+    private String processName;
+    /** KEY */
+    private String key;
+    /** 流程版本号 */
+    private String version;
+    /** 部署时间 */
+    private Date deploymentTime;
+    /** 是否挂起 */
+    private Boolean suspended;
+    /** 流程定义文件名 */
+    private String resourceName;
+    /** 流程图名 */
+    private String diagramResourceName;
+
+    /**
+     * 流程发布ID
+     * 
+     * @return
+     */
+    public String getDeploymentId() {
+        return deploymentId;
+    }
+
+    /**
+     * 部署时间
+     * 
+     * @return
+     */
+    public Date getDeploymentTime() {
+        return deploymentTime;
+    }
+
+    /**
+     * 流程图名
+     * 
+     * @return
+     */
+    public String getDiagramResourceName() {
+        return diagramResourceName;
+    }
+
+    /**
+     * 流程定义KEY
+     * 
+     * @return
+     */
+    public String getKey() {
+        return key;
+    }
+
+    /**
+     * 流程定义ID
+     * 
+     * @return
+     */
+    public String getProcessDefinitionId() {
+        return processDefinitionId;
+    }
+
+    /**
+     * 名称
+     * 
+     * @return
+     */
+    public String getProcessName() {
+        return processName;
+    }
+
+    /**
+     * 流程定义文件名
+     * 
+     * @return
+     */
+    public String getResourceName() {
+        return resourceName;
+    }
+
+    /**
+     * 是否挂起
+     * 
+     * @return
+     */
+    public Boolean getSuspended() {
+        return suspended;
+    }
+
+    /**
+     * 流程版本号
+     * 
+     * @return
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * 流程发布ID
+     * 
+     * @param deploymentId
+     */
+    public void setDeploymentId(String deploymentId) {
+        this.deploymentId = deploymentId;
+    }
+
+    /**
+     * 部署时间
+     * 
+     * @param deploymentTime
+     */
+    public void setDeploymentTime(Date deploymentTime) {
+        this.deploymentTime = deploymentTime;
+    }
+
+    /**
+     * 流程图名
+     * 
+     * @param diagramResourceName
+     */
+    public void setDiagramResourceName(String diagramResourceName) {
+        this.diagramResourceName = diagramResourceName;
+    }
+
+    /**
+     * 流程定义KEY
+     * 
+     * @param key
+     */
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    /**
+     * 流程定义ID
+     * 
+     * @param processDefinitionId
+     */
+    public void setProcessDefinitionId(String processDefinitionId) {
+        this.processDefinitionId = processDefinitionId;
+    }
+
+    /**
+     * 名称
+     * 
+     * @param processName
+     */
+    public void setProcessName(String processName) {
+        this.processName = processName;
+    }
+
+    /**
+     * 流程定义文件名
+     * 
+     * @param resourceName
+     */
+    public void setResourceName(String resourceName) {
+        this.resourceName = resourceName;
+    }
+
+    /**
+     * 是否挂起
+     * 
+     * @param suspended
+     */
+    public void setSuspended(Boolean suspended) {
+        this.suspended = suspended;
+    }
+
+    /**
+     * 流程版本号
+     * 
+     * @param version
+     */
+    public void setVersion(String version) {
+        this.version = version;
+    }
+}

+ 63 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/ProcessInst.java

@@ -0,0 +1,63 @@
+package com.xtframe.core.wf;
+
+import java.util.Map;
+
+/**
+ * 流程实例对象
+ * 
+ * @author 袁晓冬
+ *
+ */
+public class ProcessInst extends Execution {
+
+    /**
+     * The id of the process definition of the process instance.
+     */
+    String processDefinitionId;
+
+    /**
+     * The business key of this process instance.
+     */
+    String bizKey;
+
+    /**
+     * returns true if the process instance is suspended
+     */
+    boolean suspended;
+
+    /** Returns the process variables if requested in the process instance query */
+    Map<String, Object> processVariables;
+
+    public String getBizKey() {
+        return bizKey;
+    }
+
+    public String getProcessDefinitionId() {
+        return processDefinitionId;
+    }
+
+    public Map<String, Object> getProcessVariables() {
+        return processVariables;
+    }
+
+    public boolean isSuspended() {
+        return suspended;
+    }
+
+    public void setBizKey(String bizKey) {
+        this.bizKey = bizKey;
+    }
+
+    public void setProcessDefinitionId(String processDefinitionId) {
+        this.processDefinitionId = processDefinitionId;
+    }
+
+    public void setProcessVariables(Map<String, Object> processVariables) {
+        this.processVariables = processVariables;
+    }
+
+    public void setSuspended(boolean suspended) {
+        this.suspended = suspended;
+    }
+
+}

+ 220 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/SubmitInfo.java

@@ -0,0 +1,220 @@
+package com.xtframe.core.wf;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.xtframe.core.utils.WorkflowConsts;
+
+/**
+ * 活动完成提交信息
+ * 
+ * @author 袁晓冬
+ *
+ */
+public class SubmitInfo {
+	/** 任务ID */
+	String taskId;
+	/** 当前处理人ID */
+	String currUserId;
+	/** 下一步步骤 */
+	String nextStep;
+	/** 流程业务信息,对流程的业务信息进行修改,同样的会反映到流程相关的待办事宜上。 */
+	String bizName;
+	/** 是否回退 */
+	boolean back = false;
+	/** 下一步处理人 */
+	List<String> handlers;
+	/** 活动数据,如果为空,则不更新 */
+	Map<String, Object> variables;
+	/** 任务变量 */
+	Map<String, Object> taskVariables;
+	/** 处理结果 */
+	String handleResult;
+	/** 处理意见 */
+	String handleRemark;
+
+	/**
+	 * 获取流程业务信息,对流程的业务信息进行修改,同样的会反映到流程相关的待办事宜上。
+	 * 
+	 * @return
+	 */
+	public String getBizName() {
+		return bizName;
+	}
+
+	/**
+	 * 获取当前处理人ID
+	 * 
+	 * @return
+	 */
+	public String getCurrUserId() {
+		return currUserId;
+	}
+
+	/**
+	 * 处理意见,审批时设置
+	 * 
+	 * @return
+	 */
+	public String getHandleRemark() {
+		return handleRemark;
+	}
+
+	/**
+	 * 处理结果,审批时设置通过/不通过
+	 * 
+	 * @return
+	 */
+	public String getHandleResult() {
+		return handleResult;
+	}
+
+	/**
+	 * 下一步处理人
+	 * 
+	 * @return
+	 */
+	public List<String> getHandlers() {
+		return handlers;
+	}
+
+	/**
+	 * 下一步步骤
+	 * 
+	 * @return
+	 */
+	public String getNextStep() {
+		return nextStep;
+	}
+
+	/**
+	 * 获取任务ID
+	 * 
+	 * @return
+	 */
+	public String getTaskId() {
+		return taskId;
+	}
+
+	/**
+	 * task变量,task变量只有在任务存在的时候才会设置,只设置到当前任务,不设置到下一步产生的任务中
+	 * 
+	 * @return
+	 */
+	public Map<String, Object> getTaskVariables() {
+		if (null == taskVariables) {
+			taskVariables = new HashMap<String, Object>();
+		}
+		return taskVariables;
+	}
+
+	/**
+	 * 获取流程变量
+	 * 
+	 * @return
+	 */
+	public Map<String, Object> getVariables() {
+		if (null == variables) {
+			variables = new HashMap<String, Object>();
+		}
+		return variables;
+	}
+
+	public boolean isBack() {
+		return back;
+	}
+
+	public void setBack(boolean back) {
+		this.back = back;
+	}
+
+	/**
+	 * 设置流程业务信息,对流程的业务信息进行修改,同样的会反映到流程相关的待办事宜上。
+	 * 
+	 * @param bizName
+	 */
+	public void setBizName(String bizName) {
+		this.bizName = bizName;
+		getVariables().put(WorkflowConsts.WF_BIZ_NAME, bizName);
+	}
+
+	/**
+	 * 设置当前处理人ID
+	 * 
+	 * @param currUserId
+	 */
+	public void setCurrUserId(String currUserId) {
+		this.currUserId = currUserId;
+	}
+
+	/**
+	 * 处理意见,审批时设置
+	 * 
+	 * @param handleRemark
+	 */
+	public void setHandleRemark(String handleRemark) {
+		this.handleRemark = handleRemark;
+		getTaskVariables().put(WorkflowConsts.WF_HANDLER_REMARK, handleRemark);
+	}
+
+	/**
+	 * 处理结果,审批时设置通过/不通过
+	 * 
+	 * @param handleResult
+	 */
+	public void setHandleResult(String handleResult) {
+		this.handleResult = handleResult;
+		getTaskVariables().put(WorkflowConsts.WF_HANDLER_RESULT, handleResult);
+	}
+
+	/**
+	 * 下一步处理人
+	 * 
+	 * @param handlers
+	 */
+	public void setHandlers(List<String> handlers) {
+		getVariables().put(WorkflowConsts.WF_BIZ_HANDLERS, handlers);
+		this.handlers = handlers;
+	}
+
+	/**
+	 * 下一步步骤
+	 * 
+	 * @param nextStep
+	 */
+	public void setNextStep(String nextStep) {
+		getVariables().put(WorkflowConsts.WF_BIZ_NEXT_STEP, nextStep);
+		this.nextStep = nextStep;
+	}
+
+	/**
+	 * 设置任务ID
+	 * 
+	 * @param taskId
+	 */
+	public void setTaskId(String taskId) {
+		this.taskId = taskId;
+	}
+
+	/**
+	 * task变量
+	 * 
+	 * @param taskVariables
+	 * @deprecated 一般get之后put变量
+	 */
+	@Deprecated
+	public void setTaskVariables(Map<String, Object> taskVariables) {
+		this.taskVariables = taskVariables;
+	}
+
+	/**
+	 * 设置流程变量
+	 * 
+	 * @param variables
+	 */
+	public void setVariables(Map<String, Object> variables) {
+		this.variables = variables;
+	}
+
+}

+ 97 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/TaskNode.java

@@ -0,0 +1,97 @@
+package com.xtframe.core.wf;
+
+import java.util.List;
+
+/**
+ * 流程节点信息
+ * 
+ * @author 袁晓冬
+ *
+ */
+public class TaskNode {
+    /** 流程步骤ID */
+    private String id;
+    /** 步骤名称 */
+    private String name;
+    /** 执行角色 */
+    private String role;
+    /** 任务执行人ID【回退时有】 */
+    private List<String> handlerIds;
+    /** 任务执行人名称【回退时有】 */
+    private List<String> handlerNames;
+
+    public List<String> getHandlerIds() {
+        return handlerIds;
+    }
+
+    public List<String> getHandlerNames() {
+        return handlerNames;
+    }
+
+    /**
+     * 流程步骤ID
+     * 
+     * @return
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * 步骤名称
+     * 
+     * @return
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 执行角色
+     * 
+     * @return
+     */
+    public String getRole() {
+        return role;
+    }
+
+    public void setHandlerIds(List<String> handlerIds) {
+        this.handlerIds = handlerIds;
+    }
+
+    public void setHandlerNames(List<String> handlerNames) {
+        this.handlerNames = handlerNames;
+    }
+
+    /**
+     * 流程步骤ID
+     * 
+     * @param id
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * 步骤名称
+     * 
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 执行角色
+     * 
+     * @param role
+     */
+    public void setRole(String role) {
+        this.role = role;
+    }
+
+    @Override
+    public String toString() {
+        return "TaskNode [id=" + id + ", name=" + name + ", role=" + role + "]";
+    }
+}

+ 200 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/WFStartInfo.java

@@ -0,0 +1,200 @@
+package com.xtframe.core.wf;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.xtframe.core.utils.WorkflowConsts;
+import com.xtframe.util.StringUtils;
+
+/**
+ * 流程启动信息
+ * 
+ * @author 袁晓冬
+ *
+ */
+public class WFStartInfo {
+    /** 业务系统发起 */
+    public static final int STARTTYPE_COMMON = 1;
+    /** BPM发起 */
+    public static final int STARTTYPE_BPM = 0;
+    /** 流程Code(必填) */
+    String processDefinitionKey;
+    /** 流程发起人ID(必填) */
+    String startUserId;
+    /** 业务key */
+    String businessKey;
+    /** 流程发起人组织角色ID(必填) */
+    String roleId;
+    /** 启动类型,参见WFStartInfo的静态变量,默认为WFStartInfo.STARTTYPE_COMMON */
+    int startType;
+    /** 业务名称,在待办事宜中显示 */
+    String bizName;
+    /** 下一步步骤 */
+    String nextStep;
+    /** 下一步处理人 */
+    List<String> handlers;
+    /** 流程变量 */
+    Map<String, Object> variables;
+
+    /**
+     * 获取流程实例名称
+     * 
+     * @return
+     */
+    public String getBizName() {
+        return bizName;
+    }
+
+    /**
+     * 获取业务主键
+     * 
+     * @return
+     */
+    public String getBusinessKey() {
+        return businessKey;
+    }
+
+    /**
+     * 下一步处理人
+     * 
+     * @return
+     */
+    public List<String> getHandlers() {
+        return handlers;
+    }
+
+    /**
+     * 下一步步骤
+     * 
+     * @return
+     */
+    public String getNextStep() {
+        return nextStep;
+    }
+
+    /**
+     * 获取流程定义主键
+     * 
+     * @return
+     */
+    public String getProcessDefinitionKey() {
+        return processDefinitionKey;
+    }
+
+    /**
+     * 获取执行人角色
+     * 
+     * @return
+     */
+    public String getRoleId() {
+        return roleId;
+    }
+
+    /**
+     * 获取流程启动类型
+     * 
+     * @return
+     */
+    public int getStartType() {
+        return startType;
+    }
+
+    /**
+     * 获取当前执行人ID
+     * 
+     * @return
+     */
+    public String getStartUserId() {
+        return StringUtils.toNotNullString(getVariables().put(WorkflowConsts.WF_SENDER_ID, startUserId));
+    }
+
+    /**
+     * 获取流程变量,如果为null则自动创建
+     * 
+     * @return
+     */
+    public Map<String, Object> getVariables() {
+        if (null == variables) {
+            variables = new HashMap<String, Object>();
+            variables.put(WorkflowConsts.WF_START_TYPE, STARTTYPE_COMMON);
+        }
+        return variables;
+    }
+
+    /**
+     * 设置流程业务名称,同时会加入流程变量variables.s_biz_name中
+     * 
+     * @param bizName
+     */
+    public void setBizName(String bizName) {
+        this.bizName = bizName;
+        getVariables().put(WorkflowConsts.WF_BIZ_NAME, bizName);
+    }
+
+    public void setBusinessKey(String businessKey) {
+        this.businessKey = businessKey;
+    }
+
+    /**
+     * 下一步处理人
+     * 
+     * @param handlers
+     */
+    public void setHandlers(List<String> handlers) {
+        this.handlers = handlers;
+    }
+
+    /**
+     * 下一步步骤
+     * 
+     * @param nextStep
+     */
+    public void setNextStep(String nextStep) {
+        this.nextStep = nextStep;
+    }
+
+    public void setProcessDefinitionKey(String processDefinitionKey) {
+        this.processDefinitionKey = processDefinitionKey;
+    }
+
+    /**
+     * 设置角色ID,同时会加入流程变量variables.s_roleId中
+     * 
+     * @param roleId
+     */
+    public void setRoleId(String roleId) {
+        this.roleId = roleId;
+        getVariables().put(WorkflowConsts.WF_ROLE_ID, roleId);
+    }
+
+    /**
+     * 设置流程启动类型,同时会加入流程变量variables.s_startType中
+     * 
+     * @param startType
+     */
+    public void setStartType(int startType) {
+        this.startType = startType;
+        getVariables().put(WorkflowConsts.WF_START_TYPE, startType);
+    }
+
+    /**
+     * 设置流程执行人ID,同时会加入流程变量variables.s_sender_id中
+     * 
+     * @param userId
+     */
+    public void setStartUserId(String userId) {
+        this.startUserId = userId;
+        getVariables().put(WorkflowConsts.WF_SENDER_ID, userId);
+    }
+
+    /**
+     * 设置流程变量,一般使用getVariables之后再put具体属性
+     * 
+     * @param variables
+     */
+    @Deprecated
+    public void setVariables(Map<String, Object> variables) {
+        this.variables = variables;
+    }
+}

+ 66 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/WfResult.java

@@ -0,0 +1,66 @@
+package com.xtframe.core.wf;
+
+import java.util.List;
+
+/**
+ * 流程执行结果对象
+ * 
+ * @author 袁晓冬
+ *
+ */
+public class WfResult {
+	/** 流程实例ID */
+	long workflowInstanceId;
+	/** 流程发起人参与的手工活动处理的待办事宜URL */
+	String[] url;
+	/** 后续活动及处理人信息 */
+	List<NextTask> nextInfo;
+
+	/**
+	 * 后续活动及处理人信息
+	 * @return List<NextTask>
+	 */
+	public List<NextTask> getNextInfo() {
+		return nextInfo;
+	}
+
+	/**
+	 * 流程发起人参与的手工活动处理的待办事宜URL
+	 * @return
+	 */
+	public String[] getUrl() {
+		return url;
+	}
+
+	/**
+	 * 流程实例ID
+	 * @return
+	 */
+	public long getWorkflowInstanceId() {
+		return workflowInstanceId;
+	}
+
+	/**
+	 * 后续活动及处理人信息
+	 * @param nextInfo
+	 */
+	public void setNextInfo(List<NextTask> nextInfo) {
+		this.nextInfo = nextInfo;
+	}
+
+	/**
+	 * 流程发起人参与的手工活动处理的待办事宜URL
+	 * @param url
+	 */
+	public void setUrl(String[] url) {
+		this.url = url;
+	}
+
+	/**
+	 * 流程实例ID
+	 * @param workflowInstanceId
+	 */
+	public void setWorkflowInstanceId(long workflowInstanceId) {
+		this.workflowInstanceId = workflowInstanceId;
+	}
+}

+ 343 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/WorkFlowEngineClient.java

@@ -0,0 +1,343 @@
+package com.xtframe.core.wf;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Map;
+
+import com.xtframe.core.utils.WorkflowConsts;
+
+/**
+ * 流程引擎客户端
+ * 
+ * @author 袁晓冬
+ *
+ */
+public interface WorkFlowEngineClient {
+    /** 流程结束点 */
+    String ACT_END = "_end";
+
+    /**
+     * 签收处理
+     * 
+     * @param taskId
+     * @param userId
+     */
+    public void claim(String taskId, String userId);
+
+    /**
+     * 完成一个手工活动,并指定下一步活动、处理人。
+     * 
+     * @param submitInfo
+     *            活动完成提交信息(必填)
+     * @return 后续活动及处理人信息
+     */
+    public WfResult complete(SubmitInfo submitInfo);
+
+    /**
+     * 完成任务,并指定是否使用跳转
+     * 
+     * @param submitInfo
+     * @param jump
+     *            跳转:true;正常完成:false
+     * @return
+     */
+    public WfResult complete(SubmitInfo submitInfo, boolean jump);
+
+    /**
+     * 根据流程启动信息发起流程
+     * 
+     * @param stInfo
+     *            流程启动信息
+     * @return ProcessInst 流程实例对象
+     */
+    public ProcessInst create(WFStartInfo info);
+
+    /**
+     * 创建流程并完成第一步
+     * 
+     * @param info
+     * @return
+     */
+    public ProcessInst createAndFinishFirstStep(WFStartInfo info);
+
+    /**
+     * 删除部署的流程
+     * 
+     * @param deploymentId
+     *            流程部署ID
+     * @param cascade
+     *            是否级联删除流程实例
+     */
+    public void deleteDeployment(String deploymentId, boolean cascade);
+
+    /**
+     * 结束流程
+     * 
+     * @param taskId
+     * @return
+     */
+    public boolean endProcess(String taskId, Map<String, Object> taskVariables);
+
+    /**
+     * 查询当前任务可以驳回的流程节点
+     * 
+     * @param taskId
+     * @return
+     */
+    public List<TaskNode> findBackNodes(String taskId);
+
+    /**
+     * 根据流程步骤和流程ID获取可驳回的流程节点,用于流程配置画面
+     * 
+     * @param activity
+     * @param wfid
+     * @return
+     */
+    public List<TaskNode> findBackNodesByActivity(String activity, String wfid);
+
+    /**
+     * 获取可跳转节点
+     * 
+     * @param taskId
+     *            任务ID
+     * @param wfid
+     *            流程ID
+     * @return
+     */
+    public List<TaskNode> findJumpNodes(String taskId, String wfid);
+
+    /**
+     * 根据流程步骤和流程ID获取可跳转节点,用于流程配置画面
+     * 
+     * @param activity
+     * @param wfid
+     * @return
+     */
+    public List<TaskNode> findJumpNodesByActivity(String activity, String wfid);
+
+    /***
+     * 根据组织编码和角色编码查找角色。<br>
+     * 组织编码为{@link WorkflowConsts#WF_UEL_PARAM_CURR_ORG} 时取用户当前所在组织的编码
+     * 
+     * @param code
+     * @param org
+     * @return
+     */
+    public List<String> findRoleByCodeAndOrgCode(String code, String orgCode);
+
+    /**
+     * 根据角色编码和上级组织编码查找角色(不包含本级组织)。<br>
+     * 组织编码为{@link WorkflowConsts#WF_UEL_PARAM_CURR_ORG} 时取用户当前所在组织的编码
+     * 
+     * @param code
+     * @param org
+     * @return
+     */
+    public List<String> findRoleByCodeAndPOrgCode(String code, String orgCode);
+
+    /**
+     * 根据角色编码查找指定组织的上级组织编码(不包含本级组织)。<br>
+     * 组织编码为{@link WorkflowConsts#WF_UEL_PARAM_CURR_ORG} 时取用户当前所在组织的编码
+     * 
+     * @param code
+     * @param org
+     * @return
+     */
+    public List<String> findRoleByCodeAndSubOrgCode(String code, String orgCode);
+
+    /**
+     * 根据组织编码查找角色。<br>
+     * 组织编码为{@link WorkflowConsts#WF_UEL_PARAM_CURR_ORG} 时取用户当前所在组织的编码
+     * 
+     * @param org
+     * @return
+     */
+    public List<String> findRoleByOrgCode(String orgCode);
+
+    /**
+     * 根据组织编码查找用户
+     * 
+     * @param orgCode
+     * @return
+     */
+    public List<String> findUserByOrgCode(String orgCode);
+
+    /**
+     * 根据业务主键查询流程变量
+     * 
+     * @param bussKey
+     * @return
+     */
+    public Map<String, Object> getProcessVariables(String bussKey);
+
+    /**
+     * 流程跳转
+     * 
+     * @param taskId
+     *            任务ID
+     * @param activityId
+     *            流程步骤
+     * @return
+     */
+    public boolean jump(String taskId, String activityId, Map<String, Object> variables,
+            Map<String, Object> taskVariables);
+
+    /**
+     * 通过部署ID读取资源
+     * 
+     * @param processDefinitionId
+     *            部署ID
+     * @param resourceType
+     *            资源类型,image\xml...
+     * @param out
+     *            输出流
+     */
+    public void loadByDeployment(String processDefinitionId, String resourceType, OutputStream out) throws IOException;
+
+    /**
+     * 读取资源,通过流程ID
+     *
+     * @param resourceType
+     *            资源类型(xml|image)
+     * @param processInstanceId
+     *            流程实例ID
+     * @param response
+     * @throws Exception
+     */
+    public void loadByProcessInstance(String processInstanceId, String resourceType, OutputStream out) throws Exception;
+
+    /**
+     * 根据任务ID查找流程步骤,用于流程跳转时步骤查询
+     * 
+     * @param taskId
+     *            任务ID
+     * @return List<String>
+     */
+    public List<String> queryActivityIds(String taskId);
+
+    /**
+     * 分页检索流程定义
+     * 
+     * @param cntPerPage
+     *            每页条数
+     * @param currPage
+     *            当前页
+     * @param processDefinition
+     *            接收结果集合
+     * @return
+     */
+    public long queryProcessDefinition(int cntPerPage, int currPage, List<ProcessDefinitionInfo> processDefinition);
+
+    /**
+     * 分页查询流程实例
+     * 
+     * @param cntPerPage
+     *            每页条数
+     * @param currPage
+     *            当前页
+     * @param processDefinition
+     *            接收结果集合
+     * @return
+     */
+    public long queryProcessInstance(int cntPerPage, int currPage, List<ProcessInst> processInsts);
+
+    /**
+     * 根据业务主键和任务处理人(可选)查询工作记录
+     * 
+     * @param bussKey
+     *            业务主键,必填
+     * @param assignee
+     *            处理人,可空
+     * @return
+     */
+    public List<WorkItem> queryWorkItemInfo(String bussKey, String assignee);
+
+    /**
+     * 根据业务主键查询历史工作记录
+     * 
+     * @param bussKey
+     * @return
+     */
+    public List<WorkItem> queryHistoryWorkItemInfo(String bussKey);
+
+    /**
+     * 工作项查询接口
+     * 
+     * @param userId
+     *            用户ID(必填)
+     * @param workFlowCode
+     *            流程编码(为空时查询所有流程)
+     * @param state
+     *            0:所有的 1:待办事宜 2:已办事宜
+     * @param cntPerPage
+     *            分页参数:每页显示多少条,即当前返回记录条数 如果为0,则不分页,返回所有记录
+     * @param currPage
+     *            分页参数:显示第几页记录。 如果为0,则显示第一页
+     * @return
+     */
+    public long queryWorkItemInfo(String userId, String workFlowCode, int state, int cntPerPage, int currPage,
+            List<WorkItem> items);
+
+    /**
+     * 读取带跟踪的图片
+     * 
+     * @param executionId
+     * @param out
+     * @throws Exception
+     */
+    public void readResource(String executionId, OutputStream out) throws Exception;
+
+    /**
+     * 输出跟踪流程信息
+     * 
+     * @param processInstanceId
+     * @return
+     * @throws Exception
+     */
+    public List<Map<String, Object>> traceProcess(String processInstanceId) throws Exception;
+
+    /**
+     * 转办任务
+     * 
+     * @param taskId
+     *            当前任务节点ID
+     * @param userId
+     *            被转办人
+     */
+    public void transferTask(String taskId, String userId);
+
+    /**
+     * 更新流程实例状态
+     * 
+     * @param state
+     * @param processDefinitionId
+     */
+    public void updateInstanceState(String state, String processInstanceId);
+
+    /**
+     * 设置流程状态<br>
+     * <li>active 激活已挂起的流程 <li>suspend 挂起已激活的流程
+     * 
+     * @param state
+     * @param processDefinitionId
+     *            流程定义ID
+     * @return
+     */
+    public void updateProcessState(String state, String processDefinitionId);
+
+    /**
+     * 根据任务ID和节点ID获取活动节点 <br>
+     * 
+     * @param taskId
+     *            任务ID
+     * @param activityId
+     *            活动节点ID <br>
+     *            如果为null或"",则默认查询当前活动节点 <br>
+     *            如果为"end",则查询结束节点 <br>
+     * 
+     * @return
+     * @throws Exception
+     */
+    public Object findActivitiImpl(String taskId, String activityId);
+}

+ 375 - 0
jdc/frame/trunk/modules/core/src/main/java/com/xtframe/core/wf/WorkItem.java

@@ -0,0 +1,375 @@
+package com.xtframe.core.wf;
+
+import java.util.Date;
+
+/**
+ * 工作项
+ * 
+ * @author 袁晓冬
+ * 
+ */
+public class WorkItem {
+    /** 任务ID */
+    String taskId;
+    /** 页面处理url */
+    String url;
+    /** 历史事宜查看url */
+    String viewUrl;
+    /** 业务ID */
+    String bizKey;
+    /** 业务名称,在待办事宜中显示 */
+    String bizName;
+    /** 流程/实例名称 */
+    String processName;
+    /** 步骤名称 */
+    String stepName;
+    /** 处理人ID */
+    String assignee;
+    /** 处理人名称 */
+    String assigneeName;
+    /** 处理结果,一般历史任务中有 */
+    String handleResult;
+    /** 处理意见,一般历史任务中有 */
+    String handleRemark;
+    /** 发送人ID */
+    String senderId;
+    /** 发送人名称 */
+    String senderName;
+    /** 发送人组织角色 */
+    String senderRoleId;
+    /** 发送人所在组织ID */
+    String senderOrgId;
+    /** 发送人所在组织名称 */
+    String senderOrgName;
+    /** 发送时间 */
+    Date senderTime;
+    /** 是否签收状态 */
+    boolean claim;
+
+    /**
+     * 处理人ID
+     * 
+     * @return
+     */
+    public String getAssignee() {
+        return assignee;
+    }
+
+    /**
+     * 处理人名称
+     * 
+     * @return
+     */
+    public String getAssigneeName() {
+        return assigneeName;
+    }
+
+    /**
+     * 业务ID
+     * 
+     * @return
+     */
+    public String getBizKey() {
+        return bizKey;
+    }
+
+    /**
+     * 业务名称,在待办事宜中显示
+     * 
+     * @return
+     */
+    public String getBizName() {
+        return bizName;
+    }
+
+    /**
+     * 处理意见,一般历史任务中有
+     * 
+     * @return
+     */
+    public String getHandleRemark() {
+        return handleRemark;
+    }
+
+    /**
+     * 处理结果,一般历史任务中有
+     * 
+     * @return
+     */
+    public String getHandleResult() {
+        return handleResult;
+    }
+
+    /**
+     * 流程/实例名称
+     * 
+     * @return
+     */
+    public String getProcessName() {
+        return processName;
+    }
+
+    /**
+     * 发送人ID
+     * 
+     * @return
+     */
+    public String getSenderId() {
+        return senderId;
+    }
+
+    /**
+     * 发送人名称
+     * 
+     * @return
+     */
+    public String getSenderName() {
+        return senderName;
+    }
+
+    /**
+     * 发送人所在组织ID
+     * 
+     * @return
+     */
+    public String getSenderOrgId() {
+        return senderOrgId;
+    }
+
+    /**
+     * 发送人所在组织名称
+     * 
+     * @return
+     */
+    public String getSenderOrgName() {
+        return senderOrgName;
+    }
+
+    /**
+     * 发送人组织角色
+     * 
+     * @return
+     */
+    public String getSenderRoleId() {
+        return senderRoleId;
+    }
+
+    /**
+     * 发送时间
+     * 
+     * @return
+     */
+    public Date getSenderTime() {
+        return senderTime;
+    }
+
+    /**
+     * 步骤名称
+     * 
+     * @return
+     */
+    public String getStepName() {
+        return stepName;
+    }
+
+    /**
+     * 任务ID
+     * 
+     * @return
+     */
+    public String getTaskId() {
+        return taskId;
+    }
+
+    /**
+     * 页面处理url
+     * 
+     * @return
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * 历史事宜查看url
+     * 
+     * @return
+     */
+    public String getViewUrl() {
+        return viewUrl;
+    }
+
+    /**
+     * 是否签收状态
+     * 
+     * @return
+     * @deprecated 不建议使用
+     */
+    public boolean isClaim() {
+        return claim;
+    }
+
+    /**
+     * 处理人ID
+     * 
+     * @param assignee
+     */
+    public void setAssignee(String assignee) {
+        this.assignee = assignee;
+    }
+
+    /**
+     * 处理人名称
+     * 
+     * @param assigneeName
+     */
+    public void setAssigneeName(String assigneeName) {
+        this.assigneeName = assigneeName;
+    }
+
+    /**
+     * 业务ID
+     * 
+     * @param bizKey
+     */
+    public void setBizKey(String bizKey) {
+        this.bizKey = bizKey;
+    }
+
+    /**
+     * 业务名称,在待办事宜中显示
+     * 
+     * @param bizName
+     */
+    public void setBizName(String bizName) {
+        this.bizName = bizName;
+    }
+
+    /**
+     * 是否签收状态
+     * 
+     * @param claim
+     * @deprecated 不建议使用,任务直接处理,不做签收步骤
+     */
+    public void setClaim(boolean claim) {
+        this.claim = claim;
+    }
+
+    /**
+     * 处理意见,一般历史任务中有
+     * 
+     * @param handleRemark
+     */
+    public void setHandleRemark(String handleRemark) {
+        this.handleRemark = handleRemark;
+    }
+
+    /**
+     * 处理结果,一般历史任务中有
+     * 
+     * @param handleResult
+     */
+    public void setHandleResult(String handleResult) {
+        this.handleResult = handleResult;
+    }
+
+    /**
+     * 流程/实例名称
+     * 
+     * @param processName
+     */
+    public void setProcessName(String processName) {
+        this.processName = processName;
+    }
+
+    /**
+     * 发送人ID
+     * 
+     * @param senderId
+     */
+    public void setSenderId(String senderId) {
+        this.senderId = senderId;
+    }
+
+    /**
+     * 发送人名称
+     * 
+     * @param senderName
+     */
+    public void setSenderName(String senderName) {
+        this.senderName = senderName;
+    }
+
+    /**
+     * 发送人所在组织ID
+     * 
+     * @param senderOrgId
+     */
+    public void setSenderOrgId(String senderOrgId) {
+        this.senderOrgId = senderOrgId;
+    }
+
+    /**
+     * 发送人所在组织名称
+     * 
+     * @param senderOrgName
+     */
+    public void setSenderOrgName(String senderOrgName) {
+        this.senderOrgName = senderOrgName;
+    }
+
+    /**
+     * 发送人组织角色
+     * 
+     * @param senderRoleId
+     */
+    public void setSenderRoleId(String senderRoleId) {
+        this.senderRoleId = senderRoleId;
+    }
+
+    /**
+     * 发送时间
+     * 
+     * @param senderTime
+     */
+    public void setSenderTime(Date senderTime) {
+        this.senderTime = senderTime;
+    }
+
+    /**
+     * 步骤名称
+     * 
+     * @param stepName
+     */
+    public void setStepName(String stepName) {
+        this.stepName = stepName;
+    }
+
+    /**
+     * 任务ID
+     * 
+     * @param taskId
+     */
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    /**
+     * 页面处理url
+     * 
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    /**
+     * 历史事宜查看url
+     * 
+     * @param viewUrl
+     */
+    public void setViewUrl(String viewUrl) {
+        this.viewUrl = viewUrl;
+    }
+
+}

BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/BizLog$LogType.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/BizLog.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/Logical.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresAuthentication.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresGuest.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresPermissions.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresRoles.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/anon/auth/RequiresUser.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/ctl/BaseCtl.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/ctl/WebJsonResult.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/dao/BaseDao.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/entity/Entity.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/service/BaseService.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/base/vo/NodeVo.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/code/entity/Code.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/code/service/CodeService.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/data/entity/DataPerm.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/data/service/DataPermService.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/exception/BizException.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/http/HttpConsts.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/http/HttpResult.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/http/HttpResultCodes.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/job/entity/JobInfo.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/job/service/JobInfoService.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/log/BizLogRecorderService$HandlerType.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/log/BizLogRecorderService.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/menu/entity/Function.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/menu/entity/Menu.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/menu/service/MenuService.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/org/entity/Org.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/org/service/OrgService.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/role/entity/Role.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/role/service/RoleService.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/support/CoreMgr.class


BIN
jdc/frame/trunk/modules/core/target/classes/com/xtframe/core/support/SessionMgr.class


Неке датотеке нису приказане због велике количине промена