123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- <?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.miniapp.bus.mapper.BkProcessMapper">
-
- <resultMap type="BkProcess" id="BkProcessResult">
- <result property="id" column="id" />
- <result property="customerName" column="customer_name" />
- <result property="customerId" column="customer_id" />
- <result property="productId" column="product_id" />
- <result property="productName" column="product_name" />
- <result property="cardUserNo" column="card_user_no" />
- <result property="carNo" column="car_no" />
- <result property="indate" column="indate" />
- <result property="firstWeight" column="firstWeight" />
- <result property="firstWeightdate" column="firstWeightdate" />
- <result property="secondWeight" column="secondWeight" />
- <result property="secondWeightdate" column="secondWeightdate" />
- <result property="netweight" column="netweight" />
- <result property="outdate" column="outdate" />
- <result property="type" column="type" />
- <result property="loadingendtime" column="loadingendtime" />
- <result property="loadingstarttime" column="loadingstarttime" />
- <result property="contacts" column="contacts" />
- <result property="telephone" column="telephone" />
- <result property="nodecode" column="nodecode" />
- <result property="deltag" column="deltag" />
- <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" />
- </resultMap>
-
- <resultMap type="BkProcess" id="BkProcessAppResult">
- <result property="id" column="id" />
- <result property="customerName" column="customer_name" />
- <result property="customerId" column="customer_id" />
- <result property="productId" column="product_id" />
- <result property="productName" column="product_name" />
- <result property="cardUserNo" column="card_user_no" />
- <result property="carNo" column="car_no" />
- <result property="indate" column="indate" />
- <result property="firstWeight" column="firstWeight" />
- <result property="firstWeightdate" column="firstWeightdate" />
- <result property="secondWeight" column="secondWeight" />
- <result property="secondWeightdate" column="secondWeightdate" />
- <result property="netweight" column="netweight" />
- <result property="outdate" column="outdate" />
- <result property="type" column="type" />
- <result property="loadingendtime" column="loadingendtime" />
- <result property="loadingstarttime" column="loadingstarttime" />
- <result property="contacts" column="contacts" />
- <result property="telephone" column="telephone" />
- <result property="nodecode" column="nodecode" />
- <result property="deltag" column="deltag" />
- <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="fenceStartAddress" column="fence_start_address" />
- <result property="fenceEndAddress" column="fence_end_address" />
- </resultMap>
- <sql id="selectBkProcessVo">
- select id, customer_name,customer_id ,product_id,product_name, card_user_no, car_no, indate, firstWeight, firstWeightdate, secondWeight, secondWeightdate, netweight, outdate, type, loadingendtime, loadingstarttime, contacts, telephone, nodecode, deltag, create_by, create_time, update_by, update_time, remark from bk_process
- </sql>
- <sql id="selectBkProcessVo1">
- select a.id, a.customer_name,a.customer_id,a.product_id,a.product_name,a.card_user_no, a.car_no, a.indate, a.firstWeight, a.firstWeightdate, a.secondWeight, a.secondWeightdate, a.netweight, a.outdate, a.type, a.loadingendtime, a.loadingstarttime, a.contacts, a.telephone, a.nodecode, a.deltag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark from bk_process a
- </sql>
- <select id="selectBkProcessList" parameterType="BkProcess" resultMap="BkProcessResult">
- <include refid="selectBkProcessVo"/>
- <where>
- <if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
- <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
- <if test="cardUserNo != null and cardUserNo != ''"> and card_user_no = #{cardUserNo}</if>
- <if test="carNo != null and carNo != ''"> and car_no = #{carNo}</if>
- <if test="indate != null "> and indate = #{indate}</if>
- <if test="firstWeight != null and firstWeight != ''"> and firstWeight = #{firstWeight}</if>
- <if test="firstWeightdate != null "> and firstWeightdate = #{firstWeightdate}</if>
- <if test="secondWeight != null and secondWeight != ''"> and secondWeight = #{secondWeight}</if>
- <if test="secondWeightdate != null "> and secondWeightdate = #{secondWeightdate}</if>
- <if test="netweight != null and netweight != ''"> and netweight = #{netweight}</if>
- <if test="outdate != null "> and outdate = #{outdate}</if>
- <if test="type != null and type != ''"> and type = #{type}</if>
- <if test="loadingendtime != null "> and loadingendtime = #{loadingendtime}</if>
- <if test="loadingstarttime != null "> and loadingstarttime = #{loadingstarttime}</if>
- <if test="contacts != null and contacts != ''"> and contacts = #{contacts}</if>
- <if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if>
- <if test="nodecode != null and nodecode != ''"> and nodecode = #{nodecode}</if>
- <if test="deltag != null and deltag != ''"> and deltag = #{deltag}</if>
- </where>
- </select>
-
- <select id="selectBkProcessById" parameterType="Long" resultMap="BkProcessResult">
- <include refid="selectBkProcessVo1"/>
-
- where id = #{id}
- </select>
- <select id="selectBkProcessByUserId" parameterType="Long" resultMap="BkProcessAppResult">
- select
- a.id, a.customer_name,a.customer_id,a.product_id,a.product_name,a.card_user_no, a.car_no, a.indate, a.firstWeight, a.firstWeightdate, a.secondWeight, a.secondWeightdate, a.netweight, a.outdate, a.type, a.loadingendtime, a.loadingstarttime, a.contacts, a.telephone, a.nodecode, a.deltag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
- c.fence_start_address, c.fence_end_address
- from
- bk_user_process b
- left join bk_process a on b.process_id = a.id
- left join bk_fence c on b.fence_id = c.id
-
- where b.user_id = #{id}
-
- </select>
-
- <insert id="insertBkProcess" parameterType="BkProcess">
- insert into bk_process
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="customerName != null and customerName != ''">customer_name,</if>
- <if test="productName != null and productName != ''">product_name,</if>
- <if test="cardUserNo != null and cardUserNo != ''">card_user_no,</if>
- <if test="carNo != null and carNo != ''">car_no,</if>
- <if test="indate != null ">indate,</if>
- <if test="firstWeight != null and firstWeight != ''">firstWeight,</if>
- <if test="firstWeightdate != null ">firstWeightdate,</if>
- <if test="secondWeight != null and secondWeight != ''">secondWeight,</if>
- <if test="secondWeightdate != null">secondWeightdate,</if>
- <if test="netweight != null and netweight != ''">netweight,</if>
- <if test="outdate != null ">outdate,</if>
- <if test="type != null and type != ''">type,</if>
- <if test="loadingendtime != null ">loadingendtime,</if>
- <if test="loadingstarttime != null">loadingstarttime,</if>
- <if test="contacts != null and contacts != ''">contacts,</if>
- <if test="telephone != null and telephone != ''">telephone,</if>
- <if test="nodecode != null and nodecode != ''">nodecode,</if>
- <if test="deltag != null and deltag != ''">deltag,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null and updateBy != ''">update_by,</if>
- <if test="updateTime != null ">update_time,</if>
- <if test="remark != null and remark != ''">remark,</if>
- <if test="customerId != null and customerId != ''">customer_id,</if>
- <if test="productId != null and productId != ''">product_id,</if>
-
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="customerName != null and customerName != ''">#{customerName},</if>
- <if test="productName != null and productName != ''">#{productName},</if>
- <if test="cardUserNo != null and cardUserNo != ''">#{cardUserNo},</if>
- <if test="carNo != null and carNo != ''">#{carNo},</if>
- <if test="indate != null ">#{indate},</if>
- <if test="firstWeight != null and firstWeight != ''">#{firstWeight},</if>
- <if test="firstWeightdate != null ">#{firstWeightdate},</if>
- <if test="secondWeight != null and secondWeight != ''">#{secondWeight},</if>
- <if test="secondWeightdate != null">#{secondWeightdate},</if>
- <if test="netweight != null and netweight != ''">#{netweight},</if>
- <if test="outdate != null ">#{outdate},</if>
- <if test="type != null and type != ''">#{type},</if>
- <if test="loadingendtime != null ">#{loadingendtime},</if>
- <if test="loadingstarttime != null ">#{loadingstarttime},</if>
- <if test="contacts != null and contacts != ''">#{contacts},</if>
- <if test="telephone != null and telephone != ''">#{telephone},</if>
- <if test="nodecode != null and nodecode != ''">#{nodecode},</if>
- <if test="deltag != null and deltag != ''">#{deltag},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="createTime != null ">#{createTime},</if>
- <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
- <if test="updateTime != null ">#{updateTime},</if>
- <if test="remark != null and remark != ''">#{remark},</if>
- <if test="customerId != null and customerId != ''">#{customerId},</if>
- <if test="productId != null and productId != ''">#{productId},</if>
- </trim>
- </insert>
- <update id="updateBkProcess" parameterType="BkProcess">
- update bk_process
- <trim prefix="SET" suffixOverrides=",">
- <if test="customerName != null and customerName != ''">customer_name = #{customerName},</if>
- <if test="productName != null and productName != ''">product_name = #{productName},</if>
- <if test="cardUserNo != null and cardUserNo != ''">card_user_no = #{cardUserNo},</if>
- <if test="carNo != null and carNo != ''">car_no = #{carNo},</if>
- <if test="indate != null">indate = #{indate},</if>
- <if test="firstWeight != null and firstWeight != ''">firstWeight = #{firstWeight},</if>
- <if test="firstWeightdate != null ">firstWeightdate = #{firstWeightdate},</if>
- <if test="secondWeight != null and secondWeight != ''">secondWeight = #{secondWeight},</if>
- <if test="secondWeightdate != null">secondWeightdate = #{secondWeightdate},</if>
- <if test="netweight != null and netweight != ''">netweight = #{netweight},</if>
- <if test="outdate != null">outdate = #{outdate},</if>
- <if test="type != null and type != ''">type = #{type},</if>
- <if test="loadingendtime != null ">loadingendtime = #{loadingendtime},</if>
- <if test="loadingstarttime != null ">loadingstarttime = #{loadingstarttime},</if>
- <if test="contacts != null and contacts != ''">contacts = #{contacts},</if>
- <if test="telephone != null and telephone != ''">telephone = #{telephone},</if>
- <if test="nodecode != null and nodecode != ''">nodecode = #{nodecode},</if>
- <if test="deltag != null and deltag != ''">deltag = #{deltag},</if>
- <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
- <if test="createTime != null ">create_time = #{createTime},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null and remark != ''">remark = #{remark},</if>
- <if test="customerId != null and customerId != ''">customer_id = #{customerId},</if>
- <if test="productId != null and productId != ''">product_id = #{productId},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteBkProcessById" parameterType="Long">
- delete from bk_process where id = #{id}
- </delete>
- <delete id="deleteBkProcessByIds" parameterType="String">
- delete from bk_process where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|