zwxi 1 year ago
parent
commit
3f6d35e9da
1 changed files with 2 additions and 3 deletions
  1. 2 3
      controllers/commodity_trade_base_index.go

+ 2 - 3
controllers/commodity_trade_base_index.go

@@ -2821,6 +2821,7 @@ func (this *TradeCommonController) ExportMtjhList() {
 		this.ServeJSON()
 	}()
 	area := this.GetString("Area")
+	indexCode := this.GetString("IndexCode") //指标唯一编码
 
 	secNameList := make([]*models.EdbdataExportList, 0)
 
@@ -2831,7 +2832,7 @@ func (this *TradeCommonController) ExportMtjhList() {
 	xlsxFile := xlsx.NewFile()
 
 	//不为空就是导出分类表
-	if area != "" {
+	if indexCode == "" {
 		//获取指标
 		var secNameList []*string
 		var err error
@@ -2940,8 +2941,6 @@ func (this *TradeCommonController) ExportMtjhList() {
 			}
 		}
 	} else {
-		indexCode := this.GetString("IndexCode") //指标唯一编码
-
 		sheet, err := xlsxFile.AddSheet("指标")
 		if err != nil {
 			br.Msg = "新增Sheet失败"