<?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.smartor.mapper.ServiceSubtaskDetailTraceMapper">
|
|
<resultMap type="com.smartor.domain.ServiceSubtaskDetailTrace" id="ServiceSubtaskDetailTtraceResult">
|
<result property="id" column="id"/>
|
<result property="detailId" column="detail_id"/>
|
<result property="subId" column="sub_id"/>
|
<result property="taskid" column="taskid"/>
|
<result property="templateid" column="templateid"/>
|
<result property="templatequestionnum" column="templatequestionnum"/>
|
<result property="switchid" column="switchid"/>
|
<result property="questiontext" column="questiontext"/>
|
<result property="questionvoice" column="questionvoice"/>
|
<result property="categoryname" column="categoryname"/>
|
<result property="targetid" column="targetid"/>
|
<result property="targetvalue" column="targetvalue"/>
|
<result property="matchedtext" column="matchedtext"/>
|
<result property="uuid" column="uuid"/>
|
<result property="guid" column="guid"/>
|
<result property="valueType" column="value_type"/>
|
<result property="scriptid" column="scriptid"/>
|
<result property="answerps" column="answerps"/>
|
<result property="comment" column="comment"/>
|
<result property="asrtext" column="asrtext"/>
|
<result property="recordpath" column="recordpath"/>
|
<result property="recordurl" column="recordurl"/>
|
<result property="patid" column="patid"/>
|
<result property="patdesc" column="patdesc"/>
|
<result property="todeptid" column="todeptid"/>
|
<result property="todeptcode" column="todeptcode"/>
|
<result property="todeptname" column="todeptname"/>
|
<result property="handleresult" column="handleresult"/>
|
<result property="handledesc" column="handledesc"/>
|
<result property="handleFlag" column="handle_flag"/>
|
<result property="handleBy" column="handle_by"/>
|
<result property="handleTime" column="handle_time"/>
|
<result property="ccdepts" column="ccdepts"/>
|
<result property="finaloption" column="finaloption"/>
|
<result property="finaltime" column="finaltime"/>
|
<result property="operate" column="operate"/>
|
<result property="orgid" column="orgid"/>
|
<result property="isupload" column="isupload"/>
|
<result property="uploadTime" column="upload_time"/>
|
<result property="createTime" column="create_time"/>
|
<result property="delFlag" column="del_flag"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="updateTime" column="update_time"/>
|
<result property="createBy" column="create_by"/>
|
<result property="pguid" column="pguid"/>
|
<result property="pid" column="pid"/>
|
<result property="categoryid" column="categoryid"/>
|
<result property="templateType" column="template_type"/>
|
</resultMap>
|
|
<sql id="selectServiceSubtaskDetailTtraceVo">
|
select id,
|
detail_id,
|
template_type,
|
sub_id,
|
taskid,
|
templateid,
|
templatequestionnum,
|
switchid,
|
questiontext,
|
questionvoice,
|
categoryname,
|
targetid,
|
targetvalue,
|
matchedtext,
|
uuid,
|
guid,
|
value_type,
|
scriptid,
|
answerps,
|
comment,
|
asrtext,
|
recordpath,
|
recordurl,
|
patid,
|
patdesc,
|
todeptid,
|
todeptcode,
|
todeptname,
|
handleresult,
|
handledesc,
|
handle_flag,
|
handle_by,
|
handle_time,
|
ccdepts,
|
finaloption,
|
finaltime,
|
operate,
|
orgid,
|
isupload,
|
upload_time,
|
create_time,
|
del_flag,
|
update_by,
|
update_time,
|
create_by,
|
pguid,
|
type,
|
pid,
|
categoryid
|
from service_subtask_detail_trace
|
</sql>
|
|
<select id="selectServiceSubtaskDetailTtraceList" parameterType="com.smartor.domain.ServiceSubtaskDetailTrace"
|
resultMap="ServiceSubtaskDetailTtraceResult">
|
<include refid="selectServiceSubtaskDetailTtraceVo"/>
|
where del_flag=0
|
<if test="detailId != null ">
|
and detail_id = #{detailId}
|
</if>
|
<if test="templateType != null ">
|
and template_type = #{templateType}
|
</if>
|
<if test="subId != null ">
|
and sub_id = #{subId}
|
</if>
|
<if test="taskid != null ">
|
and taskid = #{taskid}
|
</if>
|
<if test="templateid != null and templateid != ''">
|
and templateid = #{templateid}
|
</if>
|
<if test="templatequestionnum != null ">
|
and templatequestionnum = #{templatequestionnum}
|
</if>
|
<if test="switchid != null ">
|
and switchid = #{switchid}
|
</if>
|
<if test="questiontext != null and questiontext != ''">
|
and questiontext = #{questiontext}
|
</if>
|
<if test="questionvoice != null and questionvoice != ''">
|
and questionvoice = #{questionvoice}
|
</if>
|
<if test="categoryname != null and categoryname != ''">
|
and categoryname like concat('%', #{categoryname}, '%')
|
</if>
|
<if test="targetid != null ">
|
and targetid = #{targetid}
|
</if>
|
<if test="targetvalue != null and targetvalue != ''">
|
and targetvalue = #{targetvalue}
|
</if>
|
<if test="matchedtext != null and matchedtext != ''">
|
and matchedtext = #{matchedtext}
|
</if>
|
<if test="uuid != null and uuid != ''">
|
and uuid = #{uuid}
|
</if>
|
<if test="guid != null and guid != ''">
|
and guid = #{guid}
|
</if>
|
<if test="valueType != null and valueType != ''">
|
and value_type = #{valueType}
|
</if>
|
<if test="scriptid != null ">
|
and scriptid = #{scriptid}
|
</if>
|
<if test="answerps != null and answerps != ''">
|
and answerps = #{answerps}
|
</if>
|
<if test="comment != null and comment != ''">
|
and comment = #{comment}
|
</if>
|
<if test="asrtext != null and asrtext != ''">
|
and asrtext = #{asrtext}
|
</if>
|
<if test="recordpath != null and recordpath != ''">
|
and recordpath = #{recordpath}
|
</if>
|
<if test="recordurl != null and recordurl != ''">
|
and recordurl = #{recordurl}
|
</if>
|
<if test="patid != null ">
|
and patid = #{patid}
|
</if>
|
<if test="patdesc != null and patdesc != ''">
|
and patdesc = #{patdesc}
|
</if>
|
<if test="todeptid != null ">
|
and todeptid = #{todeptid}
|
</if>
|
<if test="todeptcode != null and todeptcode != ''">
|
and todeptcode = #{todeptcode}
|
</if>
|
<if test="todeptname != null and todeptname != ''">
|
and todeptname like concat('%', #{todeptname}, '%')
|
</if>
|
<if test="handleresult != null and handleresult != ''">
|
and handleresult = #{handleresult}
|
</if>
|
<if test="handledesc != null and handledesc != ''">
|
and handledesc = #{handledesc}
|
</if>
|
<if test="handleFlag != null and handleFlag != ''">
|
and handle_flag = #{handleFlag}
|
</if>
|
<if test="handleBy != null and handleBy != ''">
|
and handle_by = #{handleBy}
|
</if>
|
<if test="handleTime != null ">
|
and handle_time = #{handleTime}
|
</if>
|
<if test="ccdepts != null and ccdepts != ''">
|
and ccdepts = #{ccdepts}
|
</if>
|
<if test="finaloption != null and finaloption != ''">
|
and finaloption = #{finaloption}
|
</if>
|
<if test="finaltime != null ">
|
and finaltime = #{finaltime}
|
</if>
|
<if test="operate != null and operate != ''">
|
and operate = #{operate}
|
</if>
|
<if test="orgid != null and orgid != ''">
|
and orgid = #{orgid}
|
</if>
|
<if test="isupload != null ">
|
and isupload = #{isupload}
|
</if>
|
<if test="uploadTime != null ">
|
and upload_time = #{uploadTime}
|
</if>
|
<if test="pguid != null and pguid != ''">
|
and pguid = #{pguid}
|
</if>
|
<if test="pid != null ">
|
and pid = #{pid}
|
</if>
|
<if test="categoryid != null ">
|
and categoryid = #{categoryid}
|
</if>
|
<if test="type != null and type != ''">
|
and type = #{type}
|
</if>
|
</select>
|
|
<select id="tracedeallist" parameterType="com.smartor.domain.VO.DetailTraceDealVO"
|
resultMap="ServiceSubtaskDetailTtraceResult">
|
<include refid="selectServiceSubtaskDetailTtraceVo"/>
|
where del_flag=0
|
|
<if test="templateid != null and templateid != ''">
|
and templateid = #{templateid}
|
</if>
|
<if test="todeptcode != null and todeptcode != ''">
|
and FIND_IN_SET(#{todeptcode}, todeptcode)
|
</if>
|
<if test="todeptname != null and todeptname != ''">
|
and todeptname like concat('%', #{todeptname}, '%')
|
</if>
|
<if test="handleStartTime != null and handleEndTime != null">
|
and handle_time between #{handleStartTime} and #{handleEndTime}
|
</if>
|
|
<if test="orgid != null and orgid != ''">
|
and orgid = #{orgid}
|
</if>
|
|
<if test="type != null and type != ''">
|
and type = #{type}
|
</if>
|
</select>
|
|
|
|
|
<select id="selectServiceSubtaskDetailTtraceById" parameterType="Long"
|
resultMap="ServiceSubtaskDetailTtraceResult">
|
<include refid="selectServiceSubtaskDetailTtraceVo"/>
|
where del_flag=0 and id = #{id}
|
</select>
|
|
<insert id="insertServiceSubtaskDetailTtrace" parameterType="com.smartor.domain.ServiceSubtaskDetailTrace"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into service_subtask_detail_trace
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="detailId != null">detail_id,
|
</if>
|
<if test="subId != null">sub_id,
|
</if>
|
<if test="taskid != null">taskid,
|
</if>
|
<if test="templateid != null">templateid,
|
</if>
|
<if test="templatequestionnum != null">templatequestionnum,
|
</if>
|
<if test="switchid != null">switchid,
|
</if>
|
<if test="questiontext != null">questiontext,
|
</if>
|
<if test="questionvoice != null">questionvoice,
|
</if>
|
<if test="categoryname != null">categoryname,
|
</if>
|
<if test="targetid != null">targetid,
|
</if>
|
<if test="targetvalue != null">targetvalue,
|
</if>
|
<if test="matchedtext != null">matchedtext,
|
</if>
|
<if test="uuid != null">uuid,
|
</if>
|
<if test="guid != null">guid,
|
</if>
|
<if test="valueType != null">value_type,
|
</if>
|
<if test="scriptid != null">scriptid,
|
</if>
|
<if test="answerps != null">answerps,
|
</if>
|
<if test="comment != null">comment,
|
</if>
|
<if test="asrtext != null">asrtext,
|
</if>
|
<if test="recordpath != null">recordpath,
|
</if>
|
<if test="recordurl != null">recordurl,
|
</if>
|
<if test="patid != null">patid,
|
</if>
|
<if test="patdesc != null">patdesc,
|
</if>
|
<if test="todeptid != null">todeptid,
|
</if>
|
<if test="todeptcode != null">todeptcode,
|
</if>
|
<if test="todeptname != null">todeptname,
|
</if>
|
<if test="handleresult != null">handleresult,
|
</if>
|
<if test="handledesc != null">handledesc,
|
</if>
|
<if test="handleFlag != null">handle_flag,
|
</if>
|
<if test="handleBy != null">handle_by,
|
</if>
|
<if test="handleTime != null">handle_time,
|
</if>
|
<if test="ccdepts != null">ccdepts,
|
</if>
|
<if test="finaloption != null">finaloption,
|
</if>
|
<if test="finaltime != null">finaltime,
|
</if>
|
<if test="operate != null">operate,
|
</if>
|
<if test="orgid != null">orgid,
|
</if>
|
<if test="isupload != null">isupload,
|
</if>
|
<if test="uploadTime != null">upload_time,
|
</if>
|
<if test="createTime != null">create_time,
|
</if>
|
<if test="delFlag != null">del_flag,
|
</if>
|
<if test="updateBy != null">update_by,
|
</if>
|
<if test="updateTime != null">update_time,
|
</if>
|
<if test="createBy != null">create_by,
|
</if>
|
<if test="pguid != null">pguid,
|
</if>
|
<if test="pid != null">pid,
|
</if>
|
<if test="categoryid != null">categoryid,
|
</if>
|
<if test="type != null">type,
|
</if>
|
<if test="templateType != null">template_type,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="detailId != null">#{detailId},
|
</if>
|
<if test="subId != null">#{subId},
|
</if>
|
<if test="taskid != null">#{taskid},
|
</if>
|
<if test="templateid != null">#{templateid},
|
</if>
|
<if test="templatequestionnum != null">#{templatequestionnum},
|
</if>
|
<if test="switchid != null">#{switchid},
|
</if>
|
<if test="questiontext != null">#{questiontext},
|
</if>
|
<if test="questionvoice != null">#{questionvoice},
|
</if>
|
<if test="categoryname != null">#{categoryname},
|
</if>
|
<if test="targetid != null">#{targetid},
|
</if>
|
<if test="targetvalue != null">#{targetvalue},
|
</if>
|
<if test="matchedtext != null">#{matchedtext},
|
</if>
|
<if test="uuid != null">#{uuid},
|
</if>
|
<if test="guid != null">#{guid},
|
</if>
|
<if test="valueType != null">#{valueType},
|
</if>
|
<if test="scriptid != null">#{scriptid},
|
</if>
|
<if test="answerps != null">#{answerps},
|
</if>
|
<if test="comment != null">#{comment},
|
</if>
|
<if test="asrtext != null">#{asrtext},
|
</if>
|
<if test="recordpath != null">#{recordpath},
|
</if>
|
<if test="recordurl != null">#{recordurl},
|
</if>
|
<if test="patid != null">#{patid},
|
</if>
|
<if test="patdesc != null">#{patdesc},
|
</if>
|
<if test="todeptid != null">#{todeptid},
|
</if>
|
<if test="todeptcode != null">#{todeptcode},
|
</if>
|
<if test="todeptname != null">#{todeptname},
|
</if>
|
<if test="handleresult != null">#{handleresult},
|
</if>
|
<if test="handledesc != null">#{handledesc},
|
</if>
|
<if test="handleFlag != null">#{handleFlag},
|
</if>
|
<if test="handleBy != null">#{handleBy},
|
</if>
|
<if test="handleTime != null">#{handleTime},
|
</if>
|
<if test="ccdepts != null">#{ccdepts},
|
</if>
|
<if test="finaloption != null">#{finaloption},
|
</if>
|
<if test="finaltime != null">#{finaltime},
|
</if>
|
<if test="operate != null">#{operate},
|
</if>
|
<if test="orgid != null">#{orgid},
|
</if>
|
<if test="isupload != null">#{isupload},
|
</if>
|
<if test="uploadTime != null">#{uploadTime},
|
</if>
|
<if test="createTime != null">#{createTime},
|
</if>
|
<if test="delFlag != null">#{delFlag},
|
</if>
|
<if test="updateBy != null">#{updateBy},
|
</if>
|
<if test="updateTime != null">#{updateTime},
|
</if>
|
<if test="createBy != null">#{createBy},
|
</if>
|
<if test="pguid != null">#{pguid},
|
</if>
|
<if test="pid != null">#{pid},
|
</if>
|
<if test="categoryid != null">#{categoryid},
|
</if>
|
<if test="type != null">#{type},
|
</if>
|
<if test="templateType != null">#{templateType},
|
</if>
|
</trim>
|
</insert>
|
|
<update id="updateServiceSubtaskDetailTtrace" parameterType="com.smartor.domain.ServiceSubtaskDetailTrace">
|
update service_subtask_detail_trace
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="detailId != null">detail_id =
|
#{detailId},
|
</if>
|
<if test="subId != null">sub_id =
|
#{subId},
|
</if>
|
<if test="taskid != null">taskid =
|
#{taskid},
|
</if>
|
<if test="templateid != null">templateid =
|
#{templateid},
|
</if>
|
<if test="templatequestionnum != null">templatequestionnum =
|
#{templatequestionnum},
|
</if>
|
<if test="switchid != null">switchid =
|
#{switchid},
|
</if>
|
<if test="questiontext != null">questiontext =
|
#{questiontext},
|
</if>
|
<if test="questionvoice != null">questionvoice =
|
#{questionvoice},
|
</if>
|
<if test="categoryname != null">categoryname =
|
#{categoryname},
|
</if>
|
<if test="targetid != null">targetid =
|
#{targetid},
|
</if>
|
<if test="targetvalue != null">targetvalue =
|
#{targetvalue},
|
</if>
|
<if test="matchedtext != null">matchedtext =
|
#{matchedtext},
|
</if>
|
<if test="uuid != null">uuid =
|
#{uuid},
|
</if>
|
<if test="guid != null">guid =
|
#{guid},
|
</if>
|
<if test="valueType != null">value_type =
|
#{valueType},
|
</if>
|
<if test="scriptid != null">scriptid =
|
#{scriptid},
|
</if>
|
<if test="answerps != null">answerps =
|
#{answerps},
|
</if>
|
<if test="comment != null">comment =
|
#{comment},
|
</if>
|
<if test="asrtext != null">asrtext =
|
#{asrtext},
|
</if>
|
<if test="recordpath != null">recordpath =
|
#{recordpath},
|
</if>
|
<if test="recordurl != null">recordurl =
|
#{recordurl},
|
</if>
|
<if test="patid != null">patid =
|
#{patid},
|
</if>
|
<if test="patdesc != null">patdesc =
|
#{patdesc},
|
</if>
|
<if test="todeptid != null">todeptid =
|
#{todeptid},
|
</if>
|
<if test="todeptcode != null">todeptcode =
|
#{todeptcode},
|
</if>
|
<if test="todeptname != null">todeptname =
|
#{todeptname},
|
</if>
|
<if test="handleresult != null">handleresult =
|
#{handleresult},
|
</if>
|
<if test="handledesc != null">handledesc =
|
#{handledesc},
|
</if>
|
<if test="handleFlag != null">handle_flag =
|
#{handleFlag},
|
</if>
|
<if test="handleBy != null">handle_by =
|
#{handleBy},
|
</if>
|
<if test="handleTime != null">handle_time =
|
#{handleTime},
|
</if>
|
<if test="ccdepts != null">ccdepts =
|
#{ccdepts},
|
</if>
|
<if test="finaloption != null">finaloption =
|
#{finaloption},
|
</if>
|
<if test="finaltime != null">finaltime =
|
#{finaltime},
|
</if>
|
<if test="operate != null">operate =
|
#{operate},
|
</if>
|
<if test="orgid != null">orgid =
|
#{orgid},
|
</if>
|
<if test="isupload != null">isupload =
|
#{isupload},
|
</if>
|
<if test="uploadTime != null">upload_time =
|
#{uploadTime},
|
</if>
|
<if test="createTime != null">create_time =
|
#{createTime},
|
</if>
|
<if test="delFlag != null">del_flag =
|
#{delFlag},
|
</if>
|
<if test="updateBy != null">update_by =
|
#{updateBy},
|
</if>
|
<if test="updateTime != null">update_time =
|
#{updateTime},
|
</if>
|
<if test="createBy != null">create_by =
|
#{createBy},
|
</if>
|
<if test="pguid != null">pguid =
|
#{pguid},
|
</if>
|
<if test="pid != null">pid =
|
#{pid},
|
</if>
|
<if test="categoryid != null">categoryid =
|
#{categoryid},
|
</if>
|
<if test="type != null">type =
|
#{type},
|
</if>
|
<if test="templateType != null">template_type =
|
#{templateType},
|
</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<update id="deleteServiceSubtaskDetailTtraceById" parameterType="Long">
|
update service_subtask_detail_trace
|
<trim prefix="SET" suffixOverrides=",">
|
del_flag =1
|
</trim>
|
where id = #{id}
|
</update>
|
|
<update id="deleteServiceSubtaskDetailTtraceByIds" parameterType="String">
|
update service_subtask_detail_trace
|
<trim prefix="SET" suffixOverrides=",">
|
del_flag =1
|
</trim>
|
where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</update>
|
|
</mapper>
|