zwxi 1 year ago
parent
commit
7d2eef2b9d
2 changed files with 12 additions and 0 deletions
  1. 6 0
      controllers/company.go
  2. 6 0
      controllers/english_report/english_company.go

+ 6 - 0
controllers/company.go

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

+ 6 - 0
controllers/english_report/english_company.go

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