ActReDeploymentMapper.xml
3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.trash.activiti.mapper.ActReDeploymentMapper">
<resultMap type="ActReDeploymentVO" id="ActReDeploymentResult">
<id property="id" column="id" />
<result property="deployTime" column="deploy_time" />
</resultMap>
<sql id="selectDeploymentVo">
select ID_ id,DEPLOY_TIME_ deploy_time from `act_re_deployment`
</sql>
<select id="selectActReDeploymentByIds" parameterType="String" resultMap="ActReDeploymentResult">
<include refid="selectDeploymentVo"/>
where ID_ in
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectWorkByIds" parameterType="String" resultType="java.util.Map">
select id,title,start_time as startTime,end_time as endTime, reason,type,instance_id,create_time as createTime,create_by,state from workflow where instance_id in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectHistoryWorkByPIds" parameterType="String" resultType="java.util.Map">
select id,start_time as startTime,end_time as endTime, reason,type,instance_id,create_time as createTime,create_by,state from workflow_hi where instance_id in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
ORDER BY create_time
</select>
<select id="getCaseTypeName" parameterType="String" resultType="java.lang.String">
select dict_label from sys_dict_data where dict_type = #{type} and dict_value = (
select type from case_offline where id = #{id}
)
</select>
<select id="getPhoneNumber" parameterType="String" resultType="java.lang.String">
select number from sms where checkpoint = #{checkpoint} and type = #{type}
</select>
<select id="selectTitles" parameterType="String" resultType="java.lang.String">
select DISTINCT title from workflow
<where>
<if test="name!=null">and title like concat('%', #{name}, '%')</if>
</where>
</select>
<select id="selectHistTitles" parameterType="String" resultType="java.lang.String">
select DISTINCT title from workflow_hi
</select>
<select id="selectUnCompleteWorkByUsername" parameterType="java.util.Map" resultType="java.lang.String">
select instance_id from workflow where id in (select business_key from act_workflow_formdata where create_by = #{username} GROUP BY business_key)
<if test="name!=null">and NAME_ like concat('%', #{name}, '%')</if>
</select>
<select id="selectCompleteWorkByUsername" parameterType="java.util.Map" resultType="java.lang.String">
select ID_ from act_hi_procinst where BUSINESS_KEY_ in (select business_key from act_workflow_formdata where create_by = #{username} GROUP BY business_key) and END_ACT_ID_ is not null
<if test="name!=null">and NAME_ like concat('%', #{name}, '%')</if>
</select>
</mapper>