|
@@ -88,7 +88,7 @@ func formatExcelInfo2Detail(excelInfo *excel.ExcelInfo, sysUserId int) (excelDet
|
|
|
}
|
|
|
|
|
|
switch excelInfo.Source {
|
|
|
- case utils.TIME_TABLE: // 自定义表格
|
|
|
+ case utils.TIME_TABLE: // 时间序列表格
|
|
|
var tableDataConfig TableDataConfig
|
|
|
err = json.Unmarshal([]byte(excelDetail.Content), &tableDataConfig)
|
|
|
if err != nil {
|
|
@@ -100,6 +100,39 @@ func formatExcelInfo2Detail(excelInfo *excel.ExcelInfo, sysUserId int) (excelDet
|
|
|
err = errors.New("获取最新的表格数据失败,Err:" + tmpErr.Error())
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ if len(result.EdbInfoIdList) > 0 {
|
|
|
+ classifyIdList := make([]int, 0)
|
|
|
+ for _, v := range result.Data {
|
|
|
+ classifyIdList = append(classifyIdList, v.ClassifyId)
|
|
|
+ }
|
|
|
+
|
|
|
+ classifyMap := make(map[int]*data_manage.EdbClassify)
|
|
|
+
|
|
|
+ classifyList, tmpErr := data_manage.GetEdbClassifyByIdList(classifyIdList)
|
|
|
+ if tmpErr != nil {
|
|
|
+ err = errors.New("获取分类列表失败,Err:" + tmpErr.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ for _, v := range classifyList {
|
|
|
+ classifyMap[v.ClassifyId] = v
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取所有有权限的指标和分类
|
|
|
+ permissionEdbIdList, permissionClassifyIdList, tmpErr := data_manage_permission.GetUserEdbAndClassifyPermissionList(sysUserId, 0, 0)
|
|
|
+ if err != nil {
|
|
|
+ err = errors.New("获取所有有权限的指标和分类失败,Err:" + tmpErr.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ for i, v := range result.Data {
|
|
|
+ if currClassify, ok := classifyMap[v.ClassifyId]; ok {
|
|
|
+ result.Data[i].HaveOperaAuth = data_manage_permission.CheckEdbPermissionByPermissionIdList(v.IsJoinPermission, currClassify.IsJoinPermission, v.EdbInfoId, v.ClassifyId, permissionEdbIdList, permissionClassifyIdList)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
excelDetail.TableData = result
|
|
|
case utils.MIXED_TABLE: // 混合表格
|
|
|
var result request.MixedTableReq
|
|
@@ -782,6 +815,8 @@ func GetDataByTableDataConfig(tableDataConfig TableDataConfig) (resultResp reque
|
|
|
tmpEdbInfoData.EdbName = edbInfo.EdbName
|
|
|
tmpEdbInfoData.Frequency = edbInfo.Frequency
|
|
|
tmpEdbInfoData.Unit = edbInfo.Unit
|
|
|
+ tmpEdbInfoData.ClassifyId = edbInfo.ClassifyId
|
|
|
+ tmpEdbInfoData.IsJoinPermission = edbInfo.IsJoinPermission
|
|
|
}
|
|
|
|
|
|
for index, dateTime := range sortDateTimeList {
|