更新修复投标决策

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