123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361 |
- <?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.zhyc.xps.bpm.mapper.WfActivityActionInsMapper">
- <resultMap id="WfActivityActionInsDtoResultMap" type="com.zhyc.xps.bpm.dto.WfActivityActionInsDto">
- <result column="oc_id" property="ocId" jdbcType="BIGINT" />
- <result column="wf_def_id" property="wfDefId" jdbcType="BIGINT" />
- <result column="wf_ins_id" property="wfInsId" jdbcType="BIGINT" />
- <result column="activity_def_id" property="activityDefId" jdbcType="BIGINT" />
- <result column="activity_ins_id" property="activityInsId" jdbcType="BIGINT" />
- <result column="activity_ins_from" property="activityInsFrom" jdbcType="BIGINT" />
- <result column="activity_ins_to" property="activityInsTo" jdbcType="BIGINT" />
- <result column="activity_ins_title" property="activityInsTitle" jdbcType="VARCHAR"/>
- <result column="activity_code" property="activityCode" jdbcType="VARCHAR"/>
- <result column="action_ins_id" property="actionInsId" jdbcType="BIGINT" />
- <result column="action_id" property="actionId" jdbcType="BIGINT" />
- <result column="action_title" property="actionTitle" jdbcType="VARCHAR"/>
- <result column="action_remark" property="actionRemark" jdbcType="VARCHAR"/>
- <result column="action_code" property="actionCode" jdbcType="VARCHAR"/>
- <result column="form_code" property="formCode" jdbcType="VARCHAR"/>
- <result column="action_result" property="actionResult" jdbcType="VARCHAR"/>
- <result column="target_activity_ins_id" property="targetActivityInsId" jdbcType="BIGINT" />
- <result column="action_time" property="actionTime" jdbcType="DATE" />
- <result column="group_id" property="groupId" jdbcType="BIGINT" />
- <result column="group_name" property="groupName" jdbcType="VARCHAR"/>
- <result column="position_id" property="positionId" jdbcType="BIGINT" />
- <result column="position_name" property="positionName" jdbcType="VARCHAR"/>
- <result column="account_id" property="accountId" jdbcType="BIGINT" />
- <result column="account_name" property="accountName" jdbcType="VARCHAR"/>
- </resultMap>
- <sql id="WfActivityActionInsDto_Cols">
- A.wf_def_id,
- A.wf_ins_id,
- A.activity_def_id,
- A.activity_ins_id,
- B.activity_ins_title,
- B.activity_ins_from,
- B.activity_ins_to,
- B.activity_code,
- A.action_ins_id,
- A.action_id,
- A.action_title,
- A.action_remark,
- A.action_code,
- A.form_code,
- A.action_result,
- A.target_activity_ins_id,
- A.action_time,
- A.group_id,
- A.group_name,
- A.position_id,
- A.position_name,
- A.account_id,
- A.account_name
- </sql>
- <!-- 基于ID查询-->
- <select id="getById" resultMap="WfActivityActionInsDtoResultMap">
- SELECT
- <include refid="WfActivityActionInsDto_Cols"/>
- FROM wf_activity_action_ins AS A
- LEFT JOIN wf_activity_ins AS B ON (A.oc_id = B.oc_id AND A.wf_ins_id = B.wf_ins_id )
- WHERE A.deleted_flag = 0
- AND A.oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="wfInsId != null">
- AND A.wf_ins_id = #{wfInsId, jdbcType=BIGINT}
- </if>
- <if test="activityInsId != null">
- AND A.activity_ins_id = #{activityInsId, jdbcType=BIGINT}
- </if>
- <if test="actionInsId != null">
- AND A.action_ins_id = #{actionInsId, jdbcType=BIGINT}
- </if>
- </select>
- <!-- 基于ID查询-->
- <select id="getPreHandlerOfWf" resultMap="WfActivityActionInsDtoResultMap">
- SELECT
- <include refid="WfActivityActionInsDto_Cols"/>
- FROM wf_activity_action_ins AS A
- LEFT JOIN wf_activity_ins AS B ON (A.oc_id = B.oc_id AND A.wf_ins_id = B.wf_ins_id AND A.activity_ins_id= B.activity_ins_id)
- WHERE A.deleted_flag = 0
- AND A.oc_id = #{ocId ,jdbcType=BIGINT}
- AND A.wf_ins_id = #{wfInsId, jdbcType=BIGINT}
- ORDER BY A.action_time DESC
- LIMIT 0 ,1
- </select>
- <!--分页查询-->
- <select id="getByPage" parameterType="java.util.Map" resultMap="WfActivityActionInsDtoResultMap">
- SELECT
- <include refid="WfActivityActionInsDto_Cols"/>
- FROM wf_activity_action_ins AS A
- LEFT JOIN wf_activity_ins AS B ON (A.oc_id = B.oc_id AND A.wf_ins_id = B.wf_ins_id AND A.activity_ins_id= B.activity_ins_id)
- WHERE A.deleted_flag = 0
- AND A.oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="wfDefId != null">
- AND A.wf_def_id = #{wfDefId ,jdbcType=BIGINT}
- </if>
- <if test="wfInsId != null">
- AND A.wf_ins_id = #{wfInsId ,jdbcType=BIGINT}
- </if>
- <if test="activityDefId != null">
- AND A.activity_def_id = #{activityDefId ,jdbcType=BIGINT}
- </if>
- <if test="activityInsId != null">
- AND A.activity_ins_id = #{activityInsId ,jdbcType=BIGINT}
- </if>
- <if test="actionInsId != null">
- AND A.action_ins_id = #{actionInsId ,jdbcType=BIGINT}
- </if>
- <if test="actionId != null">
- AND A.action_id = #{actionId ,jdbcType=BIGINT}
- </if>
- <if test="keywords != null and keywords != ''">
- AND A.action_title like "%"#{keywords}"%"
- </if>
- ORDER BY A.action_time DESC
- </select>
- <!--列表查询-->
- <select id="getByList" parameterType="java.util.Map" resultMap="WfActivityActionInsDtoResultMap">
- SELECT
- <include refid="WfActivityActionInsDto_Cols"/>
- FROM wf_activity_action_ins AS A
- LEFT JOIN wf_activity_ins AS B ON (A.oc_id = B.oc_id AND A.wf_ins_id = B.wf_ins_id AND A.activity_ins_id= B.activity_ins_id)
- LEFT JOIN s_group AS C ON (A.oc_id = C.oc_id AND A.group_id = C.group_id )
- LEFT JOIN s_position AS D ON (A.oc_id = D.oc_id AND A.position_id = D.position_id)
- LEFT JOIN account AS E ON (A.oc_id = E.oc_id AND A.account_id = E.account_id )
- WHERE A.deleted_flag = 0
- AND A.oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="wfDefId != null">
- AND A.wf_def_id = #{wfDefId ,jdbcType=BIGINT}
- </if>
- <if test="wfInsId != null">
- AND A.wf_ins_id = #{wfInsId ,jdbcType=BIGINT}
- </if>
- <if test="activityDefId != null">
- AND A.activity_def_id = #{activityDefId ,jdbcType=BIGINT}
- </if>
- <if test="activityInsId != null">
- AND A.activity_ins_id = #{activityInsId ,jdbcType=BIGINT}
- </if>
- <if test="actionInsId != null">
- AND A.action_ins_id = #{actionInsId ,jdbcType=BIGINT}
- </if>
- <if test="actionId != null">
- AND A.action_id = #{actionId ,jdbcType=BIGINT}
- </if>
- <if test="keywords != null and keywords != ''">
- AND A.action_title like "%"#{keywords}"%"
- </if>
- ORDER BY A.action_time DESC
- </select>
- <insert id="create" parameterType="com.zhyc.xps.bpm.entity.WfActivityActionIns">
- INSERT INTO wf_activity_action_ins
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="ocId != null">
- oc_id,
- </if>
- <if test="wfDefId != null">
- wf_def_id,
- </if>
- <if test="activityDefId != null">
- activity_def_id,
- </if>
- <if test="wfInsId != null">
- wf_ins_id,
- </if>
- <if test="activityInsId != null">
- activity_ins_id,
- </if>
- <if test="actionInsId != null">
- action_ins_id,
- </if>
- <if test="actionId != null">
- action_id,
- </if>
- <if test="actionTitle != null and actionTitle !=''">
- action_title,
- </if>
- <if test="actionRemark != null and actionRemark != ''">
- action_remark,
- </if>
- <if test="actionCode != null and actionCode != ''">
- action_code,
- </if>
- <if test="formCode != null and formCode != ''">
- form_code,
- </if>
- <if test="actionResult != null and actionResult != ''">
- action_result,
- </if>
- <if test="targetActivityInsId != null">
- target_activity_ins_id,
- </if>
- <if test="actionTime != null">
- action_time,
- </if>
- <if test="groupId != null">
- group_id,
- </if>
- <if test="positionId != null">
- position_id,
- </if>
- <if test="accountId != null">
- account_id,
- </if>
- <if test="groupName!=null and groupName!=''">
- group_name,
- </if>
- <if test="positionName!=null and positionName!=''">
- position_name,
- </if>
- <if test="accountName!=null and accountName!=''">
- account_name,
- </if>
- <if test="createdBy != null">
- created_by,
- </if>
- <if test="createdAt != null">
- created_at,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="ocId != null">
- #{ocId ,jdbcType=BIGINT},
- </if>
- <if test="wfDefId != null">
- #{wfDefId ,jdbcType=BIGINT},
- </if>
- <if test="activityDefId != null">
- #{activityDefId ,jdbcType=BIGINT},
- </if>
- <if test="wfInsId != null">
- #{wfInsId ,jdbcType=BIGINT},
- </if>
- <if test="activityInsId != null">
- #{activityInsId ,jdbcType=BIGINT},
- </if>
- <if test="actionInsId != null">
- #{actionInsId ,jdbcType=BIGINT},
- </if>
- <if test="actionId != null">
- #{actionId ,jdbcType=BIGINT},
- </if>
- <if test="actionTitle != null and actionTitle !=''">
- #{actionTitle ,jdbcType=VARCHAR},
- </if>
- <if test="actionRemark != null and actionRemark != ''">
- #{actionRemark ,jdbcType=VARCHAR},
- </if>
- <if test="actionCode != null and actionCode != ''">
- #{actionCode ,jdbcType=VARCHAR},
- </if>
- <if test="formCode != null and formCode !=''">
- #{formCode ,jdbcType=VARCHAR},
- </if>
- <if test="actionResult != null and actionResult != ''">
- #{actionResult ,jdbcType=VARCHAR},
- </if>
- <if test="targetActivityInsId != null">
- #{targetActivityInsId ,jdbcType=BIGINT},
- </if>
- <if test="actionTime != null">
- #{actionTime ,jdbcType=TIMESTAMP},
- </if>
- <if test="groupId != null">
- #{groupId ,jdbcType=BIGINT},
- </if>
- <if test="positionId != null">
- #{positionId ,jdbcType=BIGINT},
- </if>
- <if test="accountId != null">
- #{accountId ,jdbcType=BIGINT},
- </if>
- <if test="groupName!=null and groupName!=''">
- #{groupName ,jdbcType=VARCHAR},
- </if>
- <if test="positionName!=null and positionName!=''">
- #{positionName ,jdbcType=VARCHAR},
- </if>
- <if test="accountName!=null and accountName!=''">
- #{accountName ,jdbcType=VARCHAR},
- </if>
- <if test="createdBy != null">
- #{createdBy ,jdbcType=BIGINT},
- </if>
- <if test="createdAt != null">
- #{createdAt ,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <!--更新-->
- <update id="update" parameterType="com.zhyc.xps.bpm.entity.WfActivityActionIns">
- UPDATE wf_activity_action_ins
- <trim suffixOverrides=",">
- <set>
- <if test="actionTitle != null and actionTitle != ''">
- action_title = #{actionTitle ,jdbcType=VARCHAR},
- </if>
- <if test="actionDesc != null and actionDesc!=''">
- action_desc = #{actionDesc ,jdbcType=VARCHAR},
- </if>
- <if test="actionCode != null and actionCode != ''">
- action_code = #{actionCode ,jdbcType=VARCHAR},
- </if>
- <if test="formCode != null and formCode != ''">
- form_code = #{formCode ,jdbcType=VARCHAR},
- </if>
- <if test="actionResult != null and actionResult != ''">
- action_result = #{actionResult ,jdbcType=VARCHAR},
- </if>
- <if test="targetActivityInsId != null">
- targetActivityInsId = #{targetActivityInsId ,jdbcType=BIGINT},
- </if>
- </set>
- </trim>
- WHERE oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="wfInsId != null">
- AND wf_ins_id = #{wfInsId, jdbcType=BIGINT}
- </if>
- <if test="activityInsId != null">
- AND activity_ins_id = #{activityInsId, jdbcType=BIGINT}
- </if>
- <if test="actionInsId != null">
- AND action_ins_id = #{actionInsId, jdbcType=BIGINT}
- </if>
- </update>
- <!--删除-->
- <update id="delete" parameterType="java.util.Map">
- UPDATE wf_activity_action_ins
- <trim suffixOverrides=",">
- <set>
- <if test="deletedFlag != null">
- deleted_flag = #{deletedFlag,jdbcType=BIGINT},
- </if>
- <if test="deletedTime != null">
- deleted_time = #{deletedTime,jdbcType=VARCHAR},
- </if>
- <if test="deletedBy != null">
- deleted_by = #{deletedBy,jdbcType=BIGINT},
- </if>
- </set>
- </trim>
- WHERE oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="wfInsId != null">
- AND wf_ins_id = #{wfInsId ,jdbcType=BIGINT}
- </if>
- <if test="activityInsId != null">
- AND activity_ins_id = #{activityInsId ,jdbcType=BIGINT}
- </if>
- <if test="actionInsId != null">
- AND action_ins_id = #{actionInsId ,jdbcType=BIGINT}
- </if>
- </update>
- </mapper>
|