protected override string GetSummaryColumsSQL(List<SummaryField> summaryFields) { return base.GetSummaryColumsSQL(summaryFields).Replace("SUM(FTENTHOUSANDQTY) AS FTENTHOUSANDQTY,SUM(FMETREPROFIT) AS FMETREPROFIT", string.Format(@"CASE WHEN SUM(FWORKSHOPCUROUTQTY) = 0 THEN 0 ELSE ROUND(SUM(FTOTALQTY)/SUM(FWORKSHOPCUROUTQTY)*10000,{0}) END AS FTENTHOUSANDQTY, CASE WHEN SUM(FTOTALQTY) = 0 THEN 0 ELSE ROUND(SUM(FTOTALPROFIT)/SUM(FTOTALQTY),{0}) END AS FMETREPROFIT", this.PricePrecision)); }
获取汇总字段sql替换