| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427 |
- <?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.railway.business.catenary.mapper.BusJcbDmcgyqMapper">
- <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcbDmcgyq">
- <result column="id" property="id"/>
- <result column="zhanqujian" property="zhanqujian"/>
- <result column="fenxiang" property="fenxiang"/>
- <result column="xingbie" property="xingbie"/>
- <result column="zzhfw" property="zzhfw"/>
- <result column="tianqi" property="tianqi"/>
- <result column="wendu" property="wendu"/>
- <result column="jianchariqi" property="jianchariqi"/>
- <result column="dgqwg_azlg" property="dgqwgAzlg"/>
- <result column="dgqwg_wzws" property="dgqwgWzws"/>
- <result column="dgqwg_bmqj" property="dgqwgBmqj"/>
- <result column="dgqwg_azlg_gzms" property="dgqwgAzlgGzms"/>
- <result column="dgqwg_wzws_gzms" property="dgqwgWzwsGzms"/>
- <result column="dgqwg_bmqj_gzms" property="dgqwgBmqjGzms"/>
- <result column="bspwg_bsqx" property="bspwgBsqx"/>
- <result column="bspwg_bsqx_gzms" property="bspwgBsqxGzms"/>
- <result column="bspwg_azlg" property="bspwgAzlg"/>
- <result column="bspwg_azlg_gzms" property="bspwgAzlgGzms"/>
- <result column="dgqcl_g1" property="dgqclG1"/>
- <result column="dgqcl_g2" property="dgqclG2"/>
- <result column="dgqcl_g3" property="dgqclG3"/>
- <result column="dgqcl_g4" property="dgqclG4"/>
- <result column="sbzt" property="sbzt"/>
- <result column="jcr" property="jcr"/>
- <result column="czwt" property="czwt"/>
- <result column="submit_status" property="submitStatus"/>
- <result column="create_by" property="createBy"/>
- <result column="create_time" property="createTime"/>
- <result column="update_by" property="updateBy"/>
- <result column="update_time" property="updateTime"/>
- <result column="user_id" property="userId"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,
- zhanqujian,
- fenxiang,
- xingbie,
- zzhfw,
- tianqi,
- wendu,
- jianchariqi,
- dgqwg_azlg,
- dgqwg_wzws,
- dgqwg_bmqj,
- dgqwg_azlg_gzms,
- dgqwg_wzws_gzms,
- dgqwg_bmqj_gzms,
- bspwg_bsqx,
- bspwg_bsqx_gzms,
- bspwg_azlg,
- bspwg_azlg_gzms,
- dgqcl_g1,
- dgqcl_g2,
- dgqcl_g3,
- dgqcl_g4,
- sbzt,
- jcr,
- czwt,
- submit_status,
- create_by,
- create_time,
- update_by,
- update_time,
- user_id
- </sql>
- <insert id="insert" parameterType="com.railway.business.catenary.domain.BusJcbDmcgyq">
- INSERT INTO bus_jcb_dmcgyq
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test ='null != zhanqujian'>
- zhanqujian,
- </if>
- <if test ='null != fenxiang'>
- fenxiang,
- </if>
- <if test ='null != xingbie'>
- xingbie,
- </if>
- <if test ='null != zzhfw'>
- zzhfw,
- </if>
- <if test ='null != tianqi'>
- tianqi,
- </if>
- <if test ='null != wendu'>
- wendu,
- </if>
- <if test ='null != jianchariqi'>
- jianchariqi,
- </if>
- <if test ='null != dgqwgAzlg'>
- dgqwg_azlg,
- </if>
- <if test ='null != dgqwgWzws'>
- dgqwg_wzws,
- </if>
- <if test ='null != dgqwgBmqj'>
- dgqwg_bmqj,
- </if>
- <if test ='null != dgqwgAzlgGzms'>
- dgqwg_azlg_gzms,
- </if>
- <if test ='null != dgqwgWzwsGzms'>
- dgqwg_wzws_gzms,
- </if>
- <if test ='null != dgqwgBmqjGzms'>
- dgqwg_bmqj_gzms,
- </if>
- <if test ='null != bspwgBsqx'>
- bspwg_bsqx,
- </if>
- <if test ='null != bspwgBsqxGzms'>
- bspwg_bsqx_gzms,
- </if>
- <if test ='null != bspwgAzlg'>
- bspwg_azlg,
- </if>
- <if test ='null != bspwgAzlgGzms'>
- bspwg_azlg_gzms,
- </if>
- <if test ='null != dgqclG1'>
- dgqcl_g1,
- </if>
- <if test ='null != dgqclG2'>
- dgqcl_g2,
- </if>
- <if test ='null != dgqclG3'>
- dgqcl_g3,
- </if>
- <if test ='null != dgqclG4'>
- dgqcl_g4,
- </if>
- <if test ='null != sbzt'>
- sbzt,
- </if>
- <if test ='null != jcr'>
- jcr,
- </if>
- <if test ='null != czwt'>
- czwt,
- </if>
- <if test ='null != submitStatus'>
- submit_status,
- </if>
- <if test ='null != createBy'>
- create_by,
- </if>
- <if test ='null != createTime'>
- create_time,
- </if>
- <if test ='null != updateBy'>
- update_by,
- </if>
- <if test ='null != updateTime'>
- update_time,
- </if>
- <if test ='null != userId'>
- user_id
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test ='null != zhanqujian'>
- #{zhanqujian},
- </if>
- <if test ='null != fenxiang'>
- #{fenxiang},
- </if>
- <if test ='null != xingbie'>
- #{xingbie},
- </if>
- <if test ='null != zzhfw'>
- #{zzhfw},
- </if>
- <if test ='null != tianqi'>
- #{tianqi},
- </if>
- <if test ='null != wendu'>
- #{wendu},
- </if>
- <if test ='null != jianchariqi'>
- #{jianchariqi},
- </if>
- <if test ='null != dgqwgAzlg'>
- #{dgqwgAzlg},
- </if>
- <if test ='null != dgqwgWzws'>
- #{dgqwgWzws},
- </if>
- <if test ='null != dgqwgBmqj'>
- #{dgqwgBmqj},
- </if>
- <if test ='null != dgqwgAzlgGzms'>
- #{dgqwgAzlgGzms},
- </if>
- <if test ='null != dgqwgWzwsGzms'>
- #{dgqwgWzwsGzms},
- </if>
- <if test ='null != dgqwgBmqjGzms'>
- #{dgqwgBmqjGzms},
- </if>
- <if test ='null != bspwgBsqx'>
- #{bspwgBsqx},
- </if>
- <if test ='null != bspwgBsqxGzms'>
- #{bspwgBsqxGzms},
- </if>
- <if test ='null != bspwgAzlg'>
- #{bspwgAzlg},
- </if>
- <if test ='null != bspwgAzlgGzms'>
- #{bspwgAzlgGzms},
- </if>
- <if test ='null != dgqclG1'>
- #{dgqclG1},
- </if>
- <if test ='null != dgqclG2'>
- #{dgqclG2},
- </if>
- <if test ='null != dgqclG3'>
- #{dgqclG3},
- </if>
- <if test ='null != dgqclG4'>
- #{dgqclG4},
- </if>
- <if test ='null != sbzt'>
- #{sbzt},
- </if>
- <if test ='null != jcr'>
- #{jcr},
- </if>
- <if test ='null != czwt'>
- #{czwt},
- </if>
- <if test ='null != submitStatus'>
- #{submitStatus},
- </if>
- <if test ='null != createBy'>
- #{createBy},
- </if>
- <if test ='null != createTime'>
- #{createTime},
- </if>
- <if test ='null != updateBy'>
- #{updateBy},
- </if>
- <if test ='null != updateTime'>
- #{updateTime},
- </if>
- <if test ='null != userId'>
- #{userId}
- </if>
- </trim>
- </insert>
- <delete id="delete">
- UPDATE bus_jcb_dmcgyq
- set del_flag='1'
- WHERE id = #{id}
- </delete>
- <update id="update" parameterType="com.railway.business.catenary.domain.BusJcbDmcgyq">
- UPDATE bus_jcb_dmcgyq
- <set>
- <if test ='null != zhanqujian'>zhanqujian = #{zhanqujian},</if>
- <if test ='null != fenxiang'>fenxiang = #{fenxiang},</if>
- <if test ='null != xingbie'>xingbie = #{xingbie},</if>
- <if test ='null != zzhfw'>zzhfw = #{zzhfw},</if>
- <if test ='null != tianqi'>tianqi = #{tianqi},</if>
- <if test ='null != wendu'>wendu = #{wendu},</if>
- <if test ='null != jianchariqi'>jianchariqi = #{jianchariqi},</if>
- <if test ='null != dgqwgAzlg'>dgqwg_azlg = #{dgqwgAzlg},</if>
- <if test ='null != dgqwgWzws'>dgqwg_wzws = #{dgqwgWzws},</if>
- <if test ='null != dgqwgBmqj'>dgqwg_bmqj = #{dgqwgBmqj},</if>
- <if test ='null != dgqwgAzlgGzms'>dgqwg_azlg_gzms = #{dgqwgAzlgGzms},</if>
- <if test ='null != dgqwgWzwsGzms'>dgqwg_wzws_gzms = #{dgqwgWzwsGzms},</if>
- <if test ='null != dgqwgBmqjGzms'>dgqwg_bmqj_gzms = #{dgqwgBmqjGzms},</if>
- <if test ='null != bspwgBsqx'>bspwg_bsqx = #{bspwgBsqx},</if>
- <if test ='null != bspwgBsqxGzms'>bspwg_bsqx_gzms = #{bspwgBsqxGzms},</if>
- <if test ='null != bspwgAzlg'>bspwg_azlg = #{bspwgAzlg},</if>
- <if test ='null != bspwgAzlgGzms'>bspwg_azlg_gzms = #{bspwgAzlgGzms},</if>
- <if test ='null != dgqclG1'>dgqcl_g1 = #{dgqclG1},</if>
- <if test ='null != dgqclG2'>dgqcl_g2 = #{dgqclG2},</if>
- <if test ='null != dgqclG3'>dgqcl_g3 = #{dgqclG3},</if>
- <if test ='null != dgqclG4'>dgqcl_g4 = #{dgqclG4},</if>
- <if test ='null != sbzt'>sbzt = #{sbzt},</if>
- <if test ='null != jcr'>jcr = #{jcr},</if>
- <if test ='null != czwt'>czwt = #{czwt},</if>
- <if test ='null != submitStatus'>submit_status = #{submitStatus},</if>
- <if test ='null != createBy'>create_by = #{createBy},</if>
- <if test ='null != createTime'>create_time = #{createTime},</if>
- <if test ='null != updateBy'>update_by = #{updateBy},</if>
- <if test ='null != updateTime'>update_time = #{updateTime},</if>
- <if test ='null != userId'>user_id = #{userId}</if>
- </set>
- WHERE id = #{id}
- </update>
- <select id="getInfo" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM bus_jcb_dmcgyq
- WHERE id = #{id} and del_flag='0'
- </select>
- <select id="getLastRecord" resultMap="BaseResultMap">
- SELECT
- a.DGQCL_G1, a.DGQCL_G2, a.DGQCL_G3, a.DGQCL_G4
- FROM bus_jcb_dmcgyq a,
- (
- select max(update_time) as lastTime
- from bus_jcb_dmcgyq
- WHERE user_id = #{user_id}
- and submit_status != '0'
- ) b
- WHERE a.update_time = b.lastTime
- </select>
- <select id="getList" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM bus_jcb_dmcgyq
- <where>
- del_flag='0'
- <if test="zhanqujian!=null and zhanqujian!=''">
- and zhanqujian=#{zhanqujian}
- </if>
- <if test="fenxiang!=null and fenxiang!=''">
- and fenxiang=#{fenxiang}
- </if>
- <if test="xingbie!=null and xingbie!=''">
- and xingbie=#{xingbie}
- </if>
- <if test="zzhfw!=null and zzhfw!=''">
- and zzhfw=#{zzhfw}
- </if>
- <if test="tianqi!=null and tianqi!=''">
- and tianqi=#{tianqi}
- </if>
- <if test="wendu!=null and wendu!=''">
- and wendu=#{wendu}
- </if>
- <if test="jianchariqi!=null and jianchariqi!=''">
- and jianchariqi=#{jianchariqi}
- </if>
- <if test="dgqwgAzlg!=null and dgqwgAzlg!=''">
- and dgqwg_azlg=#{dgqwgAzlg}
- </if>
- <if test="dgqwgWzws!=null and dgqwgWzws!=''">
- and dgqwg_wzws=#{dgqwgWzws}
- </if>
- <if test="dgqwgBmqj!=null and dgqwgBmqj!=''">
- and dgqwg_bmqj=#{dgqwgBmqj}
- </if>
- <if test="dgqwgAzlgGzms!=null and dgqwgAzlgGzms!=''">
- and dgqwg_azlg_gzms=#{dgqwgAzlgGzms}
- </if>
- <if test="dgqwgWzwsGzms!=null and dgqwgWzwsGzms!=''">
- and dgqwg_wzws_gzms=#{dgqwgWzwsGzms}
- </if>
- <if test="dgqwgBmqjGzms!=null and dgqwgBmqjGzms!=''">
- and dgqwg_bmqj_gzms=#{dgqwgBmqjGzms}
- </if>
- <if test="bspwgBsqx!=null and bspwgBsqx!=''">
- and bspwg_bsqx=#{bspwgBsqx}
- </if>
- <if test="bspwgBsqxGzms!=null and bspwgBsqxGzms!=''">
- and bspwg_bsqx_gzms=#{bspwgBsqxGzms}
- </if>
- <if test="bspwgAzlg!=null and bspwgAzlg!=''">
- and bspwg_azlg=#{bspwgAzlg}
- </if>
- <if test="bspwgAzlgGzms!=null and bspwgAzlgGzms!=''">
- and bspwg_azlg_gzms=#{bspwgAzlgGzms}
- </if>
- <if test="dgqclG1!=null and dgqclG1!=''">
- and dgqcl_g1=#{dgqclG1}
- </if>
- <if test="dgqclG2!=null and dgqclG2!=''">
- and dgqcl_g2=#{dgqclG2}
- </if>
- <if test="dgqclG3!=null and dgqclG3!=''">
- and dgqcl_g3=#{dgqclG3}
- </if>
- <if test="dgqclG4!=null and dgqclG4!=''">
- and dgqcl_g4=#{dgqclG4}
- </if>
- <if test="sbzt!=null and sbzt!=''">
- and sbzt=#{sbzt}
- </if>
- <if test="jcr!=null and jcr!=''">
- and jcr=#{jcr}
- </if>
- <if test="czwt!=null and czwt!=''">
- and czwt=#{czwt}
- </if>
- <if test="submitStatus!=null and submitStatus!=''">
- and submit_status=#{submitStatus}
- </if>
- <if test="createBy!=null and createBy!=''">
- and create_by=#{createBy}
- </if>
- <if test="createTime!=null and createTime!=''">
- and create_time=#{createTime}
- </if>
- <if test="updateBy!=null and updateBy!=''">
- and update_by=#{updateBy}
- </if>
- <if test="updateTime!=null and updateTime!=''">
- and update_time=#{updateTime}
- </if>
- <if test="userId!=null and userId!=''">
- and user_id=#{userId}
- </if>
- </where>
- </select>
- </mapper>
|