Quellcode durchsuchen

工作流完善

wangwei vor 7 Jahren
Ursprung
Commit
deee77d1a3
13 geänderte Dateien mit 449 neuen und 0 gelöschten Zeilen
  1. 45 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/pom.xml
  2. 11 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/src/main/java/org/hswebframework/web/dao/workflow/ActDefDao.java
  3. 44 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-mybatis/pom.xml
  4. 46 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/workflow/ActDefMapper.xml
  5. 36 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/pom.xml
  6. 40 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/pom.xml
  7. 29 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ActDefEntity.java
  8. 33 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/SimpleActDefEntity.java
  9. 43 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-api/pom.xml
  10. 11 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-api/src/main/java/org/hswebframework/web/service/workflow/ActDefService.java
  11. 48 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-simple/pom.xml
  12. 29 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-simple/src/main/java/org/hswebframework/web/service/workflow/simple/SimpleActDefService.java
  13. 34 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/pom.xml

+ 45 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/pom.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 
+  ~   Copyright 2016 http://www.hswebframework.org
+  ~  
+  ~   Licensed under the Apache License, Version 2.0 (the "License");
+  ~   you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~  
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~  
+  ~   Unless required by applicable law or agreed to in writing, software
+  ~   distributed under the License is distributed on an "AS IS" BASIS,
+  ~   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~   See the License for the specific language governing permissions and
+  ~   limitations under the License.
+  ~  
+  -->
+
+<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">
+    <parent>
+        <artifactId>hsweb-system-workflow-dao</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-workflow-dao-api</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-workflow-entity</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-dao-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 11 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/src/main/java/org/hswebframework/web/dao/workflow/ActDefDao.java

@@ -0,0 +1,11 @@
+package org.hswebframework.web.dao.workflow;
+
+import org.hswebframework.web.dao.CrudDao;
+import org.hswebframework.web.entity.workflow.ActDefEntity;
+
+/**
+ * @Author wangwei
+ * @Date 2017/9/5.
+ */
+public interface ActDefDao extends CrudDao<ActDefEntity,String> {
+}

+ 44 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-mybatis/pom.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 
+  ~   Copyright 2016 http://www.hswebframework.org
+  ~  
+  ~   Licensed under the Apache License, Version 2.0 (the "License");
+  ~   you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~  
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~  
+  ~   Unless required by applicable law or agreed to in writing, software
+  ~   distributed under the License is distributed on an "AS IS" BASIS,
+  ~   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~   See the License for the specific language governing permissions and
+  ~   limitations under the License.
+  ~  
+  -->
+
+<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">
+    <parent>
+        <artifactId>hsweb-system-workflow-dao</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-workflow-dao-mybatis</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-workflow-dao-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-dao-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 46 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/workflow/ActDefMapper.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://www.mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.hswebframework.web.dao.workflow.ActDefDao">
+    <resultMap id="ActDefResultMap" type="org.hswebframework.web.entity.workflow.SimpleActDefEntity">
+              <id property="id" column="u_id" javaType="string" jdbcType="VARCHAR"/>
+            <result property="actId" column="act_id" javaType="String" jdbcType="VARCHAR"/>
+            <result property="defId" column="def_id" javaType="String" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <!--用于动态生成sql所需的配置-->
+    <sql id="config">
+        <bind name="resultMapId" value="'ActDefResultMap'"/>
+        <bind name="tableName" value="'s_act_def'"/>
+    </sql>
+  
+    <insert id="insert" parameterType="org.hswebframework.web.entity.workflow.SimpleActDefEntity" >
+        <include refid="config"/>
+        <include refid="BasicMapper.buildInsertSql"/>
+    </insert>
+
+    <delete id="deleteByPk" parameterType="String">
+        delete from s_act_def where u_id =#{id}
+    </delete>
+
+    <delete id="delete" parameterType="org.hswebframework.web.commons.entity.Entity">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildDeleteSql"/>
+    </delete>
+
+    <update id="update" parameterType="org.hswebframework.web.commons.entity.Entity">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildUpdateSql"/>
+    </update>
+
+    <select id="query" parameterType="org.hswebframework.web.commons.entity.Entity" resultMap="ActDefResultMap">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildSelectSql"/>
+    </select>
+
+    <select id="count" parameterType="org.hswebframework.web.commons.entity.Entity" resultType="int">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildTotalSql"/>
+    </select>
+</mapper>

+ 36 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/pom.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 
+  ~   Copyright 2016 http://www.hswebframework.org
+  ~  
+  ~   Licensed under the Apache License, Version 2.0 (the "License");
+  ~   you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~  
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~  
+  ~   Unless required by applicable law or agreed to in writing, software
+  ~   distributed under the License is distributed on an "AS IS" BASIS,
+  ~   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~   See the License for the specific language governing permissions and
+  ~   limitations under the License.
+  ~  
+  -->
+
+<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">
+    <parent>
+        <artifactId>hsweb-system-workflow</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-workflow-dao</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>hsweb-system-workflow-dao-api</module>
+        <module>hsweb-system-workflow-dao-mybatis</module>
+    </modules>
+</project>

+ 40 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/pom.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 
+  ~   Copyright 2016 http://www.hswebframework.org
+  ~  
+  ~   Licensed under the Apache License, Version 2.0 (the "License");
+  ~   you may not use this file except in compliance with the License.
+  ~   You may obtain a copy of the License at
+  ~  
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~  
+  ~   Unless required by applicable law or agreed to in writing, software
+  ~   distributed under the License is distributed on an "AS IS" BASIS,
+  ~   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~   See the License for the specific language governing permissions and
+  ~   limitations under the License.
+  ~  
+  -->
+
+<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">
+    <parent>
+        <artifactId>hsweb-system-workflow</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-workflow-entity</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-entity</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 29 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ActDefEntity.java

@@ -0,0 +1,29 @@
+package org.hswebframework.web.entity.workflow;
+
+import org.hswebframework.web.commons.entity.GenericEntity;
+
+/**
+ * @Author wangwei
+ * @Date 2017/9/5.
+ */
+public interface ActDefEntity extends GenericEntity<String> {
+ /*-------------------------------------------
+    |               属性名常量               |
+    ===========================================*/
+    /**
+     * 节点ID
+     */
+    String actId = "actId";
+    /**
+     * 矩阵ID
+     */
+    String defId = "defId";
+
+    String getActId();
+
+    void setActId(String actId);
+
+    String getDefId();
+
+    void setDefId(String defId);
+}

+ 33 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/SimpleActDefEntity.java

@@ -0,0 +1,33 @@
+package org.hswebframework.web.entity.workflow;
+
+import org.hswebframework.web.commons.entity.SimpleGenericEntity;
+
+/**
+ * @Author wangwei
+ * @Date 2017/9/5.
+ */
+public class SimpleActDefEntity extends SimpleGenericEntity<String> implements ActDefEntity {
+
+    private String actId;
+    private String defId;
+
+    @Override
+    public String getActId() {
+        return actId;
+    }
+
+    @Override
+    public void setActId(String actId) {
+        this.actId = actId;
+    }
+
+    @Override
+    public String getDefId() {
+        return defId;
+    }
+
+    @Override
+    public void setDefId(String defId) {
+        this.defId = defId;
+    }
+}

+ 43 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-api/pom.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2016 http://www.hswebframework.org
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  -->
+<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">
+    <parent>
+        <artifactId>hsweb-system-workflow-service</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-workflow-service-api</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-service-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-workflow-dao-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 11 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-api/src/main/java/org/hswebframework/web/service/workflow/ActDefService.java

@@ -0,0 +1,11 @@
+package org.hswebframework.web.service.workflow;
+
+import org.hswebframework.web.entity.workflow.ActDefEntity;
+import org.hswebframework.web.service.CrudService;
+
+/**
+ * @Author wangwei
+ * @Date 2017/9/5.
+ */
+public interface ActDefService extends CrudService<ActDefEntity,String> {
+}

+ 48 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-simple/pom.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2016 http://www.hswebframework.org
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  -->
+<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">
+    <parent>
+        <artifactId>hsweb-system-workflow-service</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-workflow-service-simple</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-service-simple</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-workflow-service-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-authorization-service-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 29 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-simple/src/main/java/org/hswebframework/web/service/workflow/simple/SimpleActDefService.java

@@ -0,0 +1,29 @@
+package org.hswebframework.web.service.workflow.simple;
+
+import org.hswebframework.web.dao.CrudDao;
+import org.hswebframework.web.dao.workflow.ActDefDao;
+import org.hswebframework.web.entity.workflow.ActDefEntity;
+import org.hswebframework.web.id.IDGenerator;
+import org.hswebframework.web.service.GenericEntityService;
+import org.hswebframework.web.service.workflow.ActDefService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Author wangwei
+ * @Date 2017/9/5.
+ */
+public class SimpleActDefService extends GenericEntityService<ActDefEntity,String> implements ActDefService {
+
+    @Autowired
+    private ActDefDao actDefDao;
+
+    @Override
+    protected IDGenerator<String> getIDGenerator() {
+        return IDGenerator.MD5;
+    }
+
+    @Override
+    public CrudDao<ActDefEntity, String> getDao() {
+        return actDefDao;
+    }
+}

+ 34 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/pom.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2016 http://www.hswebframework.org
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  -->
+<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">
+    <parent>
+        <artifactId>hsweb-system-workflow</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-workflow-service</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>hsweb-system-workflow-service-api</module>
+        <module>hsweb-system-workflow-service-simple</module>
+    </modules>
+</project>