帆软填报界面数据量过大,如何实现分页面SELECT DISTINCT K1.*FROM (SELECT T1.*, ROUND((T1.T1库存量 * T1.T1单价), 2) AS '金额', T2.*, LEFT(T2.T2物料组,2) AS '大类', LEFT(T2.T2物料组,4) AS '中类', T3.*, T4.*, T5.*, T6.* FROM (SELECT id AS 'T1ID', kcdbm AS 'T1库存地编码', kcdmc AS 'T1库存地名称', hjxx AS 'T1货架信息', verpr AS 'T1单价', MAX(wlbm) AS 'T1物料编码', MAX(wlms) AS 'T1物料描述', MAX(dw) AS 'T1单位', MAX(dwms) AS 'T1单位描述', MAX(jskc) AS 'T1寄售库存', SUM(kcl) AS 'T1库存量', MAX(typed) AS 'T1库存类型' , MAX(werks) AS 'T1工厂代码', MAX(org_name) AS 'T1工厂描述' FROM all_repository_stock WHERE org_id = '00018024' GROUP BY id, wlbm, kcdbm, kcdmc, hjxx, verpr) T1 LEFT JOIN ( SELECT matnr AS 'T2物料编码', maktx AS 'T2物料描述', meins AS 'T2计量单位', msehl AS 'T2单位描述', matkl AS 'T2物料组', wgbez AS 'T2物料组描述', bklas AS 'T2评估类', bkbez AS 'T2评估描述', active AS 'T2是否启用', update_date AS 'T2更新时间', werks AS 'T2工厂代码', org_id AS 'T2组织机构ID' FROM `p_product_master` WHERE org_id = '00018024' ) T2 ON T1.T1物料编码 = T2.T2物料编码 LEFT JOIN ( SELECT field_h6 AS 'T3物料编码', field_h12 AS 'T3物资级别' FROM business_38m9 ) T3 ON T1.T1物料编码 = T3.T3物料编码 LEFT JOIN (SELECT field_h1 AS '编码', field_h2 AS '描述' FROM business_o1h5) T4 ON LEFT(T2.T2物料组, 2) = T4.编码 LEFT JOIN ( SELECT wlbm AS 'T5物料编码', cbsl AS 'T5储备数量' FROM repository_reserve ) T5 ON T1.T1物料编码 = T5.T5物料编码 LEFT JOIN ( SELECT M1.*,M2.*,M3.*,M4.* FROM (SELECT id, htbh AS 'M1合同编号', MAX(rkrq) AS 'M1入库日期' FROM business_y339 GROUP BY id,htbh ) M1 LEFT JOIN ( SELECT father_id, org_id, wlbm AS 'M2物料编码', wlms AS 'M2物料描述', dhsl AS 'M2订单数量', dddj AS 'M2订单单价', caigouddgm AS 'M2采购订单', jhbm AS 'M2采购计划', xqjhsbr AS 'M2需求计划申报人', cgy AS 'M2采购员' FROM business_f7hc ) M2 ON M1.id = M2.father_id LEFT JOIN ( SELECT cggyjhbh AS 'M3采购计划编号',xqjhbh AS 'M3需求计划编号' FROM business_7twq ) M3 ON M2.M2采购计划 = M3.M3采购计划编号 LEFT JOIN ( SELECT xqjhbh AS '需求计划编号', yt AS '用途', xqsj AS '需求时间起', xqsjz AS '需求时间止', bz AS '备注', zbmchwh AS '装置名称_位号' FROM wzxqjh ) M4 ON M3.M3需求计划编号 = M4.需求计划编号 ) T6ON T1.T1物料编码 = T6.M2物料编码 ) K1WHERE ( (LEFT(K1.T2物料组, 2) IN ('10', '16', '23', '24', '27', '31', '32', '33', '34', '35', '36', '37', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51')) OR (LEFT(K1.T2物料组, 4) IN ('1202', '1203', '1702', '1799', '2107', '2514', '2516', '2599', '2607', '2608', '2699')) ) AND NOT (K1.T1库存地编码 = '4016' AND LEFT(K1.T2物料组, 4) = '2405')ORDER BY K1.编码 ASC;