(五)Paged.xml

   < select id ="paged.selectPagedInfo" parameterClass ="PageInfo"
     resultClass ="java.util.HashMap" remapResults ="true" >
    select d.*
    from (select a.*,
    rownum rn
    from
    (
     < isEqual property ="selectSql" compareValue ="dissent.queryPagedList" >
       < include refid ="dissent.queryPagedList" />
     isEqual >  
    ) a
        where rownum     < = #endIndex# ) d where rn > #startIndex#
    ]]>
     select >

(六)BLDissent.xml

< sqlMap namespace ="dissent" >
  
   < typeAlias alias ="BLDissent"
     type ="com.sinosig.atip.dissent.model.BLDissentModel" />

  
   < sql id ="dissent.queryOrgNameByCode" >
    (select o.comcname from
    t_atip_organization o where
    o.comcode=d.COMPLAINTEDORGANIZATION) as
    COMPLAINTEDORGANIZATIONNAME
   sql >

  
   < sql id ="dissent.queryPaged.where" >
     < isNotEmpty prepend ="and" property ="complaintNo" >
      d.complaintno like
      '%$complaintNo$%'
     isNotEmpty >
     < isNotEmpty prepend ="and" property ="complaintDateStart" >
      =
      date'$complaintDateStart$']]>
     isNotEmpty >
     < isNotEmpty prepend ="and" property ="complaintDateEnd" >
      <
=
      date'$complaintDateEnd$']] >
     isNotEmpty >
     < isNotEmpty prepend ="and" property ="complaintedOrganization" >
      d.complaintedorganization =#complaintedOrganization#
     isNotEmpty >
     < isNotEmpty prepend ="and" property ="complaintedPerson" >
      d.complaintedperson
      like
      '%$complaintedPerson$%'
     isNotEmpty >
     < isNotEmpty prepend ="and" property ="complaintInsuType" >
      d.complaintinsutype
      like
      '%$complaintInsuType$%'
     isNotEmpty >
     < isNotEmpty prepend ="and" property ="complaintContent" >
      d.complaintcontent like
      '%$complaintContent$%'
     isNotEmpty >
   sql >

  
  
   < sql id ="dissent.queryPagedList" >
    select d.seqno,d.complaintno,
    d.complaintdate,
    d.complaintedorganization,
    d.complaintedperson,
    d.complaintinsutype,
    d.complaintcontent,
     < include refid ="dissent.queryOrgNameByCode" />
    from
    t_atip_dissent d
    where 1=1
     < include refid ="dissent.queryPaged.where" />
    order by d.complaintdate
   sql >

  
   < select id ="dissent.queryPagedCount" parameterClass ="BLDissent"
     resultClass ="java.lang.Integer" >
    select count(0)
    from t_atip_dissent d where 1=1
     < include refid ="dissent.queryPaged.where" />
   select >

  
   < select id ="dissent.querySingleDissentBySeqno" parameterClass ="BLDissent"
     resultClass ="BLDissent" >
    select d.SEQNO,
    d.COMPLAINTNO,
    d.COMPLAINTDATE,
    d.CLIENTAREA,
    d.COMPLAINTORNAME,
    d.CLIENTSEX,
    d.TELEPHONE,
    d.CLIENTTYPE,
    d.INSUREDNAME,
    d.COMPLAINTEDORGANIZATION,
     < include refid ="dissent.queryOrgNameByCode" />
    ,
    d.COMPLAINTEDPERSON,
    d.COMPLAINTINSUTYPE,
    d.COMPLAINTTYPE,
    d.CARLICENCENO,
    d.POLICYNO,
    d.ACCIDENTNO,
    d.COMPLAINTCONTENT,
    d.DEALRESULT,
    d.ISSECONDTIME,
    d.DEALRESULTHISTORY,
    d.CREATER,
    d.UPDATER
    from t_atip_dissent d
    where d.seqno
    =#seqNo#
   select >

  
   < insert id ="dissent.addSingleDissent" parameterClass ="BLDissent" >
     < selectKey keyProperty ="seqNo" resultClass ="java.lang.Integer" >
      SELECT
      t_atip_dissent_SEQ.NEXTVAL AS seqNo FROM DUAL
     selectKey >
    insert into t_atip_dissent(
    SEQNO,
    COMPLAINTNO,
    COMPLAINTDATE,
    CLIENTAREA,
    COMPLAINTORNAME,
    CLIENTSEX,
    TELEPHONE,
    CLIENTTYPE,
    INSUREDNAME,
    COMPLAINTEDORGANIZATION,
    COMPLAINTEDPERSON,
    COMPLAINTINSUTYPE,
    COMPLAINTTYPE,
    CARLICENCENO,
    POLICYNO,
    ACCIDENTNO,
    COMPLAINTCONTENT,
    DEALRESULT,
    ISSECONDTIME,
    DEALRESULTHISTORY,
    CREATEDATE,
    CREATER) values(#seqNo#,
    #complaintNo#,
    #complaintDate#,
    #clientArea#,
    #complaintorName#,
    #clientSex#,
    #telephone#,
    #clientType#,
    #insuredName#,
    #complaintedOrganization#,
    #complaintedPerson#,
    #complaintInsuType#,
    #complaintType#,
    #carLicenceNo#,
    #policyNo#,
    #accidentNo#,
    #complaintContent#,
    #dealResult#,
    #isSecondTime#,
    #dealResultHistory#,
    sysdate,
    #creater#)
   insert >

  
   < update id ="dissent.updateSingleDissentBySeqno" parameterClass ="BLDissent" >
    update
    t_atip_dissent set COMPLAINTNO=#complaintNo#,
    COMPLAINTDATE=
    #complaintDate#,
    CLIENTAREA= #clientArea#,
    COMPLAINTORNAME=
    #complaintorName#,
    CLIENTSEX= #clientSex#,
    TELEPHONE= #telephone#,
    CLIENTTYPE= #clientType#,
    INSUREDNAME= #insuredName#,
    COMPLAINTEDORGANIZATION= #complaintedOrganization#,
    COMPLAINTEDPERSON=
    #complaintedPerson#,
    COMPLAINTINSUTYPE= #complaintInsuType#,
    COMPLAINTTYPE= #complaintType#,
    CARLICENCENO= #carLicenceNo#,
    POLICYNO=
    #policyNo#,
    ACCIDENTNO= #accidentNo#,
    COMPLAINTCONTENT=
    #complaintContent#,
    DEALRESULT= #dealResult#,
    ISSECONDTIME=
    #isSecondTime#,
    DEALRESULTHISTORY= #dealResultHistory#,
    UPDATEDATE=sysdate,
    UPDATER= #updater#
    where
    SEQNO=#seqNo#
   update >

  
   < delete id ="dissent.deleteSingleDissentBySeqno" parameterClass ="BLDissent" >
    delete t_atip_dissent d where d.seqno =#seqNo#
   delete >
   sqlMap >