|
@@ -555,7 +555,7 @@ func (this *BIDaShboardController) PublicList() {
|
|
|
resp := make([]*bi_dashboard.RespPublicGroupListItem, 0)
|
|
|
// 获取公共看板列表
|
|
|
publicCond := ` AND state = 6 AND bi_dashboard_classify_id > 0 `
|
|
|
- publicPars := []interface{}{this.SysUser.AdminId}
|
|
|
+ publicPars := make([]interface{}, 0)
|
|
|
publicList, err := bi_dashboard.GetBiDashboardList(publicCond, publicPars)
|
|
|
if err != nil {
|
|
|
err = errors.New("我的看板列表查询出错:" + err.Error())
|
|
@@ -686,6 +686,16 @@ func (this *BIDaShboardController) AddDashboardClassify() {
|
|
|
br.ErrMsg = "获取最大排序值失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ count, err := bi_dashboard.GetBiDashboardClassifyByName(req.ClassifyName)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取分类名称失败"
|
|
|
+ br.ErrMsg = "获取分类名称失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if count > 0 {
|
|
|
+ br.Msg = "分类名称已存在"
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
item := &bi_dashboard.BiDashboardClassify{
|
|
|
BiDashboardClassifyName: req.ClassifyName,
|
|
@@ -785,6 +795,20 @@ func (this *BIDaShboardController) DelDashboardClassify() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ publicCond := ` AND state = 6 AND bi_dashboard_classify_id = ? `
|
|
|
+ publicPars := make([]interface{}, 0)
|
|
|
+ publicPars = append(publicPars, req.BiDashboardClassifyId)
|
|
|
+ publicList, err := bi_dashboard.GetBiDashboardList(publicCond, publicPars)
|
|
|
+ if err != nil {
|
|
|
+ err = errors.New("我的看板列表查询出错:" + err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(publicList) > 0 {
|
|
|
+ br.Msg = "该分类下有关联看板,无法删除"
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
err = bi_dashboard.DelBiDashboardClassify(req.BiDashboardClassifyId)
|
|
|
if err != nil {
|
|
|
br.Msg = "编辑失败"
|