before adding users

This commit is contained in:
Jason Jordan
2026-04-20 12:12:52 -04:00
parent 7ab1143db8
commit 1d9025276d
21 changed files with 286 additions and 185 deletions
@@ -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|