first commit
This commit is contained in:
@@ -0,0 +1,162 @@
|
||||
<?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.linke.finance.domain.branchFreightBill.repository.mapper.BranchFreightBillMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.branchFreightBill.repository.po.BranchFreightBillPO" id="BranchFreightBillResult">
|
||||
<result property="branchFreightId" column="branch_freight_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="branchInId" column="branch_in_id" />
|
||||
<result property="branchInName" column="branch_in_name" />
|
||||
<result property="branchOutId" column="branch_out_id" />
|
||||
<result property="branchOutName" column="branch_out_name" />
|
||||
<result property="billCode" column="bill_code" />
|
||||
<result property="authStatus" column="auth_status" />
|
||||
<result property="associationOrderId" column="association_order_id" />
|
||||
<result property="associationOrderCode" column="association_order_code" />
|
||||
<result property="associationOrderStatus" column="association_order_status" />
|
||||
<result property="customFreight" column="custom_freight" />
|
||||
<result property="freight" column="freight" />
|
||||
<result property="deliveryExpense" column="delivery_expense" />
|
||||
<result property="totalFreight" column="total_freight" />
|
||||
<result property="retainedAmount" column="retained_amount" />
|
||||
<result property="otherExpenses" column="other_expenses" />
|
||||
<result property="billingTime" column="billing_time" />
|
||||
<result property="signTime" column="sign_time" />
|
||||
<result property="authTime" column="auth_time" />
|
||||
<result property="authId" column="auth_id" />
|
||||
<result property="authName" column="auth_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectBranchFreightBillPo">
|
||||
select branch_freight_id, top_organization_id, organization_id, organization_name, branch_in_id, branch_in_name, branch_out_id, branch_out_name, bill_code, auth_status, association_order_id, association_order_code, association_order_status, custom_freight, freight, delivery_expense, total_freight, other_expenses, retained_amount, billing_time, sign_time, auth_time, auth_id, auth_name, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from branch_freight_bill
|
||||
</sql>
|
||||
|
||||
<sql id="selectBranchFreightBillPo1">
|
||||
<where>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="branchInId != null ">
|
||||
and branch_in_id = #{branchInId}
|
||||
</if>
|
||||
<if test="branchInName != null and branchInName != ''">
|
||||
and branch_in_name like concat('%', #{branchInName}, '%')
|
||||
</if>
|
||||
<if test="branchOutId != null ">
|
||||
and branch_out_id = #{branchOutId}
|
||||
</if>
|
||||
<if test="branchOutName != null and branchOutName != ''">
|
||||
and branch_out_name like concat('%', #{branchOutName}, '%')
|
||||
</if>
|
||||
<if test="billCode != null and billCode != ''">
|
||||
and bill_code = #{billCode}
|
||||
</if>
|
||||
<if test="authStatus != null ">
|
||||
and auth_status = #{authStatus}
|
||||
</if>
|
||||
<if test="associationOrderId != null ">
|
||||
and association_order_id = #{associationOrderId}
|
||||
</if>
|
||||
<if test="associationOrderCode != null and associationOrderCode != ''">
|
||||
and association_order_code = #{associationOrderCode}
|
||||
</if>
|
||||
<if test="associationOrderStatus != null and associationOrderStatus != '' ">
|
||||
and association_order_status = #{associationOrderStatus}
|
||||
</if>
|
||||
<if test="customFreight != null ">
|
||||
and custom_freight = #{customFreight}
|
||||
</if>
|
||||
<if test="freight != null ">
|
||||
and freight = #{freight}
|
||||
</if>
|
||||
<if test="deliveryExpense != null ">
|
||||
and delivery_expense = #{deliveryExpense}
|
||||
</if>
|
||||
<if test="totalFreight != null ">
|
||||
and total_freight = #{totalFreight}
|
||||
</if>
|
||||
<if test="retainedAmount != null ">
|
||||
and retained_amount = #{retainedAmount}
|
||||
</if>
|
||||
<if test="billingTime != null ">
|
||||
and billing_time = #{billingTime}
|
||||
</if>
|
||||
<if test="signTime != null ">
|
||||
and sign_time = #{signTime}
|
||||
</if>
|
||||
<if test="authTime != null ">
|
||||
and auth_time = #{authTime}
|
||||
</if>
|
||||
<if test="authId != null and authId != ''">
|
||||
and auth_id = #{authId}
|
||||
</if>
|
||||
<if test="authName != null and authName != ''">
|
||||
and auth_name like concat('%', #{authName}, '%')
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="billingTimeStart != null and billingTimeStart != '' ">
|
||||
AND date_format(billing_time,'%Y-%m-%d') >= #{billingTimeStart}
|
||||
</if>
|
||||
<if test="billingTimeEnd != null and billingTimeEnd != ''">
|
||||
AND date_format(billing_time,'%Y-%m-%d') <= #{billingTimeEnd}
|
||||
</if>
|
||||
<if test="signTimeStart != null and signTimeStart != ''">
|
||||
AND date_format(sign_time,'%Y-%m-%d') >= #{signTimeStart}
|
||||
</if>
|
||||
<if test="signTimeEnd != null and signTimeEnd != ''">
|
||||
AND date_format(sign_time,'%Y-%m-%d') <= #{signTimeEnd}
|
||||
</if>
|
||||
<if test="authTimeStart != null and authTimeStart != ''">
|
||||
AND date_format(auth_time,'%Y-%m-%d') >= #{authTimeStart}
|
||||
</if>
|
||||
<if test="authTimeEnd != null and authTimeEnd != ''">
|
||||
AND date_format(auth_time,'%Y-%m-%d') <= #{authTimeEnd}
|
||||
</if>
|
||||
<if test="branchId != null">
|
||||
<choose>
|
||||
<when test="type != null and type == 1">
|
||||
and branch_in_id = #{branchId}
|
||||
</when>
|
||||
<when test="type != null and type == 2">
|
||||
and branch_out_id = #{branchId}
|
||||
</when>
|
||||
<otherwise>and (branch_in_id = #{branchId} or branch_out_id = #{branchId}) </otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<choose>
|
||||
<when test=" delFlag != null "> AND del_flag = #{delFlag} </when>
|
||||
<otherwise> AND del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.branchFreightBill.repository.todo.BranchFreightBillDO" resultMap="BranchFreightBillResult">
|
||||
<include refid="selectBranchFreightBillPo"/>
|
||||
<include refid="selectBranchFreightBillPo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user