before adding users
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
module AutomationService
|
||||
class BatchEmployerUpdate
|
||||
|
||||
def initialize(pl_plan_keys)
|
||||
def initialize(pl_plan_keys = nil)
|
||||
@pl_plan_keys = pl_plan_keys
|
||||
end
|
||||
|
||||
def call
|
||||
sql_query = "SELECT PLPlanKey, PlanId, ShortDesc FROM PLPlanHeader
|
||||
WHERE ActiveInactive = 'Active' AND PLPlanKey IN (#{@pl_plan_keys.join(',')})"
|
||||
WHERE ActiveInactive = 'Active'"
|
||||
if @pl_plan_keys.present?
|
||||
sql_query = sql_query.concat(" AND PLPlanKey IN (#{@pl_plan_keys.join(',')})")
|
||||
end
|
||||
employer_plan_headers = VhcsRecord.connection.select_all(sql_query)
|
||||
|
||||
employer_update_futures = employer_plan_headers.map do |employer_plan_header|
|
||||
|
||||
Reference in New Issue
Block a user