Эх сурвалжийг харах

Merge branch 'feature/chart_add_unit'

xyxie 2 долоо хоног өмнө
parent
commit
b6fd50a173

+ 7 - 0
controllers/business_chart.go

@@ -176,6 +176,13 @@ func (this *BusinessChartController) ChartEdbDataList() {
 		return
 	}
 
+	if edbInfo.EdbType == 1 { //禁止查询基础指标的数据
+		br.Data = make([]*data_manage.EdbDataList, 0)
+		br.Ret = 200
+		br.Msg = "获取成功"
+		return
+	}
+
 	edbDataList, e := services.GetEdbInfoDataList(edbInfo)
 	if e != nil {
 		br.Msg = "获取失败"

+ 1 - 1
models/data_manage/eta_business_chart_permission.go

@@ -120,7 +120,7 @@ type ChartDescription struct {
 func (m *EtaBusinessChartPermission) GetChartDescriptionListByChartInfoIds(chartInfoIds []int) (list []*ChartDescription, err error) {
 	o := orm.NewOrmUsingDB("data")
 	sql := `
-		SELECT * FROM chart_description WHERE chart_info_id IN (`+utils.GetOrmInReplace(len(chartInfoIds))+`)
+		SELECT * FROM chart_description WHERE chart_info_id IN (`+utils.GetOrmInReplace(len(chartInfoIds))+`) ORDER BY id DESC
 	`
 	_, err = o.Raw(sql, chartInfoIds).QueryRows(&list)
 	return list, err