|
|
@@ -63,10 +63,10 @@
|
|
|
select concat('[',five,',',other,']') from ((
|
|
|
|
|
|
select GROUP_CONCAT(concat('{"x":"',si_custname,'","y":',IFNULL(round(si_amount/10000,2),0),'}')) five from (
|
|
|
- select * from statsinfo where companyid=1 and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE' ORDER BY si_amount desc limit 0,5
|
|
|
+ select * from statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE' ORDER BY si_amount desc limit 0,5
|
|
|
) c)d,(
|
|
|
|
|
|
- select concat('{"x":"其它","y":',ifnull(round((all_sum - five_sum)/10000,2),0),'}') other from ( (select sum(si_amount) all_sum from statsinfo where companyid=1 and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE')a,
|
|
|
+ select concat('{"x":"其它","y":',ifnull(round((all_sum - five_sum)/10000,2),0),'}') other from ( (select sum(si_amount) all_sum from statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE')a,
|
|
|
(select sum(si_amount) five_sum from statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE' ORDER BY si_amount desc limit 0,5)b))e)
|
|
|
</select>
|
|
|
|