<?xml version="1.0" encoding="gbk" standalone="no"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="">
    <!-- 	<typeAlias alias="Ywrepairjobinfobean" type="cn.vp.XXX.model.YwrepairjobinfoBean"/> -->
    <typeAlias alias="Ywrepairjobinfo" type="cn.yw.ywrepairjobinfo.YwrepairjobinfoBean"/>

    <sql id="condition_Ywrepairjobinfo">
        where 1=1
        <isNotEmpty prepend='AND ' property='LIKEjobid'>
            (jobid like '%$LIKEjobid$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobid'>
            (jobid = #jobid# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobsource'>
            (jobsource like '%$LIKEjobsource$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobsource'>
            (jobsource = #jobsource# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEalarmeventid'>
            (alarmeventid like '%$LIKEalarmeventid$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='alarmeventid'>
            (alarmeventid = #alarmeventid# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfaultdevicetype'>
            (faultdevicetype like '%$LIKEfaultdevicetype$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultdevicetype'>
            (faultdevicetype = #faultdevicetype# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
            (faultdevicename like '%$LIKEfaultdevicename$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultdevicename'>
            (faultdevicename = #faultdevicename# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfaultdeviceid'>
            (faultdeviceid like '%$LIKEfaultdeviceid$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultdeviceid'>
            (faultdeviceid = #faultdeviceid# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEchannelnum'>
            (channelnum like '%$LIKEchannelnum$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='channelnum'>
            (channelnum = #channelnum# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfaultpictureurl'>
            (faultpictureurl like '%$LIKEfaultpictureurl$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultpictureurl'>
            (faultpictureurl = #faultpictureurl# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfaultgrade'>
            (faultgrade like '%$LIKEfaultgrade$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultgrade'>
            (faultgrade = #faultgrade# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfaulttype'>
            (faulttype like '%$LIKEfaulttype$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faulttype'>
            (faulttype = #faulttype# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfaultdescription'>
            (faultdescription like '%$LIKEfaultdescription$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultdescription'>
            (faultdescription = #faultdescription# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfaultoccurtime'>
            (faultoccurtime like '%$LIKEfaultoccurtime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultoccurtime'>
            (faultoccurtime = #faultoccurtime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKErequirefinishtime'>
            (requirefinishtime like '%$LIKErequirefinishtime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='requirefinishtime'>
            (requirefinishtime = #requirefinishtime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEactualfinishtime'>
            (actualfinishtime like '%$LIKEactualfinishtime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='actualfinishtime'>
            (actualfinishtime = #actualfinishtime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobprocessstate'>
            (jobprocessstate like '%$LIKEjobprocessstate$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobprocessstates'>
            ($jobprocessstates$ )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobprocessstate'>
            (jobprocessstate = #jobprocessstate# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobreportcompany'>
            (jobreportcompany like '%$LIKEjobreportcompany$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobreportcompany'>
            (jobreportcompany = #jobreportcompany# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobreportpeople'>
            (jobreportpeople like '%$LIKEjobreportpeople$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobreportpeople'>
            (jobreportpeople = #jobreportpeople# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobreportphone'>
            (jobreportphone like '%$LIKEjobreportphone$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobreportphone'>
            (jobreportphone = #jobreportphone# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobreporttime'>
            (jobreporttime like '%$LIKEjobreporttime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobreporttime'>
            (jobreporttime = #jobreporttime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobacceptstate'>
            (jobacceptstate like '%$LIKEjobacceptstate$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobacceptstate'>
            (jobacceptstate = #jobacceptstate# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobaccepttime'>
            (jobaccepttime like '%$LIKEjobaccepttime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobaccepttime'>
            (jobaccepttime = #jobaccepttime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobacceptcompany'>
            (jobacceptcompany like '%$LIKEjobacceptcompany$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobacceptcompany'>
            (jobacceptcompany = #jobacceptcompany# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobacceptpeople'>
            (jobacceptpeople like '%$LIKEjobacceptpeople$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobacceptpeople'>
            (jobacceptpeople = #jobacceptpeople# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjobacceptphone'>
            (jobacceptphone like '%$LIKEjobacceptphone$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jobacceptphone'>
            (jobacceptphone = #jobacceptphone# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKErejectcause'>
            (rejectcause like '%$LIKErejectcause$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='rejectcause'>
            (rejectcause = #rejectcause# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEishangup'>
            (ishangup like '%$LIKEishangup$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='ishangup'>
            (ishangup = #ishangup# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEhangupcause'>
            (hangupcause like '%$LIKEhangupcause$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='hangupcause'>
            (hangupcause = #hangupcause# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEhanguppeople'>
            (hanguppeople like '%$LIKEhanguppeople$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='hanguppeople'>
            (hanguppeople = #hanguppeople# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEhangupcompany'>
            (hangupcompany like '%$LIKEhangupcompany$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='hangupcompany'>
            (hangupcompany = #hangupcompany# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEhanguptime'>
            (hanguptime like '%$LIKEhanguptime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='hanguptime'>
            (hanguptime = #hanguptime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEunhanguptime'>
            (unhanguptime like '%$LIKEunhanguptime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='hanguptime'>
            (unhanguptime = #unhanguptime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEunhanguppeople'>
            (unhanguppeople like '%$LIKEunhanguppeople$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='unhanguppeople'>
            (unhanguppeople = #unhanguppeople# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEunhangupcompany'>
            (unhangupcompany like '%$LIKEunhangupcompany$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='unhangupcompany'>
            (unhangupcompany = #unhangupcompany# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfaultacceptinfo'>
            (faultacceptinfo like '%$LIKEfaultacceptinfo$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultacceptinfo'>
            (faultacceptinfo = #faultacceptinfo# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfeedbackcompany'>
            (feedbackcompany like '%$LIKEfeedbackcompany$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='feedbackcompany'>
            (feedbackcompany = #feedbackcompany# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfeedbackpeople'>
            (feedbackpeople like '%$LIKEfeedbackpeople$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='feedbackpeople'>
            (feedbackpeople = #feedbackpeople# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfeedbacktime'>
            (feedbacktime like '%$LIKEfeedbacktime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='feedbacktime'>
            (feedbacktime = #feedbacktime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfeedbackphone'>
            (feedbackphone like '%$LIKEfeedbackphone$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='feedbackphone'>
            (feedbackphone = #feedbackphone# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfeedbackstate'>
            (feedbackstate like '%$LIKEfeedbackstate$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='feedbackstate'>
            (feedbackstate = #feedbackstate# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEfeedbackinfo'>
            (feedbackinfo like '%$LIKEfeedbackinfo$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='feedbackinfo'>
            (feedbackinfo = #feedbackinfo# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEisdelay'>
            (isdelay like '%$LIKEisdelay$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='isdelay'>
            (isdelay = #isdelay# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEdelaytime'>
            (delaytime like '%$LIKEdelaytime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='delaytime'>
            (delaytime = #delaytime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEdelaycause'>
            (delaycause like '%$LIKEdelaycause$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='delaycause'>
            (delaycause = #delaycause# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEdelayforcompany'>
            (delayforcompany like '%$LIKEdelayforcompany$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='delayforcompany'>
            (delayforcompany = #delayforcompany# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEdelayforpeople'>
            (delayforpeople like '%$LIKEdelayforpeople$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='delayforpeople'>
            (delayforpeople = #delayforpeople# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEdelayfortime'>
            (delayfortime like '%$LIKEdelayfortime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='delayfortime'>
            (delayfortime = #delayfortime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEdelayforstate'>
            (delayforstate like '%$LIKEdelayforstate$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='delayforstate'>
            (delayforstate = #delayforstate# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEdelayfordescription'>
            (delayfordescription like '%$LIKEdelayfordescription$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='delayfordescription'>
            (delayfordescription = #delayfordescription# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEconfirmfaulttype'>
            (confirmfaulttype like '%$LIKEconfirmfaulttype$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='confirmfaulttype'>
            (confirmfaulttype = #confirmfaulttype# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEconfirmfaultinfo'>
            (confirmfaultinfo like '%$LIKEconfirmfaultinfo$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='confirmfaultinfo'>
            (confirmfaultinfo = #confirmfaultinfo# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKErepairdays'>
            (repairdays like '%$LIKErepairdays$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='repairdays'>
            (repairdays = #repairdays# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEconfirmcompany'>
            (confirmcompany like '%$LIKEconfirmcompany$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='confirmcompany'>
            (confirmcompany = #confirmcompany# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEconfirmpeople'>
            (confirmpeople like '%$LIKEconfirmpeople$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='confirmpeople'>
            (confirmpeople = #confirmpeople# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEconfirmtime'>
            (confirmtime like '%$LIKEconfirmtime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='confirmtime'>
            (confirmtime = #confirmtime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEconfirmphone'>
            (confirmphone like '%$LIKEconfirmphone$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='confirmphone'>
            (confirmphone = #confirmphone# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEconfirmstate'>
            (confirmstate like '%$LIKEconfirmstate$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='confirmstate'>
            (confirmstate = #confirmstate# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEconfirmdescription'>
            (confirmdescription like '%$LIKEconfirmdescription$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='confirmdescription'>
            (confirmdescription = #confirmdescription# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEcreateaccount'>
            (createaccount like '%$LIKEcreateaccount$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='createaccount'>
            (createaccount = #createaccount# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEcreatetime'>
            (createtime like '%$LIKEcreatetime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='createtime'>
            (createtime = #createtime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEmodifyaccount'>
            (modifyaccount like '%$LIKEmodifyaccount$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='modifyaccount'>
            (modifyaccount = #modifyaccount# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEmodifytime'>
            (modifytime like '%$LIKEmodifytime$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='modifytime'>
            (modifytime = #modifytime# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEremarks'>
            (remarks like '%$LIKEremarks$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='remarks'>
            (remarks = #remarks# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEextend1'>
            (extend1 like '%$LIKEextend1$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='extend1'>
            (extend1 = #extend1# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEextend2'>
            (extend2 like '%$LIKEextend2$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='extend2'>
            (extend2 = #extend2# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEextend3'>
            (extend3 like '%$LIKEextend3$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='extend3'>
            (extend3 = #extend3# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEextend4'>
            (extend4 like '%$LIKEextend4$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='extend4'>
            (extend4 = #extend4# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='receiverpeople'>
            (receiverpeople = #receiverpeople# )
        </isNotEmpty>

        <isNotEmpty property='tableparam'>
            $tableparam$
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='comprehensive'>
            $comprehensive$
        </isNotEmpty>
        <isNotEmpty property='order'>
            $order$
        </isNotEmpty>
    </sql>

    <!-- add object -->
    <insert id="insert_Ywrepairjobinfo" parameterClass="java.util.Map">
        insert into
        ywrepairjobinfo(
        <dynamic prepend=" ">
            <isNotEmpty prepend=',' property='jobid'>jobid</isNotEmpty>
            <isNotEmpty prepend=',' property='jobnum'>jobnum</isNotEmpty>
            <isNotEmpty prepend=',' property='jobsource'>jobsource</isNotEmpty>
            <isNotEmpty prepend=',' property='alarmeventid'>alarmeventid</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdevicetype'>faultdevicetype</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdevicename'>faultdevicename</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdeviceid'>faultdeviceid</isNotEmpty>
            <isNotEmpty prepend=',' property='channelnum'>channelnum</isNotEmpty>
            <isNotEmpty prepend=',' property='faultpictureurl'>faultpictureurl</isNotEmpty>
            <isNotEmpty prepend=',' property='faultgrade'>faultgrade</isNotEmpty>
            <isNotEmpty prepend=',' property='faulttype'>faulttype</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdescription'>faultdescription</isNotEmpty>
            <isNotEmpty prepend=',' property='faultoccurtime'>faultoccurtime</isNotEmpty>
            <isNotEmpty prepend=',' property='requirefinishtime'>requirefinishtime</isNotEmpty>
            <isNotEmpty prepend=',' property='actualfinishtime'>actualfinishtime</isNotEmpty>
            <isNotEmpty prepend=',' property='jobprocessstate'>jobprocessstate</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreportcompany'>jobreportcompany</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreportpeople'>jobreportpeople</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreportphone'>jobreportphone</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreporttime'>jobreporttime</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptstate'>jobacceptstate</isNotEmpty>
            <isNotEmpty prepend=',' property='jobaccepttime'>jobaccepttime</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptcompany'>jobacceptcompany</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptpeople'>jobacceptpeople</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptphone'>jobacceptphone</isNotEmpty>
            <isNotEmpty prepend=',' property='rejectcause'>rejectcause</isNotEmpty>
            <isNotEmpty prepend=',' property='ishangup'>ishangup</isNotEmpty>
            <isNotEmpty prepend=',' property='hangupcause'>hangupcause</isNotEmpty>
            <isNotEmpty prepend=',' property='hanguppeople'>hanguppeople</isNotEmpty>
            <isNotEmpty prepend=',' property='hangupcompany'>hangupcompany</isNotEmpty>
            <isNotEmpty prepend=',' property='hanguptime'>hanguptime</isNotEmpty>
            <isNotEmpty prepend=',' property='unhanguptime'>unhanguptime</isNotEmpty>
            <isNotEmpty prepend=',' property='unhanguppeople'>unhanguppeople</isNotEmpty>
            <isNotEmpty prepend=',' property='unhangupcompany'>unhangupcompany</isNotEmpty>
            <isNotEmpty prepend=',' property='faultacceptinfo'>faultacceptinfo</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackcompany'>feedbackcompany</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackpeople'>feedbackpeople</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbacktime'>feedbacktime</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackphone'>feedbackphone</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackstate'>feedbackstate</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackinfo'>feedbackinfo</isNotEmpty>
            <isNotEmpty prepend=',' property='isdelay'>isdelay</isNotEmpty>
            <isNotEmpty prepend=',' property='delaytime'>delaytime</isNotEmpty>
            <isNotEmpty prepend=',' property='delaycause'>delaycause</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforcompany'>delayforcompany</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforpeople'>delayforpeople</isNotEmpty>
            <isNotEmpty prepend=',' property='delayfortime'>delayfortime</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforstate'>delayforstate</isNotEmpty>
            <isNotEmpty prepend=',' property='delayfordescription'>delayfordescription</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmfaulttype'>confirmfaulttype</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmfaultinfo'>confirmfaultinfo</isNotEmpty>
            <isNotEmpty prepend=',' property='repairdays'>repairdays</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmcompany'>confirmcompany</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmpeople'>confirmpeople</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmtime'>confirmtime</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmphone'>confirmphone</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmstate'>confirmstate</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmdescription'>confirmdescription</isNotEmpty>
            <isNotEmpty prepend=',' property='createaccount'>createaccount</isNotEmpty>
            <isNotEmpty prepend=',' property='createtime'>createtime</isNotEmpty>
            <isNotEmpty prepend=',' property='modifyaccount'>modifyaccount</isNotEmpty>
            <isNotEmpty prepend=',' property='modifytime'>modifytime</isNotEmpty>
            <isNotEmpty prepend=',' property='remarks'>remarks</isNotEmpty>
            <isNotEmpty prepend=',' property='extend1'>extend1</isNotEmpty>
            <isNotEmpty prepend=',' property='extend2'>extend2</isNotEmpty>
            <isNotEmpty prepend=',' property='extend3'>extend3</isNotEmpty>
            <isNotEmpty prepend=',' property='extend4'>extend4</isNotEmpty>
            <isNotEmpty prepend=',' property='maintenanceresult'>maintenanceresult</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmmaintenance'>confirmmaintenance</isNotEmpty>
            <isNotEmpty prepend=',' property='completiontime'>completiontime</isNotEmpty>
            <isNotEmpty prepend=',' property='receivertime'>receivertime</isNotEmpty>
            <isNotEmpty prepend=',' property='receivercompany'>receivercompany</isNotEmpty>
            <isNotEmpty prepend=',' property='receiverpeople'>receiverpeople</isNotEmpty>
            <isNotEmpty prepend=',' property='receiverphone'>receiverphone</isNotEmpty>
            <isNotEmpty prepend=',' property='accuracyofinfo'>accuracyofinfo</isNotEmpty>
            <isNotEmpty prepend=',' property='construction'>construction</isNotEmpty>
        </dynamic>
        <![CDATA[
	        ) values (
	    ]]>
        <dynamic prepend=" ">
            <isNotEmpty prepend=',' property='jobid'>#jobid#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobnum'>#jobnum#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobsource'>#jobsource#</isNotEmpty>
            <isNotEmpty prepend=',' property='alarmeventid'>#alarmeventid#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdevicetype'>#faultdevicetype#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdevicename'>#faultdevicename#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdeviceid'>#faultdeviceid#</isNotEmpty>
            <isNotEmpty prepend=',' property='channelnum'>#channelnum#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultpictureurl'>#faultpictureurl#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultgrade'>#faultgrade#</isNotEmpty>
            <isNotEmpty prepend=',' property='faulttype'>#faulttype#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdescription'>#faultdescription#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultoccurtime'>#faultoccurtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='requirefinishtime'>#requirefinishtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='actualfinishtime'>#actualfinishtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobprocessstate'>#jobprocessstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreportcompany'>#jobreportcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreportpeople'>#jobreportpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreportphone'>#jobreportphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreporttime'>#jobreporttime#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptstate'>#jobacceptstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobaccepttime'>#jobaccepttime#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptcompany'>#jobacceptcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptpeople'>#jobacceptpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptphone'>#jobacceptphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='rejectcause'>#rejectcause#</isNotEmpty>
            <isNotEmpty prepend=',' property='ishangup'>#ishangup#</isNotEmpty>
            <isNotEmpty prepend=',' property='hangupcause'>#hangupcause#</isNotEmpty>
            <isNotEmpty prepend=',' property='hanguppeople'>#hanguppeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='hangupcompany'>#hangupcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='hanguptime'>#hanguptime#</isNotEmpty>
            <isNotEmpty prepend=',' property='unhanguptime'>#unhanguptime#</isNotEmpty>
            <isNotEmpty prepend=',' property='unhanguppeople'>#unhanguppeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='unhangupcompany'>#unhangupcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultacceptinfo'>#faultacceptinfo#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackcompany'>#feedbackcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackpeople'>#feedbackpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbacktime'>#feedbacktime#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackphone'>#feedbackphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackstate'>#feedbackstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackinfo'>#feedbackinfo#</isNotEmpty>
            <isNotEmpty prepend=',' property='isdelay'>#isdelay#</isNotEmpty>
            <isNotEmpty prepend=',' property='delaytime'>#delaytime#</isNotEmpty>
            <isNotEmpty prepend=',' property='delaycause'>#delaycause#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforcompany'>#delayforcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforpeople'>#delayforpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayfortime'>#delayfortime#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforstate'>#delayforstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayfordescription'>#delayfordescription#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmfaulttype'>#confirmfaulttype#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmfaultinfo'>#confirmfaultinfo#</isNotEmpty>
            <isNotEmpty prepend=',' property='repairdays'>#repairdays#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmcompany'>#confirmcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmpeople'>#confirmpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmtime'>#confirmtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmphone'>#confirmphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmstate'>#confirmstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmdescription'>#confirmdescription#</isNotEmpty>
            <isNotEmpty prepend=',' property='createaccount'>#createaccount#</isNotEmpty>
            <isNotEmpty prepend=',' property='createtime'>#createtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='modifyaccount'>#modifyaccount#</isNotEmpty>
            <isNotEmpty prepend=',' property='modifytime'>#modifytime#</isNotEmpty>
            <isNotEmpty prepend=',' property='remarks'>#remarks#</isNotEmpty>
            <isNotEmpty prepend=',' property='extend1'>#extend1#</isNotEmpty>
            <isNotEmpty prepend=',' property='extend2'>#extend2#</isNotEmpty>
            <isNotEmpty prepend=',' property='extend3'>#extend3#</isNotEmpty>
            <isNotEmpty prepend=',' property='extend4'>#extend4#</isNotEmpty>
            <isNotEmpty prepend=',' property='maintenanceresult'>#maintenanceresult#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmmaintenance'>#confirmmaintenance#</isNotEmpty>
            <isNotEmpty prepend=',' property='completiontime'>#completiontime#</isNotEmpty>
            <isNotEmpty prepend=',' property='receivertime'>#receivertime#</isNotEmpty>
            <isNotEmpty prepend=',' property='receivercompany'>#receivercompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='receiverpeople'>#receiverpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='receiverphone'>#receiverphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='accuracyofinfo'>#accuracyofinfo#</isNotEmpty>
            <isNotEmpty prepend=',' property='construction'>#construction#</isNotEmpty>
        </dynamic>
        <![CDATA[
	        )
	    ]]>
    </insert>

    <!-- edit object  -->
    <update id="update_Ywrepairjobinfo" parameterClass="java.util.Map">
        update ywrepairjobinfo
        <dynamic prepend="set ">

            <isNotEmpty prepend=',' property='jobsource'>jobsource=#jobsource#</isNotEmpty>
            <isNotEmpty prepend=',' property='alarmeventid'>alarmeventid=#alarmeventid#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdevicetype'>faultdevicetype=#faultdevicetype#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdevicename'>faultdevicename=#faultdevicename#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdeviceid'>faultdeviceid=#faultdeviceid#</isNotEmpty>
            <isNotEmpty prepend=',' property='channelnum'>channelnum=#channelnum#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultpictureurl'>faultpictureurl=#faultpictureurl#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultgrade'>faultgrade=#faultgrade#</isNotEmpty>
            <isNotEmpty prepend=',' property='faulttype'>faulttype=#faulttype#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultdescription'>faultdescription=#faultdescription#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultoccurtime'>faultoccurtime=#faultoccurtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='requirefinishtime'>requirefinishtime=#requirefinishtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='actualfinishtime'>actualfinishtime=#actualfinishtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobprocessstate'>jobprocessstate=#jobprocessstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreportcompany'>jobreportcompany=#jobreportcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreportpeople'>jobreportpeople=#jobreportpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreportphone'>jobreportphone=#jobreportphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobreporttime'>jobreporttime=#jobreporttime#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptstate'>jobacceptstate=#jobacceptstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobaccepttime'>jobaccepttime=#jobaccepttime#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptcompany'>jobacceptcompany=#jobacceptcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptpeople'>jobacceptpeople=#jobacceptpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='jobacceptphone'>jobacceptphone=#jobacceptphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='rejectcause'>rejectcause=#rejectcause#</isNotEmpty>
            <isNotEmpty prepend=',' property='isreject'>isreject=#isreject#</isNotEmpty>
            <isNotEmpty prepend=',' property='ishangup'>ishangup=#ishangup#</isNotEmpty>
            <isNotEmpty prepend=',' property='hangupcause'>hangupcause=#hangupcause#</isNotEmpty>
            <isNotEmpty prepend=',' property='hanguppeople'>hanguppeople=#hanguppeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='hangupcompany'>hangupcompany=#hangupcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='hanguptime'>hanguptime=#hanguptime#</isNotEmpty>
            <isNotEmpty prepend=',' property='unhanguptime'>unhanguptime=#unhanguptime#</isNotEmpty>
            <isNotEmpty prepend=',' property='unhanguppeople'>unhanguppeople=#unhanguppeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='unhangupcompany'>unhangupcompany=#unhangupcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='faultacceptinfo'>faultacceptinfo=#faultacceptinfo#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackcompany'>feedbackcompany=#feedbackcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackpeople'>feedbackpeople=#feedbackpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbacktime'>feedbacktime=#feedbacktime#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackphone'>feedbackphone=#feedbackphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackstate'>feedbackstate=#feedbackstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='feedbackinfo'>feedbackinfo=#feedbackinfo#</isNotEmpty>
            <isNotEmpty prepend=',' property='isdelay'>isdelay=#isdelay#</isNotEmpty>
            <isNotEmpty prepend=',' property='delaytime'>delaytime=#delaytime#</isNotEmpty>
            <isNotEmpty prepend=',' property='delaycause'>delaycause=#delaycause#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforcompany'>delayforcompany=#delayforcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforpeople'>delayforpeople=#delayforpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayfortime'>delayfortime=#delayfortime#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforstate'>delayforstate=#delayforstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayfordescription'>delayfordescription=#delayfordescription#
            </isNotEmpty>
            <isNotEmpty prepend=',' property='confirmfaulttype'>confirmfaulttype=#confirmfaulttype#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmfaultinfo'>confirmfaultinfo=#confirmfaultinfo#</isNotEmpty>
            <isNotEmpty prepend=',' property='repairdays'>repairdays=#repairdays#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmcompany'>confirmcompany=#confirmcompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmpeople'>confirmpeople=#confirmpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmtime'>confirmtime=#confirmtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmphone'>confirmphone=#confirmphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmstate'>confirmstate=#confirmstate#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmdescription'>confirmdescription=#confirmdescription#</isNotEmpty>
            <isNotEmpty prepend=',' property='createaccount'>createaccount=#createaccount#</isNotEmpty>
            <isNotEmpty prepend=',' property='createtime'>createtime=#createtime#</isNotEmpty>
            <isNotEmpty prepend=',' property='modifyaccount'>modifyaccount=#modifyaccount#</isNotEmpty>
            <isNotEmpty prepend=',' property='modifytime'>modifytime=#modifytime#</isNotEmpty>
            <isNotEmpty prepend=',' property='remarks'>remarks=#remarks#</isNotEmpty>
            <isNotEmpty prepend=',' property='extend1'>extend1=#extend1#</isNotEmpty>
            <isNotEmpty prepend=',' property='extend2'>extend2=#extend2#</isNotEmpty>
            <isNotEmpty prepend=',' property='extend3'>extend3=#extend3#</isNotEmpty>
            <isNotEmpty prepend=',' property='extend4'>extend4=#extend4#</isNotEmpty>
            <isNotEmpty prepend=',' property='delayforphone'>delayforphone=#delayforphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='maintenanceresult'>maintenanceresult=#maintenanceresult#</isNotEmpty>
            <isNotEmpty prepend=',' property='confirmmaintenance'>confirmmaintenance=#confirmmaintenance#</isNotEmpty>
            <isNotEmpty prepend=',' property='completiontime'>completiontime=#completiontime#</isNotEmpty>
            <isNotEmpty prepend=',' property='receivertime'>receivertime=#receivertime#</isNotEmpty>
            <isNotEmpty prepend=',' property='receivercompany'>receivercompany=#receivercompany#</isNotEmpty>
            <isNotEmpty prepend=',' property='receiverpeople'>receiverpeople=#receiverpeople#</isNotEmpty>
            <isNotEmpty prepend=',' property='receiverphone'>receiverphone=#receiverphone#</isNotEmpty>
            <isNotEmpty prepend=',' property='accuracyofinfo'>accuracyofinfo=#accuracyofinfo#</isNotEmpty>
            <isNotEmpty prepend=',' property='construction'>construction=#construction#</isNotEmpty>
        </dynamic>
        where jobid = #XGTJjobid#
        <isNotEmpty prepend='AND ' property='XGTJjobsource'>jobsource = #XGTJjobsource#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJalarmeventid'>alarmeventid = #XGTJalarmeventid#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfaultdevicetype'>faultdevicetype = #XGTJfaultdevicetype#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfaultdevicename'>faultdevicename = #XGTJfaultdevicename#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfaultdeviceid'>faultdeviceid = #XGTJfaultdeviceid#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJchannelnum'>channelnum = #XGTJchannelnum#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfaultpictureurl'>faultpictureurl = #XGTJfaultpictureurl#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfaultgrade'>faultgrade = #XGTJfaultgrade#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfaulttype'>faulttype = #XGTJfaulttype#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfaultdescription'>faultdescription = #XGTJfaultdescription#
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfaultoccurtime'>faultoccurtime = #XGTJfaultoccurtime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJrequirefinishtime'>requirefinishtime = #XGTJrequirefinishtime#
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJactualfinishtime'>actualfinishtime = #XGTJactualfinishtime#
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobprocessstate'>jobprocessstate = #XGTJjobprocessstate#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobreportcompany'>jobreportcompany = #XGTJjobreportcompany#
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobreportpeople'>jobreportpeople = #XGTJjobreportpeople#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobreportphone'>jobreportphone = #XGTJjobreportphone#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobreporttime'>jobreporttime = #XGTJjobreporttime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobacceptstate'>jobacceptstate = #XGTJjobacceptstate#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobaccepttime'>jobaccepttime = #XGTJjobaccepttime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobacceptcompany'>jobacceptcompany = #XGTJjobacceptcompany#
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobacceptpeople'>jobacceptpeople = #XGTJjobacceptpeople#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJjobacceptphone'>jobacceptphone = #XGTJjobacceptphone#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJrejectcause'>rejectcause = #XGTJrejectcause#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJishangup'>ishangup = #XGTJishangup#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJhangupcause'>hangupcause = #XGTJhangupcause#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJhanguppeople'>hanguppeople = #XGTJhanguppeople#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJhangupcompany'>hangupcompany = #XGTJhangupcompany#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJhanguptime'>hanguptime = #XGTJhanguptime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJunhanguptime'>unhanguptime = #XGTJunhanguptime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJunhanguppeople'>unhanguppeople = #XGTJunhanguppeople#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJunhangupcompany'>unhangupcompany = #XGTJunhangupcompany#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfaultacceptinfo'>faultacceptinfo = #XGTJfaultacceptinfo#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfeedbackcompany'>feedbackcompany = #XGTJfeedbackcompany#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfeedbackpeople'>feedbackpeople = #XGTJfeedbackpeople#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfeedbacktime'>feedbacktime = #XGTJfeedbacktime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfeedbackphone'>feedbackphone = #XGTJfeedbackphone#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfeedbackstate'>feedbackstate = #XGTJfeedbackstate#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJfeedbackinfo'>feedbackinfo = #XGTJfeedbackinfo#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJisdelay'>isdelay = #XGTJisdelay#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJdelaytime'>delaytime = #XGTJdelaytime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJdelaycause'>delaycause = #XGTJdelaycause#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJdelayforcompany'>delayforcompany = #XGTJdelayforcompany#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJdelayforpeople'>delayforpeople = #XGTJdelayforpeople#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJdelayfortime'>delayfortime = #XGTJdelayfortime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJdelayforstate'>delayforstate = #XGTJdelayforstate#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJdelayfordescription'>delayfordescription = #XGTJdelayfordescription#
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJconfirmfaulttype'>confirmfaulttype = #XGTJconfirmfaulttype#
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJconfirmfaultinfo'>confirmfaultinfo = #XGTJconfirmfaultinfo#
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJrepairdays'>repairdays = #XGTJrepairdays#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJconfirmcompany'>confirmcompany = #XGTJconfirmcompany#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJconfirmpeople'>confirmpeople = #XGTJconfirmpeople#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJconfirmtime'>confirmtime = #XGTJconfirmtime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJconfirmphone'>confirmphone = #XGTJconfirmphone#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJconfirmstate'>confirmstate = #XGTJconfirmstate#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJconfirmdescription'>confirmdescription = #XGTJconfirmdescription#
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJcreateaccount'>createaccount = #XGTJcreateaccount#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJcreatetime'>createtime = #XGTJcreatetime#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJmodifyaccount'>modifyaccount = #XGTJmodifyaccount#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='XGTJmodifytime'>modifytime = #XGTJmodifytime#</isNotEmpty>


    </update>

    <!-- delete object -->
    <delete id="delete_Ywrepairjobinfo" parameterClass="java.util.Map">
        delete from ywrepairjobinfo  where  (jobid = #jobid# )
    </delete>

    <!-- batch delete object -->
    <delete id="batch_delete_Ywrepairjobinfo" parameterClass="java.util.Map">
        delete from ywrepairjobinfo        where  key in (#keyword#)
    </delete>

    <!-- query objects by page-->
    <select id="query_Ywrepairjobinfo" resultClass="java.util.HashMap" parameterClass="java.util.Map"
            remapResults="true">
        select jobid,
        jobnum,
        jobsource,
        alarmeventid,
        faultdevicetype,
        (select csmc
        from xtcl b
        where b.csdl = 'ywAlarmDeviceType'
        and b.csdm = faultdevicetype) as faultdevicetypename,
        faultdevicename,
        faultdeviceid,
        channelnum,
        faultpictureurl,
        faultgrade,
        (select csmc
        from xtcl b
        where b.csdl = 'ywAlarmRuleLevel'
        and b.csdm = faultgrade) as faultgradename,
        faulttype,
        (select csmc
        from xtcl b
        where b.csdl = 'ywAlarmDeviceType'
        and b.csdm = faulttype) as faulttypename,
        faultdescription,
        faultoccurtime,
        requirefinishtime,
        actualfinishtime,
        jobprocessstate,
        (select alarmname
        from ywalarmeventcode b
        where b.alarmcode = jobprocessstate) as jobprocessstatename,
        jobreportcompany,
        (select bmmc from ptyhbm b where b.bmbh = jobreportcompany) as jobreportcompanyname,
        jobreportpeople,
        (select yhzh from ptyh b where b.yhbh = jobreportpeople) as jobreportpeoplename,
        jobreportphone,
        jobreporttime,
        jobacceptstate,
        jobaccepttime,
        jobacceptcompany,
        (select bmmc from ptyhbm b where b.bmbh = jobacceptcompany) as jobacceptcompanyname,
        jobacceptpeople,
        (select yhzh from ptyh b where b.yhbh = jobacceptpeople) as jobacceptpeoplename,
        jobacceptphone,
        rejectcause,
        ishangup,
        hangupcause,
        hanguppeople,
        (select yhzh from ptyh b where b.yhbh = hanguppeople) as hanguppeoplename,
        hangupcompany,
        (select bmmc from ptyhbm b where b.bmbh = hangupcompany) as hangupcompanyname,
        hanguptime,
        unhanguptime,
        unhanguppeople,
        (select yhzh from ptyh b where b.yhbh = unhanguppeople) as unhanguppeoplename,
        unhangupcompany,
        (select bmmc from ptyhbm b where b.bmbh = unhangupcompany) as unhangupcompanyname,
        faultacceptinfo,
        feedbackcompany,
        (select bmmc from ptyhbm b where b.bmbh = feedbackcompany) as feedbackcompanyname,
        feedbackpeople,
        feedbacktime,
        feedbackphone,
        feedbackstate,
        feedbackinfo,
        isdelay,
        delaytime,
        delaycause,
        delayforcompany,
        delayforpeople,
        delayfortime,
        delayforstate,
        delayfordescription,
        confirmfaulttype,
        (select csmc
        from Xtcl
        where csdl = 'ywAlarmRuleSource'
        and csdm = confirmfaulttype) confirmfaulttypename,
        confirmfaultinfo,
        repairdays,
        confirmcompany,
        (select bmmc from ptyhbm b where b.bmbh = confirmcompany) as confirmcompanyname,
        confirmpeople,
        confirmtime,
        confirmphone,
        confirmstate,
        confirmdescription,
        createaccount,
        createtime,
        modifyaccount,
        modifytime,
        remarks,
        extend1,
        extend2,
        extend3,
        extend4,
        isreject,
        maintenanceresult,
        confirmmaintenance,
        completiontime,
        receivertime,
        receivercompany,
        (select bmmc from ptyhbm b where b.bmbh = receivercompany) as receivercompanyname,
        receiverpeople,
        receiverphone,
        accuracyofinfo,
        construction,
        jd,
        wd
        from ywrepairjobinfo
        left join (SELECT sbbh xh, tdbh, jd, wd, '1' devicetype
        FROM sbtdspsr a  where a.kz3 is not null  and a.kz3 != '1'
        union all
        SELECT xh, null tdbh, jd, wd, '3' devicetype
        FROM nhywjtxhdgl n
        UNION ALL
        SELECT xh, null tdbh, jd, wd, '4' devicetype
        FROM nhywjtledydpgl
        UNION ALL
        SELECT id AS xh,
        null tdbh,
        to_char(longitude) jd,
        to_char(latitude) wd,
        '10' AS devicetype
        FROM its.ksh_detector
        WHERE detectortype = 'GVD'
        UNION ALL
        SELECT id AS xh,
        null tdbh,
        to_char(longitude) jd,
        to_char(latitude) wd,
        '11' AS devicetype
        FROM its.ksh_detector
        WHERE detectortype = 'SMARTSENSOR'
        UNION ALL
        SELECT xh, null tdbh, jd, wd, '12' AS detectortype
        FROM its.ksh_zxld) a
        on faultdeviceid = a.xh
        and channelnum = a.tdbh
        <include refid="condition_Ywrepairjobinfo"/>
        <!-- <isNotEmpty prepend=' ' property='start'>
            limit #start# ,#limit#
        </isNotEmpty>	 -->
    </select>

    <!-- query objects totalcount -->
    <select id="count_Ywrepairjobinfo" resultClass="java.lang.Integer" parameterClass="java.util.Map">
        select count(*) from ywrepairjobinfo
        <include refid="condition_Ywrepairjobinfo"/>
    </select>

    <!-- batch add objects -->
    <insert id="batch_insert_Ywrepairjobinfo" parameterClass="java.util.List">
        <![CDATA[
          INSERT
      	]]>
        <iterate conjunction=" ">
            into ywrepairjobinfo(
            <![CDATA[
				jobid,jobsource,alarmeventid,faultdevicetype,faultdevicename,faultdeviceid,channelnum,faultpictureurl,faultgrade,faulttype,faultdescription,faultoccurtime,requirefinishtime,actualfinishtime,jobprocessstate,jobreportcompany,jobreportpeople,jobreportphone,jobreporttime,jobacceptstate,jobaccepttime,jobacceptcompany,jobacceptpeople,jobacceptphone,rejectcause,ishangup,hangupcause,hanguppeople,hangupcompany,hanguptime,unhanguptime,unhanguppeople,unhangupcompany,faultacceptinfo,feedbackcompany,feedbackpeople,feedbacktime,feedbackphone,feedbackstate,feedbackinfo,isdelay,delaytime,delaycause,delayforcompany,delayforpeople,delayfortime,delayforstate,delayfordescription,confirmfaulttype,confirmfaultinfo,repairdays,confirmcompany,confirmpeople,confirmtime,confirmphone,confirmstate,confirmdescription,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4,maintenanceresult ,
confirmmaintenance,completiontime ,receivertime,receivercompany,receiverpeople ,receiverphone,accuracyofinfo ,construction
			)values
			 ]]>
            <![CDATA[
				(
				#list[].jobid#,#list[].jobsource#,#list[].alarmeventid#,#list[].faultdevicetype#,#list[].faultdevicename#,#list[].faultdeviceid#,#list[].channelnum#,#list[].faultpictureurl#,#list[].faultgrade#,#list[].faulttype#,#list[].faultdescription#,#list[].faultoccurtime#,#list[].requirefinishtime#,#list[].actualfinishtime#,#list[].jobprocessstate#,#list[].jobreportcompany#,#list[].jobreportpeople#,#list[].jobreportphone#,#list[].jobreporttime#,#list[].jobacceptstate#,#list[].jobaccepttime#,#list[].jobacceptcompany#,#list[].jobacceptpeople#,#list[].jobacceptphone#,#list[].rejectcause#,#list[].ishangup#,#list[].hangupcause#,#list[].hanguppeople#,#list[].hangupcompany#,#list[].hanguptime#,#list[].unhanguptime#,#list[].unhanguppeople#,#list[].unhangupcompany#,#list[].faultacceptinfo#,#list[].feedbackcompany#,#list[].feedbackpeople#,#list[].feedbacktime#,#list[].feedbackphone#,#list[].feedbackstate#,#list[].feedbackinfo#,#list[].isdelay#,#list[].delaytime#,#list[].delaycause#,#list[].delayforcompany#,#list[].delayforpeople#,#list[].delayfortime#,#list[].delayforstate#,#list[].delayfordescription#,#list[].confirmfaulttype#,#list[].confirmfaultinfo#,#list[].repairdays#,#list[].confirmcompany#,#list[].confirmpeople#,#list[].confirmtime#,#list[].confirmphone#,#list[].confirmstate#,#list[].confirmdescription#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				,#list[].maintenanceresult#,#list[].confirmmaintenance#,#list[].completiontime#,#list[].receivertime#,#list[].receivercompany#,
#list[].receiverpeople#,#list[].receiverphone#,#list[].accuracyofinfo#,#list[].construction#)
			]]>
        </iterate>
    </insert>


    <!-- 获取用户信息 -->
    <select id="getUserInfo" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select a.*,b.bmmc from ptyh a left join ptyhbm b on a.bmbh = b.bmbh
		where 1=1 and a.yhbh = #yhbh#
	</select>
    <!-- 有权限审批工单的人所在的部门 -->
    <select id="getReportBm" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select distinct c.bmbh,c.bmmc from ptyh a,ywuserrolerelation b,ptyhbm c
		where a.yhbh = b.usernum and a.bmbh = c.bmbh and b.isapprovalauthory=1
	</select>

    <!-- 有权限审批工单的人 -->
    <select id="getReportUser" resultClass="java.util.HashMap" parameterClass="java.util.Map">
        select a.yhbh,a.sjhm,a.yhmc,a.yhzh from ptyh a,ywuserrolerelation b
        where a.yhbh = b.usernum and b.isapprovalauthory=1
        <isNotEmpty prepend='AND ' property='bmbh'>a.bmbh = #bmbh#</isNotEmpty>
        <isNotEmpty prepend='AND ' property='yhzh'>a.yhzh = #yhzh#</isNotEmpty>
    </select>
    <select id="query_YwrepairDevicejobinfo" resultClass="java.util.HashMap" parameterClass="java.util.Map"
            remapResults="true">
        select
        jobid,jobnum,jobsource,alarmeventid,
        faultdevicetype,(select csmc from xtcl b where b.csdl='ywAlarmDeviceType' and b.csdm=faultdevicetype) as
        faultdevicetypename,
        faultdevicename,faultdeviceid,channelnum,faultpictureurl,
        faultgrade,(select csmc from xtcl b where b.csdl='ywAlarmRuleLevel' and b.csdm=faultgrade) as faultgradename,
        faulttype,(select csmc from xtcl b where b.csdl='ywAlarmDeviceType' and b.csdm=faulttype) as faulttypename,
        faultdescription,faultoccurtime,requirefinishtime,actualfinishtime,
        jobprocessstate,(select alarmname from ywalarmeventcode b where b.alarmcode=jobprocessstate) as
        jobprocessstatename,
        jobreportcompany,(select bmmc from ptyhbm b where b.bmbh=jobreportcompany) as jobreportcompanyname,
        jobreportpeople,(select yhzh from ptyh b where b.yhbh=jobreportpeople) as jobreportpeoplename,
        jobreportphone,jobreporttime,jobacceptstate,jobaccepttime,
        jobacceptcompany,(select bmmc from ptyhbm b where b.bmbh=jobacceptcompany) as jobacceptcompanyname,
        jobacceptpeople,(select yhzh from ptyh b where b.yhbh=jobacceptpeople ) as jobacceptpeoplename,
        jobacceptphone,rejectcause,ishangup,hangupcause,
        hanguppeople,(select yhzh from ptyh b where b.yhbh=hanguppeople ) as hanguppeoplename,
        hangupcompany,(select bmmc from ptyhbm b where b.bmbh=hangupcompany) as hangupcompanyname,
        hanguptime,unhanguptime,
        unhanguppeople,(select yhzh from ptyh b where b.yhbh=unhanguppeople ) as unhanguppeoplename,
        unhangupcompany,(select bmmc from ptyhbm b where b.bmbh=unhangupcompany) as unhangupcompanyname,
        faultacceptinfo,
        feedbackcompany,(select bmmc from ptyhbm b where b.bmbh=feedbackcompany) as feedbackcompanyname,
        feedbackpeople,feedbacktime,feedbackphone,feedbackstate,feedbackinfo,isdelay,delaytime,delaycause,delayforcompany,delayforpeople,delayfortime,delayforstate,delayfordescription,confirmfaulttype,confirmfaultinfo,repairdays,
        confirmcompany,(select bmmc from ptyhbm b where b.bmbh=confirmcompany) as confirmcompanyname,
        confirmpeople,confirmtime,confirmphone,confirmstate,confirmdescription,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4,maintenanceresult
        ,confirmmaintenance, completiontime ,receivertime,receivercompany,receiverpeople , receiverphone,accuracyofinfo
        ,construction
        from ywrepairjobinfo
        <include refid="condition_Ywrepairjobinfo"/>

    </select>
    <select id="count_YwrepairDevicejobinfo" resultClass="java.lang.Integer" parameterClass="java.util.Map">
        select count(*) from ywrepairjobinfo
        <include refid="condition_Ywrepairjobinfo"/>
    </select>

    <select id="query_Ywrepairjobinstent" resultClass="java.util.HashMap" parameterClass="java.util.Map">
        <isEqual compareValue="1" property="faultdevicetype">
            SELECT xzbh, xzmc,sbbh,
            tdmc, sum(decode(range,0,1,0)) cnt,sum(decode(range,1,1,0))uncnt
            from(
            SELECT c.xzbh,xzmc,sbbh, tdmc, decode(sign(range-#range#),1,1,0)range from(
            SELECT xzbh, sbbh, tdmc
            , round(to_number(nvl(to_date(t.actualfinishtime, 'yyyy-mm-dd hh24:mi:ss'), SYSDATE) -
            to_date(t.requirefinishtime, 'yyyy-mm-dd hh24:mi:ss'))) AS range
            from ywrepairjobinfo t ,sbtdspsr a where  a.kz3 is not null and a.kz3 != '1' and faultdeviceid=a.sbbh
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  xzbh  in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>)c  left join  ptxzs b  on b.xzbh =c.xzbh
            ) group by xzbh, sbbh,tdmc,xzmc
        </isEqual>
        <isEqual compareValue="2" property="faultdevicetype">
            select machineareanum xzbh, (select xzmc from ptxzs b where b.xzbh=machineareanum) as
            xzmc,faultdeviceid sbbh,
            faultdevicename tdmc, sum(decode(range,0,1,0)) cnt,sum(decode(range,1,1,0))uncnt
            from(
            select machineareanum,faultdeviceid, faultdevicename, decode(sign(range-#range#),1,1,0)range from(
            select machineareanum, faultdeviceid, faultdevicename
            , round(to_number(nvl(to_date(t.actualfinishtime, 'yyyy-mm-dd hh24:mi:ss'), SYSDATE) -
            to_date(t.requirefinishtime, 'yyyy-mm-dd hh24:mi:ss'))) as range
            from ywrepairjobinfo t , ywmachineinfo m where faultdeviceid = machineid
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  MACHINEAREANUM  in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>)c
            ) group by MACHINEAREANUM, faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="3" property="faultdevicetype">
            SELECT qybh xzbh, (select xzmc from ptxzs b where b.xzbh=qybh) as xzmc,faultdeviceid sbbh,
            faultdevicename tdmc, sum(decode(range,0,1,0)) cnt,sum(decode(range,1,1,0))uncnt
            from(
            SELECT qybh,faultdeviceid, faultdevicename, decode(sign(range-#range#),1,1,0)range from(
            SELECT qybh, faultdeviceid, faultdevicename
            , round(to_number(nvl(to_date(t.actualfinishtime, 'yyyy-mm-dd hh24:mi:ss'), SYSDATE) -
            to_date(t.requirefinishtime, 'yyyy-mm-dd hh24:mi:ss'))) AS range
            FROM YWREPAIRJOBINFO t , nhywjtxhdgl m where faultdeviceid=xh
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  qybh  in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>)c
            ) group by qybh, faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="4" property="faultdevicetype">
            SELECT qybh xzbh, (select xzmc from ptxzs b where b.xzbh=qybh ) as xzmc,faultdeviceid sbbh,
            faultdevicename tdmc, sum(decode(range,0,1,0)) cnt,sum(decode(range,1,1,0))uncnt
            from(
            SELECT qybh,faultdeviceid, faultdevicename, decode(sign(range-#range#),1,1,0)range from(
            SELECT qybh, faultdeviceid, faultdevicename
            , round(to_number(nvl(to_date(t.actualfinishtime, 'yyyy-mm-dd hh24:mi:ss'), SYSDATE) -
            to_date(t.requirefinishtime, 'yyyy-mm-dd hh24:mi:ss'))) AS range
            FROM YWREPAIRJOBINFO t ,nhywjtledydpgl m where faultdeviceid=xh
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  qybh  in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>)c
            ) group by qybh, faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="10" property="faultdevicetype">
            SELECT regionid xzbh, (select xzmc from ptxzs b where b.xzbh=regionid) as xzmc,faultdeviceid
            sbbh,
            faultdevicename tdmc, sum(decode(range,0,1,0)) cnt,sum(decode(range,1,1,0))uncnt
            from(
            SELECT regionid ,faultdeviceid, faultdevicename, decode(sign(range-#range#),1,1,0)range from(
            SELECT regionid , faultdeviceid, faultdevicename
            , round(to_number(nvl(to_date(t.actualfinishtime, 'yyyy-mm-dd hh24:mi:ss'), SYSDATE) -
            to_date(t.requirefinishtime, 'yyyy-mm-dd hh24:mi:ss'))) AS range
            FROM YWREPAIRJOBINFO t, its.ksh_detector a where faultdeviceid=a.id
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  regionid   in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>)c
            ) group by regionid , faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="11" property="faultdevicetype">
            SELECT regionid xzbh, (select xzmc from ptxzs b where b.xzbh=regionid ) as xzmc,faultdeviceid
            sbbh,
            faultdevicename tdmc, sum(decode(range,0,1,0)) cnt,sum(decode(range,1,1,0))uncnt
            from(
            SELECT regionid ,faultdeviceid, faultdevicename, decode(sign(range-#range#),1,1,0)range from(
            SELECT regionid , faultdeviceid, faultdevicename
            , round(to_number(nvl(to_date(t.actualfinishtime, 'yyyy-mm-dd hh24:mi:ss'), SYSDATE) -
            to_date(t.requirefinishtime, 'yyyy-mm-dd hh24:mi:ss'))) AS range
            FROM YWREPAIRJOBINFO t, its.ksh_detector a where faultdeviceid=a.id
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  regionid   in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>)c
            ) group by regionid , faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="12" property="faultdevicetype">
            SELECT gxdwbh xzbh, (select xzmc from ptxzs b where b.xzbh=gxdwbh) as xzmc,faultdeviceid sbbh,
            faultdevicename tdmc, sum(decode(range,0,1,0)) cnt,sum(decode(range,1,1,0))uncnt
            from(
            SELECT gxdwbh,faultdeviceid, faultdevicename, decode(sign(range-#range#),1,1,0)range from(
            SELECT gxdwbh, faultdeviceid, faultdevicename
            , round(to_number(nvl(to_date(t.actualfinishtime, 'yyyy-mm-dd hh24:mi:ss'), SYSDATE) -
            to_date(t.requirefinishtime, 'yyyy-mm-dd hh24:mi:ss'))) AS range
            FROM YWREPAIRJOBINFO t, its.ksh_zxld a where faultdeviceid=a.xh
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  gxdwbh  in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>)c
            ) group by gxdwbh, faultdeviceid,faultdevicename
        </isEqual>
    </select>
    <select id="count_Ywrepairjobinstent" resultClass="java.lang.Integer" parameterClass="java.util.Map">
        <isEqual compareValue="1" property="faultdevicetype">
            select count(count(*)) from ywrepairjobinfo t, sbtdspsr a where  a.kz3 is not null and a.kz3 != '1' and t.faultdeviceid=a.sbbh
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  xzbh in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>
            group by sbbh
        </isEqual>
        <isEqual compareValue="2" property="faultdevicetype">
            SELECT count(count(*))
            FROM YWREPAIRJOBINFO t , YWMACHINEINFO m where faultdeviceid = MACHINEID
         <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  MACHINEAREANUM  in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>
            group by MACHINEAREANUM, faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="3" property="faultdevicetype">
            SELECT count(count(*))
            FROM YWREPAIRJOBINFO t , nhywjtxhdgl m where faultdeviceid=xh
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  qybh  in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>
            group by qybh, faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="4" property="faultdevicetype">
            SELECT count(count(*))
            FROM YWREPAIRJOBINFO t ,nhywjtledydpgl m where faultdeviceid=xh
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  qybh  in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>
            group by qybh, faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="10" property="faultdevicetype">
            select count(count(*)) FROM YWREPAIRJOBINFO t, its.ksh_detector a
            where faultdeviceid=a.id
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  regionid   in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>
            group by regionid , faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="11" property="faultdevicetype">
            select count(count(*)) FROM YWREPAIRJOBINFO t, its.ksh_detector a
            where faultdeviceid=a.id
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  regionid   in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>
            group by regionid , faultdeviceid,faultdevicename
        </isEqual>
        <isEqual compareValue="12" property="faultdevicetype">
            select count(count(*)) from YWREPAIRJOBINFO t , its.ksh_zxld a where t.faultdeviceid=a.xh and

            <isNotEmpty prepend='AND ' property='xzbh'>
                <![CDATA[  a.gxdwbh   in ]]>
                <iterate property="xzbh" conjunction="," open="(" close=")">
                    #xzbh[]#
                </iterate>
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
                faultdevicename like '%LIKEfaultdevicename%'
            </isNotEmpty>
            <isNotEmpty prepend='AND ' property='faultdevicetype'>
                faultdevicetype = #faultdevicetype#
            </isNotEmpty>
            <isNotEmpty property='tableparam'>
                $tableparam$
            </isNotEmpty>
            group by faultdeviceid
        </isEqual>
    </select>


    <select id="count_YwrepairjobDeviceInstent" resultClass="java.lang.Integer" parameterClass="java.util.Map">
        select count(count(*)) from YWREPAIRJOBINFO t
        <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
            faultdevicename like '%LIKEfaultdevicename%'
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultdevicetype'>
            faultdevicetype = #faultdevicetype#
        </isNotEmpty>
        <isNotEmpty property='tableparam'>
            $tableparam$
        </isNotEmpty>
        group by faultdeviceid
    </select>
    <!-- batch add objects -->
    <insert id="batch_insert_KSHPicture" parameterClass="java.util.List">
        <iterate open="begin" close="end;">
            insert into its.ksh_picture(id, name, create_time, object_id, object_type, create_user)
            values(#list[].id#,#list[].name#,#list[].create_time#,#list[].object_id#,#list[].object_type#,#list[].create_user#);
        </iterate>
    </insert>
    <select id="query_kshPictureByObjectId" resultClass="java.util.HashMap" parameterClass="java.util.Map">
      select * from its.ksh_picture
    </select>

    <select id="count_kshPictureByObjectId" resultClass="java.lang.Integer" parameterClass="java.util.Map">
        select count(*) from its.ksh_picture
        <include refid="condition_Ywrepairjobinfo"/>
    </select>

    <select id="query_originStatistic" resultClass="java.util.HashMap" parameterClass="java.util.Map">
        SELECT faultdevicetype,(select csmc from Xtcl where csdl='nhywjtsblx' and csdm=faultdevicetype) devicetypename,
        (select csmc from Xtcl where csdl='ywAlarmRuleSource' and csdm=confirmfaulttype)confirmfaulttypename,
        confirmfaulttype,count(*) total,
        (select sum(count(*)) from YWREPAIRJOBINFO where faultdevicetype =t.faultdevicetype group by faultdevicetype )
        grouptotal
        FROM YWREPAIRJOBINFO t where 1=1
        <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
            faultdevicename like '%LIKEfaultdevicename%'
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultdevicetype'>
            faultdevicetype = #faultdevicetype#
        </isNotEmpty>
        <isNotEmpty property='tableparam'>
            $tableparam$
        </isNotEmpty>
        group by faultdevicetype, confirmfaulttype
        order by faultdevicetype, confirmfaulttype
    </select>

    <select id="count_originStatistic" resultClass="java.lang.Integer" parameterClass="java.util.Map">
        SELECT count(count(*))
        FROM YWREPAIRJOBINFO t where 1=1
        <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
            faultdevicename like '%LIKEfaultdevicename%'
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultdevicetype'>
            faultdevicetype = #faultdevicetype#
        </isNotEmpty>
        <isNotEmpty property='tableparam'>
            $tableparam$
        </isNotEmpty>
        group by faultdevicetype, confirmfaulttype
    </select>
    <select id="query_maxDevicetypeorigin" resultClass="java.util.HashMap" parameterClass="java.util.Map">
        SELECT * FROM (SELECT dense_rank() OVER(PARTITION BY faultdevicetype  ORDER BY total DESC) num,
        a.*,(select csmc from Xtcl where csdl='nhywjtsblx' and csdm=faultdevicetype) devicetypename,
        (select csmc from Xtcl where csdl='ywAlarmRuleSource' and csdm=confirmfaulttype)confirmfaulttypename
        FROM (SELECT faultdevicetype, confirmfaulttype,count(*) total
        FROM YWREPAIRJOBINFO t where 1=1 and confirmfaulttype is not null
        <isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
            faultdevicename like '%LIKEfaultdevicename%'
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='faultdevicetype'>
            faultdevicetype = #faultdevicetype#
        </isNotEmpty>
        <isNotEmpty property='tableparam'>
            $tableparam$
        </isNotEmpty>
        group by faultdevicetype ,confirmfaulttype)a )
        WHERE num = 1
    </select>
    <select id="query_YwrepairjobinfoReceiver" resultClass="java.util.HashMap" parameterClass="java.util.Map">
        select concat(concat(concat(concat(object_type,'/'),object_id),'/'),id) foldername,name,id,object_id,object_type  from  its.ksh_picture  where object_id=#jobid#
    </select>
    <delete id="delete_kshPictureByID"  parameterClass="java.util.Map">
       delete  from  its.ksh_picture  where id=#id#
    </delete>
    <select id="listjobprocessstate" resultClass="java.util.HashMap" parameterClass="java.util.Map">
      select alarmcode,alarmname  from  ywalarmeventcode where  alarmcodetype=4 and  fullpath is not null  order by alarmcode
    </select>


</sqlMap>











