ActReDeploymentMapper.xml 3.06 KB
<?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>