|
|
@@ -10,7 +10,7 @@
|
|
|
sum_standard, sum_amount, sale_discount, order_status, out_status, sys.f_remove_zero(outing_qty) as outing_qty, outing_amt,
|
|
|
sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as return_qty, return_amt, amt_receivable,
|
|
|
amt_handle, amt_residue, remarks, annex_paths, make_staff, make_time, flg_valid, cp_id,
|
|
|
- fact_amt,disc_amt,discount,flg_auto_handle,flg_handle_setting,outbound_processing_flag
|
|
|
+ fact_amt,disc_amt,discount,flg_auto_handle,flg_handle_setting,outbound_processing_flag,cus_name,cus_phone
|
|
|
</sql>
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
@@ -286,7 +286,9 @@
|
|
|
t.remarks, t.annex_paths, t.make_staff, t.make_time,
|
|
|
t.flg_valid, t.cp_id,
|
|
|
tmo.org_name,
|
|
|
- tms.staff_name
|
|
|
+ tms.staff_name,
|
|
|
+ t.cus_name,
|
|
|
+ t.cus_phone
|
|
|
</sql>
|
|
|
<!--小程序用 明细-->
|
|
|
<sql id="Base_Column_List_Item_Response_Detail_Join">
|
|
|
@@ -434,10 +436,10 @@
|
|
|
AND t.cp_id = #{cpId}
|
|
|
</if>
|
|
|
<if test="cusPhone != null and cusPhone != ''">
|
|
|
- AND tmc.cus_phone LIKE concat('%',my_ex.likequery(#{cusPhone}),'%')
|
|
|
+ AND t.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}),'%')
|
|
|
+ AND t.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})
|
|
|
@@ -476,8 +478,8 @@
|
|
|
<if test="searchText !=null">
|
|
|
AND ( t.order_no LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
OR t.contact_phone LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
- OR tmc.cus_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
- OR tmc.cus_phone LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
+ OR t.cus_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
+ OR t.cus_phone LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
OR t.address_full LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
OR t.remarks LIKE concat('%', my_ex.likequery(#{searchText}), '%')
|
|
|
)
|
|
|
@@ -506,8 +508,6 @@
|
|
|
tms.staff_name as "staffName",
|
|
|
t.cus_id,
|
|
|
tmc.cus_code as "cusCode",
|
|
|
- tmc.cus_name as "cusName",
|
|
|
- tmc.cus_phone as "cusPhone",
|
|
|
tmc.cus_from as "cusFrom",
|
|
|
tmdd.data_value as "cusFromName",
|
|
|
t.address_area,
|
|
|
@@ -615,8 +615,8 @@
|
|
|
tms.staff_name AS "staffName",
|
|
|
T.cus_id AS "cusId",
|
|
|
tmc.cus_code AS "cusCode",
|
|
|
- tmc.cus_name AS "cusName",
|
|
|
- tmc.cus_phone AS "cusPhone",
|
|
|
+ T.cus_name AS "cusName",
|
|
|
+ T.cus_phone AS "cusPhone",
|
|
|
tmc.cus_from AS "cusFrom",
|
|
|
tmdd.data_value AS "dataValue",
|
|
|
T.address_area AS "addressArea",
|
|
|
@@ -750,8 +750,8 @@
|
|
|
tms.staff_name as "staffName",
|
|
|
t.cus_id,
|
|
|
tmc.cus_code as "cusCode",
|
|
|
- tmc.cus_name as "cusName",
|
|
|
- tmc.cus_phone as "cusPhone",
|
|
|
+ t.cus_name as "cusName",
|
|
|
+ t.cus_phone as "cusPhone",
|
|
|
tmc.cus_from as "cusFrom",
|
|
|
tmdd.data_value as "cusFromName",
|
|
|
t.address_area,
|
|
|
@@ -1040,6 +1040,12 @@
|
|
|
<if test=" et!=null and et.flgHandleSetting != null">
|
|
|
flg_handle_setting =#{et.flgHandleSetting,jdbcType=BOOLEAN},
|
|
|
</if>
|
|
|
+ <if test=" et!=null and et.cusName != null">
|
|
|
+ cus_name =#{et.cusName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test=" et!=null and et.cusPhone != null">
|
|
|
+ cus_phone =#{et.cusPhone,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where order_id =#{et.orderId,typeHandler=UuidTypeHandler}
|
|
|
and sum_quantity >= (out_qty + outing_qty)
|
|
|
@@ -1050,7 +1056,7 @@
|
|
|
<select id="selectByCondDetail" resultMap="BaseResultMapDetailResponse">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List_Detail_Join"/>,
|
|
|
- tmc.cus_code,tmc.cus_name, tmc.cus_phone, tmc.address_area, tmc.address_name, tmc.address_no,
|
|
|
+ tmc.cus_code, tmc.address_area, tmc.address_name, tmc.address_no,
|
|
|
tmc.address_gcj02, tmc.address_full, tmc.contact_name, tmc.contact_phone, tmc.cus_from, tmc.channel_id,
|
|
|
tmsc.channel_name as "channelName",
|
|
|
|