|
@@ -12,12 +12,12 @@
|
|
|
<result property="factoryName" column="garment_factory"/>
|
|
|
<result property="factoryContact" column="garment_factory_people"/>
|
|
|
<result property="factoryPhone" column="garment_factory_tel"/>
|
|
|
- <result property="customerName" column="customer_customerName"/>
|
|
|
+ <result property="customerName" column="customerName"/>
|
|
|
<result property="address" column="receiving_address"/>
|
|
|
</association>
|
|
|
|
|
|
<association property="delivery" javaType="org.dromara.customerReconciliation.domain.VO.DeliveryVO">
|
|
|
- <result property="deliveryNo" column="delivery_deliveryNo"/>
|
|
|
+ <result property="daHuoKuanHao" column="daHuoKuanHao"/>
|
|
|
<result property="styleNo" column="item_number"/>
|
|
|
<result property="baseCloth" column="base_cloth"/>
|
|
|
<result property="flowerNo" column="flower_no"/>
|
|
@@ -113,16 +113,19 @@
|
|
|
</update>
|
|
|
|
|
|
<select id="get" resultMap="customerReconciliationResultMap">
|
|
|
- SELECT p.id AS id,garment_factory,garment_factory_people,garment_factory_tel,'客户名称' AS customer_customerName,receiving_address,'大货编号' AS delivery_deliveryNo,item_number,base_cloth,'花型号' AS flower_no,all_money AS order_amount,delivery_date,confirm_delivery_time AS receive_time,purchase_code,duizhang_status
|
|
|
+ SELECT p.id AS id,garment_factory,garment_factory_people,garment_factory_tel,c.customer_name AS customerName,receiving_address,o.dahuo_kuanhao AS daHuoKuanHao,item_number,base_cloth,o.huaxinghao AS flower_no,all_money AS order_amount,delivery_date,confirm_delivery_time AS receive_time,purchase_code,duizhang_status
|
|
|
FROM fa_kuyou_plan AS p
|
|
|
LEFT JOIN fa_kuyou_plan_info AS pi ON pi.plan_id = p.id
|
|
|
+ LEFT JOIN fa_kuyou_user AS u ON u.id = p.user_id
|
|
|
+ LEFT JOIN fa_kuyou_customers AS c ON c.id = u.customers_id
|
|
|
+ LEFT JOIN fa_template_dev_order AS o ON o.order_num = p.order_num
|
|
|
<where>
|
|
|
<if test="dto.garmentFactory != null and dto.garmentFactory != ''">
|
|
|
AND pi.garment_factory = #{dto.garmentFactory}
|
|
|
</if>
|
|
|
-
|
|
|
- AND '送货单号' = '送货单号'
|
|
|
-
|
|
|
+ <if test="dto.purchaseCode != null and dto.purchaseCode != ''">
|
|
|
+ AND p.purchase_code = #{dto.purchaseCode}
|
|
|
+ </if>
|
|
|
<if test="dto.baseCloth != null and dto.baseCloth != ''">
|
|
|
AND base_cloth = #{dto.baseCloth}
|
|
|
</if>
|