4 Commits bab13e4b69 ... d1f0a3809e

Autore SHA1 Messaggio Data
  zhangpeng d1f0a3809e 工单处理表的单位,时长都需要改成秒,bi_work_flow_group_row 1 anno fa
  Ping b259d7e6ad Merge commit 'bab13e4b69b0c796373af98eeea14079d9e85b90' 1 anno fa
  Ping a06c9d4b06 增加 if exists 1 anno fa
  Ping a95d720f58 修改bi_work_flow_group_row中聚合方式的错误 1 anno fa
1 ha cambiato i file con 6 aggiunte e 6 eliminazioni
  1. 6 6
      all.sql

+ 6 - 6
all.sql

@@ -3,7 +3,7 @@ use lawe;
 	-- (1)基础设施
 
 -- 建表语句
-DROP TABLE `bi_itm_hardware_resources`;
+DROP TABLE IF EXISTS `bi_itm_hardware_resources`;
 CREATE TABLE `bi_itm_hardware_resources` (
   `itm_hardware_resources_id` varchar(100) DEFAULT NULL COMMENT '设备ID',
   `itm_hardware_resources_type` varchar(100) DEFAULT NULL COMMENT '设备型号ID',
@@ -420,11 +420,11 @@ CREATE TABLE `bi_work_flow_group_row` (
 	from bi_work_flow_group_by_time m
 	left join itm_app ia on ia.ITM_APP_ID=m.app_id
 	union all
-	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'SUM', '小时', 'total_time_consuming' as 'kind', total_time_consuming as 'value'
+	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'SUM', '', 'total_time_consuming' as 'kind', total_time_consuming as 'value'
 	from bi_work_flow_group_by_time m
 	left join itm_app ia on ia.ITM_APP_ID=m.app_id
 	union all
-	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'AVG', '小时', 'avg_time_consuming' as 'kind', avg_time_consuming as 'value'
+	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'AVG', '', 'avg_time_consuming' as 'kind', avg_time_consuming as 'value'
 	from bi_work_flow_group_by_time m
 	left join itm_app ia on ia.ITM_APP_ID=m.app_id
 	union all
@@ -432,15 +432,15 @@ CREATE TABLE `bi_work_flow_group_row` (
 	from bi_work_flow_group_by_time m
 	left join itm_app ia on ia.ITM_APP_ID=m.app_id
 	union all
-	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'SUM', '%', 'total_works_notimeout_pct' as 'kind', 100*total_works_notimeout/total_works as 'value'
+	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'AVG', '%', 'total_works_notimeout_pct' as 'kind', 100*total_works_notimeout/total_works as 'value'
 	from bi_work_flow_group_by_time m
 	left join itm_app ia on ia.ITM_APP_ID=m.app_id
 	union all
-	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'SUM', '%', 'total_works_timeout_pct' as 'kind', 100*total_works_timeout/total_works as 'value'
+	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'AVG', '%', 'total_works_timeout_pct' as 'kind', 100*total_works_timeout/total_works as 'value'
 	from bi_work_flow_group_by_time m
 	left join itm_app ia on ia.ITM_APP_ID=m.app_id
 	union all
-	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'SUM', '%', 'total_works_end_pct' as 'kind', 100*total_works_end/total_works as 'value'
+	select m.dtype, m.thedvalue,m.process_type_name,m.app_id,ia.ITM_APP_NAME,m.serve_area,m.serve_department,m.serve_firm, 'AVG', '%', 'total_works_end_pct' as 'kind', 100*total_works_end/total_works as 'value'
 	from bi_work_flow_group_by_time m
 	left join itm_app ia on ia.ITM_APP_ID=m.app_id;