|
@@ -76,8 +76,8 @@
|
|
|
a.update_date as updateData,
|
|
|
a.tare_date as tareDate,
|
|
|
a.status,
|
|
|
- cm.buyer as buyer,
|
|
|
- cm.seller as seller,
|
|
|
+ ifnull(cm.buyer,cm1.buyer) as buyer,
|
|
|
+ ifnull(cm.seller,cm1.seller) as seller,
|
|
|
a.address_url as addressUrl,
|
|
|
a.net_weight as netWeight,
|
|
|
a.status_flag as statusFlag,
|
|
@@ -85,6 +85,8 @@
|
|
|
FROM weighing_management a
|
|
|
left join payment_management p on p.relation_id = a.relation_id and p.comp_id = a.comp_id and p.delete_flag = 0
|
|
|
left join contract_management_info cm on cm.contract_no = a.contract_no and cm.comp_id = a.comp_id and cm.delete_flag = 0
|
|
|
+ left join tran_task_info tti on tti.contract_no = a.contract_no and tti.delete_flag = 0 and tti.comp_id = a.comp_id
|
|
|
+ left join contract_management_info cm1 on cm1.contract_no = tti.send_warehouse and cm1.comp_id = a.comp_id and cm1.delete_flag = 0
|
|
|
left join warehouse_base_info w on a.warehouse_name = w.warehouse_name and w.comp_id = a.comp_id and w.delete_flag = 0
|
|
|
WHERE a.comp_id = #{compId}
|
|
|
and a.delete_flag = '0'
|