|
|
@@ -106,7 +106,7 @@
|
|
|
<sql id="Condition">
|
|
|
<where>
|
|
|
<if test="orderNo != null and orderNo != ''">
|
|
|
- AND t.order_no = #{orderNo}
|
|
|
+ AND t.order_no LIKE concat('%',my_ex.likequery(#{orderNo}),'%')
|
|
|
</if>
|
|
|
<if test="orderType != null and orderType != ''">
|
|
|
AND t.order_type = #{orderType}
|
|
|
@@ -133,20 +133,17 @@
|
|
|
AND t.address_gcj02 = #{addressGcj02}
|
|
|
</if>
|
|
|
<if test="addressFull != null and addressFull != ''">
|
|
|
- AND t.address_full = #{addressFull}
|
|
|
+ AND t.address_full LIKE concat('%',my_ex.likequery(#{addressFull}),'%')
|
|
|
</if>
|
|
|
<if test="contactName != null and contactName != ''">
|
|
|
- AND t.contact_name = #{contactName}
|
|
|
+ AND t.contact_name LIKE concat('%',my_ex.likequery(#{contactName}),'%')
|
|
|
</if>
|
|
|
<if test="contactPhone != null and contactPhone != ''">
|
|
|
- AND t.contact_phone = #{contactPhone}
|
|
|
+ AND t.contact_phone LIKE concat('%',my_ex.likequery(#{contactPhone}),'%')
|
|
|
</if>
|
|
|
<if test="salesChannel != null and salesChannel != ''">
|
|
|
AND t.sales_channel = #{salesChannel}
|
|
|
</if>
|
|
|
- <if test="deliveryDate != null">
|
|
|
- AND t.delivery_date = #{deliveryDate}
|
|
|
- </if>
|
|
|
<if test="sumQuantity != null">
|
|
|
AND t.sum_quantity = #{sumQuantity}
|
|
|
</if>
|
|
|
@@ -210,6 +207,12 @@
|
|
|
<if test="cpId != null">
|
|
|
AND t.cp_id = #{cpId}
|
|
|
</if>
|
|
|
+ <if test="cusPhone != null and cusPhone != ''">
|
|
|
+ AND tmc.cus_phone LIKE concat('%',my_ex.likequery(#{cusPhone}),'%')
|
|
|
+ </if>
|
|
|
+ <if test="cusName != null and cusName != ''">
|
|
|
+ AND tmc.cus_name LIKE concat('%',my_ex.likequery(#{cusName}),'%')
|
|
|
+ </if>
|
|
|
<if test="orgIdList != null and orgIdList.size() > 0">
|
|
|
AND t.org_id =any(#{orgIdList, typeHandler=uuidListTypeHandler})
|
|
|
</if>
|
|
|
@@ -219,14 +222,14 @@
|
|
|
<if test="outStatusList != null and outStatusList.size() > 0">
|
|
|
AND t.out_status =any(#{outStatusList, typeHandler=StringListTypeHandler})
|
|
|
</if>
|
|
|
- <if test="makeTimeStart != null and makeTimeEnd != null">
|
|
|
- AND t.make_time >= #{makeTimeStart}::timestamp with time zone
|
|
|
- AND t.make_time < #{makeTimeEnd}::timestamp with time zone + interval '1 day'
|
|
|
- </if>
|
|
|
<if test="deliveryDateStart != null and deliveryDateEnd != null">
|
|
|
AND t.delivery_date >= #{deliveryDateStart}::timestamp with time zone
|
|
|
AND t.delivery_date < #{deliveryDateEnd}::timestamp with time zone + interval '1 day'
|
|
|
</if>
|
|
|
+ <if test="makeTimeStart != null and makeTimeEnd != null">
|
|
|
+ AND t.make_time >= #{makeTimeStart}::timestamp with time zone
|
|
|
+ AND t.make_time < #{makeTimeEnd}::timestamp with time zone + interval '1 day'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
|
|
|
@@ -243,7 +246,7 @@
|
|
|
SELECT t.order_id,
|
|
|
t.order_no,
|
|
|
t.order_type,
|
|
|
- sys.f_get_name_i18n(tdk1.kind_name_i18n, 'zh_CN') as "orderTypeName",
|
|
|
+ sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "orderTypeName",
|
|
|
t.org_id,
|
|
|
tmo.org_name as "orgName",
|
|
|
t.staff_id,
|
|
|
@@ -269,9 +272,9 @@
|
|
|
t.sum_amount,
|
|
|
t.sale_discount,
|
|
|
t.order_status,
|
|
|
- sys.f_get_name_i18n(tdk2.kind_name_i18n, 'zh_CN') as "orderStatusName",
|
|
|
+ sys.f_get_name_i18n(tdk2.kind_name_i18n, #{i18n}) as "orderStatusName",
|
|
|
t.out_status,
|
|
|
- sys.f_get_name_i18n(tdk3.kind_name_i18n, 'zh_CN') as "outStatusName",
|
|
|
+ sys.f_get_name_i18n(tdk3.kind_name_i18n, #{i18n}) as "outStatusName",
|
|
|
t.outing_qty,
|
|
|
t.outing_amt,
|
|
|
t.out_qty,
|
|
|
@@ -308,6 +311,7 @@
|
|
|
SELECT
|
|
|
count(1)
|
|
|
FROM dkic_b.t_psi_order as t
|
|
|
+ left join dkic_b.t_mst_customer tmc on t.cus_id = tmc.cus_id
|
|
|
<include refid="Condition"/>
|
|
|
</select>
|
|
|
|
|
|
@@ -316,7 +320,7 @@
|
|
|
SELECT t.order_id,
|
|
|
t.order_no,
|
|
|
t.order_type,
|
|
|
- sys.f_get_name_i18n(tdk1.kind_name_i18n, 'zh_CN') as "orderTypeName",
|
|
|
+ sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "orderTypeName",
|
|
|
t.org_id,
|
|
|
tmo.org_name as "orgName",
|
|
|
t.staff_id,
|
|
|
@@ -342,9 +346,9 @@
|
|
|
t.sum_amount,
|
|
|
t.sale_discount,
|
|
|
t.order_status,
|
|
|
- sys.f_get_name_i18n(tdk2.kind_name_i18n, 'zh_CN') as "orderStatusName",
|
|
|
+ sys.f_get_name_i18n(tdk2.kind_name_i18n, #{i18n}) as "orderStatusName",
|
|
|
t.out_status,
|
|
|
- sys.f_get_name_i18n(tdk3.kind_name_i18n, 'zh_CN') as "outStatusName",
|
|
|
+ sys.f_get_name_i18n(tdk3.kind_name_i18n, #{i18n}) as "outStatusName",
|
|
|
t.outing_qty,
|
|
|
t.outing_amt,
|
|
|
t.out_qty,
|