|
@@ -7,6 +7,7 @@ import (
|
|
"hongze/hongze_yb/models/response/pc"
|
|
"hongze/hongze_yb/models/response/pc"
|
|
"hongze/hongze_yb/models/tables/company_product"
|
|
"hongze/hongze_yb/models/tables/company_product"
|
|
"hongze/hongze_yb/models/tables/rddp/classify"
|
|
"hongze/hongze_yb/models/tables/rddp/classify"
|
|
|
|
+ "hongze/hongze_yb/services/company"
|
|
"hongze/hongze_yb/services/user"
|
|
"hongze/hongze_yb/services/user"
|
|
"hongze/hongze_yb/utils"
|
|
"hongze/hongze_yb/utils"
|
|
"sort"
|
|
"sort"
|
|
@@ -96,12 +97,45 @@ func GetClassifyFirstList(user user.UserInfo) (resp pc.ClassifyFirstList, err er
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ var validPermissionIdList []int
|
|
|
|
+
|
|
|
|
+ if productAuthOk {
|
|
|
|
+ validPermissionIdList, err = company.GetValidPermissionIdListByCompany2ProductId(user.CompanyID, 1)
|
|
|
|
+ if err != nil && err != utils.ErrNoRow {
|
|
|
|
+ errMsg = err.Error()
|
|
|
|
+ err = errors.New("查询分类出错")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
for _, item := range list {
|
|
for _, item := range list {
|
|
|
|
|
|
if item.RedirectType == 4 && !productAuthOk{
|
|
if item.RedirectType == 4 && !productAuthOk{
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ if len(validPermissionIdList) == 1 && validPermissionIdList[0] == 1 && item.RedirectType == 4{
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+
|
|
for _, report := range reportList {
|
|
for _, report := range reportList {
|
|
if report.ClassifyNameFirst == item.ClassifyNameFirst {
|
|
if report.ClassifyNameFirst == item.ClassifyNameFirst {
|
|
item.Latest = report.Stage
|
|
item.Latest = report.Stage
|