|
@@ -76,12 +76,15 @@
|
|
a.update_date as updateData,
|
|
a.update_date as updateData,
|
|
a.tare_date as tareDate,
|
|
a.tare_date as tareDate,
|
|
a.status,
|
|
a.status,
|
|
|
|
+ cm.buyer as buyer,
|
|
|
|
+ cm.seller as seller,
|
|
a.address_url as addressUrl,
|
|
a.address_url as addressUrl,
|
|
a.net_weight as netWeight,
|
|
a.net_weight as netWeight,
|
|
a.status_flag as statusFlag,
|
|
a.status_flag as statusFlag,
|
|
case when p.id is null then 1 when p.status !='待结算' or p.approve_status is null then 2 else 1 end as allow
|
|
case when p.id is null then 1 when p.status !='待结算' or p.approve_status is null then 2 else 1 end as allow
|
|
FROM weighing_management a
|
|
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 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 warehouse_base_info w on a.warehouse_name = w.warehouse_name and w.comp_id = a.comp_id and w.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}
|
|
WHERE a.comp_id = #{compId}
|
|
and a.delete_flag = '0'
|
|
and a.delete_flag = '0'
|