| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <?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.logistics.mapper.BizWaybillCostDetailsMapper">
-
- <resultMap type="com.ruoyi.logistics.domain.BizWaybillCostDetails" id="BizWaybillCostDetailsResult">
- <result property="waybillDetailId" column="waybill_detail_id" />
- <result property="waybillId" column="waybill_id" />
- <result property="externalWaybillNo" column="external_waybill_no" />
- <result property="feeItemCode" column="fee_item_code" />
- <result property="feeItemName" column="fee_item_name" />
- <result property="feeName" column="fee_name" />
- <result property="amount" column="amount" />
- <result property="rateAmount" column="rate_amount" />
- <result property="adjustAmount" column="adjust_amount" />
- <result property="remark" column="remark" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="deptId" column="dept_id" />
- <result property="userId" column="user_id" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="updateBy" column="update_by" />
- </resultMap>
- <sql id="selectBizWaybillCostDetailsVo">
- select waybill_detail_id, waybill_id, external_waybill_no, fee_item_code, fee_item_name, fee_name, amount, rate_amount, adjust_amount, remark, create_time, update_time, dept_id, user_id, del_flag, create_by, update_by from biz_waybill_cost_details
- </sql>
- <select id="selectBizWaybillCostDetailsList" parameterType="com.ruoyi.logistics.domain.BizWaybillCostDetails" resultMap="BizWaybillCostDetailsResult">
- <include refid="selectBizWaybillCostDetailsVo"/>
- <where>
- <if test="waybillId != null "> and waybill_id = #{waybillId}</if>
- <if test="externalWaybillNo != null and externalWaybillNo != ''"> and external_waybill_no = #{externalWaybillNo}</if>
- <if test="feeItemCode != null and feeItemCode != ''"> and fee_item_code = #{feeItemCode}</if>
- <if test="feeItemName != null and feeItemName != ''"> and fee_item_name like concat('%', #{feeItemName}, '%')</if>
- <if test="feeName != null and feeName != ''"> and fee_name like concat('%', #{feeName}, '%')</if>
- <if test="amount != null "> and amount = #{amount}</if>
- <if test="rateAmount != null "> and rate_amount = #{rateAmount}</if>
- <if test="adjustAmount != null "> and adjust_amount = #{adjustAmount}</if>
- <if test="deptId != null "> and dept_id = #{deptId}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- </where>
- </select>
-
- <select id="selectBizWaybillCostDetailsByWaybillDetailId" parameterType="Long" resultMap="BizWaybillCostDetailsResult">
- <include refid="selectBizWaybillCostDetailsVo"/>
- where waybill_detail_id = #{waybillDetailId}
- </select>
- <insert id="insertBizWaybillCostDetails" parameterType="com.ruoyi.logistics.domain.BizWaybillCostDetails" useGeneratedKeys="true" keyProperty="waybillDetailId">
- insert into biz_waybill_cost_details
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="waybillId != null">waybill_id,</if>
- <if test="externalWaybillNo != null">external_waybill_no,</if>
- <if test="feeItemCode != null">fee_item_code,</if>
- <if test="feeItemName != null">fee_item_name,</if>
- <if test="feeName != null">fee_name,</if>
- <if test="amount != null">amount,</if>
- <if test="rateAmount != null">rate_amount,</if>
- <if test="adjustAmount != null">adjust_amount,</if>
- <if test="remark != null">remark,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="userId != null">user_id,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="createBy != null">create_by,</if>
- <if test="updateBy != null">update_by,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="waybillId != null">#{waybillId},</if>
- <if test="externalWaybillNo != null">#{externalWaybillNo},</if>
- <if test="feeItemCode != null">#{feeItemCode},</if>
- <if test="feeItemName != null">#{feeItemName},</if>
- <if test="feeName != null">#{feeName},</if>
- <if test="amount != null">#{amount},</if>
- <if test="rateAmount != null">#{rateAmount},</if>
- <if test="adjustAmount != null">#{adjustAmount},</if>
- <if test="remark != null">#{remark},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="userId != null">#{userId},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="updateBy != null">#{updateBy},</if>
- </trim>
- </insert>
- <update id="updateBizWaybillCostDetails" parameterType="com.ruoyi.logistics.domain.BizWaybillCostDetails">
- update biz_waybill_cost_details
- <trim prefix="SET" suffixOverrides=",">
- <if test="waybillId != null">waybill_id = #{waybillId},</if>
- <if test="externalWaybillNo != null">external_waybill_no = #{externalWaybillNo},</if>
- <if test="feeItemCode != null">fee_item_code = #{feeItemCode},</if>
- <if test="feeItemName != null">fee_item_name = #{feeItemName},</if>
- <if test="feeName != null">fee_name = #{feeName},</if>
- <if test="amount != null">amount = #{amount},</if>
- <if test="rateAmount != null">rate_amount = #{rateAmount},</if>
- <if test="adjustAmount != null">adjust_amount = #{adjustAmount},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="deptId != null">dept_id = #{deptId},</if>
- <if test="userId != null">user_id = #{userId},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- </trim>
- where waybill_detail_id = #{waybillDetailId}
- </update>
- <delete id="deleteBizWaybillCostDetailsByWaybillDetailId" parameterType="Long">
- delete from biz_waybill_cost_details where waybill_detail_id = #{waybillDetailId}
- </delete>
- <delete id="deleteBizWaybillCostDetailsByWaybillDetailIds" parameterType="String">
- delete from biz_waybill_cost_details where waybill_detail_id in
- <foreach item="waybillDetailId" collection="array" open="(" separator="," close=")">
- #{waybillDetailId}
- </foreach>
- </delete>
- </mapper>
|