diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index e5f4f8b4..8f3a2b53 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -891,7 +891,7 @@ class AccountController < ApplicationController @user = User.current @se = @user.extensions # 已授权的用户修改单位名称,需要重新授权 - if @se.school_id != params[:occupation].to_i && @user.certification == 1 + if (@se.school_id != params[:occupation].to_i || @se.identity != params[:identity].to_i) && @user.certification == 1 @user.certification = 0 apply_user = ApplyAction.where(:user_id => @user.id, :container_type => "TrialAuthorization") apply_user.update_all(:status => 2) unless apply_user.blank? diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 599e8da4..7a8e6495 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -3194,15 +3194,17 @@ end def trial_authorization @menu_type =10 @sub_type = 2 - search = params[:search] + name_search = params[:search] @status = trial_authorization_status(params[:status]) # @status = (params[:status].blank? || params[:status] == "0") ? 0 : [1,2] user_id = [] search = false @authorizations = ApplyAction.where(:container_type => "TrialAuthorization", :status => @status) - unless search.blank? - user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{search}%'").map(&:id) + unless name_search.blank? + new_user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{name_search}%'").map(&:id) + user_id = user_id.size == 0 ? new_user_id : user_id & new_user_id + search = true end if params[:sname] && params[:sname].strip != '' diff --git a/app/views/account/_pro_certification_form.html.erb b/app/views/account/_pro_certification_form.html.erb index 962843f7..8c5552af 100644 --- a/app/views/account/_pro_certification_form.html.erb +++ b/app/views/account/_pro_certification_form.html.erb @@ -10,6 +10,9 @@