更新修复投标决策

This commit is contained in:
yaooo 2023-12-11 15:09:56 +08:00
parent 6ba7bb636f
commit eac4d8c755

View File

@ -41,23 +41,23 @@ class BidBiddingDecisionLogic extends BaseLogic
Db::startTrans(); Db::startTrans();
try { try {
BidBiddingDecision::create([ BidBiddingDecision::create([
'project_id' => $params['project_id'], 'project_id' => $params['project_id'] ?? 0,
'approve_id' => $params['approve_id'], 'approve_id' => $params['approve_id'] ?? 0,
'project_estimation' => $params['project_estimation'], 'project_estimation' => $params['project_estimation'] ?? 0,
'bidding_project_fund_source' => $params['bidding_project_fund_source'], 'bidding_project_fund_source' => $params['bidding_project_fund_source'] ?? 0,
'bidding_time' => strtotime($params['bidding_time']), 'bidding_time' => strtotime($params['bidding_time']),
'buy_bid_document_date' => strtotime($params['buy_bid_document_date']), 'buy_bid_document_date' => strtotime($params['buy_bid_document_date']),
'bid_type' => $params['bid_type'], 'bid_type' => $params['bid_type'] ?? 0,
'competitor' => $params['competitor'], 'competitor' => $params['competitor'] ?? '',
'is_margin' => $params['is_margin'], 'is_margin' => $params['is_margin'] ?? 0,
'margin_amount' => $params['margin_amount'], 'margin_amount' => $params['margin_amount'] ?? 0,
'bid_opening_date' => strtotime($params['bid_opening_date']), 'bid_opening_date' => strtotime($params['bid_opening_date']),
'margin_amount_return_date' => strtotime($params['margin_amount_return_date']), 'margin_amount_return_date' => strtotime($params['margin_amount_return_date']),
'is_internal_resources' => $params['is_internal_resources'], 'is_internal_resources' => $params['is_internal_resources'] ?? 0,
'project_assurance' => $params['project_assurance'], 'project_assurance' => $params['project_assurance'] ?? 0,
'bid_project_overview' => $params['bid_project_overview'], 'bid_project_overview' => $params['bid_project_overview'] ?? '',
'project_desc' => $params['project_desc'], 'project_desc' => $params['project_desc'] ?? '',
'annex' => $params['annex'] 'annex' => $params['annex'] ?? '',
]); ]);
Db::commit(); Db::commit();
@ -82,23 +82,23 @@ class BidBiddingDecisionLogic extends BaseLogic
Db::startTrans(); Db::startTrans();
try { try {
BidBiddingDecision::where('id', $params['id'])->update([ BidBiddingDecision::where('id', $params['id'])->update([
'project_id' => $params['project_id'], 'project_id' => $params['project_id'] ?? 0,
'approve_id' => $params['approve_id'], 'approve_id' => $params['approve_id'] ?? 0,
'project_estimation' => $params['project_estimation'], 'project_estimation' => $params['project_estimation'] ?? 0,
'bidding_project_fund_source' => $params['bidding_project_fund_source'], 'bidding_project_fund_source' => $params['bidding_project_fund_source'] ?? 0,
'bidding_time' => strtotime($params['bidding_time']), 'bidding_time' => strtotime($params['bidding_time']),
'buy_bid_document_date' => strtotime($params['buy_bid_document_date']), 'buy_bid_document_date' => strtotime($params['buy_bid_document_date']),
'bid_type' => $params['bid_type'], 'bid_type' => $params['bid_type'] ?? 0,
'competitor' => $params['competitor'], 'competitor' => $params['competitor'] ?? '',
'is_margin' => $params['is_margin'], 'is_margin' => $params['is_margin'] ?? 0,
'margin_amount' => $params['margin_amount'], 'margin_amount' => $params['margin_amount'] ?? 0,
'bid_opening_date' => strtotime($params['bid_opening_date']), 'bid_opening_date' => strtotime($params['bid_opening_date']),
'margin_amount_return_date' => strtotime($params['margin_amount_return_date']), 'margin_amount_return_date' => strtotime($params['margin_amount_return_date']),
'is_internal_resources' => $params['is_internal_resources'], 'is_internal_resources' => $params['is_internal_resources'] ?? 0,
'project_assurance' => $params['project_assurance'], 'project_assurance' => $params['project_assurance'] ?? 0,
'bid_project_overview' => $params['bid_project_overview'], 'bid_project_overview' => $params['bid_project_overview'] ?? '',
'project_desc' => $params['project_desc'], 'project_desc' => $params['project_desc'] ?? '',
'annex' => $params['annex'] 'annex' => $params['annex'] ?? '',
]); ]);
Db::commit(); Db::commit();