|
@@ -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()
|