zwxi 1 жил өмнө
parent
commit
8b3e5e35db

+ 6 - 0
controllers/company.go

@@ -456,6 +456,7 @@ func (this *CompanyController) List() {
 	address := this.GetString("Address")
 	province := this.GetString("Province")
 	city := this.GetString("City")
+	regionType := this.GetString("RegionType")
 	keyWord = strings.Trim(keyWord, " ")
 	keyWord = strings.Replace(keyWord, "'", "", -1)
 	todoStatus := this.GetString("TodoStatus")      //任务状态
@@ -574,6 +575,11 @@ func (this *CompanyController) List() {
 		condition += ` AND a.city IN (` + citySql + `) `
 	}
 
+	if regionType != "" {
+		condition += ` AND a.region_type =? `
+		pars = append(pars, regionType)
+	}
+
 	if keyWord != "" {
 		companyIdStr, err := company.GetCompanyIdByKeyWord(keyWord)
 		if err != nil {

+ 7 - 0
controllers/english_report/english_company.go

@@ -58,6 +58,7 @@ func (this *EnglishCompanyController) List() {
 	sortType, _ := this.GetInt("SortType", 0)
 	sortParam := this.GetString("SortParam", "")
 	strPermissionIds := this.GetString("EnPermissionIds", "")
+	sellers := this.GetString("Sellers", "")
 
 	var cond, order string
 	var pars []interface{}
@@ -84,6 +85,12 @@ func (this *EnglishCompanyController) List() {
 		cond += fmt.Sprintf(` AND c.company_id IN (%s) `, utils.GetOrmInReplace(len(companyIds)))
 		pars = append(pars, companyIds)
 	}
+
+	if sellers != "" {
+		sellerIds := strings.Split(sellers, ",")
+		cond += fmt.Sprintf(` AND c.seller_id IN (%s) `, utils.GetOrmInReplace(len(sellerIds)))
+		pars = append(pars, sellerIds)
+	}
 	// 品种权限
 	if strPermissionIds != "" {
 		permissionIdArr := strings.Split(strPermissionIds, ",")