123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493 |
- <?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.ruoyi.shipping.mapper.TCntrnoMapper">
- <resultMap type="TCntrno" id="TCntrnoResult">
- <result property="fId" column="f_id"/>
- <result property="fNo" column="f_no"/>
- <result property="fTypeid" column="f_typeid"/>
- <result property="fOwner" column="f_owner"/>
- <result property="fSource" column="f_source"/>
- <result property="fRent" column="f_rent"/>
- <result property="fUpdatetime" column="f_updatetime"/>
- <result property="fUpdateaddress" column="f_updateaddress"/>
- <result property="fUpdateef" column="f_updateEF"/>
- <result property="fCntrstatus" column="f_cntrstatus"/>
- <result property="fStatus" column="f_status"/>
- <result property="createBy" column="create_by"/>
- <result property="createTime" column="create_time"/>
- <result property="updateBy" column="update_by"/>
- <result property="updateTime" column="update_time"/>
- <result property="remark" column="remark"/>
- <result property="fOpctnstatus" column="f_opctnstatus"/>
- <result property="fSealno" column="f_sealno"/>
- <result property="fBuildBoxTime" column="f_build_box_time" />
- <result property="fBoxTurtleYear" column="f_box_turtle_year" />
- <result property="fBoxTurtleMonth" column="f_box_turtle_month" />
- <result property="fBoxLord" column="f_box_lord" />
- <result property="fPactDealHorn" column="f_pact_deal_horn" />
- </resultMap>
- <sql id="selectTCntrnoVo">
- select f_id, f_no, f_typeid, f_owner, f_source, f_rent, f_updatetime, f_updateaddress, f_updateEF, f_cntrstatus, case when f_status = 'T' then '正常' else '停用' end as f_status,f_opctnstatus,f_sealno,create_by, create_time, update_by, update_time, remark,
- f_build_box_time,f_box_turtle_year,f_box_turtle_month,f_box_lord,f_pact_deal_horn from t_cntrno
- </sql>
- <select id="selectTCntrnoList" parameterType="TCntrno" resultMap="TCntrnoResult">
- <include refid="selectTCntrnoVo"/>
- <where>
- <if test="fNo != null and fNo != ''">and f_no = #{fNo}</if>
- <if test="fTypeid != null ">and f_typeid = #{fTypeid}</if>
- <if test="fOwner != null and fOwner != ''">and f_owner = #{fOwner}</if>
- <if test="fSource != null and fSource != ''">and f_source = #{fSource}</if>
- <if test="fRent != null and fRent != ''">and f_rent = #{fRent}</if>
- <if test="fUpdatetime != null ">and f_updatetime = #{fUpdatetime}</if>
- <if test="fUpdateaddress != null and fUpdateaddress != ''">and f_updateaddress = #{fUpdateaddress}</if>
- <if test="fUpdateef != null and fUpdateef != ''">and f_updateEF = #{fUpdateef}</if>
- <if test="fCntrstatus != null and fCntrstatus != ''">and f_cntrstatus = #{fCntrstatus}</if>
- <if test="fStatus != null and fStatus != ''">and f_status = #{fStatus}</if>
- <if test="fOpctnstatus != null and fOpctnstatus != ''">and f_opctnstatus = #{fOpctnstatus}</if>
- <if test="fSealno != null and fSealno != ''">and f_sealno = #{fSealno}</if>
- <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
- and create_time >= #{cLoadDate[0]}
- </if>
- <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
- and create_time <= #{cLoadDate[1]}
- </if>
- <if test="fBuildBoxTime != null "> and f_build_box_time = #{fBuildBoxTime}</if>
- <if test="fBoxTurtleYear != null and fBoxTurtleYear != ''"> and f_box_turtle_year = #{fBoxTurtleYear}</if>
- <if test="fBoxTurtleMonth != null and fBoxTurtleMonth != ''"> and f_box_turtle_month = #{fBoxTurtleMonth}</if>
- <if test="fBoxLord != null and fBoxLord != ''"> and f_box_lord = #{fBoxLord}</if>
- <if test="fPactDealHorn != null and fPactDealHorn != ''"> and f_pact_deal_horn = #{fPactDealHorn}</if>
- </where>
- </select>
- <select id="selectTcntrnoMessage" parameterType="TCntrno" resultMap="TCntrnoResult">
- SELECT
- tc.f_id,
- tc.f_no,
- tc.f_typeid,
- t.f_no typeidName,
- t.f_cntrsize cntrsize,
- prs.dict_label cntrsizeName,
- tc.f_owner,
- pro.dict_label ownerName,
- tc.f_source,
- sd.dict_label sourceName,
- tc.f_rent,
- sdd.dict_label rentName,
- tc.f_updatetime,
- tc.f_updateaddress,
- address.f_name addressName,
- tc.f_updateEF,
- sdda.dict_label updateEFName,
- tc.f_cntrstatus,
- pr.dict_label cntrstatusName,
- case when tc.f_status = 'T' then '正常' else '停用' end as f_status,
- prd.dict_label opctnstatusName,
- tc.create_by,
- tc.create_time,
- tc.update_by,
- tc.update_time,
- tc.remark,
- tc.f_build_box_time,
- tc.f_box_turtle_year,
- tc.f_box_turtle_month,
- tc.f_box_lord,
- tc.f_pact_deal_horn
- FROM
- t_cntrno tc
- LEFT JOIN sys_dict_data pro ON pro.dict_value = tc.f_owner
- AND pro.dict_type = 'f_owner'
- LEFT JOIN sys_dict_data sd ON sd.dict_value = tc.f_source
- AND sd.dict_type = 'f_source'
- LEFT JOIN sys_dict_data sdd ON sdd.dict_value = tc.f_rent
- AND sdd.dict_type = 'f_rent'
- LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_updateEF
- AND sdda.dict_type = 'f_updateEF'
- LEFT JOIN sys_dict_data pr ON pr.dict_value = tc.f_cntrstatus
- AND pr.dict_type = 'f_cntrstatus'
- LEFT JOIN t_cntr t ON tc.f_typeid = t.f_id
- LEFT JOIN sys_dict_data prs ON prs.dict_value = t.f_cntrsize
- AND prs.dict_type = 'f_cntrsize'
- LEFT JOIN sys_dict_data prd ON prd.dict_value = tc.f_opctnstatus
- AND prd.dict_type = 'f_opctnstatus'
- LEFT JOIN t_address address ON address.f_id = tc.f_updateaddress
- <where>
- tc.f_status = 'T'
- <if test="tc.fNo != null and tc.fNo != ''">and tc.f_no like concat('%', #{tc.fNo}, '%') </if>
- <if test="tc.fTypeid != null ">and tc.f_typeid = #{tc.fTypeid}</if>
- <if test="tc.fOwner != null and tc.fOwner != ''">and tc.f_owner = #{tc.fOwner}</if>
- <if test="tc.fSource != null and tc.fSource != ''">and tc.f_source = #{tc.fSource}</if>
- <if test="tc.fRent != null and tc.fRent != ''">and tc.f_rent = #{tc.fRent}</if>
- <if test="tc.fUpdatetime != null ">and tc.f_updatetime = #{tc.fUpdatetime}</if>
- <if test="tc.fUpdateaddress != null and tc.fUpdateaddress != ''">and tc.f_updateaddress = #{tc.fUpdateaddress}</if>
- <if test="tc.fUpdateef != null and tc.fUpdateef != ''">and tc.f_updateEF = #{tc.fUpdateef}</if>
- <if test="tc.fCntrstatus != null and tc.fCntrstatus != ''">and tc.f_cntrstatus = #{tc.fCntrstatus}</if>
- <if test="tc.fStatus != null and tc.fStatus != ''">and tc.f_status = #{tc.fStatus}</if>
- <if test="tc.fOpctnstatus != null and tc.fOpctnstatus != ''">and tc.f_opctnstatus = #{tc.fOpctnstatus}</if>
- <if test="tc.fSealno != null and tc.fSealno != ''">and tc.f_sealno = #{tc.fSealno}</if>
- <if test='tc.cLoadDate != null and tc.cLoadDate[0] != null and tc.cLoadDate[0]!= ""'>
- and tc.create_time >= #{tc.cLoadDate[0]}
- </if>
- <if test='tc.cLoadDate != null and tc.cLoadDate[1] != null and tc.cLoadDate[1]!= ""'>
- and tc.create_time <= #{tc.cLoadDate[1]}
- </if>
- <if test="address != null and address != ''">and address.f_name = #{address}</if>
- <if test="typeidName != null and typeidName != ''">and t.f_no = #{typeidName}</if>
- <if test="cntrstatusName != null and cntrstatusName != ''">and pr.dict_label = #{cntrstatusName}</if>
- <if test="updateEFName != null and updateEFName != ''">and sdda.dict_label = #{updateEFName}</if>
- <if test="cntrsize != null ">and t.f_cntrsize = #{cntrsize}</if>
- <if test="tc.fBuildBoxTime != null "> and tc.f_build_box_time = #{fBuildBoxTime}</if>
- <if test="tc.fBoxTurtleYear != null and tc.fBoxTurtleYear != ''"> and tc.f_box_turtle_year = #{fBoxTurtleYear}</if>
- <if test="tc.fBoxTurtleMonth != null and tc.fBoxTurtleMonth != ''"> and tc.f_box_turtle_month = #{fBoxTurtleMonth}</if>
- <if test="tc.fBoxLord != null and tc.fBoxLord != ''"> and tc.f_box_lord = #{tc.fBoxLord}</if>
- <if test="tc.fPactDealHorn != null and tc.fPactDealHorn != ''"> and tc.f_pact_deal_horn = #{tc.fPactDealHorn}</if>
- </where>
- ORDER BY tc.f_no,CONVERT(tc.f_updateaddress USING gbk),CONVERT(t.f_no USING gbk),
- tc.f_updateEF,tc.f_cntrstatus,tc.f_owner
- </select>
- <select id="selectTCntrnoById" parameterType="Long" resultMap="TCntrnoResult">
- SELECT
- tc.f_id,
- tc.f_no,
- tc.f_typeid,
- tc.f_sealno,
- t.f_name typeidName,
- t.f_cntrsize cntrsize,
- prs.dict_label cntrsizeName,
- tc.f_owner,
- pro.dict_label ownerName,
- tc.f_source,
- sd.dict_label sourceName,
- tc.f_rent,
- sdd.dict_label rentName,
- tc.f_updatetime,
- tc.f_updateaddress,
- address.f_name addressName,
- tc.f_updateEF,
- sdda.dict_label updateEFName,
- tc.f_cntrstatus,
- pr.dict_label cntrstatusName,
- case when tc.f_status = 'T' then '正常' else '停用' end as f_status,
- tc.f_opctnstatus,
- tc.create_by,
- tc.create_time,
- tc.update_by,
- tc.update_time,
- tc.remark,
- tc.f_build_box_time,
- tc.f_box_turtle_year,
- tc.f_box_turtle_month,
- tc.f_box_lord,
- tc.f_pact_deal_horn
- FROM
- t_cntrno tc
- LEFT JOIN sys_dict_data pro ON pro.dict_value = tc.f_owner
- AND pro.dict_type = 'f_owner'
- LEFT JOIN sys_dict_data sd ON sd.dict_value = tc.f_source
- AND sd.dict_type = 'f_source'
- LEFT JOIN sys_dict_data sdd ON sdd.dict_value = tc.f_rent
- AND sdd.dict_type = 'f_rent'
- LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_updateEF
- AND sdda.dict_type = 'f_updateEF'
- LEFT JOIN sys_dict_data pr ON pr.dict_value = tc.f_cntrstatus
- AND pr.dict_type = 'f_cntrstatus'
- LEFT JOIN t_cntr t ON tc.f_typeid = t.f_id
- LEFT JOIN sys_dict_data prs ON prs.dict_value = t.f_cntrsize
- AND prs.dict_type = 'f_cntrsize'
- LEFT JOIN t_address address ON address.f_id = tc.f_updateaddress
- where tc.f_id = #{fId}
- </select>
- <insert id="insertTCntrno" parameterType="TCntrno">
- insert into t_cntrno
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="fId != null">f_id,</if>
- <if test="fNo != null and fNo != ''">f_no,</if>
- <if test="fTypeid != null">f_typeid,</if>
- <if test="fOwner != null and fOwner != ''">f_owner,</if>
- <if test="fSource != null">f_source,</if>
- <if test="fRent != null">f_rent,</if>
- <if test="fUpdatetime != null">f_updatetime,</if>
- <if test="fUpdateaddress != null and fUpdateaddress != ''">f_updateaddress,</if>
- <if test="fUpdateef != null and fUpdateef != ''">f_updateEF,</if>
- <if test="fCntrstatus != null and fCntrstatus != ''">f_cntrstatus,</if>
- <if test="fStatus != null">f_status,</if>
- <if test="fOpctnstatus != null and fOpctnstatus != ''">f_opctnstatus,</if>
- <if test="fSealno != null and fSealno != ''">f_sealno,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- <if test="fBuildBoxTime != null">f_build_box_time,</if>
- <if test="fBoxTurtleYear != null">f_box_turtle_year,</if>
- <if test="fBoxTurtleMonth != null">f_box_turtle_month,</if>
- <if test="fBoxLord != null">f_box_lord,</if>
- <if test="fPactDealHorn != null">f_pact_deal_horn,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="fId != null">#{fId},</if>
- <if test="fNo != null and fNo != ''">#{fNo},</if>
- <if test="fTypeid != null">#{fTypeid},</if>
- <if test="fOwner != null and fOwner != ''">#{fOwner},</if>
- <if test="fSource != null">#{fSource},</if>
- <if test="fRent != null">#{fRent},</if>
- <if test="fUpdatetime != null">#{fUpdatetime},</if>
- <if test="fUpdateaddress != null and fUpdateaddress != ''">#{fUpdateaddress},</if>
- <if test="fUpdateef != null and fUpdateef != ''">#{fUpdateef},</if>
- <if test="fCntrstatus != null and fCntrstatus != ''">#{fCntrstatus},</if>
- <if test="fStatus != null">#{fStatus},</if>
- <if test="fOpctnstatus != null and fOpctnstatus != ''">#{fOpctnstatus},</if>
- <if test="fSealno != null and fSealno != ''">#{fSealno},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- <if test="fBuildBoxTime != null">#{fBuildBoxTime},</if>
- <if test="fBoxTurtleYear != null">#{fBoxTurtleYear},</if>
- <if test="fBoxTurtleMonth != null">#{fBoxTurtleMonth},</if>
- <if test="fBoxLord != null">#{fBoxLord},</if>
- <if test="fPactDealHorn != null">#{fPactDealHorn},</if>
- </trim>
- </insert>
- <update id="updateTCntrno" parameterType="TCntrno">
- update t_cntrno
- <trim prefix="SET" suffixOverrides=",">
- <if test="fNo != null and fNo != ''">f_no = #{fNo},</if>
- <if test="fTypeid != null">f_typeid = #{fTypeid},</if>
- <if test="fOwner != null and fOwner != ''">f_owner = #{fOwner},</if>
- <if test="fSource != null">f_source = #{fSource},</if>
- <if test="fRent != null">f_rent = #{fRent},</if>
- <if test="fUpdatetime != null">f_updatetime = #{fUpdatetime},</if>
- <if test="fUpdateaddress != null and fUpdateaddress != ''">f_updateaddress = #{fUpdateaddress},</if>
- <if test="fUpdateef != null and fUpdateef != ''">f_updateEF = #{fUpdateef},</if>
- <if test="fCntrstatus != null and fCntrstatus != ''">f_cntrstatus = #{fCntrstatus},</if>
- <if test="fStatus != null">f_status = #{fStatus},</if>
- <if test="fOpctnstatus != null and fOpctnstatus != ''">f_opctnstatus = #{fOpctnstatus},</if>
- <if test="fSealno != null and fSealno != ''">f_sealno = #{fSealno},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="fBuildBoxTime != null">f_build_box_time = #{fBuildBoxTime},</if>
- <if test="fBoxTurtleYear != null">f_box_turtle_year = #{fBoxTurtleYear},</if>
- <if test="fBoxTurtleMonth != null">f_box_turtle_month = #{fBoxTurtleMonth},</if>
- <if test="fBoxLord != null">f_box_lord = #{fBoxLord},</if>
- <if test="fPactDealHorn != null">f_pact_deal_horn = #{fPactDealHorn},</if>
- </trim>
- where f_id = #{fId}
- </update>
- <delete id="deleteTCntrnoById" parameterType="Long">
- delete from t_cntrno where f_id = #{fId}
- </delete>
- <delete id="deleteTCntrnoByIds" parameterType="String">
- delete from t_cntrno where f_id in
- <foreach item="fId" collection="array" open="(" separator="," close=")">
- #{fId}
- </foreach>
- </delete>
- <!--批量更新数据状态-->
- <update id="updateTcntrnoStatus" parameterType="string">
- update t_cntrno
- set f_status = 'F'
- where f_id in
- <foreach item="fId" collection="array" open="(" separator="," close=")">
- #{fId}
- </foreach>
- </update>
- <!--获取集装动态分布信息 -->
- <select id="getTCntrnoMessage" parameterType="string" resultType="map">
- SELECT
- container.*,
- box.`空`,
- box.`重`,
- car.`好`,
- car.`坏`
- FROM
- (
- SELECT
- tt.f_updateaddress AS 地点
- <if test=" sql != null and sql != ''">
- ,${sql}
- </if>
- FROM
- (
- SELECT
- tc.f_updateaddress f_updateaddress,
- tc.typeidCount typeidCount,
- t.f_no f_no
- FROM
- (
- SELECT
- ta.f_name f_updateaddress,
- tcn.f_typeid,
- COUNT( tcn.f_updateaddress ) typeidCount
- FROM
- t_cntrno tcn
- LEFT JOIN t_address ta ON tcn.f_updateaddress = ta.f_id
- WHERE
- tcn.f_status = 'T'
- GROUP BY
- tcn.f_updateaddress,
- tcn.f_typeid
- ) tc
- LEFT JOIN t_cntr t ON tc.f_typeid = t.f_id
- ) tt
- GROUP BY
- tt.f_updateaddress
- ) container
- LEFT JOIN (
- SELECT
- a.f_updateaddress,
- MAX( CASE WHEN a.dict_label = '空' THEN a.efCount ELSE 0 END ) AS 空,
- MAX( CASE WHEN a.dict_label = '重' THEN a.efCount ELSE 0 END ) AS 重
- FROM
- (
- SELECT
- tc.f_updateaddress f_updateaddress,
- tc.f_updateEF f_updateEF,
- tc.efCount efCount,
- sdda.dict_label dict_label
- FROM
- (
- SELECT
- ta.f_name f_updateaddress,
- tct.f_updateEF,
- COUNT( tct.f_updateaddress ) efCount
- FROM
- t_cntrno tct
- LEFT JOIN t_address ta ON tct.f_updateaddress = ta.f_id
- WHERE
- tct.f_status = 'T'
- GROUP BY
- tct.f_updateaddress,
- tct.f_updateEF
- ) tc
- LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_updateEF
- AND sdda.dict_type = 'f_updateEF'
- ) a
- GROUP BY
- a.f_updateaddress
- ) box ON container.地点 = box.f_updateaddress
- LEFT JOIN (
- SELECT
- b.f_updateaddress,
- MAX( CASE WHEN b.dict_label = '好' THEN b.statusCount ELSE 0 END ) AS 好,
- MAX( CASE WHEN b.dict_label = '坏' THEN b.statusCount ELSE 0 END ) AS 坏
- FROM
- (
- SELECT
- tc.f_updateaddress f_updateaddress,
- tc.f_cntrstatus f_cntrstatus,
- tc.statusCount statusCount,
- sdda.dict_label dict_label
- FROM
- (
- SELECT
- ta.f_name f_updateaddress,
- tct.f_cntrstatus,
- COUNT( tct.f_updateaddress ) statusCount
- FROM
- t_cntrno tct
- LEFT JOIN t_address ta ON tct.f_updateaddress = ta.f_id
- WHERE
- tct.f_status = 'T'
- GROUP BY
- tct.f_updateaddress,
- tct.f_cntrstatus
- ) tc
- LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_cntrstatus
- AND sdda.dict_type = 'f_cntrstatus'
- ) b
- GROUP BY
- b.f_updateaddress
- ) car ON container.地点 = car.f_updateaddress
- <where>
- <if test="tCntrno.fUpdateaddress != null and tCntrno.fUpdateaddress != ''">
- container.地点 like concat('%', #{tCntrno.fUpdateaddress}, '%')</if>
- </where>
- </select>
- <select id="selectTCntrnoFNo" parameterType="TCntrno" resultMap="TCntrnoResult">
- SELECT
- f_id,
- f_no
- FROM
- t_cntrno
- WHERE
- f_no = #{fNo}
- </select>
- <insert id="insertTCntrnoList" parameterType="list">
- insert into t_cntrno
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="fId != null">f_id,</if>
- <if test="fNo != null and fNo != ''">f_no,</if>
- <if test="fTypeid != null">f_typeid,</if>
- <if test="fOwner != null and fOwner != ''">f_owner,</if>
- <if test="fSource != null">f_source,</if>
- <if test="fRent != null">f_rent,</if>
- <if test="fUpdatetime != null">f_updatetime,</if>
- <if test="fUpdateaddress != null and fUpdateaddress != ''">f_updateaddress,</if>
- <if test="fUpdateef != null and fUpdateef != ''">f_updateEF,</if>
- <if test="fCntrstatus != null and fCntrstatus != ''">f_cntrstatus,</if>
- <if test="fStatus != null">f_status,</if>
- <if test="fOpctnstatus != null and fOpctnstatus != ''">f_opctnstatus,</if>
- <if test="fSealno != null and fSealno != ''">f_sealno,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- </trim>
- <foreach collection="list" item="item" separator=",">
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="fId != null">#{fId},</if>
- <if test="fNo != null and fNo != ''">#{fNo},</if>
- <if test="fTypeid != null">#{fTypeid},</if>
- <if test="fOwner != null and fOwner != ''">#{fOwner},</if>
- <if test="fSource != null">#{fSource},</if>
- <if test="fRent != null">#{fRent},</if>
- <if test="fUpdatetime != null">#{fUpdatetime},</if>
- <if test="fUpdateaddress != null and fUpdateaddress != ''">#{fUpdateaddress},</if>
- <if test="fUpdateef != null and fUpdateef != ''">#{fUpdateef},</if>
- <if test="fCntrstatus != null and fCntrstatus != ''">#{fCntrstatus},</if>
- <if test="fStatus != null">#{fStatus},</if>
- <if test="fOpctnstatus != null and fOpctnstatus != ''">#{fOpctnstatus},</if>
- <if test="fSealno != null and fSealno != ''">#{fSealno},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- </trim>
- </foreach>
- </insert>
- <select id="getTcntrnoFno" parameterType="TCntrno" resultType="map">
- SELECT
- tc.f_no,
- address.f_name addressName,
- sdda.dict_label updateEFName
- FROM
- t_cntrno tc
- LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_updateEF
- AND sdda.dict_type = 'f_updateEF'
- LEFT JOIN t_address address ON address.f_id = tc.f_updateaddress
- <where>
- tc.f_status = 'T'
- <if test="fNo != null and fNo != ''">and tc.f_no like concat('%', #{fNo}, '%') </if>
- <if test="fUpdateaddress != null and fUpdateaddress != ''">and tc.f_updateaddress = #{fUpdateaddress}</if>
- <if test="fUpdateef != null and fUpdateef != ''">and tc.f_updateEF = #{fUpdateef}</if>
- </where>
- ORDER BY tc.f_no
- </select>
- </mapper>
|