#2
林月儿2019-06-12 23:28
|
SELECT DISTINCT k1.t_goods_id from t_sales_entry_detail k1 LEFT JOIN t_sales_entry k2 on k1.t_sales_entry_id =k2.id where k2.sys_office_id='902cb4b0f15c4c3d9695c718823f2ec7' and k2.document_status='2';
SELECT DISTINCT k1.t_goods_id from t_sales_entry_detail k1 where EXISTS (
select k2.id from t_sales_entry k2 where k2.id = k1.t_sales_entry_id and k2.sys_office_id='902cb4b0f15c4c3d9695c718823f2ec7' and k2.document_status='2') ;