|
@@ -2249,7 +2249,15 @@ func (this *EdbInfoController) EdbInfoList() {
|
|
edbInfoItem.FrequencyEn = data.GetFrequencyEn(edbInfoItem.Frequency)
|
|
edbInfoItem.FrequencyEn = data.GetFrequencyEn(edbInfoItem.Frequency)
|
|
// 获取是否供应商停更
|
|
// 获取是否供应商停更
|
|
edbInfoItem.IsSupplierStop = data.GetIsSupplierStop(edbInfoItem.Source, edbInfoItem.EdbCode)
|
|
edbInfoItem.IsSupplierStop = data.GetIsSupplierStop(edbInfoItem.Source, edbInfoItem.EdbCode)
|
|
-
|
|
|
|
|
|
+ relation, err := data.GetEdbRelationListById(edbInfoItem.EdbInfoId, edbInfoItem.Source)
|
|
|
|
+ if err != nil && !utils.IsErrNoRow(err) {
|
|
|
|
+ br.Msg = "获取指标引用信息失败"
|
|
|
|
+ br.ErrMsg = "获取指标引用信息失败,Err:" + err.Error()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if relation != nil && relation.RelationNum > 0 {
|
|
|
|
+ edbInfoItem.IsRelation = true
|
|
|
|
+ }
|
|
//查询目录
|
|
//查询目录
|
|
classifyList, err, errMsg := data.GetFullClassifyByClassifyId(edbInfoItem.ClassifyId)
|
|
classifyList, err, errMsg := data.GetFullClassifyByClassifyId(edbInfoItem.ClassifyId)
|
|
if err != nil {
|
|
if err != nil {
|
|
@@ -2997,7 +3005,7 @@ func (this *EdbInfoController) EdbInfoRefresh() {
|
|
br.ErrMsg = "参数错误"
|
|
br.ErrMsg = "参数错误"
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- _, err := data_manage.GetEdbInfoById(edbInfoId)
|
|
|
|
|
|
+ edbInfo, err := data_manage.GetEdbInfoById(edbInfoId)
|
|
if err != nil {
|
|
if err != nil {
|
|
if utils.IsErrNoRow(err) {
|
|
if utils.IsErrNoRow(err) {
|
|
br.Msg = "数据已被删除,请刷新页面"
|
|
br.Msg = "数据已被删除,请刷新页面"
|
|
@@ -3008,6 +3016,11 @@ func (this *EdbInfoController) EdbInfoRefresh() {
|
|
br.ErrMsg = "获取指标信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取指标信息失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if edbInfo.NoUpdate == 1 {
|
|
|
|
+ br.Msg = "该指标已停用"
|
|
|
|
+ br.ErrMsg = "该指标已停用,edbCode:" + edbInfo.EdbCode
|
|
|
|
+ return
|
|
|
|
+ }
|
|
err, isAsync := data.EdbInfoRefreshAllFromBaseV2(edbInfoId, false, false)
|
|
err, isAsync := data.EdbInfoRefreshAllFromBaseV2(edbInfoId, false, false)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "刷新失败"
|
|
br.Msg = "刷新失败"
|
|
@@ -3899,7 +3912,16 @@ func (this *ChartInfoController) EdbInfoData() {
|
|
fullEdb.EdbInfo = edbInfo
|
|
fullEdb.EdbInfo = edbInfo
|
|
// 是否供应商停更
|
|
// 是否供应商停更
|
|
fullEdb.IsSupplierStop = data.GetIsSupplierStop(edbInfo.Source, edbInfo.EdbCode)
|
|
fullEdb.IsSupplierStop = data.GetIsSupplierStop(edbInfo.Source, edbInfo.EdbCode)
|
|
-
|
|
|
|
|
|
+ //是否被引用
|
|
|
|
+ relation, err := data.GetEdbRelationListById(edbInfo.EdbInfoId, edbInfo.Source)
|
|
|
|
+ if err != nil && !utils.IsErrNoRow(err) {
|
|
|
|
+ br.Msg = err.Error()
|
|
|
|
+ br.ErrMsg = "获取指标关联关系失败,err:" + err.Error()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if relation != nil && relation.RelationNum > 0 {
|
|
|
|
+ fullEdb.IsRelation = true
|
|
|
|
+ }
|
|
fullEdb.ClassifyList = classifyList
|
|
fullEdb.ClassifyList = classifyList
|
|
|
|
|
|
var currClassifyItem *data_manage.EdbClassifyIdItems
|
|
var currClassifyItem *data_manage.EdbClassifyIdItems
|
|
@@ -5660,9 +5682,18 @@ func (this *EdbInfoController) EdbChartList() {
|
|
v.IsSupplierStop = 1
|
|
v.IsSupplierStop = 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ var relation *data_manage.BaseRelationEdbInfo
|
|
|
|
+ relation, err = data.GetEdbRelationListById(v.EdbInfoId, v.Source)
|
|
|
|
+ if err != nil && !utils.IsErrNoRow(err) {
|
|
|
|
+ br.Msg = "获取失败"
|
|
|
|
+ br.ErrMsg = "获取数据引用信息失败,Err:" + e.Error()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if relation != nil && relation.RelationNum > 0 {
|
|
|
|
+ v.IsRelation = true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
page = paging.GetPaging(currentIndex, pageSize, int(dataCount))
|
|
page = paging.GetPaging(currentIndex, pageSize, int(dataCount))
|
|
}
|
|
}
|
|
|
|
|