| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062 |
- <?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.ydtech.modules.ins.dao.InsCmainMapper">
- <resultMap id="BaseResultMap" type="com.ydtech.modules.ins.model.InsCmain">
- <id column="policyno" jdbcType="VARCHAR" property="policyno"/>
- <result column="riskcode" jdbcType="VARCHAR" property="riskcode"/>
- <result column="riskname" jdbcType="VARCHAR" property="riskcode"/>
- <result column="startdate" jdbcType="TIMESTAMP" property="startdate"/>
- <result column="enddate" jdbcType="TIMESTAMP" property="enddate"/>
- <result column="inscompany" jdbcType="VARCHAR" property="inscompany"/>
- <result column="validstatus" jdbcType="VARCHAR" property="validstatus"/>
- <result column="insureragentcode" jdbcType="VARCHAR" property="insureragentcode"/>
- <result column="insureragentname" jdbcType="VARCHAR" property="insureragentname"/>
- <result column="insureragreementno" jdbcType="VARCHAR" property="insureragreementno"/>
- <result column="salesagreementno" jdbcType="VARCHAR" property="salesagreementno"/>
- <result column="commissionrate" jdbcType="DOUBLE" property="commissionrate"/>
- <result column="operatedate" jdbcType="TIMESTAMP" property="operatedate"/>
- <result column="insurercomcode" jdbcType="VARCHAR" property="insurercomcode"/>
- <result column="insurercomname" jdbcType="VARCHAR" property="insurercomname"/>
- <result column="comcode" jdbcType="VARCHAR" property="comcode"/>
- <result column="businessnature" jdbcType="VARCHAR" property="businessnature"/>
- <result column="handlercode" jdbcType="VARCHAR" property="handlercode"/>
- <result column="applicode" jdbcType="VARCHAR" property="applicode"/>
- <result column="appliname" jdbcType="VARCHAR" property="appliname"/>
- <result column="insuredcode" jdbcType="VARCHAR" property="insuredcode"/>
- <result column="insuredname" jdbcType="VARCHAR" property="insuredname"/>
- <result column="sumamount" jdbcType="DOUBLE" property="sumamount"/>
- <result column="sumpremium" jdbcType="DOUBLE" property="sumpremium"/>
- <result column="netpointcode" jdbcType="VARCHAR" property="netpointcode"/>
- <result column="netpointname" jdbcType="VARCHAR" property="netpointname"/>
- <result column="updatedate" jdbcType="TIMESTAMP" property="updatedate"/>
- <result column="carflag" jdbcType="VARCHAR" property="carflag"/>
- <result column="channel" jdbcType="VARCHAR" property="channel"/>
- <result column="isself" jdbcType="VARCHAR" property="isself"/>
- <result column="notaxpremium" jdbcType="DOUBLE" property="notaxpremium"/>
- <result column="jffs" jdbcType="VARCHAR" property="jffs"/>
- <result column="sfds" jdbcType="VARCHAR" property="sfds"/>
- <result column="license_no" jdbcType="VARCHAR" property="licenseNo"/>
- <result column="frame_no" jdbcType="VARCHAR" property="frameNo"/>
- <result column="engine_no" jdbcType="VARCHAR" property="engineNo"/>
- <result column="car_type_no" jdbcType="VARCHAR" property="carTypeNo"/>
- <result column="zkxs" jdbcType="VARCHAR" property="zkxs"/>
- <result column="applicertno" jdbcType="VARCHAR" property="applicertno"/>
- <result column="applimobile" jdbcType="VARCHAR" property="applimobile"/>
- <result column="appliaddress" jdbcType="VARCHAR" property="appliaddress"/>
- <result column="insuredcertno" jdbcType="VARCHAR" property="insuredcertno"/>
- <result column="insuredmobile" jdbcType="VARCHAR" property="insuredmobile"/>
- <result column="insuredaddress" jdbcType="VARCHAR" property="insuredaddress"/>
- <result column="paydate" jdbcType="TIMESTAMP" property="paydate"/>
- </resultMap>
- <sql id="Base_Column_List">
- policyno, riskcode, riskname, startdate, enddate, inscompany, validstatus, insureragentcode,
- insureragentname, insureragreementno, salesagreementno, commissionrate, operatedate,
- insurercomcode, insurercomname, comcode, businessnature, handlercode, applicode,
- appliname, insuredcode, insuredname, sumamount, sumpremium, netpointcode, netpointname,
- updatedate, carflag, channel, isself, notaxpremium, jffs, sfds,
- license_no, frame_no, engine_no, car_type_no, zkxs, applicertno, applimobile,
- appliaddress, insuredcertno, insuredmobile, insuredaddress, paydate
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from ins_cmain
- where policyno = #{policyno,jdbcType=VARCHAR}
- </select>
- <select id="selectInsCmain" resultType="com.ydtech.modules.ins.model.vo.res.InsCmainResVo">
- select
- <include refid="Base_Column_List"/>,
- (select a.name from esm_ins_company a where a.id=inscompany) inscompanyname,
- (select a.name from sys_dept a where a.id=comcode) comname,
- (select a.name from sys_user a where a.id=handlercode) handlername,
- substr(riskcode,1,2) classcode,
- (select a.name from esm_product a where a.id=substr(riskcode,1,2)) classname,
- '0' hlwbs,
- '0' snbs,
- (select a.commission from ins_income a where a.policyno=b.policyno) commission
- from ins_cmain b
- where 1=1
- <if test="policyno != null and policyno!=''">
- AND policyno=#{policyno,jdbcType=VARCHAR}
- </if>
- <if test="riskcode != null and riskcode!=''">
- AND riskcode=#{riskcode,jdbcType=VARCHAR}
- </if>
- <if test="riskname != null and riskname!=''">
- AND riskname=#{riskname,jdbcType=VARCHAR}
- </if>
- <if test="startdate != null and enddate != null">
- AND DATE_FORMAT(startdate, '%Y-%m-%d') between DATE_FORMAT(#{startdate,jdbcType=TIMESTAMP}, '%Y-%m-%d') and
- DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- </if>
- <!-- <if test="enddate != null">-->
- <!-- AND DATE_FORMAT(enddate, '%Y-%m-%d') = DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP}, '%Y-%m-%d')-->
- <!-- </if>-->
- <if test="inscompany != null and inscompany!=''">
- AND inscompany=#{inscompany,jdbcType=VARCHAR}
- </if>
- <if test="validstatus != null and validstatus!=''">
- AND validstatus=#{validstatus,jdbcType=VARCHAR}
- </if>
- <if test="insureragentcode != null and insureragentcode!=''">
- AND insureragentcode=#{insureragentcode,jdbcType=VARCHAR}
- </if>
- <if test="insureragentname != null and insureragentname!=''">
- AND insureragentname like concat('%', #{insureragentname,jdbcType=VARCHAR},'%')
- </if>
- <if test="insureragreementno != null and insureragreementno!=''">
- AND insureragreementno=#{insureragreementno,jdbcType=VARCHAR}
- </if>
- <if test="salesagreementno != null and salesagreementno!=''">
- AND salesagreementno=#{salesagreementno,jdbcType=VARCHAR}
- </if>
- <!-- <if test="operatedate != null">-->
- <!-- AND DATE_FORMAT(operatedate, '%Y-%m-%d') = DATE_FORMAT(#{operatedate,jdbcType=TIMESTAMP}, '%Y-%m-%d')-->
- <!-- </if>-->
- <if test="insurercomcode != null and insurercomcode!=''">
- AND insurercomcode=#{insurercomcode,jdbcType=VARCHAR}
- </if>
- <if test="insurercomname != null and insurercomname!=''">
- AND insurercomname like concat('%', #{insurercomname,jdbcType=VARCHAR},'%')
- </if>
- <if test="comcode != null and comcode!=''">
- AND comcode like concat(#{comcode,jdbcType=VARCHAR},'%')
- </if>
- <if test="businessnature != null and businessnature!=''">
- AND businessnature=#{businessnature,jdbcType=VARCHAR}
- </if>
- <if test="handlercode != null and handlercode!=''">
- <choose>
- <when test="handlercodeFlag == true">
- AND handlercode in (${handlercode})
- </when>
- <otherwise>
- AND handlercode = #{handlercode,jdbcType=VARCHAR}
- </otherwise>
- </choose>
- </if>
- <if test="applicode != null and applicode!=''">
- AND applicode=#{applicode,jdbcType=VARCHAR}
- </if>
- <if test="appliname != null and appliname!=''">
- AND appliname like concat('%', #{appliname,jdbcType=VARCHAR},'%')
- </if>
- <if test="insuredcode != null and insuredcode!=''">
- AND insuredcode=#{insuredcode,jdbcType=VARCHAR}
- </if>
- <if test="insuredname != null and insuredname!=''">
- AND insuredname like concat('%', #{insuredname,jdbcType=VARCHAR},'%')
- </if>
- <if test="netpointcode != null and netpointcode!=''">
- AND netpointcode=#{netpointcode,jdbcType=VARCHAR}
- </if>
- <if test="netpointname != null and netpointname!=''">
- AND netpointnam like concat('%', #{netpointnam,jdbcType=VARCHAR},'%')
- </if>
- <if test="updatedate != null">
- AND DATE_FORMAT(updatedate, '%Y-%m-%d') = DATE_FORMAT(#{updatedate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- </if>
- <if test="carflag != null and carflag!=''">
- AND carflag=#{carflag,jdbcType=VARCHAR}
- </if>
- <if test="channel != null and channel!=''">
- AND channel=#{channel,jdbcType=VARCHAR}
- </if>
- <if test="isself != null and isself!=''">
- AND isself=#{isself,jdbcType=VARCHAR}
- </if>
- order by policyno
- </select>
- <select id="selectInsCmainDetail" resultType="com.ydtech.modules.ins.model.vo.res.InsCmainDetailResVo">
- SELECT
- SUBSTR(a.comcode, 1,5) com2code,
- (SELECT z.name from sys_dept z where z.id=SUBSTR(a.comcode, 1,5)) com2name,
- SUBSTR(a.comcode, 1,9) com3code,
- (SELECT z.name from sys_dept z where z.id=SUBSTR(a.comcode, 1,9)) com3name,
- c.dept_id handlercomcode ,
- h.name handlercomname,
- a.comcode comcode,
- (SELECT z.name from sys_dept z where z.id=a.comcode) comname,
- a.handlercode handlercode,
- c.name handlername,
- a.inscompany inscompany,
- d.name inscompanyname,
- a.policyno policyno,
- '' endorseno,
- a.applicode applicode,
- a.appliname appliname,
- a.insuredcode insuredcode,
- a.insuredname insuredname,
- i.parent_id classcode,
- (select name from esm_product t where t.id=i.parent_id) classname,
- a.riskcode riskcode,
- a.riskname riskname,
- DATE_FORMAT(a.startdate,'%Y-%m-%d') startdate,
- DATE_FORMAT(a.enddate,'%Y-%m-%d') enddate,
- null updatedate,
- null pmOperatedate,
- '' tbxg,
- '' xzzh,
- '' xbzh,
- '' cldl,
- '' clyt,
- '' clxl,
- CASE a.businessnature WHEN '1' THEN '直属业务' WHEN '2' THEN '代理业务' ELSE '' END businessnature,
- '' ywqd,
- a.sumpremium sumpremium,
- a.notaxpremium notaxpremium,
- a.commissionrate commissionrate,
- e.commission commission,
- a.jffs jffs,
- CASE a.sfds WHEN '1' THEN '是' WHEN '0' THEN '否' ELSE '' END sfds,
- a.sumamount sumamount,
- CASE a.channel WHEN '1' THEN '核心' WHEN '2' THEN '二维码' WHEN '3' THEN '车加意' ELSE '' END channel,
- a.license_no licenseNo,
- a.frame_no frameNo,
- a.engine_no engineNo,
- a.car_type_no carTypeNo,
- a.zkxs zkxs,
- a.applicertno applicertno,
- a.applimobile applimobile,
- a.appliaddress appliaddress,
- a.insuredcertno insuredcertno,
- a.insuredmobile insuredmobile,
- a.insuredaddress insuredaddress,
- a.paydate paydate
- FROM
- ins_cmain a
- left JOIN ins_pmain b ON a.policyno = b.policyno
- LEFT JOIN sys_user c ON a.handlercode=c.id
- LEFT JOIN sys_dept h ON h.id=c.dept_id
- LEFT JOIN esm_ins_company d ON a.inscompany=d.id
- LEFT JOIN ins_income e ON e.policyno=a.policyno
- /*LEFT JOIN ods_riskinfo f ON a.policyno=f.policy_no
- LEFT join ods_carinfo g ON g.order_no=f.order_no*/
- LEFT JOIN esm_product i ON i.id=a.riskcode
- where 1=1
- <if test="carflag != null and carflag!=''">
- AND a.carflag=#{carflag,jdbcType=VARCHAR}
- </if>
- <if test="operatedate != null">
- AND DATE_FORMAT(a.operatedate,'%Y-%m-%d') between DATE_FORMAT(#{operatedate,jdbcType=TIMESTAMP},'%Y-%m-%d')
- and DATE_FORMAT(#{operatedate,jdbcType=TIMESTAMP} ,'%Y-%m-%d')
- </if>
- <if test="startdate != null and enddate!=null">
- AND DATE_FORMAT(a.startdate,'%Y-%m-%d') between DATE_FORMAT(#{startdate,jdbcType=TIMESTAMP},'%Y-%m-%d') and
- DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP},'%Y-%m-%d')
- </if>
- <if test="inscompany != null and inscompany!=''">
- AND a.inscompany like concat(#{inscompany,jdbcType=VARCHAR},'%')
- </if>
- <if test="policyno != null and policyno!=''">
- AND a.policyno=#{policyno,jdbcType=VARCHAR}
- </if>
- <if test="comcode != null and comcode!=''">
- AND a.comcode like concat(#{comcode,jdbcType=VARCHAR},'%')
- </if>
- <if test="handlercode != null and handlercode!=''">
- AND a.handlercode=#{handlercode,jdbcType=VARCHAR}
- </if>
- UNION
- SELECT
- SUBSTR(a.comcode, 1,5) com2code,
- (SELECT z.name from sys_dept z where z.id=SUBSTR(a.comcode, 1,5)) com2name,
- SUBSTR(a.comcode, 1,9) com3code,
- (SELECT z.name from sys_dept z where z.id=SUBSTR(a.comcode, 1,9)) com3name,
- c.dept_id handlercomcode ,
- h.name handlercomname,
- a.comcode comcode,
- (SELECT z.name from sys_dept z where z.id=a.comcode) comname,
- a.handlercode handlercode,
- c.name handlername,
- a.inscompany inscompany,
- d.name inscompanyname,
- a.policyno policyno,
- b.endorseno endorseno,
- a.applicode applicode,
- a.appliname appliname,
- a.insuredcode insuredcode,
- a.insuredname insuredname,
- i.parent_id classcode,
- (select name from esm_product t where t.id=i.parent_id) classname,
- a.riskcode riskcode,
- a.riskname riskname,
- DATE_FORMAT(b.startdate,'%Y-%m-%d') startdate,
- DATE_FORMAT(b.enddate,'%Y-%m-%d') enddate,
- DATE_FORMAT(b.updatedate,'%Y-%m-%d') updatedate,
- DATE_FORMAT(b.operatedate,'%Y-%m-%d') pmOperatedate,
- '' tbxg,
- '' xzzh,
- '' xbzh,
- '' cldl,
- '' clyt,
- '' clxl,
- CASE a.businessnature WHEN '1' THEN '直属业务' WHEN '2' THEN '代理业务' ELSE '' END businessnature,
- '' ywqd,
- a.sumpremium sumpremium,
- a.notaxpremium notaxpremium,
- a.commissionrate commissionrate,
- e.commission commission,
- a.jffs jffs,
- CASE a.sfds WHEN '1' THEN '是' WHEN '0' THEN '否' ELSE '' END sfds,
- a.sumamount sumamount,
- CASE a.channel WHEN '1' THEN '核心' WHEN '2' THEN '二维码' WHEN '3' THEN '车加意' ELSE '' END channel,
- a.license_no licenseNo,
- a.frame_no frameNo,
- a.engine_no engineNo,
- a.car_type_no carTypeNo,
- a.zkxs zkxs,
- a.applicertno applicertno,
- a.applimobile applimobile,
- a.appliaddress appliaddress,
- a.insuredcertno insuredcertno,
- a.insuredmobile insuredmobile,
- a.insuredaddress insuredaddress,
- b.paydate paydate
- FROM
- ins_pmain b
- LEFT JOIN ins_cmain a ON a.policyno = b.policyno
- LEFT JOIN sys_user c ON a.handlercode=c.id
- LEFT JOIN sys_dept h ON h.id=c.dept_id
- LEFT JOIN esm_ins_company d ON a.inscompany=d.id
- LEFT JOIN ins_income e ON e.policyno=a.policyno
- LEFT JOIN esm_product i ON i.id=a.riskcode
- where 1=1
- <if test="carflag != null and carflag!=''">
- AND a.carflag=#{carflag,jdbcType=VARCHAR}
- </if>
- <if test="operatedate != null">
- AND DATE_FORMAT(a.operatedate,'%Y-%m-%d') between DATE_FORMAT(#{operatedate,jdbcType=TIMESTAMP},'%Y-%m-%d')
- and DATE_FORMAT(#{operatedate,jdbcType=TIMESTAMP} ,'%Y-%m-%d')
- </if>
- <if test="startdate != null and enddate!=null">
- AND DATE_FORMAT(b.startdate,'%Y-%m-%d') between DATE_FORMAT(#{startdate,jdbcType=TIMESTAMP},'%Y-%m-%d') and
- DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP},'%Y-%m-%d')
- </if>
- <if test="inscompany != null and inscompany!=''">
- AND a.inscompany like concat(#{inscompany,jdbcType=VARCHAR},'%')
- </if>
- <if test="policyno != null and policyno!=''">
- AND b.policyno=#{policyno,jdbcType=VARCHAR}
- </if>
- <if test="comcode != null and comcode!=''">
- AND a.comcode like concat(#{comcode,jdbcType=VARCHAR},'%')
- </if>
- <if test="handlercode != null and handlercode!=''">
- AND a.handlercode=#{handlercode,jdbcType=VARCHAR}
- </if>
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete
- from ins_cmain
- where policyno = #{policyno,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteInsCmain">
- DELETE FROM ins_cmain
- WHERE
- DATE_FORMAT(operatedate, '%Y-%m-%d') = DATE_FORMAT(#{operatedate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- AND channel=#{channel,jdbcType=VARCHAR}
- <choose>
- <when test="handlercodeFlag == true">
- AND handlercode in (${handlercode})
- </when>
- <otherwise>
- AND handlercode = #{handlercode,jdbcType=VARCHAR}
- </otherwise>
- </choose>
- </delete>
- <delete id="deleteBatch">
- DELETE FROM ins_cmain
- WHERE (policyno, updatedate) in
- <foreach collection="clist" item="item" index="index" separator="," open="(" close=")">
- (#{item.policyno, jdbcType=VARCHAR}, DATE_FORMAT(#{item.updatedate, jdbcType=TIMESTAMP}, '%Y-%m-%d'))
- </foreach>
- </delete>
- <insert id="insert" parameterType="com.ydtech.modules.ins.model.InsCmain">
- insert into ins_cmain (policyno, riskcode, riskname, startdate,
- enddate, inscompany, validstatus,
- insureragentcode, insureragentname, insureragreementno,
- salesagreementno, commissionrate, operatedate,
- insurercomcode, insurercomname, comcode,
- businessnature, handlercode, applicode,
- appliname, insuredcode, insuredname,
- sumamount, sumpremium, netpointcode,
- netpointname, updatedate, carflag,
- channel, isself, notaxpremium,
- jffs, sfds,
- license_no, frame_no, engine_no, car_type_no, zkxs,
- applicertno, applimobile, appliaddress, insuredcertno, insuredmobile,
- insuredaddress, paydate)
- values (#{policyno,jdbcType=VARCHAR}, #{riskcode,jdbcType=VARCHAR}, #{riskname,jdbcType=VARCHAR},
- #{startdate,jdbcType=TIMESTAMP},
- #{enddate,jdbcType=TIMESTAMP}, #{inscompany,jdbcType=VARCHAR}, #{validstatus,jdbcType=VARCHAR},
- #{insureragentcode,jdbcType=VARCHAR}, #{insureragentname,jdbcType=VARCHAR},
- #{insureragreementno,jdbcType=VARCHAR},
- #{salesagreementno,jdbcType=VARCHAR}, #{commissionrate,jdbcType=DOUBLE},
- #{operatedate,jdbcType=TIMESTAMP},
- #{insurercomcode,jdbcType=VARCHAR}, #{insurercomname,jdbcType=VARCHAR}, #{comcode,jdbcType=VARCHAR},
- #{businessnature,jdbcType=VARCHAR}, #{handlercode,jdbcType=VARCHAR}, #{applicode,jdbcType=VARCHAR},
- #{appliname,jdbcType=VARCHAR}, #{insuredcode,jdbcType=VARCHAR}, #{insuredname,jdbcType=VARCHAR},
- #{sumamount,jdbcType=DOUBLE}, #{sumpremium,jdbcType=DOUBLE}, #{netpointcode,jdbcType=VARCHAR},
- #{netpointname,jdbcType=VARCHAR}, #{updatedate,jdbcType=TIMESTAMP}, #{carflag,jdbcType=VARCHAR},
- #{channel,jdbcType=VARCHAR}, #{isself,jdbcType=VARCHAR}, #{notaxpremium,jdbcType=DOUBLE},
- #{jffs,jdbcType=VARCHAR}, #{sfds,jdbcType=VARCHAR},
- #{licenseNo,jdbcType=VARCHAR}, #{frameNo,jdbcType=VARCHAR}, #{engineNo,jdbcType=VARCHAR},
- #{carTypeNo,jdbcType=VARCHAR}, #{zkxs,jdbcType=VARCHAR}, #{applicertno,jdbcType=DOUBLE},
- #{applimobile,jdbcType=VARCHAR}, #{appliaddress,jdbcType=VARCHAR}, #{insuredcertno,jdbcType=DOUBLE},
- #{insuredmobile,jdbcType=VARCHAR}, #{insuredaddress,jdbcType=VARCHAR}, #{paydate,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.ydtech.modules.ins.model.InsCmain">
- insert into ins_cmain
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="policyno != null">
- policyno,
- </if>
- <if test="riskcode != null">
- riskcode,
- </if>
- <if test="riskname != null">
- riskname,
- </if>
- <if test="startdate != null">
- startdate,
- </if>
- <if test="enddate != null">
- enddate,
- </if>
- <if test="inscompany != null">
- inscompany,
- </if>
- <if test="validstatus != null">
- validstatus,
- </if>
- <if test="insureragentcode != null">
- insureragentcode,
- </if>
- <if test="insureragentname != null">
- insureragentname,
- </if>
- <if test="insureragreementno != null">
- insureragreementno,
- </if>
- <if test="salesagreementno != null">
- salesagreementno,
- </if>
- <if test="commissionrate != null">
- commissionrate,
- </if>
- <if test="operatedate != null">
- operatedate,
- </if>
- <if test="insurercomcode != null">
- insurercomcode,
- </if>
- <if test="insurercomname != null">
- insurercomname,
- </if>
- <if test="comcode != null">
- comcode,
- </if>
- <if test="businessnature != null">
- businessnature,
- </if>
- <if test="handlercode != null">
- handlercode,
- </if>
- <if test="applicode != null">
- applicode,
- </if>
- <if test="appliname != null">
- appliname,
- </if>
- <if test="insuredcode != null">
- insuredcode,
- </if>
- <if test="insuredname != null">
- insuredname,
- </if>
- <if test="sumamount != null">
- sumamount,
- </if>
- <if test="sumpremium != null">
- sumpremium,
- </if>
- <if test="netpointcode != null">
- netpointcode,
- </if>
- <if test="netpointname != null">
- netpointname,
- </if>
- <if test="updatedate != null">
- updatedate,
- </if>
- <if test="carflag != null">
- carflag,
- </if>
- <if test="channel != null">
- channel,
- </if>
- <if test="isself != null">
- isself,
- </if>
- <if test="notaxpremium != null">
- notaxpremium,
- </if>
- <if test="jffs != null">
- jffs,
- </if>
- <if test="sfds != null">
- sfds,
- </if>
- <if test="licenseNo != null">
- license_no,
- </if>
- <if test="frameNo != null">
- frame_no,
- </if>
- <if test="engineNo != null">
- engine_no,
- </if>
- <if test="carTypeNo != null">
- car_type_no,
- </if>
- <if test="zkxs != null">
- zkxs,
- </if>
- <if test="applicertno != null">
- applicertno,
- </if>
- <if test="applimobile != null">
- applimobile,
- </if>
- <if test="appliaddress != null">
- appliaddress,
- </if>
- <if test="insuredcertno != null">
- insuredcertno,
- </if>
- <if test="insuredmobile != null">
- insuredmobile,
- </if>
- <if test="insuredaddress != null">
- insuredaddress,
- </if>
- <if test="paydate != null">
- paydate,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="policyno != null">
- #{policyno,jdbcType=VARCHAR},
- </if>
- <if test="riskcode != null">
- #{riskcode,jdbcType=VARCHAR},
- </if>
- <if test="riskname != null">
- #{riskname,jdbcType=VARCHAR},
- </if>
- <if test="startdate != null">
- #{startdate,jdbcType=TIMESTAMP},
- </if>
- <if test="enddate != null">
- #{enddate,jdbcType=TIMESTAMP},
- </if>
- <if test="inscompany != null">
- #{inscompany,jdbcType=VARCHAR},
- </if>
- <if test="validstatus != null">
- #{validstatus,jdbcType=VARCHAR},
- </if>
- <if test="insureragentcode != null">
- #{insureragentcode,jdbcType=VARCHAR},
- </if>
- <if test="insureragentname != null">
- #{insureragentname,jdbcType=VARCHAR},
- </if>
- <if test="insureragreementno != null">
- #{insureragreementno,jdbcType=VARCHAR},
- </if>
- <if test="salesagreementno != null">
- #{salesagreementno,jdbcType=VARCHAR},
- </if>
- <if test="commissionrate != null">
- #{commissionrate,jdbcType=DOUBLE},
- </if>
- <if test="operatedate != null">
- #{operatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="insurercomcode != null">
- #{insurercomcode,jdbcType=VARCHAR},
- </if>
- <if test="insurercomname != null">
- #{insurercomname,jdbcType=VARCHAR},
- </if>
- <if test="comcode != null">
- #{comcode,jdbcType=VARCHAR},
- </if>
- <if test="businessnature != null">
- #{businessnature,jdbcType=VARCHAR},
- </if>
- <if test="handlercode != null">
- #{handlercode,jdbcType=VARCHAR},
- </if>
- <if test="applicode != null">
- #{applicode,jdbcType=VARCHAR},
- </if>
- <if test="appliname != null">
- #{appliname,jdbcType=VARCHAR},
- </if>
- <if test="insuredcode != null">
- #{insuredcode,jdbcType=VARCHAR},
- </if>
- <if test="insuredname != null">
- #{insuredname,jdbcType=VARCHAR},
- </if>
- <if test="sumamount != null">
- #{sumamount,jdbcType=DOUBLE},
- </if>
- <if test="sumpremium != null">
- #{sumpremium,jdbcType=DOUBLE},
- </if>
- <if test="netpointcode != null">
- #{netpointcode,jdbcType=VARCHAR},
- </if>
- <if test="netpointname != null">
- #{netpointname,jdbcType=VARCHAR},
- </if>
- <if test="updatedate != null">
- #{updatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="carflag != null">
- #{carflag,jdbcType=VARCHAR},
- </if>
- <if test="channel != null">
- #{channel,jdbcType=VARCHAR},
- </if>
- <if test="isself != null">
- #{isself,jdbcType=VARCHAR},
- </if>
- <if test="notaxpremium != null">
- #{notaxpremium,jdbcType=DOUBLE},
- </if>
- <if test="jffs != null">
- #{jffs,jdbcType=VARCHAR},
- </if>
- <if test="sfds != null">
- #{sfds,jdbcType=VARCHAR},
- </if>
- <if test="licenseNo != null">
- #{licenseNo,jdbcType=VARCHAR},
- </if>
- <if test="frameNo != null">
- #{frameNo,jdbcType=VARCHAR},
- </if>
- <if test="engineNo != null">
- #{engineNo,jdbcType=VARCHAR},
- </if>
- <if test="carTypeNo != null">
- #{carTypeNo,jdbcType=VARCHAR},
- </if>
- <if test="zkxs != null">
- #{zkxs,jdbcType=VARCHAR},
- </if>
- <if test="applicertno != null">
- #{applicertno,jdbcType=VARCHAR},
- </if>
- <if test="applimobile != null">
- #{applimobile,jdbcType=VARCHAR},
- </if>
- <if test="appliaddress != null">
- #{appliaddress,jdbcType=VARCHAR},
- </if>
- <if test="insuredcertno != null">
- #{insuredcertno,jdbcType=VARCHAR},
- </if>
- <if test="insuredmobile != null">
- #{insuredmobile,jdbcType=VARCHAR},
- </if>
- <if test="insuredaddress != null">
- #{insuredaddress,jdbcType=VARCHAR},
- </if>
- <if test="paydate != null">
- #{paydate,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <insert id="insertBatch" parameterType="list">
- insert into ins_cmain (
- <include refid="Base_Column_List"/>
- )
- values
- <foreach collection="qtList" item="item" separator=",">
- (#{item.policyno}, #{item.riskcode}, #{item.riskname}, #{item.startdate}, #{item.enddate},
- #{item.inscompany}, '1',
- #{item.insureragentcode}, #{item.insureragentname}, #{item.insureragreementno}, #{item.salesagreementno},
- #{item.commissionrate}, #{item.operatedate},
- #{item.insurercomcode}, #{item.insurercomname}, #{item.comcode}, #{item.businessnature},
- #{item.handlercode}, #{item.applicode},
- #{item.appliname}, #{item.insuredcode}, #{item.insuredname}, #{item.sumamount}, #{item.sumpremium},
- #{item.netpointcode},
- #{item.netpointname}, #{item.updatedate}, #{item.carflag}, #{item.channel}, #{item.isself},
- #{item.notaxpremium},
- #{item.jffs}, #{item.sfds}, #{item.licenseNo}, #{item.frameNo}, #{item.engineNo}, #{item.carTypeNo},
- #{item.zkxs},
- #{item.applicertno}, #{item.applimobile}, #{item.appliaddress}, #{item.insuredcertno},
- #{item.insuredmobile}, #{item.insuredaddress},
- #{item.paydate}
- )
- </foreach>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.ydtech.modules.ins.model.InsCmain">
- update ins_cmain
- <set>
- <if test="riskcode != null">
- riskcode = #{riskcode,jdbcType=VARCHAR},
- </if>
- <if test="riskname != null">
- riskname = #{riskname,jdbcType=VARCHAR},
- </if>
- <if test="startdate != null">
- startdate = #{startdate,jdbcType=TIMESTAMP},
- </if>
- <if test="enddate != null">
- enddate = #{enddate,jdbcType=TIMESTAMP},
- </if>
- <if test="inscompany != null">
- inscompany = #{inscompany,jdbcType=VARCHAR},
- </if>
- <if test="validstatus != null">
- validstatus = #{validstatus,jdbcType=VARCHAR},
- </if>
- <if test="insureragentcode != null">
- insureragentcode = #{insureragentcode,jdbcType=VARCHAR},
- </if>
- <if test="insureragentname != null">
- insureragentname = #{insureragentname,jdbcType=VARCHAR},
- </if>
- <if test="insureragreementno != null">
- insureragreementno = #{insureragreementno,jdbcType=VARCHAR},
- </if>
- <if test="salesagreementno != null">
- salesagreementno = #{salesagreementno,jdbcType=VARCHAR},
- </if>
- <if test="commissionrate != null">
- commissionrate = #{commissionrate,jdbcType=DOUBLE},
- </if>
- <if test="operatedate != null">
- operatedate = #{operatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="insurercomcode != null">
- insurercomcode = #{insurercomcode,jdbcType=VARCHAR},
- </if>
- <if test="insurercomname != null">
- insurercomname = #{insurercomname,jdbcType=VARCHAR},
- </if>
- <if test="comcode != null">
- comcode = #{comcode,jdbcType=VARCHAR},
- </if>
- <if test="businessnature != null">
- businessnature = #{businessnature,jdbcType=VARCHAR},
- </if>
- <if test="handlercode != null">
- handlercode = #{handlercode,jdbcType=VARCHAR},
- </if>
- <if test="applicode != null">
- applicode = #{applicode,jdbcType=VARCHAR},
- </if>
- <if test="appliname != null">
- appliname = #{appliname,jdbcType=VARCHAR},
- </if>
- <if test="insuredcode != null">
- insuredcode = #{insuredcode,jdbcType=VARCHAR},
- </if>
- <if test="insuredname != null">
- insuredname = #{insuredname,jdbcType=VARCHAR},
- </if>
- <if test="sumamount != null">
- sumamount = #{sumamount,jdbcType=DOUBLE},
- </if>
- <if test="sumpremium != null">
- sumpremium = #{sumpremium,jdbcType=DOUBLE},
- </if>
- <if test="netpointcode != null">
- netpointcode = #{netpointcode,jdbcType=VARCHAR},
- </if>
- <if test="netpointname != null">
- netpointname = #{netpointname,jdbcType=VARCHAR},
- </if>
- <if test="updatedate != null">
- updatedate = #{updatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="carflag != null">
- carflag = #{carflag,jdbcType=VARCHAR},
- </if>
- <if test="channel != null">
- channel = #{channel,jdbcType=VARCHAR},
- </if>
- <if test="isself != null">
- isself = #{isself,jdbcType=VARCHAR},
- </if>
- <if test="notaxpremium != null">
- notaxpremium = #{notaxpremium,jdbcType=DOUBLE},
- </if>
- <if test="jffs != null">
- jffs = #{jffs,jdbcType=VARCHAR},
- </if>
- <if test="sfds != null">
- sfds = #{sfds,jdbcType=VARCHAR},
- </if>
- <if test="licenseNo != null">
- license_no = #{licenseNo,jdbcType=VARCHAR},
- </if>
- <if test="frameNo != null">
- frame_no = #{frameNo,jdbcType=VARCHAR},
- </if>
- <if test="engineNo != null">
- engine_no = #{engineNo,jdbcType=VARCHAR},
- </if>
- <if test="carTypeNo != null">
- car_type_no = #{carTypeNo,jdbcType=VARCHAR},
- </if>
- <if test="zkxs != null">
- zkxs = #{zkxs,jdbcType=VARCHAR},
- </if>
- <if test="applicertno != null">
- applicertno = #{applicertno,jdbcType=VARCHAR},
- </if>
- <if test="applimobile != null">
- applimobile = #{applimobile,jdbcType=VARCHAR},
- </if>
- <if test="appliaddress != null">
- appliaddress = #{appliaddress,jdbcType=VARCHAR},
- </if>
- <if test="insuredcertno != null">
- insuredcertno = #{insuredcertno,jdbcType=VARCHAR},
- </if>
- <if test="insuredmobile != null">
- insuredmobile = #{insuredmobile,jdbcType=VARCHAR},
- </if>
- <if test="insuredaddress != null">
- insuredaddress = #{insuredaddress,jdbcType=VARCHAR},
- </if>
- <if test="paydate != null">
- paydate = #{paydate,jdbcType=TIMESTAMP},
- </if>
- </set>
- where policyno = #{policyno,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.ydtech.modules.ins.model.InsCmain">
- update ins_cmain
- set riskcode = #{riskcode,jdbcType=VARCHAR},
- riskname = #{riskname,jdbcType=VARCHAR},
- startdate = #{startdate,jdbcType=TIMESTAMP},
- enddate = #{enddate,jdbcType=TIMESTAMP},
- inscompany = #{inscompany,jdbcType=VARCHAR},
- validstatus = #{validstatus,jdbcType=VARCHAR},
- insureragentcode = #{insureragentcode,jdbcType=VARCHAR},
- insureragentname = #{insureragentname,jdbcType=VARCHAR},
- insureragreementno = #{insureragreementno,jdbcType=VARCHAR},
- salesagreementno = #{salesagreementno,jdbcType=VARCHAR},
- commissionrate = #{commissionrate,jdbcType=DOUBLE},
- operatedate = #{operatedate,jdbcType=TIMESTAMP},
- insurercomcode = #{insurercomcode,jdbcType=VARCHAR},
- insurercomname = #{insurercomname,jdbcType=VARCHAR},
- comcode = #{comcode,jdbcType=VARCHAR},
- businessnature = #{businessnature,jdbcType=VARCHAR},
- handlercode = #{handlercode,jdbcType=VARCHAR},
- applicode = #{applicode,jdbcType=VARCHAR},
- appliname = #{appliname,jdbcType=VARCHAR},
- insuredcode = #{insuredcode,jdbcType=VARCHAR},
- insuredname = #{insuredname,jdbcType=VARCHAR},
- sumamount = #{sumamount,jdbcType=DOUBLE},
- sumpremium = #{sumpremium,jdbcType=DOUBLE},
- netpointcode = #{netpointcode,jdbcType=VARCHAR},
- netpointname = #{netpointname,jdbcType=VARCHAR},
- updatedate = #{updatedate,jdbcType=TIMESTAMP},
- carflag = #{carflag,jdbcType=VARCHAR},
- channel = #{channel,jdbcType=VARCHAR},
- isself = #{isself,jdbcType=VARCHAR},
- notaxpremium = #{notaxpremium,jdbcType=DOUBLE},
- jffs = #{jffs,jdbcType=VARCHAR},
- sfds = #{sfds,jdbcType=VARCHAR},
- license_no = #{licenseNo,jdbcType=VARCHAR},
- frame_no = #{frameNo,jdbcType=VARCHAR},
- engine_no = #{engineNo,jdbcType=VARCHAR},
- car_type_no = #{carTypeNo,jdbcType=VARCHAR},
- zkxs = #{zkxs,jdbcType=VARCHAR},
- applicertno = #{applicertno,jdbcType=VARCHAR},
- applimobile = #{applimobile,jdbcType=VARCHAR},
- appliaddress = #{appliaddress,jdbcType=VARCHAR},
- insuredcertno = #{insuredcertno,jdbcType=VARCHAR},
- insuredmobile = #{insuredmobile,jdbcType=VARCHAR},
- insuredaddress = #{insuredaddress,jdbcType=VARCHAR},
- paydate = #{paydate,jdbcType=TIMESTAMP}
- where policyno = #{policyno,jdbcType=VARCHAR}
- </update>
- <select id="selectBFJELJ" resultType="Double">
- select coalesce(sum(t.notaxpremium),0.00) from
- (SELECT coalesce(sum(notaxpremium),0.00) as notaxpremium from ins_cmain a
- where 1=1
- <if test="inscompany != null and inscompany !=''">
- and inscompany = #{inscompany,jdbcType=VARCHAR}
- </if>
- <if test="sign == 2">
- and inscompany like "100001%"
- </if>
- <if test="sign == 3">
- and inscompany not like "100001%"
- </if>
- <if test="riskcode != null and riskcode != ''">
- and riskcode like #{riskcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="comcode != null and comcode != ''">
- and comcode like #{comcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="startdate != null and enddate != null">
- AND DATE_FORMAT(IF ( a.operatedate <![CDATA[<]]> a.paydate, a.paydate, a.operatedate ), '%Y-%m-%d') between
- DATE_FORMAT(#{startdate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- and DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- </if>
- union
- SELECT coalesce(sum(p.notaxpremium),0.00) as notaxpremium from ins_pmain p
- left join ins_cmain a on p.policyno=a.policyno
- where 1=1
- <if test="inscompany != null and inscompany !=''">
- and a.inscompany = #{inscompany,jdbcType=VARCHAR}
- </if>
- <if test="sign == 2">
- and a.inscompany like "100001%"
- </if>
- <if test="sign == 3">
- and a.inscompany not like "100001%"
- </if>
- <if test="riskcode != null and riskcode != ''">
- and a.riskcode like #{riskcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="comcode != null and comcode != ''">
- and a.comcode like #{comcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="startdate != null and enddate != null">
- AND DATE_FORMAT(IF ( p.operatedate <![CDATA[<]]> p.paydate, p.paydate, p.operatedate ), '%Y-%m-%d') between
- DATE_FORMAT(#{startdate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- and DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- </if>
- ) t
- </select>
- <select id="selectDLYJLJ" resultType="Double">
- select coalesce(sum(t.notaxpremium),0.00) from
- (SELECT coalesce(sum(notaxpremium*commissionrate),0.00) as notaxpremium from ins_cmain a
- where 1=1
- <if test="inscompany != null and inscompany !=''">
- and inscompany = #{inscompany,jdbcType=VARCHAR}
- </if>
- <if test="sign == 2">
- and inscompany like "100001%"
- </if>
- <if test="sign == 3">
- and inscompany not like "100001%"
- </if>
- <if test="riskcode != null and riskcode != ''">
- and riskcode like #{riskcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="comcode != null and comcode != ''">
- and comcode like #{comcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="startdate != null and enddate != null">
- AND DATE_FORMAT(IF ( a.operatedate <![CDATA[<]]> a.paydate, a.paydate, a.operatedate ), '%Y-%m-%d') between
- DATE_FORMAT(#{startdate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- and DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- </if>
- union
- SELECT coalesce(sum(p.notaxpremium*a.commissionrate),0.00) as notaxpremium from ins_pmain p
- left join ins_cmain a on p.policyno=a.policyno
- where 1=1
- <if test="inscompany != null and inscompany !=''">
- and a.inscompany = #{inscompany,jdbcType=VARCHAR}
- </if>
- <if test="sign == 2">
- and a.inscompany like "100001%"
- </if>
- <if test="sign == 3">
- and a.inscompany not like "100001%"
- </if>
- <if test="riskcode != null and riskcode != ''">
- and a.riskcode like #{riskcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="comcode != null and comcode != ''">
- and a.comcode like #{comcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="startdate != null and enddate != null">
- AND DATE_FORMAT(IF ( p.operatedate <![CDATA[<]]> p.paydate, p.paydate, p.operatedate ), '%Y-%m-%d') between
- DATE_FORMAT(#{startdate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- and DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- </if>
- ) t
- </select>
- <select id="selectBFJELJ2" resultType="Double">
- SELECT
- coalesce(sum(b.notaxpremium),0.00)
- FROM
- ins_settle a,
- ins_settle_detail b
- WHERE a.settleno = b.settleno
- <if test="inscompany != null and inscompany !=''">
- and a.insurercode = #{inscompany,jdbcType=VARCHAR}
- </if>
- <if test="sign == 2">
- and a.insurercode like "100001%"
- </if>
- <if test="sign == 3">
- and a.insurercode not like "100001%"
- </if>
- <if test="riskcode != null and riskcode != ''">
- and b.riskcode like #{riskcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="comcode != null and comcode != ''">
- and a.comcode like #{comcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="startdate != null and enddate != null">
- AND DATE_FORMAT(a.updatedate, '%Y-%m-%d') between DATE_FORMAT(#{startdate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- and DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- </if>
- </select>
- <select id="selectDLYJLJ2" resultType="Double">
- SELECT
- coalesce(sum(b.commission),0.00)
- FROM
- ins_settle a,
- ins_settle_detail b
- WHERE a.settleno = b.settleno
- <if test="inscompany != null and inscompany !=''">
- and a.insurercode = #{inscompany,jdbcType=VARCHAR}
- </if>
- <if test="sign == 2">
- and a.insurercode like "100001%"
- </if>
- <if test="sign == 3">
- and a.insurercode not like "100001%"
- </if>
- <if test="riskcode != null and riskcode != ''">
- and b.riskcode like #{riskcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="comcode != null and comcode != ''">
- and a.comcode like #{comcode,jdbcType=VARCHAR}"%"
- </if>
- <if test="startdate != null and enddate != null">
- AND DATE_FORMAT(a.updatedate, '%Y-%m-%d') between DATE_FORMAT(#{startdate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- and DATE_FORMAT(#{enddate,jdbcType=TIMESTAMP}, '%Y-%m-%d')
- </if>
- </select>
- </mapper>
|