|
|
@ -10,7 +10,7 @@ class ProjectPackages::WinBiddingService
|
|
|
|
|
|
|
|
|
|
|
|
def call
|
|
|
|
def call
|
|
|
|
raise Error, '竞标报名还未结束' unless package.bidding_end?
|
|
|
|
raise Error, '竞标报名还未结束' unless package.bidding_end?
|
|
|
|
raise Error, '该状态下不能选择中标者' unless package.can_finish_bidding?
|
|
|
|
raise Error, '该状态下不能选择中标者' unless package.may_finish_bidding?
|
|
|
|
|
|
|
|
|
|
|
|
win_user_ids = Array.wrap(params[:user_ids]).compact.map(&:to_i)
|
|
|
|
win_user_ids = Array.wrap(params[:user_ids]).compact.map(&:to_i)
|
|
|
|
bidding_user_ids = package.bidding_users.pluck(:user_id)
|
|
|
|
bidding_user_ids = package.bidding_users.pluck(:user_id)
|
|
|
|