Browse Source

no message

xingzai 6 months ago
parent
commit
6242013089
1 changed files with 13 additions and 6 deletions
  1. 13 6
      models/data_manage/edb_info.go

+ 13 - 6
models/data_manage/edb_info.go

@@ -183,12 +183,19 @@ func GetEdbInfoById(edbInfoId int) (item *EdbInfo, err error) {
 
 func GetQuarterEdbInfo() (item []*EdbInfo, err error) {
 	//o := orm.NewOrm()
-	sql := ` SELECT c.* FROM chart_info AS a
-			INNER JOIN chart_edb_mapping AS b ON a.chart_info_id=b.chart_info_id
-			INNER JOIN edb_info AS c ON b.edb_info_id=c.edb_info_id
-			WHERE a.chart_type=2
-			GROUP BY b.edb_info_id
-			ORDER BY b.edb_info_id ASC  `
+	//sql := ` SELECT c.* FROM chart_info AS a
+	//		INNER JOIN chart_edb_mapping AS b ON a.chart_info_id=b.chart_info_id
+	//		INNER JOIN edb_info AS c ON b.edb_info_id=c.edb_info_id
+	//		WHERE a.chart_type=2
+	//		GROUP BY b.edb_info_id
+	//		ORDER BY b.edb_info_id ASC  `
+	sql := `SELECT c.edb_info_id, c.edb_info_type, c.source_name, c.source, c.edb_code, c.edb_name, c.edb_name_source, c.frequency, c.unit, c.start_date, c.end_date, c.classify_id, c.sys_user_id, c.sys_user_real_name, c.create_time, c.modify_time, c.unique_code, c.min_value, c.max_value, c.calculate_formula, c.edb_type, c.is_update, c.sort, c.latest_date, c.latest_value, c.move_type, c.move_frequency, c.no_update, c.server_url, c.edb_name_en, c.unit_en, c.chart_image, c.calendar, c.empty_type, c.max_empty_type, c.data_date_type, c.manual_save, c.terminal_code, c.data_update_time, c.er_data_update_date, c.source_index_name, c.end_value, c.sub_source, c.sub_source_name, c.indicator_code, c.stock_code, c.extra, c.is_join_permission, c.base_modify_time, c.is_static_data, c.set_update_time
+			FROM chart_info AS a
+			INNER JOIN chart_edb_mapping AS b ON a.chart_info_id = b.chart_info_id
+			INNER JOIN edb_info AS c ON b.edb_info_id = c.edb_info_id
+			WHERE a.chart_type = 2
+			GROUP BY b.edb_info_id, c.edb_info_id, c.edb_info_type, c.source_name, c.source, c.edb_code, c.edb_name, c.edb_name_source, c.frequency, c.unit, c.start_date, c.end_date, c.classify_id, c.sys_user_id, c.sys_user_real_name, c.create_time, c.modify_time, c.unique_code, c.min_value, c.max_value, c.calculate_formula, c.edb_type, c.is_update, c.sort, c.latest_date, c.latest_value, c.move_type, c.move_frequency, c.no_update, c.server_url, c.edb_name_en, c.unit_en, c.chart_image, c.calendar, c.empty_type, c.max_empty_type, c.data_date_type, c.manual_save, c.terminal_code, c.data_update_time, c.er_data_update_date, c.source_index_name, c.end_value, c.sub_source, c.sub_source_name, c.indicator_code, c.stock_code, c.extra, c.is_join_permission, c.base_modify_time, c.is_static_data, c.set_update_time
+			ORDER BY b.edb_info_id ASC `
 	//_, err = o.Raw(sql).QueryRows(&item)
 
 	err = global.DEFAULT_DmSQL.Raw(sql).Find(&item).Error