|
|
@@ -1427,10 +1427,10 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
|
|
// String sql = "select pd_id from (select rownum r,pd_id from purc$orderitems left join purc$orders on pd_puid = pu_id where pu_venduseruu is not null and pu_enuu = "
|
|
|
// + enUU + " and rownum <= " + page * size + " order by pd_id desc) where r > " + size * (page - 1);
|
|
|
String sql = "select " + importId + " as pr_import_id, pr_title,pr_code,pr_spec,pr_unit,pr_minpack,pr_minorder,pr_leadtime,pr_ltinstock,pr_brand,pr_cmpcode,'B2B' as pr_sourceapp,pd_prid as pr_sourceid,1 as pr_issale,0 as pr_ispurchase," +
|
|
|
- "pr_isshow,pr_ispubsale,pr_standard,pr_create_time,pu_venduu as pr_enuu,pu_venduseruu as pr_useruu from (select P.*,t.*,rownum r from (" +
|
|
|
+ "pr_isshow,pr_ispubsale,pr_standard,pr_create_time,pu_venduu as pr_enuu,pu_venduseruu as pr_useruu from (" +
|
|
|
" select pd_prid,pu_venduu,pu_venduseruu,count(1) as nums from purc$orderitems left join purc$orders on pd_puid = pu_id " +
|
|
|
" where pu_venduseruu is not null and pu_enuu = " + enUU + " group by pd_prid,pu_venduseruu,pu_venduu order by count(1) desc " +
|
|
|
- " ) t left join v$products P on pd_prid = pr_id where P.pr_title is not null and P.pr_code is not null and rownum <= " + page * size + ") where r > " + size * (page - 1);
|
|
|
+ " ) t left join v$products P on pd_prid = pr_id where P.pr_title is not null and P.pr_code is not null limit "+ size * (page - 1)+ ", "+ (page * size-size * (page - 1)) ;
|
|
|
System.out.println(sql);
|
|
|
List<ProductTemp> productTemps = commonDao.query(sql, ProductTemp.class);
|
|
|
System.out.println(enUU + "找到采购单详情" + productTemps.size());
|