|
@@ -690,6 +690,10 @@ func (c *EdbInfoController) SaveRelationEdbRefreshStatus() {
|
|
// todo 批量设置刷新状态修改
|
|
// todo 批量设置刷新状态修改
|
|
edbIdList := make([]int, 0)
|
|
edbIdList := make([]int, 0)
|
|
edbCodeList := make([]string, 0)
|
|
edbCodeList := make([]string, 0)
|
|
|
|
+ isStop := 0
|
|
|
|
+ if req.ModifyStatus == `暂停` {
|
|
|
|
+ isStop = 1
|
|
|
|
+ }
|
|
// 指标id列表
|
|
// 指标id列表
|
|
if req.IsSelectAll {
|
|
if req.IsSelectAll {
|
|
// 如果是列表全选
|
|
// 如果是列表全选
|
|
@@ -712,7 +716,7 @@ func (c *EdbInfoController) SaveRelationEdbRefreshStatus() {
|
|
if ok {
|
|
if ok {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
- if v.RelationNum > 0 && v.IsSupplierStop == 0 {
|
|
|
|
|
|
+ if v.RelationNum > 0 && v.IsSupplierStop == 0 && isStop==1{
|
|
br.Msg = "保存失败,停用指标已被引用,指标ID:" + v.EdbCode + "指标名称:" + v.EdbName
|
|
br.Msg = "保存失败,停用指标已被引用,指标ID:" + v.EdbCode + "指标名称:" + v.EdbName
|
|
br.ErrMsg = "保存失败,停用指标已被引用,指标ID:" + v.EdbCode + "指标名称:" + v.EdbName
|
|
br.ErrMsg = "保存失败,停用指标已被引用,指标ID:" + v.EdbCode + "指标名称:" + v.EdbName
|
|
return
|
|
return
|
|
@@ -729,7 +733,7 @@ func (c *EdbInfoController) SaveRelationEdbRefreshStatus() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
for _, v := range edbRelationList {
|
|
for _, v := range edbRelationList {
|
|
- if v.RelationNum > 0 && v.IsSupplierStop == 0 {
|
|
|
|
|
|
+ if v.RelationNum > 0 && v.IsSupplierStop == 0 && isStop==1{
|
|
br.Msg = "保存失败,停用指标已被引用,指标ID:" + v.EdbCode + "指标名称:" + v.EdbName
|
|
br.Msg = "保存失败,停用指标已被引用,指标ID:" + v.EdbCode + "指标名称:" + v.EdbName
|
|
br.ErrMsg = "保存失败,停用指标已被引用,指标ID:" + v.EdbCode + "指标名称:" + v.EdbName
|
|
br.ErrMsg = "保存失败,停用指标已被引用,指标ID:" + v.EdbCode + "指标名称:" + v.EdbName
|
|
return
|
|
return
|
|
@@ -801,11 +805,6 @@ func (c *EdbInfoController) SaveRelationEdbRefreshStatus() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- isStop := 0
|
|
|
|
- if req.ModifyStatus == `暂停` {
|
|
|
|
- isStop = 1
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// 查询计算指标ID
|
|
// 查询计算指标ID
|
|
// 查询相关的计算指标
|
|
// 查询相关的计算指标
|
|
calculateEdbIdList := make([]int, 0)
|
|
calculateEdbIdList := make([]int, 0)
|