|
@@ -20,6 +20,7 @@ type ExcelClassifyController struct {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
func (this *ExcelClassifyController) List() {
|
|
@@ -29,8 +30,13 @@ func (this *ExcelClassifyController) List() {
|
|
|
this.ServeJSON()
|
|
|
}()
|
|
|
|
|
|
+ source, _ := this.GetInt("Source")
|
|
|
+ if source <= 0 {
|
|
|
+ source = utils.EXCEL_DEFAULT
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- rootList, err := data_manage.GetExcelClassifyByParentId(0)
|
|
|
+ rootList, err := data_manage.GetExcelClassifyByParentId(0, source)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
@@ -82,6 +88,7 @@ func (this *ExcelClassifyController) List() {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
func (this *ExcelClassifyController) ExcelClassifyItems() {
|
|
@@ -90,7 +97,12 @@ func (this *ExcelClassifyController) ExcelClassifyItems() {
|
|
|
this.Data["json"] = br
|
|
|
this.ServeJSON()
|
|
|
}()
|
|
|
- rootList, err := data_manage.GetExcelClassifyByParentId(0)
|
|
|
+
|
|
|
+ source, _ := this.GetInt("Source")
|
|
|
+ if source <= 0 {
|
|
|
+ source = utils.EXCEL_DEFAULT
|
|
|
+ }
|
|
|
+ rootList, err := data_manage.GetExcelClassifyByParentId(0, source)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
@@ -135,8 +147,13 @@ func (this *ExcelClassifyController) AddExcelClassify() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ source := req.Source
|
|
|
+ if source <= 0 {
|
|
|
+ source = utils.EXCEL_DEFAULT
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- count, err := data_manage.GetExcelClassifyCount(req.ExcelClassifyName, req.ParentId)
|
|
|
+ count, err := data_manage.GetExcelClassifyCount(req.ExcelClassifyName, req.ParentId, source)
|
|
|
if err != nil {
|
|
|
br.Msg = "判断名称是否已存在失败"
|
|
|
br.ErrMsg = "判断名称是否已存在失败,Err:" + err.Error()
|
|
@@ -222,7 +239,7 @@ func (this *ExcelClassifyController) EditExcelClassify() {
|
|
|
}
|
|
|
|
|
|
|
|
|
- count, err := data_manage.GetExcelClassifyCount(req.ExcelClassifyName, item.ParentId)
|
|
|
+ count, err := data_manage.GetExcelClassifyCount(req.ExcelClassifyName, item.ParentId, item.Source)
|
|
|
if err != nil {
|
|
|
br.Msg = "判断名称是否已存在失败"
|
|
|
br.ErrMsg = "判断名称是否已存在失败,Err:" + err.Error()
|
|
@@ -463,30 +480,7 @@ func (this *ExcelClassifyController) DeleteExcelClassify() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- nextItem, err = data_manage.GetNextExcelInfo(excelInfo.ExcelClassifyId, currClassifyInfo.Sort)
|
|
|
+ nextItem, err = data_manage.GetNextExcelInfo(excelInfo.ExcelClassifyId, currClassifyInfo.Sort, currClassifyInfo.Source)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "删除失败"
|
|
|
br.ErrMsg = "获取下一级表格信息失败,Err:" + err.Error()
|