zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
commit | author | age
a18bfa 1 <?xml version="1.0" encoding="UTF-8"?>
Z 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >  
3 <mapper namespace="cn.autoform.web.mapper.process.ProcessInstanceMapper">
4     
5     <insert id="addProcess" parameterType="cn.autoform.db.entity.ProcessInstance">
6         INSERT INTO process_instance (
7             processDefId,
8             processInstId,
9             organizationId,
10             dataRowNum,
11             formID,
12             tenantID,
13             processState,
14             activityInstId,
15             dataStart
16             
17         )
18         VALUES
19             (#{processDefId},#{processInstId},#{organizationId},#{dataRowNum},#{formID},#{tenantID},#{processState},#{activityInstId},0)
20     </insert>
21     
22     <update id="updatePro"  parameterType="cn.autoform.db.entity.ProcessInstance">
23         UPDATE  process_instance SET
24             activityInstId = #{activityInstId}
25             where processInstId = #{processInstId}
26     </update>
27
28     <select id="selectForm" resultType="cn.autoform.db.entity.ProcessInstance">
29     
30         select * from process_instance where dataStart = 0 and processInstId = #{id}
31     
32     </select>
33     
34     <select id="selectInst" resultType="cn.autoform.db.entity.ProcessInstance">
35         
36         select
37             processDefId,
38              processInstId,
39             organizationId,
40             dataRowNum,
41             formID,
42             activityInstId,
43             tenantID
44         from    process_instance
45         where
46         dataStart = 0
47         and dataRowNum = #{pro.dataRowNum}
48         and formID = #{pro.formID}
49         and tenantID = #{tenantID}
50     
51     </select>
52     
53     <select id="selectInsts" resultType="cn.autoform.db.entity.ProcessInstance">
54         
55         select
56             processDefId,
57              processInstId,
58             organizationId,
59             dataRowNum,
60             activityInstId,
61             formID,
62             tenantID
63         from    process_instance
64         where
65         dataStart = 0
66         and processInstId = #{pro}
67         and tenantID = #{tenantID}
68     
69     </select>
70     
71     <update id="updateProState">
72         UPDATE  process_instance SET
73             dataStart = 1
74             where processInstId = #{processInstanceId}
75     </update>
76
77 </mapper>