浏览代码

Merge branch 'refs/heads/eta_2.0.8_ly_0804@guomengyuan' into debug

gmy 8 月之前
父节点
当前提交
a6be53143f
共有 1 个文件被更改,包括 7 次插入11 次删除
  1. 7 11
      controllers/data_manage/base_from_ly_index_controller.go

+ 7 - 11
controllers/data_manage/base_from_ly_index_controller.go

@@ -358,7 +358,8 @@ func (this *BaseFromLyIndexController) LyIndexAdd() {
 // LyIndexDataExport
 // @Title 导出指标数据
 // @Description 导出指标数据
-// @Param  IndexCodes     query   string     true        "指标编码"
+// @Param  IndexCode     query   string     false        "指标编码"
+// @Param  ClassifyId     query   int     false        "分类ID"
 // @Success 200 string "操作成功"
 // @router /ly/index/data/export [get]
 func (this *BaseFromLyIndexController) LyIndexDataExport() {
@@ -376,11 +377,6 @@ func (this *BaseFromLyIndexController) LyIndexDataExport() {
 	classifyId, _ := this.GetInt("ClassifyId") //分类
 	indexCode := this.GetString("IndexCode")   //指标唯一编码
 
-	if classifyId <= 0 {
-		br.Msg = "请选择分类"
-		return
-	}
-
 	//userId := sysUser.AdminId
 	//超管账号可以查看分类下的所有频度数据
 	/*if sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_ADMIN {
@@ -430,11 +426,6 @@ func (this *BaseFromLyIndexController) LyIndexDataExport() {
 		if err != nil {
 			return
 		}
-
-		if indexCode != "" {
-			fileName = lyIndices[0].IndexName
-		}
-
 		var sheet *xlsx.Sheet
 		if len(lyIndices) > 0 {
 			sheet, err = xlsxFile.AddSheet(*frequency)
@@ -446,6 +437,11 @@ func (this *BaseFromLyIndexController) LyIndexDataExport() {
 		} else {
 			continue
 		}
+
+		if indexCode != "" {
+			fileName = lyIndices[0].IndexName
+		}
+
 		//获取指标数据
 		rowSecName := sheet.AddRow()
 		celSecName := rowSecName.AddCell()