我在mysql中查询出的数据,为什么在柱状图中不是按项目储备、年度预算、预算下达、需求提报、招标采购、合同签订、合同履约、物资领用、支出入账顺序排列的。而是乱的。
62626
SELECT * FROM (
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'年度预算' as type,BEGBUDAMOUNT/10000 as type_value,'' rate,'' rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'项目储备' as type,ALL_INVEST/10000 as type_value,'' rate,'' rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'预算下达' as type,TRAAMOUNT/10000 as type_value,'预算下达率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'需求提报' as type,APPAMOUNT/10000 as type_value,'需求提报率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'招标采购' as type,INVAMOUNT/10000 as type_value,'招标采购率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'合同签订' as type,SIGAMOUNT/10000 as type_value,'合同签订率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'合同履约' as type,AGGREAMOUNT/10000 as type_value,'合同履约率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'物资领用' as type,HOLDAMOUNT/10000 as type_value,'物资领用率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'支出入账' as type,PAST/10000 as type_value,'支出入账率' as rate,RATE_1 as rate_value FROM date_xm_01
) a
WHERE y = '${统计日期}'
AND 项目名称 = '${项目名称}'