Browse Source

分类外层查不到数据问题

xyxie 3 weeks ago
parent
commit
6f55d9773f

+ 5 - 5
controllers/hisugar_data.go

@@ -674,14 +674,14 @@ func (this *TradeCommonController) HisugarExporthisugarList() {
 	}
 	if req.IsSelectedAll {
 		if len(req.IndexCode) > 0 {
-			//condition += ` AND index_code NOT IN (` + utils.GetOrmInReplace(len(req.IndexCode)) + `)`
-			condition += ` AND index_code NOT IN ? `
+			condition += ` AND index_code NOT IN (` + utils.GetOrmInReplace(len(req.IndexCode)) + `)`
+			//condition += ` AND index_code NOT IN ? `
 			pars = append(pars, req.IndexCode)
 		}
 	} else {
 		if len(req.IndexCode) > 0 {
-			//condition += ` AND index_code IN (` + utils.GetOrmInReplace(len(req.IndexCode)) + `)`
-			condition += ` AND index_code IN ?`
+			condition += ` AND index_code IN (` + utils.GetOrmInReplace(len(req.IndexCode)) + `)`
+			//condition += ` AND index_code IN ?`
 			pars = append(pars, req.IndexCode)
 		}
 	}
@@ -694,7 +694,7 @@ func (this *TradeCommonController) HisugarExporthisugarList() {
 		}
 		if classifyIds != "" {
 			//condition += ` AND classify_id IN (` + classifyIds + `)`
-			condition += ` AND classify_id IN ?`
+			condition += ` AND classify_id IN (?)`
 			pars = append(pars, classifyIds)
 		}
 	}

+ 1 - 1
models/data_manage/base_from_fenwei.go

@@ -160,7 +160,7 @@ func (b *BaseFromFenweiData) AfterFind(tx *gorm.DB) (err error) {
 	if utils.NeedDateOrTimeFormat(utils.DbDriverName) {
 		b.CreateTime = utils.GormDateStrToDateTimeStr(b.CreateTime)
 		b.ModifyTime = utils.GormDateStrToDateTimeStr(b.ModifyTime)
-		b.DataTime = utils.GormDateStrToDateTimeStr(b.DataTime)
+		b.DataTime = utils.GormDateStrToDateStr(b.DataTime)
 	}
 	return
 }

+ 1 - 1
services/data/base_from_rzd_index_service.go

@@ -29,7 +29,7 @@ func RzdIndexData(classifyId int, frequency string, currentIndex, startSize, pag
 		}
 
 		condition += ` AND base_from_rzd_classify_id in (` + utils.GetOrmInReplace(len(classifyIdList)) + `)`
-		pars = append(pars, interfaceClassifyIdList...)
+		pars = append(pars, interfaceClassifyIdList)
 	}
 
 	if frequency != "" {

+ 2 - 6
services/document_manage_service/document_manage_service.go

@@ -145,15 +145,11 @@ func DocumentReportList(documentType int, chartPermissionIdList []string, classi
 			}
 		}
 		condition += ` and t1.classify_id in (` + utils.GetOrmInReplace(len(classifyIdList)) + `)`
-		for _, classifyId := range classifyIdList {
-			pars = append(pars, classifyId)
-		}
+		pars = append(pars, classifyIdList)
 	}
 	if len(chartPermissionIdList) > 0 {
 		condition += ` and t2.chart_permission_id in (` + utils.GetOrmInReplace(len(chartPermissionIdList)) + `)`
-		for _, chartPermissionId := range chartPermissionIdList {
-			pars = append(pars, chartPermissionId)
-		}
+		pars = append(pars, chartPermissionIdList)
 	}
 	if keyword != "" {
 		condition += ` and (t1.title like ? or t1.sys_user_name like ?) `