瀏覽代碼

no message

xingzai 2 年之前
父節點
當前提交
75b45cc9bb
共有 1 個文件被更改,包括 13 次插入13 次删除
  1. 13 13
      controllers/report.go

+ 13 - 13
controllers/report.go

@@ -540,11 +540,23 @@ func (this *MobileReportController) List() {
 		//	br.ErrMsg = "获取信息失败,Err:" + errCategory.Error() + "categoryID 不存在:" + strconv.Itoa(categoryId)
 		//	return
 		//}
+		//fmt.Println(detail.PolymerizationId)
 		if detail.PolymerizationId != "" {
 			condition = ` AND category_id IN(` + detail.PolymerizationId + `)`
 		} else {
+			categoryIdSet, errCategory := models.GetdetailByCategoryIdSet(categoryId)
+			if errCategory != nil {
+				br.Msg = "获取信息失败"
+				br.ErrMsg = "获取信息失败,Err:" + errCategory.Error() + "categoryID 不存在:" + strconv.Itoa(categoryId)
+				return
+			}
+			if categoryIdSet != "" {
+				condition = ` AND category_id IN(` + categoryIdSet + `)`
+			} else {
+				condition = ` AND category_id IN(` + strconv.Itoa(categoryId) + `)`
+			}
 			//condition = ` AND category_id IN(` + strconv.Itoa(categoryId) + `)`
-			condition = ` AND match_type_name  = '` + detail.MatchTypeName + `'`
+			//condition = ` AND match_type_name  = '` + detail.MatchTypeName + `'`
 		}
 
 		if industrialManagementId > 0 {
@@ -562,18 +574,6 @@ func (this *MobileReportController) List() {
 			pars = append(pars, articleIdList)
 		}
 
-		categoryIdSet, errCategory := models.GetdetailByCategoryIdSet(categoryId)
-		if errCategory != nil {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "获取信息失败,Err:" + errCategory.Error() + "categoryID 不存在:" + strconv.Itoa(categoryId)
-			return
-		}
-		if categoryIdSet != "" {
-			condition = ` AND category_id IN(` + categoryIdSet + `)`
-		} else {
-			condition = ` AND category_id IN(` + strconv.Itoa(categoryId) + `)`
-		}
-
 		total, err = models.GetHomeCount(condition, pars)
 		if err != nil {
 			br.Msg = "获取信息失败"